From 03183b79c3afc19efcc1d129aee31a28408e3eec Mon Sep 17 00:00:00 2001 From: Treece Burgess Date: Mon, 27 Jan 2025 00:44:27 +0000 Subject: [PATCH] Updating error message for function check_exclude_guest() in perf_event.c. --- src/components/perf_event/perf_event.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/perf_event/perf_event.c b/src/components/perf_event/perf_event.c index d2fbbfa7c..5cba9b8d9 100644 --- a/src/components/perf_event/perf_event.c +++ b/src/components/perf_event/perf_event.c @@ -289,7 +289,8 @@ check_exclude_guest( void ) ev_fd = sys_perf_event_open( &attr, 0, -1, -1, 0 ); if ( ev_fd == -1 ) { - PAPIERROR("Couldn't open hw_instructions in exclude_guest=0 test"); + PAPIERROR("Couldn't open hw_instructions in exclude_guest=0 test. " + "Set /proc/sys/kernel/perf_event_paranoid to 2 (or less) or run as root."); return; } close(ev_fd); @@ -306,7 +307,8 @@ check_exclude_guest( void ) exclude_guest_unsupported=1; } else { - PAPIERROR("Couldn't open hw_instructions in exclude_guest=1 test"); + PAPIERROR("Couldn't open hw_instructions in exclude_guest=1 test. " + "Set /proc/sys/kernel/perf_event_paranoid to 2 (or less) or run as root."); } } else { exclude_guest_unsupported=0;