From: Leo Yan Date: Thu, 11 Feb 2021 13:38:51 +0000 (+0200) Subject: perf arm-spe: Enable sample type PERF_SAMPLE_DATA_SRC X-Git-Tag: accepted/tizen/unified/20230118.172025~7783^2~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=845d3a65c3352fc54eaf936259cd87e40a4b0fcf;p=platform%2Fkernel%2Flinux-rpi.git perf arm-spe: Enable sample type PERF_SAMPLE_DATA_SRC This patch is to enable sample type PERF_SAMPLE_DATA_SRC for Arm SPE in the perf data, when output the tracing data, it tells tools that it contains data source in the memory event. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Al Grant Cc: Andre Przywara Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wei Li Cc: Will Deacon Link: https://lore.kernel.org/r/20210211133856.2137-1-james.clark@arm.com Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index 8901a165..b134516 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -803,7 +803,7 @@ arm_spe_synth_events(struct arm_spe *spe, struct perf_session *session) attr.type = PERF_TYPE_HARDWARE; attr.sample_type = evsel->core.attr.sample_type & PERF_SAMPLE_MASK; attr.sample_type |= PERF_SAMPLE_IP | PERF_SAMPLE_TID | - PERF_SAMPLE_PERIOD; + PERF_SAMPLE_PERIOD | PERF_SAMPLE_DATA_SRC; if (spe->timeless_decoding) attr.sample_type &= ~(u64)PERF_SAMPLE_TIME; else