Patch "perf tests: Apply attributes to all events in object code reading test" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf tests: Apply attributes to all events in object code reading test

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-tests-apply-attributes-to-all-events-in-object-.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e50e5d8bef0881fd8a468045fad48be1ae1263d7
Author: James Clark <james.clark@xxxxxxx>
Date:   Wed Apr 10 11:34:53 2024 +0100

    perf tests: Apply attributes to all events in object code reading test
    
    [ Upstream commit 2dade41a533f337447b945239b87ff31a8857890 ]
    
    PERF_PMU_CAP_EXTENDED_HW_TYPE results in multiple events being opened on
    heterogeneous systems. Currently this test only sets its required
    attributes on the first event. Not disabling enable_on_exec on the other
    events causes the test to fail because the forked objdump processes are
    sampled. No tracking event is opened so Perf only knows about its own
    mappings causing the objdump samples to give the following error:
    
      $ perf test -vvv "object code reading"
    
      Reading object code for memory address: 0xffff9aaa55ec
      thread__find_map failed
      ---- end(-1) ----
      24: Object code reading              : FAILED!
    
    Fixes: 251aa040244a3b17 ("perf parse-events: Wildcard most "numeric" events")
    Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
    Signed-off-by: James Clark <james.clark@xxxxxxx>
    Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Athira Rajeev <atrajeev@xxxxxxxxxxxxxxxxxx>
    Cc: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
    Cc: Leo Yan <leo.yan@xxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Cc: Spoorthy S <spoorts2@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240410103458.813656-3-james.clark@xxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index ed3815163d1be..ff249555ca57a 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -657,11 +657,11 @@ static int do_test_code_reading(bool try_kcore)
 
 		evlist__config(evlist, &opts, NULL);
 
-		evsel = evlist__first(evlist);
-
-		evsel->core.attr.comm = 1;
-		evsel->core.attr.disabled = 1;
-		evsel->core.attr.enable_on_exec = 0;
+		evlist__for_each_entry(evlist, evsel) {
+			evsel->core.attr.comm = 1;
+			evsel->core.attr.disabled = 1;
+			evsel->core.attr.enable_on_exec = 0;
+		}
 
 		ret = evlist__open(evlist);
 		if (ret < 0) {




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux