Skip to content

Commit 455c988

Browse files
German Gomezacmel
authored andcommitted
perf arm-spe: Update --switch-events docs in 'perf record'
Update 'perf record' docs and ARM SPE recording options so that they are consistent. This includes supporting the --no-switch-events flag in ARM SPE as well. Reviewed-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: German Gomez <german.gomez@arm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John Garry <john.garry@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Will Deacon <will@kernel.org> Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20211111133625.193568-3-german.gomez@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 9dc9855 commit 455c988

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tools/perf/Documentation/perf-record.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ This option sets the time out limit. The default value is 500 ms.
469469

470470
--switch-events::
471471
Record context switch events i.e. events of type PERF_RECORD_SWITCH or
472-
PERF_RECORD_SWITCH_CPU_WIDE. In some cases (e.g. Intel PT or CoreSight)
472+
PERF_RECORD_SWITCH_CPU_WIDE. In some cases (e.g. Intel PT, CoreSight or Arm SPE)
473473
switch events will be enabled automatically, which can be suppressed by
474474
by the option --no-switch-events.
475475

tools/perf/arch/arm64/util/arm-spe.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,10 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
254254
if (!perf_cpu_map__empty(cpus)) {
255255
evsel__set_sample_bit(tracking_evsel, TIME);
256256
evsel__set_sample_bit(tracking_evsel, CPU);
257+
257258
/* also track task context switch */
258-
tracking_evsel->core.attr.context_switch = 1;
259+
if (!record_opts__no_switch_events(opts))
260+
tracking_evsel->core.attr.context_switch = 1;
259261
}
260262

261263
return 0;

0 commit comments

Comments
 (0)