diff options
author | Ian Rogers <irogers@google.com> | 2023-09-02 02:39:48 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-09-11 16:26:36 +0300 |
commit | 727adeed06e82915841e121762eb329881ae0107 (patch) | |
tree | 27d5c0c37e830d2ae5d786b87f6e8ab088c90abd /tools/perf/util/pmu.c | |
parent | 4163644818e95ea6b0afb3982b34c4d59ed50bb2 (diff) | |
download | linux-727adeed06e82915841e121762eb329881ae0107.tar.xz |
perf parse-events: Copy fewer term lists
When trying to add events to multiple PMUs the term list is copied first
as adding the event will rewrite the event's name term into the sysfs
and/or json encoding terms (see perf_pmu__check_alias).
Change the parse events add API so the passed in term list is const,
then copy the list when modification is necessary.
Reviewed-by: James Clark <james.clark@arm.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230901233949.2930562-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/pmu.c')
0 files changed, 0 insertions, 0 deletions