/kernel/linux/linux-6.6/arch/x86/events/amd/ |
H A D | lbr.c | 99 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in amd_pmu_lbr_filter() local 100 int br_sel = cpuc->br_sel, offset, type, i, j; in amd_pmu_lbr_filter() 110 for (i = 0; i < cpuc->lbr_stack.nr; i++) { in amd_pmu_lbr_filter() 111 from = cpuc->lbr_entries[i].from; in amd_pmu_lbr_filter() 112 to = cpuc->lbr_entries[i].to; in amd_pmu_lbr_filter() 121 cpuc->lbr_entries[i].from += offset; in amd_pmu_lbr_filter() 128 cpuc->lbr_entries[i].from = 0; /* mark invalid */ in amd_pmu_lbr_filter() 133 cpuc->lbr_entries[i].type = common_branch_type(type); in amd_pmu_lbr_filter() 140 for (i = 0; i < cpuc->lbr_stack.nr; ) { in amd_pmu_lbr_filter() 141 if (!cpuc in amd_pmu_lbr_filter() 162 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_read() local 324 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_reset() local 343 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_add() local 363 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_del() local 378 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_sched_task() local 391 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_enable_all() local 412 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_lbr_disable_all() local [all...] |
H A D | core.c | 364 static inline int amd_has_nb(struct cpu_hw_events *cpuc) in amd_has_nb() argument 366 struct amd_nb *nb = cpuc->amd_nb; in amd_has_nb() 392 static void __amd_put_nb_event_constraints(struct cpu_hw_events *cpuc, in __amd_put_nb_event_constraints() argument 395 struct amd_nb *nb = cpuc->amd_nb; in __amd_put_nb_event_constraints() 449 __amd_get_nb_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, in __amd_get_nb_event_constraints() argument 453 struct amd_nb *nb = cpuc->amd_nb; in __amd_get_nb_event_constraints() 460 if (cpuc->is_fake) in __amd_get_nb_event_constraints() 547 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); in amd_pmu_cpu_prepare() local 549 cpuc->lbr_sel = kzalloc_node(sizeof(struct er_account), GFP_KERNEL, in amd_pmu_cpu_prepare() 551 if (!cpuc in amd_pmu_cpu_prepare() 571 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); amd_pmu_cpu_starting() local 692 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_check_overflow() local 724 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_enable_all() local 854 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_handle_irq() local 883 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_v2_handle_irq() local 975 amd_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints() argument 987 amd_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) amd_put_event_constraints() argument 1084 amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints_f15h() argument 1159 amd_get_event_constraints_f17h(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints_f17h() argument 1170 amd_put_event_constraints_f17h(struct cpu_hw_events *cpuc, struct perf_event *event) amd_put_event_constraints_f17h() argument 1200 amd_get_event_constraints_f19h(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints_f19h() argument 1494 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_enable_virt() local 1505 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_disable_virt() local [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 386 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_brs_sched_task() local 407 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); perf_amd_brs_lopwr_cb() local [all...] |
/kernel/linux/linux-5.10/arch/alpha/kernel/ |
H A D | perf_event.c | 387 * If new events have been scheduled then update cpuc with the new 391 static void maybe_change_configuration(struct cpu_hw_events *cpuc) in maybe_change_configuration() argument 395 if (cpuc->n_added == 0) in maybe_change_configuration() 399 for (j = 0; j < cpuc->n_events; j++) { in maybe_change_configuration() 400 struct perf_event *pe = cpuc->event[j]; in maybe_change_configuration() 402 if (cpuc->current_idx[j] != PMC_NO_INDEX && in maybe_change_configuration() 403 cpuc->current_idx[j] != pe->hw.idx) { in maybe_change_configuration() 404 alpha_perf_event_update(pe, &pe->hw, cpuc->current_idx[j], 0); in maybe_change_configuration() 405 cpuc->current_idx[j] = PMC_NO_INDEX; in maybe_change_configuration() 410 cpuc in maybe_change_configuration() 435 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_add() local 487 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_del() local 535 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_stop() local 555 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_start() local 722 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_enable() local 748 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_disable() local 807 struct cpu_hw_events *cpuc; alpha_perf_event_irq_handler() local [all...] |
/kernel/linux/linux-6.6/arch/alpha/kernel/ |
H A D | perf_event.c | 387 * If new events have been scheduled then update cpuc with the new 391 static void maybe_change_configuration(struct cpu_hw_events *cpuc) in maybe_change_configuration() argument 395 if (cpuc->n_added == 0) in maybe_change_configuration() 399 for (j = 0; j < cpuc->n_events; j++) { in maybe_change_configuration() 400 struct perf_event *pe = cpuc->event[j]; in maybe_change_configuration() 402 if (cpuc->current_idx[j] != PMC_NO_INDEX && in maybe_change_configuration() 403 cpuc->current_idx[j] != pe->hw.idx) { in maybe_change_configuration() 404 alpha_perf_event_update(pe, &pe->hw, cpuc->current_idx[j], 0); in maybe_change_configuration() 405 cpuc->current_idx[j] = PMC_NO_INDEX; in maybe_change_configuration() 410 cpuc in maybe_change_configuration() 435 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_add() local 487 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_del() local 535 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_stop() local 555 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_start() local 718 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_enable() local 744 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); alpha_pmu_disable() local 803 struct cpu_hw_events *cpuc; alpha_perf_event_irq_handler() local [all...] |
/kernel/linux/linux-5.10/arch/x86/events/intel/ |
H A D | lbr.c | 173 static void intel_pmu_lbr_filter(struct cpu_hw_events *cpuc); 190 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_lbr_enable() local 204 if (cpuc->lbr_sel) in __intel_pmu_lbr_enable() 205 lbr_select = cpuc->lbr_sel->config & x86_pmu.lbr_sel_mask; in __intel_pmu_lbr_enable() 206 if (!static_cpu_has(X86_FEATURE_ARCH_LBR) && !pmi && cpuc->lbr_sel) in __intel_pmu_lbr_enable() 273 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_lbr_reset() local 280 cpuc->last_task_ctx = NULL; in intel_pmu_lbr_reset() 281 cpuc->last_log_id = 0; in intel_pmu_lbr_reset() 443 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_lbr_restore() local 465 if (cpuc in intel_pmu_lbr_restore() 507 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_lbr_restore() local 535 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_save() local 584 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_lbr_save() local 624 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_sched_task() local 661 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_add() local 703 struct cpu_hw_events *cpuc; release_lbr_buffers() local 722 struct cpu_hw_events *cpuc; reserve_lbr_buffers() local 742 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_del() local 764 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); vlbr_exclude_host() local 772 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_enable_all() local 780 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_disable_all() local 786 intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc) intel_pmu_lbr_read_32() argument 823 intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc) intel_pmu_lbr_read_64() argument 947 intel_pmu_store_lbr(struct cpu_hw_events *cpuc, struct lbr_entry *entries) intel_pmu_store_lbr() argument 983 intel_pmu_arch_lbr_read(struct cpu_hw_events *cpuc) intel_pmu_arch_lbr_read() argument 988 intel_pmu_arch_lbr_read_xsave(struct cpu_hw_events *cpuc) intel_pmu_arch_lbr_read_xsave() argument 1003 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_read() local 1413 intel_pmu_lbr_filter(struct cpu_hw_events *cpuc) intel_pmu_lbr_filter() argument 1478 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_store_pebs_lbrs() local [all...] |
H A D | ds.c | 566 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_disable_bts() local 569 if (!cpuc->ds) in intel_pmu_disable_bts() 583 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_bts_buffer() local 584 struct debug_store *ds = cpuc->ds; in intel_pmu_drain_bts_buffer() 590 struct perf_event *event = cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; in intel_pmu_drain_bts_buffer() 909 static inline bool pebs_needs_sched_cb(struct cpu_hw_events *cpuc) in pebs_needs_sched_cb() argument 911 if (cpuc->n_pebs == cpuc->n_pebs_via_pt) in pebs_needs_sched_cb() 914 return cpuc->n_pebs && (cpuc in pebs_needs_sched_cb() 919 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_sched_task() local 925 pebs_update_threshold(struct cpu_hw_events *cpuc) pebs_update_threshold() argument 951 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); adaptive_pebs_record_size_update() local 1018 pebs_update_state(bool needed_cb, struct cpu_hw_events *cpuc, struct perf_event *event, bool add) pebs_update_state() argument 1067 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_add() local 1082 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_via_pt_disable() local 1093 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_via_pt_enable() local 1110 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_enable() local 1151 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_del() local 1166 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_disable() local 1191 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_enable_all() local 1199 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_disable_all() local 1207 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_fixup_ip() local 1354 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_pebs_fixed_sample_data() local 1519 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_pebs_adaptive_sample_data() local 1624 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); get_next_pebs_record_by_bit() local 1741 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_pebs_event() local 1791 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_core() local 1827 intel_pmu_pebs_event_update_no_drain(struct cpu_hw_events *cpuc, int size) intel_pmu_pebs_event_update_no_drain() argument 1848 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_nhm() local 1963 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_icl() local [all...] |
H A D | core.c | 1971 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_disable_all() local 1975 if (test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) in __intel_pmu_disable_all() 1988 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_enable_all() local 1992 x86_pmu.intel_ctrl & ~cpuc->intel_ctrl_guest_mask); in __intel_pmu_enable_all() 1994 if (test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) { in __intel_pmu_enable_all() 1996 cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; in __intel_pmu_enable_all() 2027 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_nhm_workaround() local 2060 event = cpuc->events[i]; in intel_pmu_nhm_workaround() 2074 event = cpuc->events[i]; in intel_pmu_nhm_workaround() 2092 static void intel_set_tfa(struct cpu_hw_events *cpuc, boo argument 2102 intel_tfa_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr) intel_tfa_commit_scheduling() argument 2113 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_tfa_pmu_enable_all() local 2158 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_set_masks() local 2170 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_clear_masks() local 2184 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_disable_fixed() local 2331 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); update_saved_topdown_regs() local 2355 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); icl_update_topdown_event() local 2412 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_read_topdown_event() local 2441 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_enable_fixed() local 2588 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); handle_pmi_common() local 2725 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_handle_irq_v4() local 2798 struct cpu_hw_events *cpuc; intel_pmu_handle_irq() local 2935 __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 3010 __intel_shared_reg_put_constraints(struct cpu_hw_events *cpuc, struct hw_perf_event_extra *reg) __intel_shared_reg_put_constraints() argument 3036 intel_shared_regs_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_shared_regs_constraints() argument 3060 x86_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) x86_get_event_constraints() argument 3078 __intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) __intel_get_event_constraints() argument 3103 intel_start_scheduling(struct cpu_hw_events *cpuc) intel_start_scheduling() argument 3132 intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr) intel_commit_scheduling() argument 3159 intel_stop_scheduling(struct cpu_hw_events *cpuc) intel_stop_scheduling() argument 3186 dyn_constraint(struct cpu_hw_events *cpuc, struct event_constraint *c, int idx) dyn_constraint() argument 3215 intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, int idx, struct event_constraint *c) intel_get_excl_constraints() argument 3315 intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) intel_get_event_constraints() argument 3341 intel_put_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_put_excl_constraints() argument 3387 intel_put_shared_regs_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_put_shared_regs_event_constraints() argument 3401 intel_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_put_event_constraints() argument 3704 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_guest_get_msrs() local 3736 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); core_guest_get_msrs() local 3770 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); core_pmu_enable_all() local 3834 hsw_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) hsw_get_event_constraints() argument 3852 icl_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) icl_get_event_constraints() argument 3867 glp_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) glp_get_event_constraints() argument 3882 tnt_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) tnt_get_event_constraints() argument 3907 tfa_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) tfa_get_event_constraints() argument 4015 intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu) intel_cpuc_prepare() argument 4075 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); intel_pmu_cpu_starting() local 4151 free_excl_cntrs(struct cpu_hw_events *cpuc) free_excl_cntrs() argument 4174 intel_cpuc_finish(struct cpu_hw_events *cpuc) intel_cpuc_finish() argument 4763 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); update_tfa_sched() local [all...] |
H A D | bts.c | 256 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_start() local 267 bts->ds_back.bts_buffer_base = cpuc->ds->bts_buffer_base; in bts_event_start() 268 bts->ds_back.bts_absolute_maximum = cpuc->ds->bts_absolute_maximum; in bts_event_start() 269 bts->ds_back.bts_interrupt_threshold = cpuc->ds->bts_interrupt_threshold; in bts_event_start() 301 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_stop() local 326 cpuc->ds->bts_index = bts->ds_back.bts_buffer_base; in bts_event_stop() 327 cpuc->ds->bts_buffer_base = bts->ds_back.bts_buffer_base; in bts_event_stop() 328 cpuc->ds->bts_absolute_maximum = bts->ds_back.bts_absolute_maximum; in bts_event_stop() 329 cpuc->ds->bts_interrupt_threshold = bts->ds_back.bts_interrupt_threshold; in bts_event_stop() 516 struct cpu_hw_events *cpuc in bts_event_add() local [all...] |
/kernel/linux/linux-6.6/arch/x86/events/intel/ |
H A D | lbr.c | 105 static void intel_pmu_lbr_filter(struct cpu_hw_events *cpuc); 122 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_lbr_enable() local 136 if (cpuc->lbr_sel) in __intel_pmu_lbr_enable() 137 lbr_select = cpuc->lbr_sel->config & x86_pmu.lbr_sel_mask; in __intel_pmu_lbr_enable() 138 if (!static_cpu_has(X86_FEATURE_ARCH_LBR) && !pmi && cpuc->lbr_sel) in __intel_pmu_lbr_enable() 191 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_lbr_reset() local 198 cpuc->last_task_ctx = NULL; in intel_pmu_lbr_reset() 199 cpuc->last_log_id = 0; in intel_pmu_lbr_reset() 200 if (!static_cpu_has(X86_FEATURE_ARCH_LBR) && cpuc->lbr_select) in intel_pmu_lbr_reset() 361 struct cpu_hw_events *cpuc in intel_pmu_lbr_restore() local 426 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_lbr_restore() local 453 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_save() local 503 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_lbr_save() local 543 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_sched_task() local 580 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_add() local 622 struct cpu_hw_events *cpuc; release_lbr_buffers() local 641 struct cpu_hw_events *cpuc; reserve_lbr_buffers() local 661 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_del() local 683 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); vlbr_exclude_host() local 691 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_enable_all() local 699 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_disable_all() local 709 intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc) intel_pmu_lbr_read_32() argument 743 intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc) intel_pmu_lbr_read_64() argument 869 intel_pmu_store_lbr(struct cpu_hw_events *cpuc, struct lbr_entry *entries) intel_pmu_store_lbr() argument 906 intel_pmu_arch_lbr_read(struct cpu_hw_events *cpuc) intel_pmu_arch_lbr_read() argument 911 intel_pmu_arch_lbr_read_xsave(struct cpu_hw_events *cpuc) intel_pmu_arch_lbr_read_xsave() argument 926 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_lbr_read() local 1123 intel_pmu_lbr_filter(struct cpu_hw_events *cpuc) intel_pmu_lbr_filter() argument 1188 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_store_pebs_lbrs() local [all...] |
H A D | ds.c | 740 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_disable_bts() local 743 if (!cpuc->ds) in intel_pmu_disable_bts() 757 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in intel_pmu_drain_bts_buffer() local 758 struct debug_store *ds = cpuc->ds; in intel_pmu_drain_bts_buffer() 764 struct perf_event *event = cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; in intel_pmu_drain_bts_buffer() 1120 static inline bool pebs_needs_sched_cb(struct cpu_hw_events *cpuc) in pebs_needs_sched_cb() argument 1122 if (cpuc->n_pebs == cpuc->n_pebs_via_pt) in pebs_needs_sched_cb() 1125 return cpuc->n_pebs && (cpuc in pebs_needs_sched_cb() 1130 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_sched_task() local 1136 pebs_update_threshold(struct cpu_hw_events *cpuc) pebs_update_threshold() argument 1164 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); adaptive_pebs_record_size_update() local 1233 pebs_update_state(bool needed_cb, struct cpu_hw_events *cpuc, struct perf_event *event, bool add) pebs_update_state() argument 1273 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_add() local 1288 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_via_pt_disable() local 1299 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_via_pt_enable() local 1325 intel_pmu_drain_large_pebs(struct cpu_hw_events *cpuc) intel_pmu_drain_large_pebs() argument 1334 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_enable() local 1391 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_del() local 1406 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_disable() local 1429 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_enable_all() local 1437 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_disable_all() local 1445 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_pebs_fixup_ip() local 1620 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_pebs_fixed_sample_data() local 1797 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); setup_pebs_adaptive_sample_data() local 1929 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); get_next_pebs_record_by_bit() local 2046 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_pebs_event() local 2096 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_core() local 2132 intel_pmu_pebs_event_update_no_drain(struct cpu_hw_events *cpuc, int size) intel_pmu_pebs_event_update_no_drain() argument 2153 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_nhm() local 2268 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_drain_pebs_icl() local [all...] |
H A D | core.c | 2212 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_disable_all() local 2216 if (bts && test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) in __intel_pmu_disable_all() 2229 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in __intel_pmu_enable_all() local 2230 u64 intel_ctrl = hybrid(cpuc->pmu, intel_ctrl); in __intel_pmu_enable_all() 2234 if (cpuc->fixed_ctrl_val != cpuc->active_fixed_ctrl_val) { in __intel_pmu_enable_all() 2235 wrmsrl(MSR_ARCH_PERFMON_FIXED_CTR_CTRL, cpuc->fixed_ctrl_val); in __intel_pmu_enable_all() 2236 cpuc->active_fixed_ctrl_val = cpuc->fixed_ctrl_val; in __intel_pmu_enable_all() 2240 intel_ctrl & ~cpuc in __intel_pmu_enable_all() 2263 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); __intel_pmu_snapshot_branch_stack() local 2316 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_nhm_workaround() local 2381 intel_set_tfa(struct cpu_hw_events *cpuc, bool on) intel_set_tfa() argument 2391 intel_tfa_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr) intel_tfa_commit_scheduling() argument 2402 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_tfa_pmu_enable_all() local 2435 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_set_masks() local 2447 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_clear_masks() local 2456 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_disable_fixed() local 2462 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_disable_fixed() local 2625 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); update_saved_topdown_regs() local 2650 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_update_topdown_event() local 2725 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_read_topdown_event() local 2749 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_enable_fixed() local 2755 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_enable_fixed() local 2878 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_reset() local 2933 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_handle_guest_pebs() local 2963 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); handle_pmi_common() local 3076 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_pmu_handle_irq() local 3177 intel_alt_er(struct cpu_hw_events *cpuc, int idx, u64 config) intel_alt_er() argument 3222 __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 3297 __intel_shared_reg_put_constraints(struct cpu_hw_events *cpuc, struct hw_perf_event_extra *reg) __intel_shared_reg_put_constraints() argument 3323 intel_shared_regs_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_shared_regs_constraints() argument 3347 x86_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) x86_get_event_constraints() argument 3366 __intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) __intel_get_event_constraints() argument 3391 intel_start_scheduling(struct cpu_hw_events *cpuc) intel_start_scheduling() argument 3420 intel_commit_scheduling(struct cpu_hw_events *cpuc, int idx, int cntr) intel_commit_scheduling() argument 3447 intel_stop_scheduling(struct cpu_hw_events *cpuc) intel_stop_scheduling() argument 3474 dyn_constraint(struct cpu_hw_events *cpuc, struct event_constraint *c, int idx) dyn_constraint() argument 3503 intel_get_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, int idx, struct event_constraint *c) intel_get_excl_constraints() argument 3603 intel_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) intel_get_event_constraints() argument 3629 intel_put_excl_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_put_excl_constraints() argument 3675 intel_put_shared_regs_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_put_shared_regs_event_constraints() argument 3689 intel_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) intel_put_event_constraints() argument 4058 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); intel_guest_get_msrs() local 4138 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); core_guest_get_msrs() local 4172 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); core_pmu_enable_all() local 4248 hsw_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) hsw_get_event_constraints() argument 4266 icl_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) icl_get_event_constraints() argument 4281 spr_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) spr_get_event_constraints() argument 4306 glp_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) glp_get_event_constraints() argument 4321 tnt_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) tnt_get_event_constraints() argument 4346 tfa_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) tfa_get_event_constraints() argument 4364 adl_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) adl_get_event_constraints() argument 4379 cmt_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) cmt_get_event_constraints() argument 4412 rwc_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) rwc_get_event_constraints() argument 4436 mtl_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) mtl_get_event_constraints() argument 4564 intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu) intel_cpuc_prepare() argument 4643 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); init_hybrid_pmu() local 4691 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); intel_pmu_cpu_starting() local 4775 free_excl_cntrs(struct cpu_hw_events *cpuc) free_excl_cntrs() argument 4795 intel_cpuc_finish(struct cpu_hw_events *cpuc) intel_cpuc_finish() argument 4811 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); intel_pmu_cpu_dead() local 5418 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); update_tfa_sched() local [all...] |
H A D | bts.c | 262 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_start() local 273 bts->ds_back.bts_buffer_base = cpuc->ds->bts_buffer_base; in bts_event_start() 274 bts->ds_back.bts_absolute_maximum = cpuc->ds->bts_absolute_maximum; in bts_event_start() 275 bts->ds_back.bts_interrupt_threshold = cpuc->ds->bts_interrupt_threshold; in bts_event_start() 307 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in bts_event_stop() local 332 cpuc->ds->bts_index = bts->ds_back.bts_buffer_base; in bts_event_stop() 333 cpuc->ds->bts_buffer_base = bts->ds_back.bts_buffer_base; in bts_event_stop() 334 cpuc->ds->bts_absolute_maximum = bts->ds_back.bts_absolute_maximum; in bts_event_stop() 335 cpuc->ds->bts_interrupt_threshold = bts->ds_back.bts_interrupt_threshold; in bts_event_stop() 522 struct cpu_hw_events *cpuc in bts_event_add() local [all...] |
/kernel/linux/linux-5.10/arch/x86/events/ |
H A D | core.c | 653 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in x86_pmu_disable_all() local 657 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; in x86_pmu_disable_all() 660 if (!test_bit(idx, cpuc->active_mask)) in x86_pmu_disable_all() 687 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in x86_pmu_disable() local 692 if (!cpuc->enabled) in x86_pmu_disable() 695 cpuc->n_added = 0; in x86_pmu_disable() 696 cpuc->enabled = 0; in x86_pmu_disable() 704 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in x86_pmu_enable_all() local 708 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; in x86_pmu_enable_all() 710 if (!test_bit(idx, cpuc in x86_pmu_enable_all() 724 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); x86_get_pmu() local 934 x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign) x86_schedule_events() argument 1073 add_nr_metric_event(struct cpu_hw_events *cpuc, struct perf_event *event) add_nr_metric_event() argument 1086 del_nr_metric_event(struct cpu_hw_events *cpuc, struct perf_event *event) del_nr_metric_event() argument 1093 collect_event(struct cpu_hw_events *cpuc, struct perf_event *event, int max_count, int n) collect_event() argument 1116 collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, bool dogrp) collect_events() argument 1168 x86_assign_hw_event(struct perf_event *event, struct cpu_hw_events *cpuc, int i) x86_assign_hw_event() argument 1226 match_prev_assignment(struct hw_perf_event *hwc, struct cpu_hw_events *cpuc, int i) match_prev_assignment() argument 1239 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_enable() local 1404 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_add() local 1462 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_start() local 1489 struct cpu_hw_events *cpuc; perf_event_print_debug() local 1547 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_stop() local 1570 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_del() local 1627 struct cpu_hw_events *cpuc; x86_pmu_handle_irq() local 1713 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); x86_pmu_prepare_cpu() local 1732 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); x86_pmu_online_cpu() local 2069 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_start_txn() local 2091 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_cancel_txn() local 2120 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_commit_txn() local 2158 free_fake_cpuc(struct cpu_hw_events *cpuc) free_fake_cpuc() argument 2166 struct cpu_hw_events *cpuc; allocate_fake_cpuc() local [all...] |
/kernel/linux/linux-6.6/arch/x86/events/ |
H A D | core.c | 679 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in x86_pmu_disable_all() local 683 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; in x86_pmu_disable_all() 686 if (!test_bit(idx, cpuc->active_mask)) in x86_pmu_disable_all() 719 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in x86_pmu_disable() local 724 if (!cpuc->enabled) in x86_pmu_disable() 727 cpuc->n_added = 0; in x86_pmu_disable() 728 cpuc->enabled = 0; in x86_pmu_disable() 736 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in x86_pmu_enable_all() local 740 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; in x86_pmu_enable_all() 742 if (!test_bit(idx, cpuc in x86_pmu_enable_all() 766 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); x86_get_pmu() local 976 x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign) x86_schedule_events() argument 1114 add_nr_metric_event(struct cpu_hw_events *cpuc, struct perf_event *event) add_nr_metric_event() argument 1127 del_nr_metric_event(struct cpu_hw_events *cpuc, struct perf_event *event) del_nr_metric_event() argument 1134 collect_event(struct cpu_hw_events *cpuc, struct perf_event *event, int max_count, int n) collect_event() argument 1158 collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, bool dogrp) collect_events() argument 1212 x86_assign_hw_event(struct perf_event *event, struct cpu_hw_events *cpuc, int i) x86_assign_hw_event() argument 1272 match_prev_assignment(struct hw_perf_event *hwc, struct cpu_hw_events *cpuc, int i) match_prev_assignment() argument 1285 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_enable() local 1439 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_add() local 1497 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_start() local 1524 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); perf_event_print_debug() local 1584 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_stop() local 1607 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_del() local 1667 struct cpu_hw_events *cpuc; x86_pmu_handle_irq() local 1757 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); x86_pmu_prepare_cpu() local 1776 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); x86_pmu_online_cpu() local 2218 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_start_txn() local 2240 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_cancel_txn() local 2269 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); x86_pmu_commit_txn() local 2307 free_fake_cpuc(struct cpu_hw_events *cpuc) free_fake_cpuc() argument 2315 struct cpu_hw_events *cpuc; allocate_fake_cpuc() local 2470 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); perf_clear_dirty_counters() local [all...] |
/kernel/linux/linux-5.10/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, int idx) 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, int idx) 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 947 calculate_single_pcr(struct cpu_hw_events *cpuc) calculate_single_pcr() argument 983 calculate_multiple_pcrs(struct cpu_hw_events *cpuc) calculate_multiple_pcrs() argument 1017 update_pcrs_for_enable(struct cpu_hw_events *cpuc) update_pcrs_for_enable() argument 1031 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_enable() local 1049 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_disable() local 1068 active_event_index(struct cpu_hw_events *cpuc, struct perf_event *event) active_event_index() argument 1083 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_start() local 1100 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_stop() local 1116 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_del() local 1151 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_read() local 1163 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); perf_stop_nmi_watchdog() local 1374 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_add() local 1552 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_commit_txn() local 1618 struct cpu_hw_events *cpuc; perf_event_nmi_handler() local [all...] |
/kernel/linux/linux-6.6/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, int idx) 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, int idx) 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 947 calculate_single_pcr(struct cpu_hw_events *cpuc) calculate_single_pcr() argument 983 calculate_multiple_pcrs(struct cpu_hw_events *cpuc) calculate_multiple_pcrs() argument 1017 update_pcrs_for_enable(struct cpu_hw_events *cpuc) update_pcrs_for_enable() argument 1031 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_enable() local 1049 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_disable() local 1068 active_event_index(struct cpu_hw_events *cpuc, struct perf_event *event) active_event_index() argument 1083 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_start() local 1100 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_stop() local 1116 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_del() local 1151 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_read() local 1163 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); perf_stop_nmi_watchdog() local 1374 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_add() local 1552 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); sparc_pmu_commit_txn() local 1618 struct cpu_hw_events *cpuc; perf_event_nmi_handler() local [all...] |
/kernel/linux/linux-5.10/arch/x86/events/amd/ |
H A D | core.c | 354 static inline int amd_has_nb(struct cpu_hw_events *cpuc) in amd_has_nb() argument 356 struct amd_nb *nb = cpuc->amd_nb; in amd_has_nb() 382 static void __amd_put_nb_event_constraints(struct cpu_hw_events *cpuc, in __amd_put_nb_event_constraints() argument 385 struct amd_nb *nb = cpuc->amd_nb; in __amd_put_nb_event_constraints() 439 __amd_get_nb_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, in __amd_get_nb_event_constraints() argument 443 struct amd_nb *nb = cpuc->amd_nb; in __amd_get_nb_event_constraints() 450 if (cpuc->is_fake) in __amd_get_nb_event_constraints() 515 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); in amd_pmu_cpu_prepare() local 517 WARN_ON_ONCE(cpuc->amd_nb); in amd_pmu_cpu_prepare() 522 cpuc in amd_pmu_cpu_prepare() 531 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); amd_pmu_cpu_starting() local 610 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_disable_all() local 696 amd_get_event_constraints(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints() argument 708 amd_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) amd_put_event_constraints() argument 805 amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints_f15h() argument 880 amd_get_event_constraints_f17h(struct cpu_hw_events *cpuc, int idx, struct perf_event *event) amd_get_event_constraints_f17h() argument 891 amd_put_event_constraints_f17h(struct cpu_hw_events *cpuc, struct perf_event *event) amd_put_event_constraints_f17h() argument 1028 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_enable_virt() local 1040 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); amd_pmu_disable_virt() local [all...] |
/kernel/linux/linux-5.10/arch/loongarch/kernel/ |
H A D | perf_event.c | 254 static int loongarch_pmu_alloc_counter(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc) in loongarch_pmu_alloc_counter() argument 259 if (!test_and_set_bit(i, cpuc->used_mask)) in loongarch_pmu_alloc_counter() 270 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in loongarch_pmu_enable_event() local 275 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base) | in loongarch_pmu_enable_event() 289 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in loongarch_pmu_disable_event() local 294 cpuc->saved_ctrl[idx] = loongarch_pmu_read_control(idx) & in loongarch_pmu_disable_event() 296 loongarch_pmu_write_control(idx, cpuc->saved_ctrl[idx]); in loongarch_pmu_disable_event() 389 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in loongarch_pmu_add() local 395 idx = loongarch_pmu_alloc_counter(cpuc, hwc); in loongarch_pmu_add() 407 cpuc in loongarch_pmu_add() 423 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); loongarch_pmu_del() local 472 handle_associated_event(struct cpu_hw_events *cpuc, int idx, struct perf_sample_data *data, struct pt_regs *regs) handle_associated_event() argument 494 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); pmu_handle_irq() local 818 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); pause_local_counters() local 833 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); resume_local_counters() local [all...] |
/kernel/linux/linux-6.6/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 in loongarch_pmu_add() 422 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); loongarch_pmu_del() local 481 handle_associated_event(struct cpu_hw_events *cpuc, int idx, struct perf_sample_data *data, struct pt_regs *regs) handle_associated_event() argument 503 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); pmu_handle_irq() local 827 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); pause_local_counters() local 842 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); resume_local_counters() local [all...] |
/kernel/linux/linux-5.10/arch/sh/kernel/ |
H A D | perf_event.c | 219 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_stop() local 225 cpuc->events[idx] = NULL; in sh_pmu_stop() 237 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_start() local 247 cpuc->events[idx] = event; in sh_pmu_start() 254 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_del() local 257 __clear_bit(event->hw.idx, cpuc->used_mask); in sh_pmu_del() 264 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); in sh_pmu_add() local 271 if (__test_and_set_bit(idx, cpuc->used_mask)) { in sh_pmu_add() 272 idx = find_first_zero_bit(cpuc->used_mask, sh_pmu->num_events); in sh_pmu_add() 276 __set_bit(idx, cpuc in sh_pmu_add() [all...] |
/kernel/linux/linux-6.6/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 in sh_pmu_add() [all...] |
/kernel/linux/linux-5.10/arch/arm/kernel/ |
H A D | perf_event_xscale.c | 149 struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events); in xscale1pmu_handle_irq() local 174 struct perf_event *event = cpuc->events[idx]; in xscale1pmu_handle_irq() 275 xscale1pmu_get_event_idx(struct pmu_hw_events *cpuc, in xscale1pmu_get_event_idx() argument 280 if (test_and_set_bit(XSCALE_CYCLE_COUNTER, cpuc->used_mask)) in xscale1pmu_get_event_idx() 285 if (!test_and_set_bit(XSCALE_COUNTER1, cpuc->used_mask)) in xscale1pmu_get_event_idx() 288 if (!test_and_set_bit(XSCALE_COUNTER0, cpuc->used_mask)) in xscale1pmu_get_event_idx() 295 static void xscalepmu_clear_event_idx(struct pmu_hw_events *cpuc, in xscalepmu_clear_event_idx() argument 298 clear_bit(event->hw.idx, cpuc->used_mask); in xscalepmu_clear_event_idx() 501 struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events); in xscale2pmu_handle_irq() local 520 struct perf_event *event = cpuc in xscale2pmu_handle_irq() 649 xscale2pmu_get_event_idx(struct pmu_hw_events *cpuc, struct perf_event *event) xscale2pmu_get_event_idx() argument [all...] |
/kernel/linux/linux-6.6/arch/arm/kernel/ |
H A D | perf_event_xscale.c | 149 struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events); in xscale1pmu_handle_irq() local 174 struct perf_event *event = cpuc->events[idx]; in xscale1pmu_handle_irq() 275 xscale1pmu_get_event_idx(struct pmu_hw_events *cpuc, in xscale1pmu_get_event_idx() argument 280 if (test_and_set_bit(XSCALE_CYCLE_COUNTER, cpuc->used_mask)) in xscale1pmu_get_event_idx() 285 if (!test_and_set_bit(XSCALE_COUNTER1, cpuc->used_mask)) in xscale1pmu_get_event_idx() 288 if (!test_and_set_bit(XSCALE_COUNTER0, cpuc->used_mask)) in xscale1pmu_get_event_idx() 295 static void xscalepmu_clear_event_idx(struct pmu_hw_events *cpuc, in xscalepmu_clear_event_idx() argument 298 clear_bit(event->hw.idx, cpuc->used_mask); in xscalepmu_clear_event_idx() 501 struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events); in xscale2pmu_handle_irq() local 520 struct perf_event *event = cpuc in xscale2pmu_handle_irq() 649 xscale2pmu_get_event_idx(struct pmu_hw_events *cpuc, struct perf_event *event) xscale2pmu_get_event_idx() argument [all...] |
/kernel/linux/linux-6.6/drivers/perf/ |
H A D | riscv_pmu.c | 264 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in riscv_pmu_add() local 273 cpuc->events[idx] = event; in riscv_pmu_add() 274 cpuc->n_events++; in riscv_pmu_add() 288 struct cpu_hw_events *cpuc = this_cpu_ptr(rvpmu->hw_events); in riscv_pmu_del() local 292 cpuc->events[hwc->idx] = NULL; in riscv_pmu_del() 296 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 in riscv_pmu_alloc() [all...] |