Lines Matching defs:attr

2437 	if (event->attr.exclude_host)
2439 if (event->attr.exclude_guest)
2511 if (unlikely(event->attr.precise_ip))
2525 if (event->attr.precise_ip)
2778 if (!event->attr.precise_ip)
2795 if (x86_pmu.intel_cap.pebs_baseline && event->attr.precise_ip) {
2809 if (unlikely(event->attr.precise_ip))
2837 if (event->attr.precise_ip)
2953 if (!event->attr.precise_ip)
3790 if (event->attr.precise_ip < 3)
3797 if (event->attr.precise_ip < 3)
3806 if (event->attr.use_clockid)
3808 if (!event->attr.exclude_kernel)
3810 if (event->attr.sample_regs_user & ~PEBS_GP_REGS)
3817 struct perf_event_attr *attr = &event->attr;
3825 if (!attr->exclude_kernel)
3829 if (attr->precise_ip)
3858 event->attr.config <= INTEL_TD_METRIC_AVAILABLE_MAX;
3863 return (event->attr.config & INTEL_ARCH_EVENT_MASK) == X86_CONFIG(.event=0xcd, .umask=0x01);
3868 return (event->attr.config & INTEL_ARCH_EVENT_MASK) == X86_CONFIG(.event=0x03, .umask=0x82);
3891 int type = event->attr.type;
3923 config = event->attr.config & PERF_HW_EVENT_MASK;
3957 start = DIV_ROUND_UP_ULL(factor, event->attr.sample_freq) - 1;
3979 if (event->attr.freq && event->attr.sample_freq) {
3985 if (event->attr.precise_ip) {
3986 if ((event->attr.config & INTEL_ARCH_EVENT_MASK) == INTEL_FIXED_VLBR_EVENT)
3989 if (!(event->attr.freq || (event->attr.wakeup_events && !event->attr.watermark))) {
3991 if (!(event->attr.sample_type &
4019 if (event->attr.aux_output) {
4020 if (!event->attr.precise_ip)
4026 if ((event->attr.type == PERF_TYPE_HARDWARE) ||
4027 (event->attr.type == PERF_TYPE_HW_CACHE))
4041 if (event->attr.config1 || event->attr.config2)
4048 if (event->attr.config & X86_ALL_EVENT_FLAGS)
4092 (event->attr.sample_type & PERF_SAMPLE_DATA_SRC) &&
4114 if (!(event->attr.config & ARCH_PERFMON_EVENTSEL_ANY))
4120 ret = perf_allow_cpu(&event->attr);
4244 if (event->attr.exclude_host)
4246 else if (event->attr.exclude_guest)
4256 if (!event->attr.exclude_host)
4269 cpuc->events[idx]->attr.exclude_host)
4284 event->hw.config |= event->attr.config & (HSW_IN_TX|HSW_IN_TX_CHECKPOINTED);
4293 event->attr.precise_ip > 0))
4306 if (event->attr.sample_period > 0 &&
4307 event->attr.sample_period < 0x7fffffff)
4363 if ((event->attr.precise_ip == 3) &&
4384 if ((event->attr.precise_ip == 3) &&
4402 if (event->attr.precise_ip == 3)
4422 if (event->attr.precise_ip == 3) {
4482 if (event->attr.precise_ip == 3) {
4510 if (event->attr.precise_ip &&
4511 (event->attr.sample_type & PERF_SAMPLE_WEIGHT_TYPE) &&
4517 if (event->attr.precise_ip == 3)
4608 if (event->attr.precise_ip == 3)
4623 &format_attr_event.attr,
4624 &format_attr_umask.attr,
4625 &format_attr_edge.attr,
4626 &format_attr_pc.attr,
4627 &format_attr_inv.attr,
4628 &format_attr_cmask.attr,
4983 &format_attr_event.attr,
4984 &format_attr_umask.attr,
4985 &format_attr_edge.attr,
4986 &format_attr_pc.attr,
4987 &format_attr_any.attr,
4988 &format_attr_inv.attr,
4989 &format_attr_cmask.attr,
4994 &format_attr_in_tx.attr,
4995 &format_attr_in_tx_cp.attr,
4996 &format_attr_offcore_rsp.attr,
4997 &format_attr_ldlat.attr,
5002 &format_attr_offcore_rsp.attr,
5003 &format_attr_ldlat.attr,
5008 &format_attr_offcore_rsp.attr,
5013 &format_attr_offcore_rsp.attr,
5014 &format_attr_ldlat.attr,
5015 &format_attr_snoop_rsp.attr,
5020 &format_attr_frontend.attr,
5492 struct device_attribute *attr,
5501 struct device_attribute *attr,
5543 struct device_attribute *attr,
5550 struct device_attribute *attr,
5577 struct device_attribute *attr,
5586 &dev_attr_branches.attr,
5593 struct device_attribute *attr,
5602 &dev_attr_pmu_name.attr,
5611 &dev_attr_freeze_on_smi.attr,
5612 &dev_attr_allow_tsx_force_abort.attr,
5617 tsx_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5619 return boot_cpu_has(X86_FEATURE_RTM) ? attr->mode : 0;
5623 pebs_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5625 return x86_pmu.pebs ? attr->mode : 0;
5629 mem_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5631 if (attr == &event_attr_mem_ld_aux.attr.attr)
5632 return x86_pmu.flags & PMU_FL_MEM_LOADS_AUX ? attr->mode : 0;
5634 return pebs_is_visible(kobj, attr, i);
5638 lbr_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5640 return x86_pmu.lbr_nr ? attr->mode : 0;
5644 exra_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5646 return x86_pmu.version >= 2 ? attr->mode : 0;
5650 default_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5652 if (attr == &dev_attr_allow_tsx_force_abort.attr)
5653 return x86_pmu.flags & PMU_FL_TFA ? attr->mode : 0;
5655 return attr->mode;
5659 td_is_visible(struct kobject *kobj, struct attribute *attr, int i)
5666 return x86_pmu.intel_cap.perf_metrics ? attr->mode : 0;
5668 return attr->mode;
5827 static bool is_attr_for_this_pmu(struct kobject *kobj, struct attribute *attr)
5833 container_of(attr, struct perf_pmu_events_hybrid_attr, attr.attr);
5839 struct attribute *attr, int i)
5841 return is_attr_for_this_pmu(kobj, attr) ? attr->mode : 0;
5852 struct attribute *attr, int i)
5859 return (cpu >= 0) && is_attr_for_this_pmu(kobj, attr) && cpu_has(&cpu_data(cpu), X86_FEATURE_RTM) ? attr->mode : 0;
5863 struct attribute *attr, int i)
5869 container_of(attr, struct perf_pmu_format_hybrid_attr, attr.attr);
5872 return (cpu >= 0) && (pmu->cpu_type & pmu_attr->pmu_type) ? attr->mode : 0;
5876 struct attribute *attr, int i)
5882 if (!is_attr_for_this_pmu(kobj, attr))
5888 return pmu->intel_cap.perf_metrics ? attr->mode : 0;
5890 return attr->mode;
5914 struct device_attribute *attr,
5925 &dev_attr_cpus.attr,