Skip to content

Commit

Permalink
Fix obvious bug introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Oct 17, 2023
1 parent 4f24986 commit 8563453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PerfCounters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ static void infallible_perf_event_enable_if_open(ScopedFd& fd) {

static void infallible_perf_event_disable_if_open(ScopedFd& fd) {
if (fd.is_open()) {
if (ioctl(fd, PERF_EVENT_IOC_ENABLE, 0)) {
if (ioctl(fd, PERF_EVENT_IOC_DISABLE, 0)) {
FATAL() << "ioctl(PERF_EVENT_IOC_ENABLE) failed";
}
}
Expand Down

0 comments on commit 8563453

Please sign in to comment.