diff options
author | Andi Kleen <ak@linux.intel.com> | 2017-03-20 13:17:10 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-03-23 11:42:31 -0300 |
commit | 962848142335e8b35d522be78f58f2011d976b17 (patch) | |
tree | 3d73b6f223cf8fd2246d2ee33870bac2166d34bc /tools/perf/pmu-events/jevents.h | |
parent | 7f372a636d92e21d6fa41aebd6986ef590aefbfc (diff) | |
download | linux-962848142335e8b35d522be78f58f2011d976b17.tar.bz2 |
perf pmu: Add support for MetricName JSON attribute
Add support for a new JSON event attribute to name MetricExpr for better
output in perf stat.
If the event has no MetricName it uses the normal event name instead to
describe the metric.
Before
% perf stat -a -I 1000 -e '{unc_p_clockticks,unc_p_freq_max_os_cycles}' --metric-only
time unc_p_freq_max_os_cycles
1.000149775 15.7
2.000344807 19.3
3.000502544 16.7
4.000640656 6.6
5.000779955 9.9
After
% perf stat -a -I 1000 -e '{unc_p_clockticks,unc_p_freq_max_os_cycles}' --metric-only
time freq_max_os_cycles %
1.000149775 15.7
2.000344807 19.3
3.000502544 16.7
4.000640656 6.6
5.000779955 9.9
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20170320201711.14142-13-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/pmu-events/jevents.h')
-rw-r--r-- | tools/perf/pmu-events/jevents.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/pmu-events/jevents.h b/tools/perf/pmu-events/jevents.h index 57e111bf2168..611fac01913d 100644 --- a/tools/perf/pmu-events/jevents.h +++ b/tools/perf/pmu-events/jevents.h @@ -5,7 +5,8 @@ int json_events(const char *fn, int (*func)(void *data, char *name, char *event, char *desc, char *long_desc, char *pmu, - char *unit, char *perpkg, char *metric_expr), + char *unit, char *perpkg, char *metric_expr, + char *metric_name), void *data); char *get_cpu_str(void); |