From 85634530048c87a0fff4284f61eec009df168ee1 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 17 Oct 2023 15:21:30 +1300 Subject: [PATCH] Fix obvious bug introduced by previous commit --- src/PerfCounters.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PerfCounters.cc b/src/PerfCounters.cc index 81fd94e1560..8fb715c754c 100644 --- a/src/PerfCounters.cc +++ b/src/PerfCounters.cc @@ -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"; } }