/samples/kobject/ |
D | kobject-example.c | 28 static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr, in foo_show() argument 34 static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, in foo_store() argument 54 static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, in b_show() argument 59 if (strcmp(attr->attr.name, "baz") == 0) in b_show() 66 static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, in b_store() argument 75 if (strcmp(attr->attr.name, "baz") == 0) in b_store() 93 &foo_attribute.attr, 94 &baz_attribute.attr, 95 &bar_attribute.attr,
|
D | kset-example.c | 39 struct attribute attr; member 40 ssize_t (*show)(struct foo_obj *foo, struct foo_attribute *attr, char *buf); 41 ssize_t (*store)(struct foo_obj *foo, struct foo_attribute *attr, const char *buf, size_t count); 43 #define to_foo_attr(x) container_of(x, struct foo_attribute, attr) 53 struct attribute *attr, in foo_attr_show() argument 59 attribute = to_foo_attr(attr); in foo_attr_show() 73 struct attribute *attr, in foo_attr_store() argument 79 attribute = to_foo_attr(attr); in foo_attr_store() 112 static ssize_t foo_show(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_show() argument 118 static ssize_t foo_store(struct foo_obj *foo_obj, struct foo_attribute *attr, in foo_store() argument [all …]
|
/samples/hw_breakpoint/ |
D | data_breakpoint.c | 43 struct perf_event_attr attr; in hw_break_module_init() local 49 hw_breakpoint_init(&attr); in hw_break_module_init() 50 attr.bp_addr = (unsigned long)addr; in hw_break_module_init() 51 attr.bp_len = HW_BREAKPOINT_LEN_4; in hw_break_module_init() 52 attr.bp_type = HW_BREAKPOINT_W; in hw_break_module_init() 54 sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler, NULL); in hw_break_module_init()
|
/samples/bpf/ |
D | task_fd_query_user.c | 127 struct perf_event_attr attr = {}; in test_nondebug_fs_kuprobe_common() local 136 attr.sample_period = 1; in test_nondebug_fs_kuprobe_common() 137 attr.wakeup_events = 1; in test_nondebug_fs_kuprobe_common() 139 attr.config |= 1 << is_return_bit; in test_nondebug_fs_kuprobe_common() 142 attr.config1 = ptr_to_u64((void *)name); in test_nondebug_fs_kuprobe_common() 143 attr.config2 = offset; in test_nondebug_fs_kuprobe_common() 145 attr.config1 = 0; in test_nondebug_fs_kuprobe_common() 146 attr.config2 = addr; in test_nondebug_fs_kuprobe_common() 148 attr.size = sizeof(attr); in test_nondebug_fs_kuprobe_common() 149 attr.type = type; in test_nondebug_fs_kuprobe_common() [all …]
|
D | trace_event_user.c | 137 static void test_perf_event_all_cpu(struct perf_event_attr *attr) in test_perf_event_all_cpu() argument 149 attr->inherit = 0; in test_perf_event_all_cpu() 153 pmu_fd = sys_perf_event_open(attr, -1, i, -1, 0); in test_perf_event_all_cpu() 181 static void test_perf_event_task(struct perf_event_attr *attr) in test_perf_event_task() argument 189 attr->inherit = 1; in test_perf_event_task() 192 pmu_fd = sys_perf_event_open(attr, 0, -1, -1, 0); in test_perf_event_task()
|
D | tracex6_user.c | 26 static void check_on_cpu(int cpu, struct perf_event_attr *attr) in check_on_cpu() argument 38 pmu_fd = sys_perf_event_open(attr, -1/*pid*/, cpu/*cpu*/, -1/*group_fd*/, 0); in check_on_cpu() 74 static void test_perf_event_array(struct perf_event_attr *attr, in test_perf_event_array() argument 87 check_on_cpu(i, attr); in test_perf_event_array()
|
D | bpf_load.c | 94 struct perf_event_attr attr = {}; in load_and_attach() local 96 attr.type = PERF_TYPE_TRACEPOINT; in load_and_attach() 97 attr.sample_type = PERF_SAMPLE_RAW; in load_and_attach() 98 attr.sample_period = 1; in load_and_attach() 99 attr.wakeup_events = 1; in load_and_attach() 241 attr.config = id; in load_and_attach() 243 efd = sys_perf_event_open(&attr, -1/*pid*/, 0/*cpu*/, -1/*group_fd*/, 0); in load_and_attach()
|
/samples/vfio-mdev/ |
D | mdpy.c | 639 resolution_show(struct device *dev, struct device_attribute *attr, in resolution_show() argument 652 &dev_attr_resolution.attr, 699 &mdev_type_attr_name.attr, 700 &mdev_type_attr_description.attr, 701 &mdev_type_attr_device_api.attr, 702 &mdev_type_attr_available_instances.attr,
|
D | mtty.c | 1261 sample_mtty_dev_show(struct device *dev, struct device_attribute *attr, in sample_mtty_dev_show() argument 1270 &dev_attr_sample_mtty_dev.attr, 1285 sample_mdev_dev_show(struct device *dev, struct device_attribute *attr, in sample_mdev_dev_show() argument 1297 &dev_attr_sample_mdev_dev.attr, 1368 &mdev_type_attr_name.attr, 1369 &mdev_type_attr_device_api.attr, 1370 &mdev_type_attr_available_instances.attr,
|
D | mbochs.c | 1317 memory_show(struct device *dev, struct device_attribute *attr, in memory_show() argument 1328 &dev_attr_memory.attr, 1377 &mdev_type_attr_name.attr, 1378 &mdev_type_attr_description.attr, 1379 &mdev_type_attr_device_api.attr, 1380 &mdev_type_attr_available_instances.attr,
|