Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 25 of 83) sorted by relevance

1234

/tools/perf/tests/
Dparse-events.c20 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->attr.type); in test__checkevent_tracepoint()
22 PERF_TP_SAMPLE_TYPE == evsel->attr.sample_type); in test__checkevent_tracepoint()
23 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->attr.sample_period); in test__checkevent_tracepoint()
36 PERF_TYPE_TRACEPOINT == evsel->attr.type); in test__checkevent_tracepoint_multi()
38 PERF_TP_SAMPLE_TYPE == evsel->attr.sample_type); in test__checkevent_tracepoint_multi()
40 1 == evsel->attr.sample_period); in test__checkevent_tracepoint_multi()
50 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->attr.type); in test__checkevent_raw()
51 TEST_ASSERT_VAL("wrong config", 0x1a == evsel->attr.config); in test__checkevent_raw()
60 TEST_ASSERT_VAL("wrong type", 1 == evsel->attr.type); in test__checkevent_numeric()
61 TEST_ASSERT_VAL("wrong config", 1 == evsel->attr.config); in test__checkevent_numeric()
[all …]
Dtask-exit.c77 evsel->attr.task = 1; in test__task_exit()
78 evsel->attr.sample_freq = 0; in test__task_exit()
79 evsel->attr.inherit = 0; in test__task_exit()
80 evsel->attr.watermark = 0; in test__task_exit()
81 evsel->attr.wakeup_events = 1; in test__task_exit()
82 evsel->attr.exclude_kernel = 1; in test__task_exit()
Dpmu.c147 struct perf_event_attr attr; in test__pmu() local
149 memset(&attr, 0, sizeof(attr)); in test__pmu()
155 ret = perf_pmu__config_terms(&formats, &attr, terms, false); in test__pmu()
161 if (attr.config != 0xc00000000002a823) in test__pmu()
163 if (attr.config1 != 0x8000400000000145) in test__pmu()
165 if (attr.config2 != 0x0400000020041d07) in test__pmu()
Dattr.c58 #define WRITE_ASS(field, fmt) __WRITE_ASS(field, fmt, attr->field)
60 static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu, in store_event() argument
67 attr->type, attr->config, fd); in store_event()
76 attr->type, attr->config, fd) < 0) { in store_event()
130 void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, in test_attr__open() argument
135 if (store_event(attr, pid, cpu, fd, group_fd, flags)) in test_attr__open()
Dsw-clock.c29 struct perf_event_attr attr = { in __test__sw_clock_freq() local
38 attr.sample_freq = 500; in __test__sw_clock_freq()
46 evsel = perf_evsel__new(&attr); in __test__sw_clock_freq()
67 knob, (u64)attr.sample_freq); in __test__sw_clock_freq()
/tools/testing/selftests/mqueue/
Dmq_open_tests.c64 static inline void test_queue(struct mq_attr *attr, struct mq_attr *result);
65 static inline int test_queue_fail(struct mq_attr *attr, struct mq_attr *result);
196 static inline void test_queue(struct mq_attr *attr, struct mq_attr *result) in test_queue() argument
201 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue()
218 static inline int test_queue_fail(struct mq_attr *attr, struct mq_attr *result) in test_queue_fail() argument
223 if ((queue = mq_open(queue_path, flags, perms, attr)) == -1) in test_queue_fail()
237 struct mq_attr attr, result; in main() local
428 attr.mq_maxmsg = cur_max_msgs; in main()
429 attr.mq_msgsize = cur_max_msgsize; in main()
430 if (test_queue_fail(&attr, &result)) in main()
[all …]
/tools/testing/selftests/powerpc/pmu/
Dper_event_excludes.c40 e->attr.disabled = 1; in per_event_excludes()
45 e->attr.disabled = 1; in per_event_excludes()
46 e->attr.exclude_user = 1; in per_event_excludes()
47 e->attr.exclude_hv = 1; in per_event_excludes()
52 e->attr.disabled = 1; in per_event_excludes()
53 e->attr.exclude_user = 1; in per_event_excludes()
54 e->attr.exclude_kernel = 1; in per_event_excludes()
59 e->attr.disabled = 1; in per_event_excludes()
60 e->attr.exclude_hv = 1; in per_event_excludes()
61 e->attr.exclude_kernel = 1; in per_event_excludes()
Devent.c16 int perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, in perf_event_open() argument
19 return syscall(__NR_perf_event_open, attr, pid, cpu, in perf_event_open()
29 e->attr.type = type; in event_init_opts()
30 e->attr.config = config; in event_init_opts()
31 e->attr.size = sizeof(e->attr); in event_init_opts()
33 e->attr.read_format = PERF_FORMAT_TOTAL_TIME_ENABLED | \ in event_init_opts()
54 e->fd = perf_event_open(&e->attr, pid, cpu, group_fd, 0); in event_open_with_options()
/tools/perf/util/
Dparse-events.c284 struct perf_event_attr *attr, in __add_event() argument
289 event_attr_init(attr); in __add_event()
291 evsel = perf_evsel__new_idx(attr, (*idx)++); in __add_event()
303 struct perf_event_attr *attr, char *name) in add_event() argument
305 return __add_event(list, idx, attr, name, NULL) ? 0 : -ENOMEM; in add_event()
329 struct perf_event_attr attr; in parse_events_add_cache() local
381 memset(&attr, 0, sizeof(attr)); in parse_events_add_cache()
382 attr.config = cache_type | (cache_op << 8) | (cache_result << 16); in parse_events_add_cache()
383 attr.type = PERF_TYPE_HW_CACHE; in parse_events_add_cache()
384 return add_event(list, idx, &attr, name); in parse_events_add_cache()
[all …]
Devsel.c159 evsel->id_pos = __perf_evsel__calc_id_pos(evsel->attr.sample_type); in perf_evsel__calc_id_pos()
160 evsel->is_pos = __perf_evsel__calc_is_pos(evsel->attr.sample_type); in perf_evsel__calc_id_pos()
166 if (!(evsel->attr.sample_type & bit)) { in __perf_evsel__set_sample_bit()
167 evsel->attr.sample_type |= bit; in __perf_evsel__set_sample_bit()
176 if (evsel->attr.sample_type & bit) { in __perf_evsel__reset_sample_bit()
177 evsel->attr.sample_type &= ~bit; in __perf_evsel__reset_sample_bit()
192 evsel->attr.read_format |= PERF_FORMAT_ID; in perf_evsel__set_sample_id()
196 struct perf_event_attr *attr, int idx) in perf_evsel__init() argument
200 evsel->attr = *attr; in perf_evsel__init()
206 evsel->sample_size = __perf_evsel__sample_size(attr->sample_type); in perf_evsel__init()
[all …]
Devsel.h60 struct perf_event_attr attr; member
112 struct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);
114 static inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr) in perf_evsel__new() argument
116 return perf_evsel__new_idx(attr, 0); in perf_evsel__new()
129 struct perf_event_attr *attr, int idx);
209 (evsel->attr.type == PERF_TYPE_##t && \
210 evsel->attr.config == PERF_COUNT_##c)
215 return (e1->attr.type == e2->attr.type) && in perf_evsel__match2()
216 (e1->attr.config == e2->attr.config); in perf_evsel__match2()
222 (a)->attr.type == (b)->attr.type && \
[all …]
Ddwarf-aux.c66 Dwarf_Attribute attr; in cu_get_comp_dir() local
67 if (dwarf_attr(cu_die, DW_AT_comp_dir, &attr) == NULL) in cu_get_comp_dir()
69 return dwarf_formstring(&attr); in cu_get_comp_dir()
155 Dwarf_Attribute attr; in die_get_call_lineno() local
158 if (!dwarf_attr(in_die, DW_AT_call_line, &attr)) in die_get_call_lineno()
161 dwarf_formudata(&attr, &ret); in die_get_call_lineno()
175 Dwarf_Attribute attr; in die_get_type() local
177 if (dwarf_attr_integrate(vr_die, DW_AT_type, &attr) && in die_get_type()
178 dwarf_formref_die(&attr, die_mem)) in die_get_type()
225 Dwarf_Attribute attr; in die_get_attr_udata() local
[all …]
Drecord.c29 fd = sys_perf_event_open(&evsel->attr, pid, cpu, -1, flags); in perf_do_probe_api()
43 fd = sys_perf_event_open(&evsel->attr, pid, cpu, -1, flags); in perf_do_probe_api()
80 evsel->attr.sample_type |= PERF_SAMPLE_IDENTIFIER; in perf_probe_sample_identifier()
85 evsel->attr.comm_exec = 1; in perf_probe_comm_exec()
119 evsel->attr.comm_exec = 1; in perf_evlist__config()
126 if (evsel->attr.sample_type == first->attr.sample_type) in perf_evlist__config()
235 fd = sys_perf_event_open(&evsel->attr, pid, cpu, -1, in perf_evlist__can_select_event()
Dpython.c510 struct perf_event_attr attr = { in pyrf_evsel__init() local
569 &attr.type, &attr.config, &attr.sample_freq, in pyrf_evsel__init()
570 &sample_period, &attr.sample_type, in pyrf_evsel__init()
571 &attr.read_format, &disabled, &inherit, in pyrf_evsel__init()
577 &attr.wakeup_events, &attr.bp_type, in pyrf_evsel__init()
578 &attr.bp_addr, &attr.bp_len, &idx)) in pyrf_evsel__init()
583 if (attr.sample_freq != 0) in pyrf_evsel__init()
585 attr.sample_period = sample_period; in pyrf_evsel__init()
589 attr.disabled = disabled; in pyrf_evsel__init()
590 attr.inherit = inherit; in pyrf_evsel__init()
[all …]
Dcloexec.c19 struct perf_event_attr attr = { in perf_flag_probe() local
40 fd = sys_perf_event_open(&attr, pid, cpu, -1, in perf_flag_probe()
61 fd = sys_perf_event_open(&attr, pid, cpu, -1, 0); in perf_flag_probe()
/tools/testing/selftests/powerpc/pmu/ebb/
Devent_attributes_test.c34 event.attr.exclusive = 0; in event_attributes()
41 event.attr.freq = 1; in event_attributes()
48 event.attr.sample_period = 1; in event_attributes()
55 event.attr.enable_on_exec = 1; in event_attributes()
62 event.attr.inherit = 1; in event_attributes()
94 leader.attr.config &= ~(1ull << 63); in event_attributes()
108 leader.attr.exclusive = 0; in event_attributes()
115 leader.attr.pinned = 0; in event_attributes()
Dtask_event_pinned_vs_ebb_test.c26 event->attr.pinned = 1; in setup_child_event()
28 event->attr.exclude_kernel = 1; in setup_child_event()
29 event->attr.exclude_hv = 1; in setup_child_event()
30 event->attr.exclude_idle = 1; in setup_child_event()
Dcpu_event_pinned_vs_ebb_test.c26 event->attr.pinned = 1; in setup_cpu_event()
28 event->attr.exclude_kernel = 1; in setup_cpu_event()
29 event->attr.exclude_hv = 1; in setup_cpu_event()
30 event->attr.exclude_idle = 1; in setup_cpu_event()
Dno_handler_test.c25 event.attr.exclude_kernel = 1; in no_handler_test()
26 event.attr.exclude_hv = 1; in no_handler_test()
27 event.attr.exclude_idle = 1; in no_handler_test()
Dcycles_test.c22 event.attr.exclude_kernel = 1; in cycles()
23 event.attr.exclude_hv = 1; in cycles()
24 event.attr.exclude_idle = 1; in cycles()
Dlost_exception_test.c30 event.attr.exclude_kernel = 1; in test_body()
31 event.attr.exclude_hv = 1; in test_body()
32 event.attr.exclude_idle = 1; in test_body()
Dtask_event_vs_ebb_test.c26 event->attr.exclude_kernel = 1; in setup_child_event()
27 event->attr.exclude_hv = 1; in setup_child_event()
28 event->attr.exclude_idle = 1; in setup_child_event()
Debb_on_child_test.c66 event.attr.exclude_kernel = 1; in ebb_on_child()
67 event.attr.exclude_hv = 1; in ebb_on_child()
68 event.attr.exclude_idle = 1; in ebb_on_child()
Dcpu_event_vs_ebb_test.c26 event->attr.exclude_kernel = 1; in setup_cpu_event()
27 event->attr.exclude_hv = 1; in setup_cpu_event()
28 event->attr.exclude_idle = 1; in setup_cpu_event()
/tools/lib/lockdep/include/liblockdep/
Drwlock.h23 const pthread_rwlockattr_t *attr) in __rwlock_init() argument
27 return pthread_rwlock_init(&lock->rwlock, attr); in __rwlock_init()
30 #define liblockdep_pthread_rwlock_init(lock, attr) \ argument
34 __rwlock_init((lock), #lock, &__key, (attr)); \

1234