Lines Matching refs:event

176 static int amd_core_hw_config(struct perf_event *event)  in amd_core_hw_config()  argument
178 if (event->attr.exclude_host && event->attr.exclude_guest) in amd_core_hw_config()
184 event->hw.config &= ~(ARCH_PERFMON_EVENTSEL_USR | in amd_core_hw_config()
186 else if (event->attr.exclude_host) in amd_core_hw_config()
187 event->hw.config |= AMD64_EVENTSEL_GUESTONLY; in amd_core_hw_config()
188 else if (event->attr.exclude_guest) in amd_core_hw_config()
189 event->hw.config |= AMD64_EVENTSEL_HOSTONLY; in amd_core_hw_config()
214 static int amd_pmu_hw_config(struct perf_event *event) in amd_pmu_hw_config() argument
219 if (event->attr.precise_ip && get_ibs_caps()) in amd_pmu_hw_config()
222 if (has_branch_stack(event)) in amd_pmu_hw_config()
225 ret = x86_pmu_hw_config(event); in amd_pmu_hw_config()
229 if (event->attr.type == PERF_TYPE_RAW) in amd_pmu_hw_config()
230 event->hw.config |= event->attr.config & AMD64_RAW_EVENT_MASK; in amd_pmu_hw_config()
232 return amd_core_hw_config(event); in amd_pmu_hw_config()
236 struct perf_event *event) in __amd_put_nb_event_constraints() argument
250 if (cmpxchg(nb->owners + i, event, NULL) == event) in __amd_put_nb_event_constraints()
292 __amd_get_nb_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, in __amd_get_nb_event_constraints() argument
295 struct hw_perf_event *hwc = &event->hw; in __amd_get_nb_event_constraints()
319 old = cmpxchg(nb->owners + idx, NULL, event); in __amd_get_nb_event_constraints()
320 else if (nb->owners[idx] == event) in __amd_get_nb_event_constraints()
322 old = event; in __amd_get_nb_event_constraints()
326 if (old && old != event) in __amd_get_nb_event_constraints()
331 cmpxchg(nb->owners + new, event, NULL); in __amd_get_nb_event_constraints()
335 if (old == event) in __amd_get_nb_event_constraints()
434 struct perf_event *event) in amd_get_event_constraints() argument
439 if (!(amd_has_nb(cpuc) && amd_is_nb_event(&event->hw))) in amd_get_event_constraints()
442 return __amd_get_nb_event_constraints(cpuc, event, NULL); in amd_get_event_constraints()
446 struct perf_event *event) in amd_put_event_constraints() argument
448 if (amd_has_nb(cpuc) && amd_is_nb_event(&event->hw)) in amd_put_event_constraints()
449 __amd_put_nb_event_constraints(cpuc, event); in amd_put_event_constraints()
452 PMU_FORMAT_ATTR(event, "config:0-7,32-35");
543 struct perf_event *event) in amd_get_event_constraints_f15h() argument
545 struct hw_perf_event *hwc = &event->hw; in amd_get_event_constraints_f15h()
616 u64 event = (config & ARCH_PERFMON_EVENTSEL_EVENT) | in amd_event_sysfs_show() local
619 return x86_event_sysfs_show(page, config, event); in amd_event_sysfs_show()