|
@@ -374,6 +374,39 @@ static int power7_cache_events[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+GENERIC_EVENT_ATTR(cpu-cycles, CYC);
|
|
|
+GENERIC_EVENT_ATTR(stalled-cycles-frontend, GCT_NOSLOT_CYC);
|
|
|
+GENERIC_EVENT_ATTR(stalled-cycles-backend, CMPLU_STALL);
|
|
|
+GENERIC_EVENT_ATTR(instructions, INST_CMPL);
|
|
|
+GENERIC_EVENT_ATTR(cache-references, LD_REF_L1);
|
|
|
+GENERIC_EVENT_ATTR(cache-misses, LD_MISS_L1);
|
|
|
+GENERIC_EVENT_ATTR(branch-instructions, BRU_FIN);
|
|
|
+GENERIC_EVENT_ATTR(branch-misses, BRU_MPRED);
|
|
|
+
|
|
|
+static struct attribute *power7_events_attr[] = {
|
|
|
+ GENERIC_EVENT_PTR(CYC),
|
|
|
+ GENERIC_EVENT_PTR(GCT_NOSLOT_CYC),
|
|
|
+ GENERIC_EVENT_PTR(CMPLU_STALL),
|
|
|
+ GENERIC_EVENT_PTR(INST_CMPL),
|
|
|
+ GENERIC_EVENT_PTR(LD_REF_L1),
|
|
|
+ GENERIC_EVENT_PTR(LD_MISS_L1),
|
|
|
+ GENERIC_EVENT_PTR(BRU_FIN),
|
|
|
+ GENERIC_EVENT_PTR(BRU_MPRED),
|
|
|
+ NULL
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+static struct attribute_group power7_pmu_events_group = {
|
|
|
+ .name = "events",
|
|
|
+ .attrs = power7_events_attr,
|
|
|
+};
|
|
|
+
|
|
|
+static const struct attribute_group *power7_pmu_attr_groups[] = {
|
|
|
+ &power7_pmu_events_group,
|
|
|
+ NULL,
|
|
|
+};
|
|
|
+
|
|
|
static struct power_pmu power7_pmu = {
|
|
|
.name = "POWER7",
|
|
|
.n_counter = 6,
|
|
@@ -385,6 +418,7 @@ static struct power_pmu power7_pmu = {
|
|
|
.get_alternatives = power7_get_alternatives,
|
|
|
.disable_pmc = power7_disable_pmc,
|
|
|
.flags = PPMU_ALT_SIPR,
|
|
|
+ .attr_groups = power7_pmu_attr_groups,
|
|
|
.n_generic = ARRAY_SIZE(power7_generic_events),
|
|
|
.generic_events = power7_generic_events,
|
|
|
.cache_events = &power7_cache_events,
|