/arch/alpha/kernel/ |
H A D | perf_event.c | 386 * If new events have been scheduled then update cpuc with the new 390 static void maybe_change_configuration(struct cpu_hw_events *cpuc) argument 394 if (cpuc->n_added == 0) 398 for (j = 0; j < cpuc->n_events; j++) { 399 struct perf_event *pe = cpuc->event[j]; 401 if (cpuc->current_idx[j] != PMC_NO_INDEX && 402 cpuc->current_idx[j] != pe->hw.idx) { 403 alpha_perf_event_update(pe, &pe->hw, cpuc->current_idx[j], 0); 404 cpuc->current_idx[j] = PMC_NO_INDEX; 409 cpuc 434 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 486 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 534 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 554 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 727 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 753 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 811 struct cpu_hw_events *cpuc; local [all...] |
/arch/x86/kernel/cpu/ |
H A D | perf_event_intel_lbr.c | 126 static void intel_pmu_lbr_filter(struct cpu_hw_events *cpuc); 136 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 138 if (cpuc->lbr_sel) 139 wrmsrl(MSR_LBR_SELECT, cpuc->lbr_sel->config); 186 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 195 if (event->ctx->task && cpuc->lbr_context != event->ctx) { 197 cpuc->lbr_context = event->ctx; 199 cpuc->br_sel = event->hw.branch_reg.reg; 201 cpuc->lbr_users++; 206 struct cpu_hw_events *cpuc local 223 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 231 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 249 intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc) argument 281 intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc) argument 335 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 617 intel_pmu_lbr_filter(struct cpu_hw_events *cpuc) argument [all...] |
H A D | perf_event_amd.c | 207 static inline int amd_has_nb(struct cpu_hw_events *cpuc) argument 209 struct amd_nb *nb = cpuc->amd_nb; 235 static void __amd_put_nb_event_constraints(struct cpu_hw_events *cpuc, argument 238 struct amd_nb *nb = cpuc->amd_nb; 292 __amd_get_nb_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, argument 296 struct amd_nb *nb = cpuc->amd_nb; 303 if (cpuc->is_fake) 368 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local 370 WARN_ON_ONCE(cpuc->amd_nb); 375 cpuc 384 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local 432 amd_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 443 amd_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 540 amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, struct perf_event *event) argument 702 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 714 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local [all...] |
H A D | perf_event.c | 492 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 498 if (!test_bit(idx, cpuc->active_mask)) 510 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 515 if (!cpuc->enabled) 518 cpuc->n_added = 0; 519 cpuc->enabled = 0; 527 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 531 struct hw_perf_event *hwc = &cpuc->events[idx]->hw; 533 if (!test_bit(idx, cpuc->active_mask)) 722 int x86_schedule_events(struct cpu_hw_events *cpuc, in argument 805 collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader, bool dogrp) argument 838 x86_assign_hw_event(struct perf_event *event, struct cpu_hw_events *cpuc, int i) argument 861 match_prev_assignment(struct hw_perf_event *hwc, struct cpu_hw_events *cpuc, int i) argument 874 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1025 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1076 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1103 struct cpu_hw_events *cpuc; local 1155 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1177 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1227 struct cpu_hw_events *cpuc; local 1319 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local 1641 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1672 free_fake_cpuc(struct cpu_hw_events *cpuc) argument 1680 struct cpu_hw_events *cpuc; local [all...] |
H A D | perf_event_intel_ds.c | 477 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 480 if (!cpuc->ds) 494 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 495 struct debug_store *ds = cpuc->ds; 501 struct perf_event *event = cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; 672 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 677 cpuc->pebs_enabled |= 1ULL << hwc->idx; 680 cpuc->pebs_enabled |= 1ULL << (hwc->idx + 32); 682 cpuc->pebs_enabled |= 1ULL << 63; 687 struct cpu_hw_events *cpuc local 705 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 713 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 721 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 832 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 919 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 960 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local [all...] |
H A D | perf_event_intel.c | 1048 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1052 if (test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) 1061 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1066 x86_pmu.intel_ctrl & ~cpuc->intel_ctrl_guest_mask); 1068 if (test_bit(INTEL_PMC_IDX_FIXED_BTS, cpuc->active_mask)) { 1070 cpuc->events[INTEL_PMC_IDX_FIXED_BTS]; 1095 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1128 event = cpuc->events[i]; 1142 event = cpuc->events[i]; 1194 struct cpu_hw_events *cpuc local 1258 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1347 struct cpu_hw_events *cpuc; local 1502 __intel_shared_reg_get_constraints(struct cpu_hw_events *cpuc, struct perf_event *event, struct hw_perf_event_extra *reg) argument 1577 __intel_shared_reg_put_constraints(struct cpu_hw_events *cpuc, struct hw_perf_event_extra *reg) argument 1603 intel_shared_regs_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1627 x86_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1644 intel_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1664 intel_put_shared_regs_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1678 intel_put_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1784 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1805 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1839 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1894 hsw_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1984 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local 1998 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local 2034 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local [all...] |
H A D | perf_event_knc.c | 215 struct cpu_hw_events *cpuc; local 220 cpuc = this_cpu_ptr(&cpu_hw_events); 242 struct perf_event *event = cpuc->events[bit]; 246 if (!test_bit(bit, cpuc->active_mask))
|
H A D | perf_event.h | 420 int (*schedule_events)(struct cpu_hw_events *cpuc, int n, int *assign); 439 (*get_event_constraints)(struct cpu_hw_events *cpuc, 442 void (*put_event_constraints)(struct cpu_hw_events *cpuc, 605 int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign); 674 x86_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event);
|
H A D | perf_event_p4.c | 918 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 922 struct perf_event *event = cpuc->events[idx]; 923 if (!test_bit(idx, cpuc->active_mask)) 987 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 991 struct perf_event *event = cpuc->events[idx]; 992 if (!test_bit(idx, cpuc->active_mask)) 1001 struct cpu_hw_events *cpuc; local 1007 cpuc = this_cpu_ptr(&cpu_hw_events); 1012 if (!test_bit(idx, cpuc->active_mask)) { 1014 if (__test_and_clear_bit(idx, cpuc 1206 p4_pmu_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign) argument [all...] |
/arch/sparc/kernel/ |
H A D | perf_event.c | 818 static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) argument 826 enc = perf_event_get_enc(cpuc->events[idx]); 828 val = cpuc->pcr[pcr_index]; 831 cpuc->pcr[pcr_index] = val; 833 pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); 836 static inline void sparc_pmu_disable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) argument 846 val = cpuc->pcr[pcr_index]; 849 cpuc->pcr[pcr_index] = val; 851 pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); 910 static void read_in_all_counters(struct cpu_hw_events *cpuc) argument 932 calculate_single_pcr(struct cpu_hw_events *cpuc) argument 964 calculate_multiple_pcrs(struct cpu_hw_events *cpuc) argument 1002 update_pcrs_for_enable(struct cpu_hw_events *cpuc) argument 1016 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1034 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1053 active_event_index(struct cpu_hw_events *cpuc, struct perf_event *event) argument 1068 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1083 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1099 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1136 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1148 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1359 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1527 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1587 struct cpu_hw_events *cpuc; local [all...] |
/arch/tile/kernel/ |
H A D | perf_event.c | 593 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 597 if (__test_and_clear_bit(idx, cpuc->active_mask)) { 599 cpuc->events[hwc->idx] = NULL; 619 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 635 cpuc->events[idx] = event; 636 __set_bit(idx, cpuc->active_mask); 653 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 663 if (cpuc->n_events == tile_pmu->num_counters) 666 cpuc->event_list[cpuc 709 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 883 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local [all...] |
/arch/sh/kernel/ |
H A D | perf_event.c | 222 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 228 cpuc->events[idx] = NULL; 240 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 250 cpuc->events[idx] = event; 257 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 260 __clear_bit(event->hw.idx, cpuc->used_mask); 267 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 274 if (__test_and_set_bit(idx, cpuc->used_mask)) { 275 idx = find_first_zero_bit(cpuc->used_mask, sh_pmu->num_events); 279 __set_bit(idx, cpuc [all...] |
/arch/blackfin/kernel/ |
H A D | perf_event.c | 303 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 309 cpuc->events[idx] = NULL; 321 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 331 cpuc->events[idx] = event; 338 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 341 __clear_bit(event->hw.idx, cpuc->used_mask); 348 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 355 if (__test_and_set_bit(idx, cpuc->used_mask)) { 356 idx = find_first_zero_bit(cpuc->used_mask, MAX_HWEVENTS); 360 __set_bit(idx, cpuc 424 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local [all...] |
/arch/metag/kernel/perf/ |
H A D | perf_event.c | 261 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 288 cpuc->events[idx] = event; 309 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 318 cpuc->used_mask)) { 325 idx = find_first_zero_bit(cpuc->used_mask, 332 __set_bit(idx, cpuc->used_mask); 351 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 357 cpuc->events[idx] = NULL; 358 __clear_bit(idx, cpuc->used_mask); 810 struct cpu_hw_events *cpuc local 877 struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); local [all...] |
/arch/arm/kernel/ |
H A D | perf_event_xscale.c | 141 struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); local 166 struct perf_event *event = cpuc->events[idx]; 267 xscale1pmu_get_event_idx(struct pmu_hw_events *cpuc, argument 272 if (test_and_set_bit(XSCALE_CYCLE_COUNTER, cpuc->used_mask)) 277 if (!test_and_set_bit(XSCALE_COUNTER1, cpuc->used_mask)) 280 if (!test_and_set_bit(XSCALE_COUNTER0, cpuc->used_mask)) 488 struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); local 507 struct perf_event *event = cpuc->events[idx]; 636 xscale2pmu_get_event_idx(struct pmu_hw_events *cpuc, argument 639 int idx = xscale1pmu_get_event_idx(cpuc, even [all...] |
H A D | perf_event_v6.c | 303 struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); local 320 struct perf_event *event = cpuc->events[idx]; 381 armv6pmu_get_event_idx(struct pmu_hw_events *cpuc, argument 387 if (test_and_set_bit(ARMV6_CYCLE_COUNTER, cpuc->used_mask)) 396 if (!test_and_set_bit(ARMV6_COUNTER1, cpuc->used_mask)) 399 if (!test_and_set_bit(ARMV6_COUNTER0, cpuc->used_mask))
|
H A D | perf_event_v7.c | 786 struct pmu_hw_events *cpuc = cpu_pmu->get_hw_events(); local 807 struct perf_event *event = cpuc->events[idx]; 865 static int armv7pmu_get_event_idx(struct pmu_hw_events *cpuc, argument 875 if (test_and_set_bit(ARMV7_IDX_CYCLE_COUNTER, cpuc->used_mask)) 886 if (!test_and_set_bit(idx, cpuc->used_mask)) 1388 static int krait_pmu_get_event_idx(struct pmu_hw_events *cpuc, argument 1416 if (test_and_set_bit(bit, cpuc->used_mask)) 1420 idx = armv7pmu_get_event_idx(cpuc, event); 1422 clear_bit(bit, cpuc->used_mask); 1427 static void krait_pmu_clear_event_idx(struct pmu_hw_events *cpuc, argument [all...] |
/arch/mips/kernel/ |
H A D | perf_event_mipsxx.c | 311 static int mipsxx_pmu_alloc_counter(struct cpu_hw_events *cpuc, argument 334 !test_and_set_bit(i, cpuc->used_mask)) 343 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 347 cpuc->saved_ctrl[idx] = M_PERFCTL_EVENT(evt->event_base & 0xff) | 353 cpuc->saved_ctrl[idx] |= 363 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 369 cpuc->saved_ctrl[idx] = mipsxx_pmu_read_control(idx) & 371 mipsxx_pmu_write_control(idx, cpuc->saved_ctrl[idx]); 463 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 471 idx = mipsxx_pmu_alloc_counter(cpuc, hw 499 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 737 handle_associated_event(struct cpu_hw_events *cpuc, int idx, struct perf_sample_data *data, struct pt_regs *regs) argument 1278 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1294 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local 1305 struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); local [all...] |
/arch/arm64/kernel/ |
H A D | perf_event.c | 1075 struct pmu_hw_events *cpuc; local 1095 cpuc = this_cpu_ptr(&cpu_hw_events); 1097 struct perf_event *event = cpuc->events[idx]; 1155 static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc, argument 1163 if (test_and_set_bit(ARMV8_IDX_CYCLE_COUNTER, cpuc->used_mask)) 1174 if (!test_and_set_bit(idx, cpuc->used_mask))
|