/arch/powerpc/perf/ |
D | core-fsl-emb.c | 27 struct perf_event *event[MAX_HWEVENTS]; member 179 static void fsl_emb_pmu_read(struct perf_event *event) in fsl_emb_pmu_read() argument 183 if (event->hw.state & PERF_HES_STOPPED) in fsl_emb_pmu_read() 192 prev = local64_read(&event->hw.prev_count); in fsl_emb_pmu_read() 194 val = read_pmc(event->hw.idx); in fsl_emb_pmu_read() 195 } while (local64_cmpxchg(&event->hw.prev_count, prev, val) != prev); in fsl_emb_pmu_read() 199 local64_add(delta, &event->count); in fsl_emb_pmu_read() 200 local64_sub(delta, &event->hw.period_left); in fsl_emb_pmu_read() 272 struct perf_event *event; in collect_events() local 280 list_for_each_entry(event, &group->sibling_list, group_entry) { in collect_events() [all …]
|
D | hv-gpci.c | 151 static u64 h_gpci_get_value(struct perf_event *event) in h_gpci_get_value() argument 154 unsigned long ret = single_gpci_request(event_get_request(event), in h_gpci_get_value() 155 event_get_starting_index(event), in h_gpci_get_value() 156 event_get_secondary_index(event), in h_gpci_get_value() 157 event_get_counter_info_version(event), in h_gpci_get_value() 158 event_get_offset(event), in h_gpci_get_value() 159 event_get_length(event), in h_gpci_get_value() 166 static void h_gpci_event_update(struct perf_event *event) in h_gpci_event_update() argument 169 u64 now = h_gpci_get_value(event); in h_gpci_event_update() 170 prev = local64_xchg(&event->hw.prev_count, now); in h_gpci_event_update() [all …]
|
D | core-book3s.c | 36 struct perf_event *event[MAX_HWEVENTS]; member 116 static bool is_ebb_event(struct perf_event *event) { return false; } in is_ebb_event() argument 117 static int ebb_event_check(struct perf_event *event) { return 0; } in ebb_event_check() argument 118 static void ebb_event_add(struct perf_event *event) { } in ebb_event_add() argument 125 static inline void power_pmu_bhrb_enable(struct perf_event *event) {} in power_pmu_bhrb_enable() argument 126 static inline void power_pmu_bhrb_disable(struct perf_event *event) {} in power_pmu_bhrb_disable() argument 349 static void power_pmu_bhrb_enable(struct perf_event *event) in power_pmu_bhrb_enable() argument 357 if (event->ctx->task && cpuhw->bhrb_context != event->ctx) { in power_pmu_bhrb_enable() 359 cpuhw->bhrb_context = event->ctx; in power_pmu_bhrb_enable() 364 static void power_pmu_bhrb_disable(struct perf_event *event) in power_pmu_bhrb_disable() argument [all …]
|
D | hv-24x7.c | 291 static unsigned long event_24x7_request(struct perf_event *event, u64 *res, in event_24x7_request() argument 294 return single_24x7_request(event_get_domain(event), in event_24x7_request() 295 event_get_offset(event), in event_24x7_request() 296 event_get_starting_index(event), in event_24x7_request() 297 event_get_lpar(event), in event_24x7_request() 302 static int h_24x7_event_init(struct perf_event *event) in h_24x7_event_init() argument 310 if (event->attr.type != event->pmu->type) in h_24x7_event_init() 314 if (event_get_reserved1(event) || in h_24x7_event_init() 315 event_get_reserved2(event) || in h_24x7_event_init() 316 event_get_reserved3(event)) { in h_24x7_event_init() [all …]
|
D | power5+-pmu.c | 136 static int power5p_get_constraint(u64 event, unsigned long *maskp, in power5p_get_constraint() argument 143 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5p_get_constraint() 150 if (pmc >= 5 && !(event == 0x500009 || event == 0x600005)) in power5p_get_constraint() 153 if (event & PM_BUSEVENT_MSK) { in power5p_get_constraint() 154 unit = (event >> PM_UNIT_SH) & PM_UNIT_MSK; in power5p_get_constraint() 161 byte = (event >> PM_BYTE_SH) & PM_BYTE_MSK; in power5p_get_constraint() 170 bit = event & 7; in power5p_get_constraint() 174 value |= (unsigned long)((event >> PM_GRS_SH) & fmask) in power5p_get_constraint() 191 static int power5p_limited_pmc_event(u64 event) in power5p_limited_pmc_event() argument 193 int pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5p_limited_pmc_event() [all …]
|
D | power6-pmu.c | 139 static int power6_marked_instr_event(u64 event) in power6_marked_instr_event() argument 145 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power6_marked_instr_event() 146 psel = (event & PM_PMCSEL_MSK) >> 1; /* drop edge/level bit */ in power6_marked_instr_event() 165 if (!(event & PM_BUSEVENT_MSK) || bit == -1) in power6_marked_instr_event() 168 byte = (event >> PM_BYTE_SH) & PM_BYTE_MSK; in power6_marked_instr_event() 169 unit = (event >> PM_UNIT_SH) & PM_UNIT_MSK; in power6_marked_instr_event() 177 static int p6_compute_mmcr(u64 event[], int n_ev, in p6_compute_mmcr() argument 190 pmc = (event[i] >> PM_PMC_SH) & PM_PMC_MSK; in p6_compute_mmcr() 198 ev = event[i]; in p6_compute_mmcr() 245 if (power6_marked_instr_event(event[i])) in p6_compute_mmcr() [all …]
|
D | power5-pmu.c | 140 static int power5_get_constraint(u64 event, unsigned long *maskp, in power5_get_constraint() argument 148 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power5_get_constraint() 157 else if (event != 0x500009 && event != 0x600005) in power5_get_constraint() 160 if (event & PM_BUSEVENT_MSK) { in power5_get_constraint() 161 unit = (event >> PM_UNIT_SH) & PM_UNIT_MSK; in power5_get_constraint() 168 byte = (event >> PM_BYTE_SH) & PM_BYTE_MSK; in power5_get_constraint() 177 bit = event & 7; in power5_get_constraint() 181 value |= (unsigned long)((event >> PM_GRS_SH) & fmask) in power5_get_constraint() 227 static int find_alternative(u64 event) in find_alternative() argument 232 if (event < event_alternatives[i][0]) in find_alternative() [all …]
|
D | mpc7450-pmu.c | 41 static int mpc7450_classify_event(u32 event) in mpc7450_classify_event() argument 45 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_classify_event() 51 event &= PM_PMCSEL_MSK; in mpc7450_classify_event() 52 if (event <= 1) in mpc7450_classify_event() 54 if (event <= 7) in mpc7450_classify_event() 56 if (event <= 13) in mpc7450_classify_event() 58 if (event <= 22) in mpc7450_classify_event() 81 static int mpc7450_threshold_use(u32 event) in mpc7450_threshold_use() argument 85 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in mpc7450_threshold_use() 86 sel = event & PM_PMCSEL_MSK; in mpc7450_threshold_use() [all …]
|
D | power7-pmu.c | 85 static int power7_get_constraint(u64 event, unsigned long *maskp, in power7_get_constraint() argument 91 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in power7_get_constraint() 98 if (pmc >= 5 && !(event == 0x500fa || event == 0x600f4)) in power7_get_constraint() 107 unit = (event >> PM_UNIT_SH) & PM_UNIT_MSK; in power7_get_constraint() 110 int l2sel = (event >> PM_L2SEL_SH) & PM_L2SEL_MSK; in power7_get_constraint() 132 static int find_alternative(u64 event) in find_alternative() argument 137 if (event < event_alternatives[i][0]) in find_alternative() 140 if (event == event_alternatives[i][j]) in find_alternative() 146 static s64 find_alternative_decode(u64 event) in find_alternative_decode() argument 151 pmc = (event >> PM_PMC_SH) & PM_PMC_MSK; in find_alternative_decode() [all …]
|
/arch/powerpc/kernel/ |
D | eeh_event.c | 54 struct eeh_event *event; in eeh_event_handler() local 63 event = NULL; in eeh_event_handler() 65 event = list_entry(eeh_eventlist.next, in eeh_event_handler() 67 list_del(&event->list); in eeh_event_handler() 70 if (!event) in eeh_event_handler() 74 pe = event->pe; in eeh_event_handler() 90 kfree(event); in eeh_event_handler() 132 struct eeh_event *event; in eeh_send_failure_event() local 134 event = kzalloc(sizeof(*event), GFP_ATOMIC); in eeh_send_failure_event() 135 if (!event) { in eeh_send_failure_event() [all …]
|
/arch/sh/kernel/ |
D | perf_event.c | 84 static void hw_perf_event_destroy(struct perf_event *event) in hw_perf_event_destroy() argument 121 static int __hw_perf_event_init(struct perf_event *event) in __hw_perf_event_init() argument 123 struct perf_event_attr *attr = &event->attr; in __hw_perf_event_init() 124 struct hw_perf_event *hwc = &event->hw; in __hw_perf_event_init() 152 event->destroy = hw_perf_event_destroy; in __hw_perf_event_init() 179 static void sh_perf_event_update(struct perf_event *event, in sh_perf_event_update() argument 217 local64_add(delta, &event->count); in sh_perf_event_update() 220 static void sh_pmu_stop(struct perf_event *event, int flags) in sh_pmu_stop() argument 223 struct hw_perf_event *hwc = &event->hw; in sh_pmu_stop() 226 if (!(event->hw.state & PERF_HES_STOPPED)) { in sh_pmu_stop() [all …]
|
/arch/arm/kernel/ |
D | perf_event.c | 74 armpmu_map_event(struct perf_event *event, in armpmu_map_event() argument 82 u64 config = event->attr.config; in armpmu_map_event() 84 switch (event->attr.type) { in armpmu_map_event() 96 int armpmu_event_set_period(struct perf_event *event) in armpmu_event_set_period() argument 98 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_set_period() 99 struct hw_perf_event *hwc = &event->hw; in armpmu_event_set_period() 123 armpmu->write_counter(event, (u64)(-left) & 0xffffffff); in armpmu_event_set_period() 125 perf_event_update_userpage(event); in armpmu_event_set_period() 130 u64 armpmu_event_update(struct perf_event *event) in armpmu_event_update() argument 132 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); in armpmu_event_update() [all …]
|
/arch/x86/kernel/cpu/ |
D | perf_event_intel_uncore_snb.c | 53 DEFINE_UNCORE_FORMAT_ATTR(event, event, "config:0-7"); 61 static void snb_uncore_msr_enable_event(struct intel_uncore_box *box, struct perf_event *event) in snb_uncore_msr_enable_event() argument 63 struct hw_perf_event *hwc = &event->hw; in snb_uncore_msr_enable_event() 71 static void snb_uncore_msr_disable_event(struct intel_uncore_box *box, struct perf_event *event) in snb_uncore_msr_disable_event() argument 73 wrmsrl(event->hw.config_base, 0); in snb_uncore_msr_disable_event() 212 static void snb_uncore_imc_enable_event(struct intel_uncore_box *box, struct perf_event *event) in snb_uncore_imc_enable_event() argument 215 static void snb_uncore_imc_disable_event(struct intel_uncore_box *box, struct perf_event *event) in snb_uncore_imc_disable_event() argument 218 static u64 snb_uncore_imc_read_counter(struct intel_uncore_box *box, struct perf_event *event) in snb_uncore_imc_read_counter() argument 220 struct hw_perf_event *hwc = &event->hw; in snb_uncore_imc_read_counter() 230 static int snb_uncore_imc_event_init(struct perf_event *event) in snb_uncore_imc_event_init() argument [all …]
|
D | perf_event_amd_iommu.c | 84 const char *event; member 90 struct amd_iommu_event_desc *event = in _iommu_event_show() local 92 return sprintf(buf, "%s\n", event->event); in _iommu_event_show() 98 .event = _event, \ 200 static int perf_iommu_event_init(struct perf_event *event) in perf_iommu_event_init() argument 202 struct hw_perf_event *hwc = &event->hw; in perf_iommu_event_init() 207 if (event->attr.type != event->pmu->type) in perf_iommu_event_init() 215 if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) in perf_iommu_event_init() 219 if (event->attr.exclude_user || event->attr.exclude_kernel || in perf_iommu_event_init() 220 event->attr.exclude_host || event->attr.exclude_guest) in perf_iommu_event_init() [all …]
|
D | perf_event_amd_uncore.c | 54 static bool is_nb_event(struct perf_event *event) in is_nb_event() argument 56 return event->pmu->type == amd_nb_pmu.type; in is_nb_event() 59 static bool is_l2_event(struct perf_event *event) in is_l2_event() argument 61 return event->pmu->type == amd_l2_pmu.type; in is_l2_event() 64 static struct amd_uncore *event_to_amd_uncore(struct perf_event *event) in event_to_amd_uncore() argument 66 if (is_nb_event(event) && amd_uncore_nb) in event_to_amd_uncore() 67 return *per_cpu_ptr(amd_uncore_nb, event->cpu); in event_to_amd_uncore() 68 else if (is_l2_event(event) && amd_uncore_l2) in event_to_amd_uncore() 69 return *per_cpu_ptr(amd_uncore_l2, event->cpu); in event_to_amd_uncore() 74 static void amd_uncore_read(struct perf_event *event) in amd_uncore_read() argument [all …]
|
D | perf_event_intel_uncore.c | 26 struct uncore_event_desc *event = in uncore_event_show() local 28 return sprintf(buf, "%s", event->config); in uncore_event_show() 31 struct intel_uncore_pmu *uncore_event_to_pmu(struct perf_event *event) in uncore_event_to_pmu() argument 33 return container_of(event->pmu, struct intel_uncore_pmu, pmu); in uncore_event_to_pmu() 61 struct intel_uncore_box *uncore_event_to_box(struct perf_event *event) in uncore_event_to_box() argument 67 return uncore_pmu_to_box(uncore_event_to_pmu(event), smp_processor_id()); in uncore_event_to_box() 70 u64 uncore_msr_read_counter(struct intel_uncore_box *box, struct perf_event *event) in uncore_msr_read_counter() argument 74 rdmsrl(event->hw.event_base, count); in uncore_msr_read_counter() 83 uncore_get_constraint(struct intel_uncore_box *box, struct perf_event *event) in uncore_get_constraint() argument 86 struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; in uncore_get_constraint() [all …]
|
D | perf_event.c | 62 u64 x86_perf_event_update(struct perf_event *event) in x86_perf_event_update() argument 64 struct hw_perf_event *hwc = &event->hw; in x86_perf_event_update() 99 local64_add(delta, &event->count); in x86_perf_event_update() 108 static int x86_pmu_extra_regs(u64 config, struct perf_event *event) in x86_pmu_extra_regs() argument 113 reg = &event->hw.extra_reg; in x86_pmu_extra_regs() 119 if (er->event != (config & er->config_mask)) in x86_pmu_extra_regs() 121 if (event->attr.config1 & ~er->valid_mask) in x86_pmu_extra_regs() 128 reg->config = event->attr.config1; in x86_pmu_extra_regs() 255 static void hw_perf_event_destroy(struct perf_event *event) in hw_perf_event_destroy() argument 270 set_ext_hw_attr(struct hw_perf_event *hwc, struct perf_event *event) in set_ext_hw_attr() argument [all …]
|
D | perf_event_intel_rapl.c | 123 static inline u64 rapl_read_counter(struct perf_event *event) in rapl_read_counter() argument 126 rdmsrl(event->hw.event_base, raw); in rapl_read_counter() 141 static u64 rapl_event_update(struct perf_event *event) in rapl_event_update() argument 143 struct hw_perf_event *hwc = &event->hw; in rapl_event_update() 150 rdmsrl(event->hw.event_base, new_raw_count); in rapl_event_update() 171 local64_add(sdelta, &event->count); in rapl_event_update() 191 struct perf_event *event; in rapl_hrtimer_handle() local 199 list_for_each_entry(event, &pmu->active_list, active_entry) { in rapl_hrtimer_handle() 200 rapl_event_update(event); in rapl_hrtimer_handle() 219 struct perf_event *event) in __rapl_pmu_event_start() argument [all …]
|
/arch/arc/kernel/ |
D | perf_event.c | 47 static void arc_perf_event_update(struct perf_event *event, in arc_perf_event_update() argument 50 struct arc_pmu *arc_pmu = container_of(event->pmu, struct arc_pmu, pmu); in arc_perf_event_update() 63 local64_add(delta, &event->count); in arc_perf_event_update() 67 static void arc_pmu_read(struct perf_event *event) in arc_pmu_read() argument 69 arc_perf_event_update(event, &event->hw, event->hw.idx); in arc_pmu_read() 96 static int arc_pmu_event_init(struct perf_event *event) in arc_pmu_event_init() argument 98 struct arc_pmu *arc_pmu = container_of(event->pmu, struct arc_pmu, pmu); in arc_pmu_event_init() 99 struct hw_perf_event *hwc = &event->hw; in arc_pmu_event_init() 102 switch (event->attr.type) { in arc_pmu_event_init() 104 if (event->attr.config >= PERF_COUNT_HW_MAX) in arc_pmu_event_init() [all …]
|
/arch/alpha/kernel/ |
D | perf_event.c | 40 struct perf_event *event[MAX_HWEVENTS]; member 151 static int ev67_check_constraints(struct perf_event **event, in ev67_check_constraints() argument 198 event[0]->hw.idx = idx0; in ev67_check_constraints() 199 event[0]->hw.config_base = config; in ev67_check_constraints() 201 event[1]->hw.idx = idx0 ^ 1; in ev67_check_constraints() 202 event[1]->hw.config_base = config; in ev67_check_constraints() 251 static int alpha_perf_event_set_period(struct perf_event *event, in alpha_perf_event_set_period() argument 286 perf_event_update_userpage(event); in alpha_perf_event_set_period() 306 static unsigned long alpha_perf_event_update(struct perf_event *event, in alpha_perf_event_update() argument 329 local64_add(delta, &event->count); in alpha_perf_event_update() [all …]
|
/arch/powerpc/oprofile/ |
D | op_model_7450.c | 39 #define mmcr0_event1(event) \ argument 40 ((event << MMCR0_PMC1_SHIFT) & MMCR0_PMC1SEL) 41 #define mmcr0_event2(event) \ argument 42 ((event << MMCR0_PMC2_SHIFT) & MMCR0_PMC2SEL) 44 #define mmcr1_event3(event) \ argument 45 ((event << MMCR1_PMC3_SHIFT) & MMCR1_PMC3SEL) 46 #define mmcr1_event4(event) \ argument 47 ((event << MMCR1_PMC4_SHIFT) & MMCR1_PMC4SEL) 48 #define mmcr1_event5(event) \ argument 49 ((event << MMCR1_PMC5_SHIFT) & MMCR1_PMC5SEL) [all …]
|
/arch/alpha/oprofile/ |
D | op_model_ev5.c | 48 unsigned long event = ctr[i].event; in common_reg_setup() local 54 if (event == 0) in common_reg_setup() 55 event = 12+48; in common_reg_setup() 56 else if (event == 2+41) in common_reg_setup() 57 event = 4+65; in common_reg_setup() 61 if (event < 2) in common_reg_setup() 62 ctl |= event << 31; in common_reg_setup() 63 else if (event < 24) in common_reg_setup() 65 else if (event < 40) in common_reg_setup() 66 ctl |= (event - 24) << 4; in common_reg_setup() [all …]
|
/arch/blackfin/kernel/ |
D | perf_event.c | 260 static void bfin_perf_event_update(struct perf_event *event, in bfin_perf_event_update() argument 298 local64_add(delta, &event->count); in bfin_perf_event_update() 301 static void bfin_pmu_stop(struct perf_event *event, int flags) in bfin_pmu_stop() argument 304 struct hw_perf_event *hwc = &event->hw; in bfin_pmu_stop() 307 if (!(event->hw.state & PERF_HES_STOPPED)) { in bfin_pmu_stop() 310 event->hw.state |= PERF_HES_STOPPED; in bfin_pmu_stop() 313 if ((flags & PERF_EF_UPDATE) && !(event->hw.state & PERF_HES_UPTODATE)) { in bfin_pmu_stop() 314 bfin_perf_event_update(event, &event->hw, idx); in bfin_pmu_stop() 315 event->hw.state |= PERF_HES_UPTODATE; in bfin_pmu_stop() 319 static void bfin_pmu_start(struct perf_event *event, int flags) in bfin_pmu_start() argument [all …]
|
/arch/s390/kernel/ |
D | perf_cpum_cf.c | 87 static int get_counter_set(u64 event) in get_counter_set() argument 91 if (event < 32) in get_counter_set() 93 else if (event < 64) in get_counter_set() 95 else if (event < 128) in get_counter_set() 97 else if (event < 256) in get_counter_set() 292 static void hw_perf_event_destroy(struct perf_event *event) in hw_perf_event_destroy() argument 323 static int __hw_perf_event_init(struct perf_event *event) in __hw_perf_event_init() argument 325 struct perf_event_attr *attr = &event->attr; in __hw_perf_event_init() 326 struct hw_perf_event *hwc = &event->hw; in __hw_perf_event_init() 396 event->destroy = hw_perf_event_destroy; in __hw_perf_event_init() [all …]
|
D | perf_cpum_sf.c | 87 struct perf_event *event; /* Scheduled perf event */ member 625 static void hw_perf_event_destroy(struct perf_event *event) in hw_perf_event_destroy() argument 628 if (RAWSAMPLE_REG(&event->hw)) in hw_perf_event_destroy() 629 kfree((void *) RAWSAMPLE_REG(&event->hw)); in hw_perf_event_destroy() 668 static int __hw_perf_event_init(struct perf_event *event) in __hw_perf_event_init() argument 672 struct perf_event_attr *attr = &event->attr; in __hw_perf_event_init() 673 struct hw_perf_event *hwc = &event->hw; in __hw_perf_event_init() 687 event->destroy = hw_perf_event_destroy; in __hw_perf_event_init() 703 if (event->cpu == -1) in __hw_perf_event_init() 709 cpuhw = &per_cpu(cpu_hw_sf, event->cpu); in __hw_perf_event_init() [all …]
|