| /linux/arch/x86/events/amd/ |
| H A D | lbr.c | 102 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_filter() local 103 int br_sel = cpuc->br_sel, offset, type, i, j; in amd_pmu_lbr_filter() 113 for (i = 0; i < cpuc->lbr_stack.nr; i++) { in amd_pmu_lbr_filter() 114 from = cpuc->lbr_entries[i].from; in amd_pmu_lbr_filter() 115 to = cpuc->lbr_entries[i].to; in amd_pmu_lbr_filter() 124 cpuc->lbr_entries[i].from += offset; in amd_pmu_lbr_filter() 131 (!(br_sel & X86_BR_KERNEL) && kernel_ip(cpuc->lbr_entries[i].from))) { in amd_pmu_lbr_filter() 132 cpuc->lbr_entries[i].from = 0; /* mark invalid */ in amd_pmu_lbr_filter() 137 cpuc->lbr_entries[i].type = common_branch_type(type); in amd_pmu_lbr_filter() 144 for (i = 0; i < cpuc in amd_pmu_lbr_filter() 166 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_read() local 326 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_reset() local 345 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_add() local 365 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_del() local 381 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_sched_task() local 394 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_enable_all() local 417 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_disable_all() local [all...] |
| H A D | core.c | 397 static inline int amd_has_nb(struct cpu_hw_events *cpuc) in amd_has_nb() argument 399 struct amd_nb *nb = cpuc->amd_nb; in amd_has_nb() 425 static void __amd_put_nb_event_constraints(struct cpu_hw_events *cpuc, in __amd_put_nb_event_constraints() argument 428 struct amd_nb *nb = cpuc->amd_nb; in __amd_put_nb_event_constraints() 484 __amd_get_nb_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, in __amd_get_nb_event_constraints() argument 488 struct amd_nb *nb = cpuc->amd_nb; in __amd_get_nb_event_constraints() 495 if (cpuc->is_fake) in __amd_get_nb_event_constraints() 582 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); in amd_pmu_cpu_prepare() local 584 cpuc->lbr_sel = kzalloc_node(sizeof(struct er_account), GFP_KERNEL, in amd_pmu_cpu_prepare() 586 if (!cpuc->lbr_sel) in amd_pmu_cpu_prepare() [all …]
|
| H A D | brs.c | 205 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_enable() local 209 if (++cpuc->brs_active > 1) in amd_brs_enable() 221 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_enable_all() local 222 if (cpuc->lbr_users) in amd_brs_enable_all() 228 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_disable() local 232 if (!cpuc->brs_active) in amd_brs_disable() 236 if (--cpuc->brs_active) in amd_brs_disable() 257 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_brs_disable_all() local 258 if (cpuc->lbr_users) in amd_brs_disable_all() 283 struct cpu_hw_events *cpuc in amd_brs_drain() local 387 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_brs_sched_task() local 408 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); perf_amd_brs_lopwr_cb() local [all...] |
| /linux/arch/sparc/kernel/ |
| H A D | perf_event.c | 827 static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, in… in sparc_pmu_enable_event() argument 835 enc = perf_event_get_enc(cpuc->events[idx]); in sparc_pmu_enable_event() 837 val = cpuc->pcr[pcr_index]; in sparc_pmu_enable_event() 840 cpuc->pcr[pcr_index] = val; in sparc_pmu_enable_event() 842 pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); in sparc_pmu_enable_event() 845 static inline void sparc_pmu_disable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, i… in sparc_pmu_disable_event() argument 855 val = cpuc->pcr[pcr_index]; in sparc_pmu_disable_event() 858 cpuc->pcr[pcr_index] = val; in sparc_pmu_disable_event() 860 pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); in sparc_pmu_disable_event() 923 static void read_in_all_counters(struct cpu_hw_events *cpuc) in read_in_all_counters() argument [all …]
|
| /linux/arch/x86/events/intel/ |
| H A D | ds.c | 1099 struct cpu_hw_events *cpuc = per_cpu_ptr(&cpu_hw_events, cpu); 1105 if (!cpuc->pebs_vaddr) { in fini_arch_pebs_on_cpu() 1117 arch_pebs_base = virt_to_phys(cpuc->pebs_vaddr) | PEBS_BUFFER_SHIFT; in intel_pmu_enable_bts() 1159 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_bts_buffer() 1162 if (!cpuc->ds) in intel_pmu_drain_bts_buffer() 1176 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_bts_buffer() 1177 struct debug_store *ds = cpuc->ds; in intel_pmu_drain_bts_buffer() 1183 struct perf_event *event = cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; in intel_pmu_drain_bts_buffer() 1267 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); 1270 WARN_ON_ONCE(cpuc 1077 struct cpu_hw_events *cpuc = per_cpu_ptr(&cpu_hw_events, cpu); init_arch_pebs_on_cpu() local 1137 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_disable_bts() local 1154 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_bts_buffer() local 1245 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_buffer() local 1582 pebs_needs_sched_cb(struct cpu_hw_events * cpuc) pebs_needs_sched_cb() argument 1592 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_sched_task() local 1598 pebs_update_threshold(struct cpu_hw_events * cpuc) pebs_update_threshold() argument 1638 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); adaptive_pebs_record_size_update() local 1684 intel_pmu_pebs_late_setup(struct cpu_hw_events * cpuc) intel_pmu_pebs_late_setup() argument 1756 pebs_update_state(bool needed_cb,struct cpu_hw_events * cpuc,struct perf_event * event,bool add) pebs_update_state() argument 1796 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_get_arch_pebs_data_config() local 1815 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_add() local 1830 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_via_pt_disable() local 1841 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_via_pt_enable() local 1867 intel_pmu_drain_large_pebs(struct cpu_hw_events * cpuc) intel_pmu_drain_large_pebs() argument 1879 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_pebs_enable() local 1888 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_enable() local 1943 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_del() local 1958 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_pebs_disable() local 1968 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_disable() local 1987 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_enable_all() local 1995 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_disable_all() local 2003 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_fixup_ip() local 2178 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_pebs_fixed_sample_data() local 2380 __setup_pebs_counter_group(struct cpu_hw_events * cpuc,struct perf_event * event,struct pebs_cntr_header * cntr,void * next_record) __setup_pebs_counter_group() argument 2518 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_pebs_adaptive_sample_data() local 2636 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_arch_pebs_sample_data() local 2756 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); get_next_pebs_record_by_bit() local 2942 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_pebs_events() local 2963 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_core() local 2999 intel_pmu_pebs_event_update_no_drain(struct cpu_hw_events * cpuc,u64 mask) intel_pmu_pebs_event_update_no_drain() argument 3021 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_nhm() local 3143 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_handle_pebs_record() local 3170 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_handle_last_pebs_record() local 3190 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_icl() local 3241 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_arch_pebs() local [all...] |
| H A D | core.c | 2772 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_disable_all() 2776 if (bts && test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) 2789 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_enable_all() 2790 u64 intel_ctrl = hybrid(cpuc->pmu, intel_ctrl); in __intel_pmu_enable_all() 2794 if (cpuc->fixed_ctrl_val != cpuc->active_fixed_ctrl_val) { in __intel_pmu_enable_all() 2795 wrmsrq(MSR_ARCH_PERFMON_FIXED_CTR_CTRL, cpuc->fixed_ctrl_val); in __intel_pmu_enable_all() 2796 cpuc->active_fixed_ctrl_val = cpuc->fixed_ctrl_val; in __intel_pmu_enable_all() 2800 intel_ctrl & ~cpuc in __intel_pmu_enable_all() 2762 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_disable_all() local 2779 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_enable_all() local 2813 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_snapshot_branch_stack() local 2866 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_nhm_workaround() local 2931 intel_set_tfa(struct cpu_hw_events * cpuc,bool on) intel_set_tfa() argument 2941 intel_tfa_commit_scheduling(struct cpu_hw_events * cpuc,int idx,int cntr) intel_tfa_commit_scheduling() argument 2952 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_tfa_pmu_enable_all() local 2985 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_set_masks() local 2997 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_clear_masks() local 3006 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_disable_fixed() local 3012 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_disable_fixed() local 3031 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_update_event_ext() local 3130 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_quiesce() local 3142 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_resume() local 3235 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); update_saved_topdown_regs() local 3260 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_update_topdown_event() local 3339 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_read_event() local 3365 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_enable_fixed() local 3371 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_enable_fixed() local 3418 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_config_acr() local 3466 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_enable_event_ext() local 3607 intel_pmu_acr_late_setup(struct cpu_hw_events * cpuc) intel_pmu_acr_late_setup() argument 3653 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_late_setup() local 3713 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_reset() local 3766 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_handle_guest_pebs() local 3794 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); handle_pmi_common() local 3955 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_handle_irq() local 4056 intel_alt_er(struct cpu_hw_events * cpuc,int idx,u64 config) intel_alt_er() argument 4126 __intel_shared_reg_get_constraints(struct cpu_hw_events * cpuc,struct perf_event * event,struct hw_perf_event_extra * reg) __intel_shared_reg_get_constraints() argument 4201 __intel_shared_reg_put_constraints(struct cpu_hw_events * cpuc,struct hw_perf_event_extra * reg) __intel_shared_reg_put_constraints() argument 4227 intel_shared_regs_constraints(struct cpu_hw_events * cpuc,struct perf_event * event) intel_shared_regs_constraints() argument 4251 x86_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) x86_get_event_constraints() argument 4270 __intel_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) __intel_get_event_constraints() argument 4295 intel_start_scheduling(struct cpu_hw_events * cpuc) intel_start_scheduling() argument 4324 intel_commit_scheduling(struct cpu_hw_events * cpuc,int idx,int cntr) intel_commit_scheduling() argument 4351 intel_stop_scheduling(struct cpu_hw_events * cpuc) intel_stop_scheduling() argument 4378 dyn_constraint(struct cpu_hw_events * cpuc,struct event_constraint * c,int idx) dyn_constraint() argument 4407 intel_get_excl_constraints(struct cpu_hw_events * cpuc,struct perf_event * event,int idx,struct event_constraint * c) intel_get_excl_constraints() argument 4507 intel_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) intel_get_event_constraints() argument 4539 intel_put_excl_constraints(struct cpu_hw_events * cpuc,struct perf_event * event) intel_put_excl_constraints() argument 4585 intel_put_shared_regs_event_constraints(struct cpu_hw_events * cpuc,struct perf_event * event) intel_put_shared_regs_event_constraints() argument 4599 intel_put_event_constraints(struct cpu_hw_events * cpuc,struct perf_event * event) intel_put_event_constraints() argument 5290 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_guest_get_msrs() local 5370 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); core_guest_get_msrs() local 5404 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); core_pmu_enable_all() local 5480 hsw_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) hsw_get_event_constraints() argument 5498 icl_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) icl_get_event_constraints() argument 5513 glc_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) glc_get_event_constraints() argument 5538 glp_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) glp_get_event_constraints() argument 5553 tnt_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) tnt_get_event_constraints() argument 5578 tfa_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) tfa_get_event_constraints() argument 5596 adl_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) adl_get_event_constraints() argument 5611 cmt_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) cmt_get_event_constraints() argument 5649 rwc_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) rwc_get_event_constraints() argument 5673 mtl_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) mtl_get_event_constraints() argument 5712 arl_h_get_event_constraints(struct cpu_hw_events * cpuc,int idx,struct perf_event * event) arl_h_get_event_constraints() argument 5898 intel_cpuc_prepare(struct cpu_hw_events * cpuc,int cpu) intel_cpuc_prepare() argument 5940 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); intel_pmu_cpu_prepare() local 6355 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); init_hybrid_pmu() local 6390 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); intel_pmu_cpu_starting() local 6480 free_excl_cntrs(struct cpu_hw_events * cpuc) free_excl_cntrs() argument 6501 intel_cpuc_finish(struct cpu_hw_events * cpuc) intel_cpuc_finish() argument 6517 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); intel_pmu_cpu_dead() local 7111 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); update_tfa_sched() local [all...] |
| H A D | bts.c | 263 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_start() local 274 bts->ds_back.bts_buffer_base = cpuc->ds->bts_buffer_base; in bts_event_start() 275 bts->ds_back.bts_absolute_maximum = cpuc->ds->bts_absolute_maximum; in bts_event_start() 276 bts->ds_back.bts_interrupt_threshold = cpuc->ds->bts_interrupt_threshold; in bts_event_start() 308 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_stop() local 333 cpuc->ds->bts_index = bts->ds_back.bts_buffer_base; in bts_event_stop() 334 cpuc->ds->bts_buffer_base = bts->ds_back.bts_buffer_base; in bts_event_stop() 335 cpuc->ds->bts_absolute_maximum = bts->ds_back.bts_absolute_maximum; in bts_event_stop() 336 cpuc->ds->bts_interrupt_threshold = bts->ds_back.bts_interrupt_threshold; in bts_event_stop() 538 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_add() local [all …]
|
| /linux/arch/loongarch/kernel/ |
| H A D | perf_event.c | 253 static int loongarch_pmu_alloc_counter(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc) in loongarch_pmu_alloc_counter() argument 258 if (!test_and_set_bit(i, cpuc->used_mask)) in loongarch_pmu_alloc_counter() 269 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in loongarch_pmu_enable_event() local 274 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base) | in loongarch_pmu_enable_event() 288 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in loongarch_pmu_disable_event() local 293 cpuc->saved_ctrl[idx] = loongarch_pmu_read_control(idx) & in loongarch_pmu_disable_event() 295 loongarch_pmu_write_control(idx, cpuc->saved_ctrl[idx]); in loongarch_pmu_disable_event() 388 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in loongarch_pmu_add() local 394 idx = loongarch_pmu_alloc_counter(cpuc, hwc); in loongarch_pmu_add() 406 cpuc->events[idx] = event; in loongarch_pmu_add() [all …]
|
| /linux/arch/sh/kernel/ |
| H A D | perf_event.c | 201 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_stop() local 207 cpuc->events[idx] = NULL; in sh_pmu_stop() 219 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_start() local 229 cpuc->events[idx] = event; in sh_pmu_start() 236 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_del() local 239 __clear_bit(event->hw.idx, cpuc->used_mask); in sh_pmu_del() 246 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_add() local 253 if (__test_and_set_bit(idx, cpuc->used_mask)) { in sh_pmu_add() 254 idx = find_first_zero_bit(cpuc->used_mask, sh_pmu->num_events); in sh_pmu_add() 258 __set_bit(idx, cpuc->used_mask); in sh_pmu_add()
|
| /linux/drivers/perf/ |
| H A D | riscv_pmu.c | 260 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in riscv_pmu_add() local 269 cpuc->events[idx] = event; in riscv_pmu_add() 270 cpuc->n_events++; in riscv_pmu_add() 284 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in riscv_pmu_del() local 288 cpuc->events[hwc->idx] = NULL; in riscv_pmu_del() 292 cpuc->n_events--; in riscv_pmu_del() 390 struct cpu_hw_events *cpuc; in riscv_pmu_alloc() local 403 cpuc = per_cpu_ptr(pmu->hw_events, cpuid); in riscv_pmu_alloc() 404 cpuc->n_events = 0; in riscv_pmu_alloc() 406 cpuc->events[i] = NULL; in riscv_pmu_alloc() [all …]
|
| H A D | riscv_pmu_sbi.c | 563 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in pmu_sbi_ctr_get_idx() local 614 if (!test_and_set_bit(idx, cpuc->used_fw_ctrs)) in pmu_sbi_ctr_get_idx() 617 if (!test_and_set_bit(idx, cpuc->used_hw_ctrs)) in pmu_sbi_ctr_get_idx() 629 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in pmu_sbi_ctr_clear_idx() local 633 clear_bit(idx, cpuc->used_fw_ctrs); in pmu_sbi_ctr_clear_idx() 635 clear_bit(idx, cpuc->used_hw_ctrs); in pmu_sbi_ctr_clear_idx() 1290 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in riscv_pm_pmu_notify() local 1291 bool enabled = !bitmap_empty(cpuc->used_hw_ctrs, RISCV_MAX_COUNTERS); in riscv_pm_pmu_notify() 1299 event = cpuc->events[idx]; in riscv_pm_pmu_notify()
|
| H A D | arm_brbe.c | 496 struct pmu_hw_events *cpuc = this_cpu_ptr(arm_pmu->hw_events); in brbe_enable() local 509 struct perf_event *event = cpuc->events[i]; in brbe_enable()
|
| /linux/tools/sched_ext/ |
| H A D | scx_flatcg.bpf.c | 152 struct fcg_cpu_ctx *cpuc; in find_cpu_ctx() local 155 cpuc = bpf_map_lookup_elem(&cpu_ctx, &idx); in find_cpu_ctx() 156 if (!cpuc) { in find_cpu_ctx() 160 return cpuc; in find_cpu_ctx() 735 struct fcg_cpu_ctx *cpuc; in BPF_STRUCT_OPS() local 741 cpuc = find_cpu_ctx(); in BPF_STRUCT_OPS() 742 if (!cpuc) in BPF_STRUCT_OPS() 745 if (!cpuc->cur_cgid) in BPF_STRUCT_OPS() 748 if (time_before(now, cpuc->cur_at + cgrp_slice_ns)) { in BPF_STRUCT_OPS() 749 if (scx_bpf_dsq_move_to_local(cpuc->cur_cgid, 0)) { in BPF_STRUCT_OPS() [all …]
|
| H A D | scx_qmap.bpf.c | 701 struct cpu_ctx __arena *cpuc; in BPF_STRUCT_OPS() local 751 cpuc = &qa.cpu_ctxs[scx_bpf_this_cid()]; in BPF_STRUCT_OPS() 755 if (!cpuc->dsp_cnt) { in BPF_STRUCT_OPS() 756 cpuc->dsp_idx = (cpuc->dsp_idx + 1) % 5; in BPF_STRUCT_OPS() 757 cpuc->dsp_cnt = 1 << cpuc->dsp_idx; in BPF_STRUCT_OPS() 764 taskc = qmap_fifo_pop(&qa.fifos[cpuc->dsp_idx]); in BPF_STRUCT_OPS() 819 cpuc->dsp_cnt--; in BPF_STRUCT_OPS() 826 if (!cpuc->dsp_cnt) in BPF_STRUCT_OPS() 830 cpuc->dsp_cnt = 0; in BPF_STRUCT_OPS() 858 struct cpu_ctx __arena *cpuc = &qa.cpu_ctxs[scx_bpf_this_cid()]; in BPF_STRUCT_OPS() local [all …]
|
| /linux/arch/x86/events/ |
| H A D | perf_event.h | 843 int (*schedule_events)(struct cpu_hw_events *cpuc, int n, int *assign); 883 (*get_event_constraints)(struct cpu_hw_events *cpuc, 887 void (*put_event_constraints)(struct cpu_hw_events *cpuc, 890 void (*start_scheduling)(struct cpu_hw_events *cpuc); 892 void (*commit_scheduling)(struct cpu_hw_events *cpuc, int idx, int cntr); 894 void (*stop_scheduling)(struct cpu_hw_events *cpuc); 1001 void (*lbr_read)(struct cpu_hw_events *cpuc); 1295 int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign); 1499 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); 1502 cpuc in amd_pmu_brs_add() 1503 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_brs_add() local 1515 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_brs_del() local 1891 intel_cpuc_prepare(struct cpu_hw_events * cpuc,int cpu) intel_cpuc_prepare() argument 1896 intel_cpuc_finish(struct cpu_hw_events * cpuc) intel_cpuc_finish() argument [all...] |