summaryrefslogtreecommitdiff
path: root/tools/perf/pmu-events/pmu-events.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/pmu-events/pmu-events.h')
-rw-r--r--tools/perf/pmu-events/pmu-events.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
index b7d4a66b8ad2..b7dff8f1021f 100644
--- a/tools/perf/pmu-events/pmu-events.h
+++ b/tools/perf/pmu-events/pmu-events.h
@@ -2,6 +2,8 @@
#ifndef PMU_EVENTS_H
#define PMU_EVENTS_H
+#include <stdbool.h>
+
struct perf_pmu;
enum aggr_mode_class {
@@ -9,6 +11,29 @@ enum aggr_mode_class {
PerCore
};
+/**
+ * enum metric_event_groups - How events within a pmu_metric should be grouped.
+ */
+enum metric_event_groups {
+ /**
+ * @MetricGroupEvents: Default, group events within the metric.
+ */
+ MetricGroupEvents = 0,
+ /**
+ * @MetricNoGroupEvents: Don't group events for the metric.
+ */
+ MetricNoGroupEvents = 1,
+ /**
+ * @MetricNoGroupEventsNmi: Don't group events for the metric if the NMI
+ * watchdog is enabled.
+ */
+ MetricNoGroupEventsNmi = 2,
+ /**
+ * @MetricNoGroupEventsSmt: Don't group events for the metric if SMT is
+ * enabled.
+ */
+ MetricNoGroupEventsSmt = 3,
+};
/*
* Describe each PMU event. Each CPU has a table of PMU events.
*/
@@ -21,21 +46,21 @@ struct pmu_event {
const char *long_desc;
const char *pmu;
const char *unit;
- const char *perpkg;
- const char *aggr_mode;
- const char *deprecated;
+ bool perpkg;
+ bool deprecated;
};
struct pmu_metric {
const char *metric_name;
const char *metric_group;
const char *metric_expr;
+ const char *metric_threshold;
const char *unit;
const char *compat;
- const char *aggr_mode;
- const char *metric_constraint;
const char *desc;
const char *long_desc;
+ enum aggr_mode_class aggr_mode;
+ enum metric_event_groups event_grouping;
};
struct pmu_events_table;