1 // SPDX-License-Identifier: GPL-2.0-only
3 #define METRICGROUP_H 1
5 #include <linux/list.h>
6 #include <linux/rbtree.h>
13 struct pmu_events_map
;
18 struct list_head head
; /* list of metric_expr */
22 const char *metric_name
;
23 const char *metric_expr
;
28 const char *metric_expr
;
29 const char *metric_name
;
30 const char *metric_unit
;
31 struct evsel
**metric_events
;
32 struct metric_ref
*metric_refs
;
36 struct metric_event
*metricgroup__lookup(struct rblist
*metric_events
,
39 int metricgroup__parse_groups(const struct option
*opt
,
43 struct rblist
*metric_events
);
45 int metricgroup__parse_groups_test(struct evlist
*evlist
,
46 struct pmu_events_map
*map
,
50 struct rblist
*metric_events
);
52 void metricgroup__print(bool metrics
, bool groups
, char *filter
,
53 bool raw
, bool details
);
54 bool metricgroup__has_metric(const char *metric
);
55 int arch_get_runtimeparam(void);
56 void metricgroup__rblist_exit(struct rblist
*metric_events
);