]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf evsel: Assign abbr name for the branch counter events
authorKan Liang <kan.liang@linux.intel.com>
Tue, 13 Aug 2024 16:02:04 +0000 (09:02 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Aug 2024 13:20:40 +0000 (10:20 -0300)
commit7398bf181d59a8c8d8d13cb555bf3f44b70f6221
tree3f8bf0b846f03beff63bb3ada68caed196c5629f
parent1f2b7fbb04f53540090ac7d320194654f142443f
perf evsel: Assign abbr name for the branch counter events

There could be several branch counter events. If perf tool output the
result via the format "event name + a number", the line could be very
long and hard to read.

An abbreviation is introduced to replace the full event name in the
display. The abbreviation starts from 'A' to 'Z9', which can support
up to 286 events. The same abbreviation will be assigned if the same
events are found in the evlist. The next patch will utilize the
abbreviation name to show the branch counter events in the output.

Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20240813160208.2493643-6-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.c
tools/perf/util/evsel.h