From c7100f75c64d357a1425140f5a0ac1de4068d97e Mon Sep 17 00:00:00 2001 From: Pierre Pebay Date: Thu, 12 Dec 2024 17:38:37 +0100 Subject: [PATCH] #2302: Improve perf metrics configuration error messages --- cmake/load_perf.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/load_perf.cmake b/cmake/load_perf.cmake index 1422890eb9..663154a924 100644 --- a/cmake/load_perf.cmake +++ b/cmake/load_perf.cmake @@ -7,7 +7,7 @@ if (vt_perf_enabled) # check if linux if (CMAKE_SYSTEM_NAME STREQUAL "Linux") # check if there's the perf header we need - INCLUDE(CheckIncludeFiles) + include(CheckIncludeFiles) CHECK_INCLUDE_FILES("linux/perf_event.h" HAVE_PERF_EVENT_H) if (HAVE_PERF_EVENT_H) # check if the kernel is recent enough @@ -26,22 +26,22 @@ if (vt_perf_enabled) set(vt_perf_enabled "1") set(vt_perf_found "1") else () - message(WARNING "Perf measurements enabled but couldn't run perf stat successfully. Disabling perf measurements.") + message(WARNING "Perf disabled: \"perf stat\" results in non-zero error code.") set(vt_perf_enabled "0") set(vt_perf_found "0") endif () else () - message(WARNING "Perf measurements enabled but Kernel major version is less than 4. Disabling perf measurements.") + message(WARNING "Perf disabled: kernel major version is less than 4.") set(vt_perf_enabled "0") set(vt_perf_found "0") endif () else () - message(WARNING "Perf measurements enabled but couldn't find perf_event.h. Disabling perf measurements.") + message(WARNING "Perf disabled: could not find \"perf_event.h\".") set(vt_perf_enabled "0") set(vt_perf_found "0") endif () else () - message(WARNING "Perf measurements enabled but system is not Linux. Disabling perf measurements.") + message(WARNING "Perf disabled: system name is not Linux.") set(vt_perf_enabled "0") set(vt_perf_found "0") endif ()