Lines Matching defs:event
3 * Performance event support - PPC 8xx
49 static int event_type(struct perf_event *event)
51 switch (event->attr.type) {
53 if (event->attr.config == PERF_COUNT_HW_CPU_CYCLES)
55 if (event->attr.config == PERF_COUNT_HW_INSTRUCTIONS)
59 if (event->attr.config == ITLB_LOAD_MISS)
61 if (event->attr.config == DTLB_LOAD_MISS)
72 static int mpc8xx_pmu_event_init(struct perf_event *event)
74 int type = event_type(event);
81 static int mpc8xx_pmu_add(struct perf_event *event, int flags)
83 int type = event_type(event);
115 local64_set(&event->hw.prev_count, val);
119 static void mpc8xx_pmu_read(struct perf_event *event)
121 int type = event_type(event);
128 prev = local64_read(&event->hw.prev_count);
149 } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev);
151 local64_add(delta, &event->count);
154 static void mpc8xx_pmu_del(struct perf_event *event, int flags)
156 mpc8xx_pmu_read(event);
159 switch (event_type(event)) {