aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/arm64/util
diff options
context:
space:
mode:
authorGerman Gomez <german.gomez@arm.com>2022-02-21 17:10:42 +0000
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-02-23 07:02:23 -0300
commit521f2688c5af8442ace095815702f08c1aabcb45 (patch)
treed3f448c17cbf7359b7dcebd1646e05ca1e4c5392 /tools/perf/arch/arm64/util
parentperf data: Don't mention --to-ctf if it's not supported (diff)
downloadlinux-dev-521f2688c5af8442ace095815702f08c1aabcb45.tar.xz
linux-dev-521f2688c5af8442ace095815702f08c1aabcb45.zip
perf arm-spe: Use advertised caps/min_interval as default sample_period
When recording SPE traces, the default sample_period is currently being set to 1 in the perf_event_attr fields, instead of the value advertised in '/sys/devices/arm_spe_0/caps/min_interval': Before: $ perf record -e arm_spe// -vv -- sleep 1 [...] { sample_period, sample_freq } 1 [...] Use the value from the above sysfs location as a more sensible default (it was already being read, but the value not being used) After: $ perf record -e arm_spe// -vv -- sleep 1 [...] { sample_period, sample_freq } 1024 [...] Reviewed-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: German Gomez <german.gomez@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20220221171042.58460-1-german.gomez@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/arch/arm64/util')
-rw-r--r--tools/perf/arch/arm64/util/arm-spe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 2100d46ccf5e..5860bbaea95a 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -158,7 +158,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
return -EINVAL;
}
evsel->core.attr.freq = 0;
- evsel->core.attr.sample_period = 1;
+ evsel->core.attr.sample_period = arm_spe_pmu->default_config->sample_period;
arm_spe_evsel = evsel;
opts->full_auxtrace = true;
}