metricgroup.h 791 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef METRICGROUP_H
  2. #define METRICGROUP_H 1
  3. #include "linux/list.h"
  4. #include "rblist.h"
  5. #include <subcmd/parse-options.h>
  6. #include "evlist.h"
  7. #include "strbuf.h"
  8. struct metric_event {
  9. struct rb_node nd;
  10. struct perf_evsel *evsel;
  11. struct list_head head; /* list of metric_expr */
  12. };
  13. struct metric_expr {
  14. struct list_head nd;
  15. const char *metric_expr;
  16. const char *metric_name;
  17. struct perf_evsel **metric_events;
  18. };
  19. struct metric_event *metricgroup__lookup(struct rblist *metric_events,
  20. struct perf_evsel *evsel,
  21. bool create);
  22. int metricgroup__parse_groups(const struct option *opt,
  23. const char *str,
  24. struct rblist *metric_events);
  25. void metricgroup__print(bool metrics, bool groups, char *filter, bool raw);
  26. bool metricgroup__has_metric(const char *metric);
  27. #endif