Lines Matching refs:cpuc
497 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_disable_bts() local
500 if (!cpuc->ds) in intel_pmu_disable_bts()
514 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_bts_buffer() local
515 struct debug_store *ds = cpuc->ds; in intel_pmu_drain_bts_buffer()
521 struct perf_event *event = cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; in intel_pmu_drain_bts_buffer()
769 static inline bool pebs_is_enabled(struct cpu_hw_events *cpuc) in pebs_is_enabled() argument
771 return (cpuc->pebs_enabled & ((1ULL << MAX_PEBS_EVENTS) - 1)); in pebs_is_enabled()
776 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_pebs_enable() local
778 struct debug_store *ds = cpuc->ds; in intel_pmu_pebs_enable()
784 first_pebs = !pebs_is_enabled(cpuc); in intel_pmu_pebs_enable()
785 cpuc->pebs_enabled |= 1ULL << hwc->idx; in intel_pmu_pebs_enable()
788 cpuc->pebs_enabled |= 1ULL << (hwc->idx + 32); in intel_pmu_pebs_enable()
790 cpuc->pebs_enabled |= 1ULL << 63; in intel_pmu_pebs_enable()
826 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_pebs_disable() local
828 struct debug_store *ds = cpuc->ds; in intel_pmu_pebs_disable()
835 cpuc->pebs_enabled &= ~(1ULL << hwc->idx); in intel_pmu_pebs_disable()
838 cpuc->pebs_enabled &= ~(1ULL << (hwc->idx + 32)); in intel_pmu_pebs_disable()
840 cpuc->pebs_enabled &= ~(1ULL << 63); in intel_pmu_pebs_disable()
842 if (large_pebs && !pebs_is_enabled(cpuc)) in intel_pmu_pebs_disable()
845 if (cpuc->enabled) in intel_pmu_pebs_disable()
846 wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled); in intel_pmu_pebs_disable()
853 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_pebs_enable_all() local
855 if (cpuc->pebs_enabled) in intel_pmu_pebs_enable_all()
856 wrmsrl(MSR_IA32_PEBS_ENABLE, cpuc->pebs_enabled); in intel_pmu_pebs_enable_all()
861 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_pebs_disable_all() local
863 if (cpuc->pebs_enabled) in intel_pmu_pebs_disable_all()
869 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_pebs_fixup_ip() local
870 unsigned long from = cpuc->lbr_entries[0].from; in intel_pmu_pebs_fixup_ip()
871 unsigned long old_to, to = cpuc->lbr_entries[0].to; in intel_pmu_pebs_fixup_ip()
886 if (!cpuc->lbr_stack.nr || !from || !to) in intel_pmu_pebs_fixup_ip()
993 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in setup_pebs_sample_data() local
1103 data->br_stack = &cpuc->lbr_stack; in setup_pebs_sample_data()
1109 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in get_next_pebs_record_by_bit() local
1128 pebs_status = p->status & cpuc->pebs_enabled; in get_next_pebs_record_by_bit()
1173 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_pebs_core() local
1174 struct debug_store *ds = cpuc->ds; in intel_pmu_drain_pebs_core()
1175 struct perf_event *event = cpuc->events[0]; /* PMC0 only */ in intel_pmu_drain_pebs_core()
1190 if (!test_bit(0, cpuc->active_mask)) in intel_pmu_drain_pebs_core()
1207 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_pebs_nhm() local
1208 struct debug_store *ds = cpuc->ds; in intel_pmu_drain_pebs_nhm()
1239 pebs_status = p->status & cpuc->pebs_enabled; in intel_pmu_drain_pebs_nhm()
1246 (unsigned long long)p->status, (unsigned long long)cpuc->pebs_enabled, in intel_pmu_drain_pebs_nhm()
1247 *(unsigned long long *)cpuc->active_mask)) in intel_pmu_drain_pebs_nhm()
1279 event = cpuc->events[bit]; in intel_pmu_drain_pebs_nhm()