treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / perf / util / metricgroup.h
blob475c7f912864f9ff512cf9d189bed9ed1b4fa7a3
1 // SPDX-License-Identifier: GPL-2.0-only
2 #ifndef METRICGROUP_H
3 #define METRICGROUP_H 1
5 #include <linux/list.h>
6 #include <linux/rbtree.h>
7 #include <stdbool.h>
9 struct evsel;
10 struct option;
11 struct rblist;
13 struct metric_event {
14 struct rb_node nd;
15 struct evsel *evsel;
16 struct list_head head; /* list of metric_expr */
19 struct metric_expr {
20 struct list_head nd;
21 const char *metric_expr;
22 const char *metric_name;
23 const char *metric_unit;
24 struct evsel **metric_events;
27 struct metric_event *metricgroup__lookup(struct rblist *metric_events,
28 struct evsel *evsel,
29 bool create);
30 int metricgroup__parse_groups(const struct option *opt,
31 const char *str,
32 struct rblist *metric_events);
34 void metricgroup__print(bool metrics, bool groups, char *filter,
35 bool raw, bool details);
36 bool metricgroup__has_metric(const char *metric);
37 #endif