perf sort: Add dynamic headers for perf report columns
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Mon, 22 Mar 2021 14:57:24 +0000 (10:57 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Mar 2021 11:49:27 +0000 (08:49 -0300)
commit0a606822c4863b2398925e6ff3329d64c4c52bb8
tree45b2b4b5812e225e44cb07eb3dcbf89c4e5cf0fa
parent463a7d5a9e6fd3f3b592e09c936d2d07ee0b65b9
perf sort: Add dynamic headers for perf report columns

Currently the header string for different columns in perf report is
fixed. Some fields of perf sample could have different meaning for
different architectures than the meaning conveyed by the header string.

An example is the new field 'var2_w' of perf_sample_weight structure.
This is presently captured as 'Local INSTR Latency' in perf mem report.
But this could be used to denote a different latency cycle in another
architecture.

Introduce a weak function arch_perf_header_entry() to set the arch
specific header string for the fields which can contain dynamic header.
If the architecture do not have this function, fall back to the default
header string value.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Link: https://lore.kernel.org/r/1616425047-1666-3-git-send-email-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.h
tools/perf/util/sort.c