From dcc8af5bfce1904c89bea57d1578bb2aa3ff2db6 Mon Sep 17 00:00:00 2001 From: Galaxy Date: Tue, 30 Jul 2024 13:11:10 +0000 Subject: [PATCH] update pmu/evt.cpp. Fix bug in PmuDisable: incorrect condition of ioctl. Signed-off-by: Galaxy --- pmu/evt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmu/evt.cpp b/pmu/evt.cpp index 84fdeea..f459d2a 100644 --- a/pmu/evt.cpp +++ b/pmu/evt.cpp @@ -53,7 +53,7 @@ int KUNPENG_PMU::PerfEvt::Reset() int KUNPENG_PMU::PerfEvt::Disable() { - if (ioctl(this->fd, PERF_EVENT_IOC_DISABLE, 0)) { + if (ioctl(this->fd, PERF_EVENT_IOC_DISABLE, 0) == 0) { return SUCCESS; } return LIBPERF_ERR_FAILED_PMU_DISABLE; -- Gitee