Lines Matching refs:event
41 struct perf_event *event[MAX_HWEVENTS]; member
152 static int ev67_check_constraints(struct perf_event **event, in ev67_check_constraints() argument
199 event[0]->hw.idx = idx0; in ev67_check_constraints()
200 event[0]->hw.config_base = config; in ev67_check_constraints()
202 event[1]->hw.idx = idx0 ^ 1; in ev67_check_constraints()
203 event[1]->hw.config_base = config; in ev67_check_constraints()
252 static int alpha_perf_event_set_period(struct perf_event *event, in alpha_perf_event_set_period() argument
287 perf_event_update_userpage(event); in alpha_perf_event_set_period()
307 static unsigned long alpha_perf_event_update(struct perf_event *event, in alpha_perf_event_update() argument
330 local64_add(delta, &event->count); in alpha_perf_event_update()
341 struct perf_event *event[], unsigned long *evtype, in collect_events() argument
350 event[n] = group; in collect_events()
358 event[n] = pe; in collect_events()
400 struct perf_event *pe = cpuc->event[j]; in maybe_change_configuration()
412 struct perf_event *pe = cpuc->event[j]; in maybe_change_configuration()
424 cpuc->config = cpuc->event[0]->hw.config_base; in maybe_change_configuration()
433 static int alpha_pmu_add(struct perf_event *event, int flags) in alpha_pmu_add() argument
436 struct hw_perf_event *hwc = &event->hw; in alpha_pmu_add()
449 perf_pmu_disable(event->pmu); in alpha_pmu_add()
458 cpuc->event[n0] = event; in alpha_pmu_add()
459 cpuc->evtype[n0] = event->hw.event_base; in alpha_pmu_add()
462 if (!alpha_check_constraints(cpuc->event, cpuc->evtype, n0+1)) { in alpha_pmu_add()
474 perf_pmu_enable(event->pmu); in alpha_pmu_add()
485 static void alpha_pmu_del(struct perf_event *event, int flags) in alpha_pmu_del() argument
488 struct hw_perf_event *hwc = &event->hw; in alpha_pmu_del()
492 perf_pmu_disable(event->pmu); in alpha_pmu_del()
496 if (event == cpuc->event[j]) { in alpha_pmu_del()
503 cpuc->event[j - 1] = cpuc->event[j]; in alpha_pmu_del()
510 alpha_perf_event_update(event, hwc, idx, 0); in alpha_pmu_del()
511 perf_event_update_userpage(event); in alpha_pmu_del()
520 perf_pmu_enable(event->pmu); in alpha_pmu_del()
524 static void alpha_pmu_read(struct perf_event *event) in alpha_pmu_read() argument
526 struct hw_perf_event *hwc = &event->hw; in alpha_pmu_read()
528 alpha_perf_event_update(event, hwc, hwc->idx, 0); in alpha_pmu_read()
532 static void alpha_pmu_stop(struct perf_event *event, int flags) in alpha_pmu_stop() argument
534 struct hw_perf_event *hwc = &event->hw; in alpha_pmu_stop()
543 alpha_perf_event_update(event, hwc, hwc->idx, 0); in alpha_pmu_stop()
552 static void alpha_pmu_start(struct perf_event *event, int flags) in alpha_pmu_start() argument
554 struct hw_perf_event *hwc = &event->hw; in alpha_pmu_start()
562 alpha_perf_event_set_period(event, hwc, hwc->idx); in alpha_pmu_start()
594 static void hw_perf_event_destroy(struct perf_event *event) in hw_perf_event_destroy() argument
602 static int __hw_perf_event_init(struct perf_event *event) in __hw_perf_event_init() argument
604 struct perf_event_attr *attr = &event->attr; in __hw_perf_event_init()
605 struct hw_perf_event *hwc = &event->hw; in __hw_perf_event_init()
649 if (event->group_leader != event) { in __hw_perf_event_init()
650 n = collect_events(event->group_leader, in __hw_perf_event_init()
657 evts[n] = event; in __hw_perf_event_init()
666 event->destroy = hw_perf_event_destroy; in __hw_perf_event_init()
690 static int alpha_pmu_event_init(struct perf_event *event) in alpha_pmu_event_init() argument
693 if (has_branch_stack(event)) in alpha_pmu_event_init()
696 switch (event->attr.type) { in alpha_pmu_event_init()
710 return __hw_perf_event_init(event); in alpha_pmu_event_init()
805 struct perf_event *event; in alpha_perf_event_irq_handler() local
841 event = cpuc->event[j]; in alpha_perf_event_irq_handler()
843 if (unlikely(!event)) { in alpha_perf_event_irq_handler()
851 hwc = &event->hw; in alpha_perf_event_irq_handler()
852 alpha_perf_event_update(event, hwc, idx, alpha_pmu->pmc_max_period[idx]+1); in alpha_perf_event_irq_handler()
855 if (alpha_perf_event_set_period(event, hwc, idx)) in alpha_perf_event_irq_handler()
856 perf_event_overflow(event, &data, regs); in alpha_perf_event_irq_handler()