aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/instruments/PMU.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework/instruments/PMU.cpp')
-rw-r--r--tests/framework/instruments/PMU.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/framework/instruments/PMU.cpp b/tests/framework/instruments/PMU.cpp
index 0594e96cb2..d0cacbba73 100644
--- a/tests/framework/instruments/PMU.cpp
+++ b/tests/framework/instruments/PMU.cpp
@@ -74,9 +74,10 @@ void PMU::open(const perf_event_attr &perf_config)
ARM_COMPUTE_ERROR_ON_MSG(_fd < 0, "perf_event_open failed");
const int result = ioctl(_fd, PERF_EVENT_IOC_ENABLE, 0);
-
- ARM_COMPUTE_ERROR_ON_MSG(result == -1, "Failed to enable PMU counter: %d", errno);
- ARM_COMPUTE_UNUSED(result);
+ if(result == -1)
+ {
+ ARM_COMPUTE_ERROR("Failed to enable PMU counter: %d", errno);
+ }
}
void PMU::close()
@@ -91,8 +92,10 @@ void PMU::close()
void PMU::reset()
{
const int result = ioctl(_fd, PERF_EVENT_IOC_RESET, 0);
- ARM_COMPUTE_ERROR_ON_MSG(result == -1, "Failed to reset PMU counter: %d", errno);
- ARM_COMPUTE_UNUSED(result);
+ if(result == -1)
+ {
+ ARM_COMPUTE_ERROR("Failed to reset PMU counter: %d", errno);
+ }
}
} // namespace framework
} // namespace test