aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/parse-events.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2017-08-31 15:40:32 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-09-13 08:49:13 -0400
commit71b0acce78d12e99eeda6fd6642ba89cc2b2b49c (patch)
tree1da8cdf2f79717d2d9cc0136b6700ac0f90f30d8 /tools/perf/util/parse-events.c
parentb18f3e365019de1a5b26a851e123f0aedcce881f (diff)
perf list: Add metric groups to perf list
Add code to perf list to print metric groups, and metrics that don't have an event name. The metricgroup code collects the eventgroups and events into a rblist, and then prints them according to the configured filters. The metricgroups are printed by default, but can be limited by perf list metric or perf list metricgroup % perf list metricgroup .. Metric Groups: DSB: DSB_Coverage [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)] FLOPS: GFLOPs [Giga Floating Point Operations Per Second] Frontend: IFetch_Line_Utilization [Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions] Frontend_Bandwidth: DSB_Coverage [Fraction of Uops delivered by the DSB (aka Decoded Icache; or Uop Cache)] Memory_BW: MLP [Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)] v2: Check return value of asprintf to fix warning on FC26 Fix key in lookup/addition for the groups list Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: http://lkml.kernel.org/r/20170831194036.30146-8-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r--tools/perf/util/parse-events.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 57d7acf890e0..75588920fccc 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -28,6 +28,7 @@
28#include "probe-file.h" 28#include "probe-file.h"
29#include "asm/bug.h" 29#include "asm/bug.h"
30#include "util/parse-branch-options.h" 30#include "util/parse-branch-options.h"
31#include "metricgroup.h"
31 32
32#define MAX_NAME_LEN 100 33#define MAX_NAME_LEN 100
33 34
@@ -2380,6 +2381,8 @@ void print_events(const char *event_glob, bool name_only, bool quiet_flag,
2380 print_tracepoint_events(NULL, NULL, name_only); 2381 print_tracepoint_events(NULL, NULL, name_only);
2381 2382
2382 print_sdt_events(NULL, NULL, name_only); 2383 print_sdt_events(NULL, NULL, name_only);
2384
2385 metricgroup__print(true, true, NULL, name_only);
2383} 2386}
2384 2387
2385int parse_events__is_hardcoded_term(struct parse_events_term *term) 2388int parse_events__is_hardcoded_term(struct parse_events_term *term)