perf test task_exit: No need for a cycles event to check if we get an PERF_RECORD_EXIT
Forgot to CC lkml :-\
Em Fri, Jul 14, 2023 at 03:39:22PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 46 lines
The intent of this test is to check we get a
PERF_RECORD_EXITas asked for by setting perf_event_attr.task=1.When the test was written we didn't have the "dummy" event so we went with the default event, "cycles".
There were reports of this test failing sometimes, one of these reports was with a
PREEMPT_RT_FULLkernel, but I noticed it failing sometimes on an aarch64 Firefly board.In the kernel the call to
perf_event_task_output(), that generates thePERF_RECORD_EXITmay fail when there is not enough memory in the ring buffer, if the ring buffer is paused, etc.So switch to using the "dummy" event to use the ring buffer just for what the test was designed for, avoiding uneeded
PERF_RECORD_SAMPLEs.Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Jiri Olsa <[email protected]>Cc Juri Lelli <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/tests/task-exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/perf/tests/task-exit.c +2
-2@@ -58,9 +58,9 @@ static int test__task_exit(struct test_suite *test __maybe_unused, int subtest _signal (SIGCHLD , sig_handler); - evlist =evlist__new_default (); + evlist =evlist__new_dummy ();if (evlist ==NULL ) { -pr_debug ("evlist__new_default\n" ); +pr_debug ("evlist__new_dummy\n" );return -1 ; }Signature · 1 line
2.37.1
Signature · 1 line
- Arnaldo