Lines Matching refs:event

43  * Cache if the event is allowed to trace Context information.
45 * in the context of the event owner, once, during the event_init().
51 static void set_spe_event_has_cx(struct perf_event *event)
54 event->hw.flags |= SPE_PMU_HW_FLAGS_CX;
57 static bool get_spe_event_has_cx(struct perf_event *event)
59 return !!(event->hw.flags & SPE_PMU_HW_FLAGS_CX);
301 static u64 arm_spe_event_to_pmscr(struct perf_event *event)
303 struct perf_event_attr *attr = &event->attr;
316 if (get_spe_event_has_cx(event))
322 static void arm_spe_event_sanitise_period(struct perf_event *event)
324 struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu);
325 u64 period = event->hw.sample_period;
335 event->hw.sample_period = period;
338 static u64 arm_spe_event_to_pmsirr(struct perf_event *event)
340 struct perf_event_attr *attr = &event->attr;
343 arm_spe_event_sanitise_period(event);
346 reg |= event->hw.sample_period;
351 static u64 arm_spe_event_to_pmsfcr(struct perf_event *event)
353 struct perf_event_attr *attr = &event->attr;
375 static u64 arm_spe_event_to_pmsevfr(struct perf_event *event)
377 struct perf_event_attr *attr = &event->attr;
381 static u64 arm_spe_event_to_pmsnevfr(struct perf_event *event)
383 struct perf_event_attr *attr = &event->attr;
387 static u64 arm_spe_event_to_pmslatfr(struct perf_event *event)
389 struct perf_event_attr *attr = &event->attr;
406 struct arm_spe_pmu *spe_pmu = to_spe_pmu(handle->event->pmu);
434 struct arm_spe_pmu *spe_pmu = to_spe_pmu(handle->event->pmu);
444 * a record when generating a buffer management event.
505 struct arm_spe_pmu *spe_pmu = to_spe_pmu(handle->event->pmu);
522 struct perf_event *event)
528 buf = perf_aux_output_begin(handle, event);
530 event->hw.state |= PERF_HES_STOPPED;
630 /* Buffer management event */
654 struct perf_event *event = handle->event;
689 arm_spe_perf_aux_output_begin(handle, event);
718 static int arm_spe_pmu_event_init(struct perf_event *event)
721 struct perf_event_attr *attr = &event->attr;
722 struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu);
725 if (attr->type != event->pmu->type)
728 if (event->cpu >= 0 &&
729 !cpumask_test_cpu(event->cpu, &spe_pmu->supported_cpus))
732 if (arm_spe_event_to_pmsevfr(event) & arm_spe_pmsevfr_res0(spe_pmu->pmsver))
735 if (arm_spe_event_to_pmsnevfr(event) & arm_spe_pmsevfr_res0(spe_pmu->pmsver))
744 * samples in the buffer when it fills up and adjust the event
751 reg = arm_spe_event_to_pmsfcr(event);
768 set_spe_event_has_cx(event);
769 reg = arm_spe_event_to_pmscr(event);
777 static void arm_spe_pmu_start(struct perf_event *event, int flags)
780 struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu);
781 struct hw_perf_event *hwc = &event->hw;
785 arm_spe_perf_aux_output_begin(handle, event);
789 reg = arm_spe_event_to_pmsfcr(event);
792 reg = arm_spe_event_to_pmsevfr(event);
796 reg = arm_spe_event_to_pmsnevfr(event);
800 reg = arm_spe_event_to_pmslatfr(event);
804 reg = arm_spe_event_to_pmsirr(event);
811 reg = arm_spe_event_to_pmscr(event);
816 static void arm_spe_pmu_stop(struct perf_event *event, int flags)
818 struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu);
819 struct hw_perf_event *hwc = &event->hw;
857 static int arm_spe_pmu_add(struct perf_event *event, int flags)
860 struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu);
861 struct hw_perf_event *hwc = &event->hw;
862 int cpu = event->cpu == -1 ? smp_processor_id() : event->cpu;
870 arm_spe_pmu_start(event, PERF_EF_RELOAD);
878 static void arm_spe_pmu_del(struct perf_event *event, int flags)
880 arm_spe_pmu_stop(event, PERF_EF_UPDATE);
883 static void arm_spe_pmu_read(struct perf_event *event)
887 static void *arm_spe_pmu_setup_aux(struct perf_event *event, void **pages,
890 int i, cpu = event->cpu;
963 * This requires that userspace either uses a dummy event for
965 * a subsequent mmap, or creates the profiling event in a