Andi Kleen | b18f3e3 | 2017-08-31 12:40:31 -0700 | [diff] [blame] | 1 | #ifndef METRICGROUP_H |
| 2 | #define METRICGROUP_H 1 |
| 3 | |
| 4 | #include "linux/list.h" |
| 5 | #include "rblist.h" |
| 6 | #include <subcmd/parse-options.h> |
| 7 | #include "evlist.h" |
| 8 | #include "strbuf.h" |
| 9 | |
| 10 | struct metric_event { |
| 11 | struct rb_node nd; |
| 12 | struct perf_evsel *evsel; |
| 13 | struct list_head head; /* list of metric_expr */ |
| 14 | }; |
| 15 | |
| 16 | struct metric_expr { |
| 17 | struct list_head nd; |
| 18 | const char *metric_expr; |
| 19 | const char *metric_name; |
| 20 | struct perf_evsel **metric_events; |
| 21 | }; |
| 22 | |
| 23 | struct metric_event *metricgroup__lookup(struct rblist *metric_events, |
| 24 | struct perf_evsel *evsel, |
| 25 | bool create); |
| 26 | int metricgroup__parse_groups(const struct option *opt, |
| 27 | const char *str, |
| 28 | struct rblist *metric_events); |
| 29 | |
Jiri Olsa | 33bbc57 | 2019-02-13 13:32:41 +0100 | [diff] [blame] | 30 | void metricgroup__print(bool metrics, bool groups, char *filter, |
| 31 | bool raw, bool details); |
Thomas Richter | 742d92f | 2018-06-26 09:17:01 +0200 | [diff] [blame] | 32 | bool metricgroup__has_metric(const char *metric); |
Andi Kleen | b18f3e3 | 2017-08-31 12:40:31 -0700 | [diff] [blame] | 33 | #endif |