Skip to content

Commit

Permalink
fix crash in pcm-latency when run as a non-root
Browse files Browse the repository at this point in the history
addresses issue reposted in #187

Change-Id: Iace49a011eab0710f8ecc492eb11eeb1341df40c
  • Loading branch information
rdementi committed Mar 4, 2020
1 parent 7220ff4 commit 14ffae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpucounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3111,7 +3111,7 @@ void PCM::cleanupUncorePMUs()

void PCM::resetPMU()
{
for (int i = 0; i < (int)num_cores; ++i)
for (int i = 0; i < (int)MSR.size(); ++i)
{
// disable all counters
MSR[i]->write(IA32_CR_PERF_GLOBAL_CTRL, 0);
Expand Down

0 comments on commit 14ffae8

Please sign in to comment.