blob: 5c52097a5c63ac69f1cfe5a33a42e1c828043127 [file] [log] [blame]
Andi Kleenb18f3e32017-08-31 12:40:31 -07001#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
10struct metric_event {
11 struct rb_node nd;
12 struct perf_evsel *evsel;
13 struct list_head head; /* list of metric_expr */
14};
15
16struct 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
23struct metric_event *metricgroup__lookup(struct rblist *metric_events,
24 struct perf_evsel *evsel,
25 bool create);
26int metricgroup__parse_groups(const struct option *opt,
27 const char *str,
28 struct rblist *metric_events);
29
Jiri Olsa33bbc572019-02-13 13:32:41 +010030void metricgroup__print(bool metrics, bool groups, char *filter,
31 bool raw, bool details);
Thomas Richter742d92f2018-06-26 09:17:01 +020032bool metricgroup__has_metric(const char *metric);
Andi Kleenb18f3e32017-08-31 12:40:31 -070033#endif