Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ARCH_X86_EVENTS_PROBE_H__
0003 #define __ARCH_X86_EVENTS_PROBE_H__
0004 #include <linux/sysfs.h>
0005 
0006 struct perf_msr {
0007     u64         msr;
0008     struct attribute_group  *grp;
0009     bool            (*test)(int idx, void *data);
0010     bool            no_check;
0011     u64         mask;
0012 };
0013 
0014 unsigned long
0015 perf_msr_probe(struct perf_msr *msr, int cnt, bool no_zero, void *data);
0016 
0017 #define __PMU_EVENT_GROUP(_name)            \
0018 static struct attribute *attrs_##_name[] = {        \
0019     &attr_##_name.attr.attr,            \
0020     NULL,                       \
0021 }
0022 
0023 #define PMU_EVENT_GROUP(_grp, _name)            \
0024 __PMU_EVENT_GROUP(_name);               \
0025 static struct attribute_group group_##_name = {     \
0026     .name  = #_grp,                 \
0027     .attrs = attrs_##_name,             \
0028 }
0029 
0030 #endif /* __ARCH_X86_EVENTS_PROBE_H__ */