Lines Matching refs:evsel

37 static bool test_config(const struct evsel *evsel, __u64 expected_config)  in test_config()  argument
39 __u32 type = evsel->core.attr.type; in test_config()
40 __u64 config = evsel->core.attr.config; in test_config()
52 static bool test_perf_config(const struct perf_evsel *evsel, __u64 expected_config) in test_perf_config() argument
54 return (evsel->attr.config & PERF_HW_EVENT_MASK) == expected_config; in test_perf_config()
87 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint() local
91 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_tracepoint()
93 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_tracepoint()
94 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__checkevent_tracepoint()
100 struct evsel *evsel; in test__checkevent_tracepoint_multi() local
105 evlist__for_each_entry(evlist, evsel) { in test__checkevent_tracepoint_multi()
107 PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_tracepoint_multi()
109 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_tracepoint_multi()
111 1 == evsel->core.attr.sample_period); in test__checkevent_tracepoint_multi()
119 struct perf_evsel *evsel; in test__checkevent_raw() local
124 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_raw()
128 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, 0x1a)); in test__checkevent_raw()
130 evsel->attr.type == PERF_TYPE_RAW); in test__checkevent_raw()
141 if (pmu->type == evsel->attr.type) { in test__checkevent_raw()
157 struct evsel *evsel = evlist__first(evlist); in test__checkevent_numeric() local
160 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); in test__checkevent_numeric()
161 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_numeric()
167 struct perf_evsel *evsel; in test__checkevent_symbolic_name() local
171 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_symbolic_name()
172 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type); in test__checkevent_symbolic_name()
174 test_perf_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__checkevent_symbolic_name()
181 struct perf_evsel *evsel; in test__checkevent_symbolic_name_config() local
185 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_symbolic_name_config()
186 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->attr.type); in test__checkevent_symbolic_name_config()
187 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__checkevent_symbolic_name_config()
192 TEST_ASSERT_VAL("wrong period", 0 == evsel->attr.sample_period); in test__checkevent_symbolic_name_config()
193 TEST_ASSERT_VAL("wrong config1", 0 == evsel->attr.config1); in test__checkevent_symbolic_name_config()
194 TEST_ASSERT_VAL("wrong config2", 1 == evsel->attr.config2); in test__checkevent_symbolic_name_config()
201 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias() local
204 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_symbolic_alias()
205 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_PAGE_FAULTS)); in test__checkevent_symbolic_alias()
211 struct perf_evsel *evsel; in test__checkevent_genhw() local
215 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_genhw()
216 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HW_CACHE == evsel->attr.type); in test__checkevent_genhw()
217 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, 1 << 16)); in test__checkevent_genhw()
224 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint() local
227 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint()
228 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint()
230 evsel->core.attr.bp_type); in test__checkevent_breakpoint()
232 evsel->core.attr.bp_len); in test__checkevent_breakpoint()
238 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x() local
241 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_x()
242 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_x()
244 HW_BREAKPOINT_X == evsel->core.attr.bp_type); in test__checkevent_breakpoint_x()
245 TEST_ASSERT_VAL("wrong bp_len", sizeof(long) == evsel->core.attr.bp_len); in test__checkevent_breakpoint_x()
251 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r() local
255 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_r()
256 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_r()
258 HW_BREAKPOINT_R == evsel->core.attr.bp_type); in test__checkevent_breakpoint_r()
260 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_r()
266 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w() local
270 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_w()
271 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_w()
273 HW_BREAKPOINT_W == evsel->core.attr.bp_type); in test__checkevent_breakpoint_w()
275 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_w()
281 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw() local
285 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_rw()
286 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_rw()
288 (HW_BREAKPOINT_R|HW_BREAKPOINT_W) == evsel->core.attr.bp_type); in test__checkevent_breakpoint_rw()
290 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_rw()
297 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint_modifier() local
299 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_tracepoint_modifier()
300 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_tracepoint_modifier()
301 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_tracepoint_modifier()
302 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_tracepoint_modifier()
310 struct perf_evsel *evsel; in test__checkevent_tracepoint_multi_modifier() local
314 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_tracepoint_multi_modifier()
315 TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user); in test__checkevent_tracepoint_multi_modifier()
316 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_tracepoint_multi_modifier()
317 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_tracepoint_multi_modifier()
318 TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip); in test__checkevent_tracepoint_multi_modifier()
327 struct perf_evsel *evsel; in test__checkevent_raw_modifier() local
329 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_raw_modifier()
330 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_raw_modifier()
331 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel); in test__checkevent_raw_modifier()
332 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_raw_modifier()
333 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_raw_modifier()
340 struct perf_evsel *evsel; in test__checkevent_numeric_modifier() local
342 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_numeric_modifier()
343 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_numeric_modifier()
344 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_numeric_modifier()
345 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv); in test__checkevent_numeric_modifier()
346 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_numeric_modifier()
353 struct perf_evsel *evsel; in test__checkevent_symbolic_name_modifier() local
358 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_symbolic_name_modifier()
359 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_symbolic_name_modifier()
360 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_symbolic_name_modifier()
361 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv); in test__checkevent_symbolic_name_modifier()
362 TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip); in test__checkevent_symbolic_name_modifier()
369 struct perf_evsel *evsel; in test__checkevent_exclude_host_modifier() local
371 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_exclude_host_modifier()
372 TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest); in test__checkevent_exclude_host_modifier()
373 TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host); in test__checkevent_exclude_host_modifier()
380 struct perf_evsel *evsel; in test__checkevent_exclude_guest_modifier() local
382 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_exclude_guest_modifier()
383 TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest); in test__checkevent_exclude_guest_modifier()
384 TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host); in test__checkevent_exclude_guest_modifier()
391 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias_modifier() local
393 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_symbolic_alias_modifier()
394 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_symbolic_alias_modifier()
395 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_symbolic_alias_modifier()
396 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_symbolic_alias_modifier()
403 struct perf_evsel *evsel; in test__checkevent_genhw_modifier() local
405 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_genhw_modifier()
406 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_genhw_modifier()
407 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel); in test__checkevent_genhw_modifier()
408 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_genhw_modifier()
409 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_genhw_modifier()
416 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier() local
418 TEST_ASSERT_VAL("wrong exclude idle", evsel->core.attr.exclude_idle); in test__checkevent_exclude_idle_modifier()
419 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__checkevent_exclude_idle_modifier()
420 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__checkevent_exclude_idle_modifier()
421 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_exclude_idle_modifier()
422 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_exclude_idle_modifier()
423 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_exclude_idle_modifier()
424 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_exclude_idle_modifier()
431 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier_1() local
433 TEST_ASSERT_VAL("wrong exclude idle", evsel->core.attr.exclude_idle); in test__checkevent_exclude_idle_modifier_1()
434 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__checkevent_exclude_idle_modifier_1()
435 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__checkevent_exclude_idle_modifier_1()
436 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_exclude_idle_modifier_1()
437 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_exclude_idle_modifier_1()
438 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_exclude_idle_modifier_1()
439 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_exclude_idle_modifier_1()
446 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier() local
449 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_modifier()
450 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_modifier()
451 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_modifier()
452 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_modifier()
454 !strcmp(evsel__name(evsel), "mem:0:u")); in test__checkevent_breakpoint_modifier()
461 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier() local
463 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_x_modifier()
464 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_x_modifier()
465 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_x_modifier()
466 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_x_modifier()
468 !strcmp(evsel__name(evsel), "mem:0:x:k")); in test__checkevent_breakpoint_x_modifier()
475 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier() local
477 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_r_modifier()
478 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_r_modifier()
479 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_r_modifier()
480 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_r_modifier()
482 !strcmp(evsel__name(evsel), "mem:0:r:hp")); in test__checkevent_breakpoint_r_modifier()
489 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier() local
491 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_w_modifier()
492 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_w_modifier()
493 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_w_modifier()
494 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_w_modifier()
496 !strcmp(evsel__name(evsel), "mem:0:w:up")); in test__checkevent_breakpoint_w_modifier()
503 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier() local
505 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_rw_modifier()
506 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_rw_modifier()
507 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_rw_modifier()
508 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_rw_modifier()
510 !strcmp(evsel__name(evsel), "mem:0:rw:kp")); in test__checkevent_breakpoint_rw_modifier()
517 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier_name() local
519 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_modifier_name()
520 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_modifier_name()
521 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_modifier_name()
522 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_modifier_name()
524 !strcmp(evsel__name(evsel), "breakpoint")); in test__checkevent_breakpoint_modifier_name()
531 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier_name() local
533 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_x_modifier_name()
534 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_x_modifier_name()
535 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_x_modifier_name()
536 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_x_modifier_name()
538 !strcmp(evsel__name(evsel), "breakpoint")); in test__checkevent_breakpoint_x_modifier_name()
545 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier_name() local
547 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_r_modifier_name()
548 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_r_modifier_name()
549 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_r_modifier_name()
550 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_r_modifier_name()
552 !strcmp(evsel__name(evsel), "breakpoint")); in test__checkevent_breakpoint_r_modifier_name()
559 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier_name() local
561 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_w_modifier_name()
562 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_w_modifier_name()
563 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_w_modifier_name()
564 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_w_modifier_name()
566 !strcmp(evsel__name(evsel), "breakpoint")); in test__checkevent_breakpoint_w_modifier_name()
573 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier_name() local
575 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_rw_modifier_name()
576 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_rw_modifier_name()
577 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_rw_modifier_name()
578 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_rw_modifier_name()
580 !strcmp(evsel__name(evsel), "breakpoint")); in test__checkevent_breakpoint_rw_modifier_name()
587 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_2_events() local
591 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_2_events()
592 TEST_ASSERT_VAL("wrong name", !strcmp(evsel__name(evsel), "breakpoint1")); in test__checkevent_breakpoint_2_events()
594 evsel = evsel__next(evsel); in test__checkevent_breakpoint_2_events()
596 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_2_events()
597 TEST_ASSERT_VAL("wrong name", !strcmp(evsel__name(evsel), "breakpoint2")); in test__checkevent_breakpoint_2_events()
605 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu() local
608 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu()
609 TEST_ASSERT_VAL("wrong config", test_config(evsel, 10)); in test__checkevent_pmu()
610 TEST_ASSERT_VAL("wrong config1", 1 == evsel->core.attr.config1); in test__checkevent_pmu()
611 TEST_ASSERT_VAL("wrong config2", 3 == evsel->core.attr.config2); in test__checkevent_pmu()
612 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_pmu()
617 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu()
625 struct evsel *evsel = evlist__first(evlist); in test__checkevent_list() local
630 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT != evsel->core.attr.type); in test__checkevent_list()
631 while (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) { in test__checkevent_list()
632 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_list()
633 TEST_ASSERT_VAL("wrong config1", 0 == evsel->core.attr.config1); in test__checkevent_list()
634 TEST_ASSERT_VAL("wrong config2", 0 == evsel->core.attr.config2); in test__checkevent_list()
635 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_list()
636 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_list()
637 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_list()
638 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_list()
639 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_list()
640 evsel = evsel__next(evsel); in test__checkevent_list()
644 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_list()
646 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_list()
647 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__checkevent_list()
648 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_list()
649 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_list()
650 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_list()
651 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_list()
654 evsel = evsel__next(evsel); in test__checkevent_list()
655 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); in test__checkevent_list()
656 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_list()
657 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_list()
658 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_list()
659 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_list()
660 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_list()
668 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_name() local
672 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_name()
673 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_pmu_name()
674 TEST_ASSERT_VAL("wrong name", !strcmp(evsel__name(evsel), "krava")); in test__checkevent_pmu_name()
677 evsel = evsel__next(evsel); in test__checkevent_pmu_name()
679 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_name()
680 TEST_ASSERT_VAL("wrong config", test_config(evsel, 2)); in test__checkevent_pmu_name()
682 !strcmp(evsel__name(evsel), "cpu/config=2/u")); in test__checkevent_pmu_name()
689 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_partial_time_callgraph() local
693 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_partial_time_callgraph()
694 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_pmu_partial_time_callgraph()
699 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu_partial_time_callgraph()
700 TEST_ASSERT_VAL("wrong callgraph", !evsel__has_callchain(evsel)); in test__checkevent_pmu_partial_time_callgraph()
701 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); in test__checkevent_pmu_partial_time_callgraph()
704 evsel = evsel__next(evsel); in test__checkevent_pmu_partial_time_callgraph()
705 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_partial_time_callgraph()
706 TEST_ASSERT_VAL("wrong config", test_config(evsel, 2)); in test__checkevent_pmu_partial_time_callgraph()
711 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu_partial_time_callgraph()
712 TEST_ASSERT_VAL("wrong callgraph", !evsel__has_callchain(evsel)); in test__checkevent_pmu_partial_time_callgraph()
713 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); in test__checkevent_pmu_partial_time_callgraph()
720 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_events() local
723 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type || in test__checkevent_pmu_events()
724 strcmp(evsel->pmu_name, "cpu")); in test__checkevent_pmu_events()
726 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events()
728 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events()
729 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events()
730 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events()
731 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events()
732 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__checkevent_pmu_events()
740 struct evsel *evsel = NULL; in test__checkevent_pmu_events_mix() local
748 evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__checkevent_pmu_events_mix()
751 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events_mix()
753 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events_mix()
754 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events_mix()
755 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events_mix()
756 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
757 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__checkevent_pmu_events_mix()
760 evsel = evsel__next(evsel); in test__checkevent_pmu_events_mix()
761 TEST_ASSERT_VAL("wrong type", evsel__find_pmu(evsel)->is_core); in test__checkevent_pmu_events_mix()
763 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events_mix()
765 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events_mix()
766 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events_mix()
767 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events_mix()
768 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
769 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
856 struct evsel *evsel, *leader; in test__group1() local
865 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group1()
866 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group1()
867 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__group1()
868 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group1()
869 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group1()
870 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group1()
871 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group1()
872 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group1()
873 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group1()
874 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group1()
875 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group1()
876 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group1()
877 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group1()
880 evsel = evsel__next(evsel); in test__group1()
881 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group1()
882 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group1()
883 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group1()
884 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group1()
885 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group1()
887 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group1()
888 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group1()
889 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 2); in test__group1()
890 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group1()
891 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group1()
892 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group1()
899 struct evsel *evsel, *leader = NULL; in test__group2() local
909 evlist__for_each_entry(evlist, evsel) { in test__group2()
910 if (evsel->core.attr.type == PERF_TYPE_SOFTWARE) { in test__group2()
912 leader = evsel; in test__group2()
914 test_config(evsel, PERF_COUNT_SW_PAGE_FAULTS)); in test__group2()
915 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group2()
916 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group2()
917 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
918 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group2()
919 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
920 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
921 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group2()
922 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group2()
923 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group2()
924 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
927 if (evsel->core.attr.type == PERF_TYPE_HARDWARE && in test__group2()
928 test_config(evsel, PERF_COUNT_HW_CACHE_REFERENCES)) { in test__group2()
930 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group2()
931 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group2()
932 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
933 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group2()
934 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
935 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
936 if (evsel__has_leader(evsel, leader)) in test__group2()
937 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group2()
938 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
942 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group2()
943 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group2()
944 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group2()
945 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group2()
946 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
947 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group2()
948 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
949 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
950 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group2()
951 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
959 struct evsel *evsel, *group1_leader = NULL, *group2_leader = NULL; in test__group3() local
970 evlist__for_each_entry(evlist, evsel) { in test__group3()
971 if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) { in test__group3()
973 group1_leader = evsel; in test__group3()
975 evsel->core.attr.sample_type == PERF_TP_SAMPLE_TYPE); in test__group3()
976 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__group3()
977 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
978 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group3()
979 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group3()
980 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group3()
981 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group3()
982 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
983 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
984 TEST_ASSERT_VAL("wrong group name", !strcmp(evsel->group_name, "group1")); in test__group3()
985 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group3()
986 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group3()
987 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
990 if (evsel->core.attr.type == PERF_TYPE_HARDWARE && in test__group3()
991 test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)) { in test__group3()
992 if (evsel->core.attr.exclude_user) { in test__group3()
995 evsel->core.attr.exclude_user); in test__group3()
997 !evsel->core.attr.exclude_kernel); in test__group3()
998 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group3()
1001 evsel->core.attr.exclude_guest); in test__group3()
1003 !evsel->core.attr.exclude_host); in test__group3()
1005 evsel->core.attr.precise_ip == 3); in test__group3()
1006 if (evsel__has_leader(evsel, group1_leader)) { in test__group3()
1007 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group3()
1009 evsel__group_idx(evsel) == 1); in test__group3()
1011 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1014 group2_leader = evsel; in test__group3()
1016 !evsel->core.attr.exclude_kernel); in test__group3()
1018 !evsel->core.attr.exclude_hv); in test__group3()
1020 !evsel->core.attr.exclude_guest); in test__group3()
1022 evsel->core.attr.exclude_host); in test__group3()
1023 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1024 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1025 if (evsel->core.nr_members == 2) { in test__group3()
1027 evsel__group_idx(evsel) == 0); in test__group3()
1029 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1033 if (evsel->core.attr.type == 1) { in test__group3()
1035 TEST_ASSERT_VAL("wrong config", test_config(evsel, 3)); in test__group3()
1036 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
1037 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group3()
1038 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group3()
1039 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group3()
1040 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group3()
1041 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1042 if (evsel__has_leader(evsel, group2_leader)) in test__group3()
1043 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group3()
1044 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1048 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group3()
1049 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__group3()
1050 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
1051 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group3()
1052 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group3()
1053 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group3()
1054 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group3()
1055 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1056 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1057 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1065 struct evsel *evsel, *leader; in test__group4() local
1074 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group4()
1075 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group4()
1076 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group4()
1077 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group4()
1078 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group4()
1079 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group4()
1081 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group4()
1082 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group4()
1083 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 1); in test__group4()
1084 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group4()
1085 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group4()
1086 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group4()
1087 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group4()
1088 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group4()
1091 evsel = evsel__next(evsel); in test__group4()
1092 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group4()
1093 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__group4()
1094 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group4()
1095 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group4()
1096 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group4()
1098 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group4()
1099 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group4()
1100 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 2); in test__group4()
1101 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group4()
1102 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group4()
1103 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group4()
1110 struct evsel *evsel = NULL, *leader; in test__group5() local
1119 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group5()
1120 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group5()
1121 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group5()
1122 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1123 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1124 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1125 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1126 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1127 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1128 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group5()
1129 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1130 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group5()
1131 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group5()
1132 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1135 evsel = evsel__next(evsel); in test__group5()
1136 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group5()
1137 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__group5()
1138 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1139 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1140 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1141 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1142 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1143 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1144 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group5()
1145 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group5()
1146 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1150 evsel = leader = evsel__next(evsel); in test__group5()
1151 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group5()
1152 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group5()
1153 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1154 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1155 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1156 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1157 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1158 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1159 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group5()
1160 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1161 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group5()
1162 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group5()
1163 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1166 evsel = evsel__next(evsel); in test__group5()
1167 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group5()
1168 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__group5()
1169 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1170 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1171 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1172 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1173 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1174 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1175 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group5()
1176 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group5()
1180 evsel = evsel__next(evsel); in test__group5()
1181 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group5()
1182 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group5()
1183 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1184 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1185 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1186 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group5()
1187 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group5()
1188 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1189 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1196 struct evsel *evsel = NULL, *leader; in test__group_gh1() local
1205 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh1()
1206 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh1()
1207 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group_gh1()
1208 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh1()
1209 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh1()
1210 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh1()
1211 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group_gh1()
1212 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh1()
1213 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh1()
1214 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh1()
1215 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh1()
1216 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh1()
1217 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh1()
1220 evsel = evsel__next(evsel); in test__group_gh1()
1221 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh1()
1222 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__group_gh1()
1223 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh1()
1224 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh1()
1225 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh1()
1226 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh1()
1227 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh1()
1228 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh1()
1229 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh1()
1230 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh1()
1237 struct evsel *evsel = NULL, *leader; in test__group_gh2() local
1246 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh2()
1247 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh2()
1248 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group_gh2()
1249 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh2()
1250 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh2()
1251 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh2()
1252 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh2()
1253 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh2()
1254 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh2()
1255 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh2()
1256 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh2()
1257 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh2()
1258 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh2()
1261 evsel = evsel__next(evsel); in test__group_gh2()
1262 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh2()
1263 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__group_gh2()
1264 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh2()
1265 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh2()
1266 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh2()
1267 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh2()
1268 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh2()
1269 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh2()
1270 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh2()
1271 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh2()
1278 struct evsel *evsel = NULL, *leader; in test__group_gh3() local
1287 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh3()
1288 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh3()
1289 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group_gh3()
1290 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh3()
1291 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh3()
1292 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh3()
1293 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh3()
1294 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh3()
1295 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh3()
1296 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh3()
1297 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh3()
1298 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh3()
1299 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh3()
1302 evsel = evsel__next(evsel); in test__group_gh3()
1303 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh3()
1304 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__group_gh3()
1305 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh3()
1306 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh3()
1307 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh3()
1308 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group_gh3()
1309 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh3()
1310 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh3()
1311 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh3()
1312 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh3()
1319 struct evsel *evsel = NULL, *leader; in test__group_gh4() local
1328 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh4()
1329 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh4()
1330 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__group_gh4()
1331 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh4()
1332 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh4()
1333 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh4()
1334 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh4()
1335 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh4()
1336 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh4()
1337 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh4()
1338 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh4()
1339 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh4()
1340 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh4()
1343 evsel = evsel__next(evsel); in test__group_gh4()
1344 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__group_gh4()
1345 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__group_gh4()
1346 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh4()
1347 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh4()
1348 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh4()
1349 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh4()
1350 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh4()
1351 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh4()
1352 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh4()
1353 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh4()
1360 struct evsel *evsel = NULL, *leader; in test__leader_sample1() local
1367 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__leader_sample1()
1368 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__leader_sample1()
1369 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__leader_sample1()
1370 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1371 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1372 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1373 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample1()
1374 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1375 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1376 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample1()
1377 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1378 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1381 evsel = evsel__next(evsel); in test__leader_sample1()
1382 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__leader_sample1()
1383 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__leader_sample1()
1384 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1385 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1386 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1387 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample1()
1388 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1389 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1390 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1391 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1394 evsel = evsel__next(evsel); in test__leader_sample1()
1395 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__leader_sample1()
1396 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_MISSES)); in test__leader_sample1()
1397 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1398 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1399 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1400 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample1()
1401 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1402 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1403 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample1()
1404 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1405 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1412 struct evsel *evsel = NULL, *leader; in test__leader_sample2() local
1419 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__leader_sample2()
1420 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__leader_sample2()
1421 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_INSTRUCTIONS)); in test__leader_sample2()
1422 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample2()
1423 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__leader_sample2()
1424 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__leader_sample2()
1425 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample2()
1426 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample2()
1427 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample2()
1428 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample2()
1429 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample2()
1430 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample2()
1433 evsel = evsel__next(evsel); in test__leader_sample2()
1434 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__leader_sample2()
1435 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_MISSES)); in test__leader_sample2()
1436 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample2()
1437 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__leader_sample2()
1438 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__leader_sample2()
1439 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample2()
1440 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample2()
1441 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample2()
1442 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample2()
1443 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample2()
1444 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample2()
1451 struct evsel *evsel = NULL; in test__checkevent_pinned_modifier() local
1457 evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__checkevent_pinned_modifier()
1458 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_pinned_modifier()
1459 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_pinned_modifier()
1460 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pinned_modifier()
1461 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_pinned_modifier()
1462 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); in test__checkevent_pinned_modifier()
1469 struct evsel *evsel = NULL, *leader; in test__pinned_group() local
1476 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__pinned_group()
1477 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__pinned_group()
1478 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__pinned_group()
1479 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__pinned_group()
1480 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__pinned_group()
1483 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); in test__pinned_group()
1486 evsel = evsel__next(evsel); in test__pinned_group()
1487 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__pinned_group()
1488 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__pinned_group()
1489 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__pinned_group()
1492 evsel = evsel__next(evsel); in test__pinned_group()
1493 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_MISSES)); in test__pinned_group()
1494 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__pinned_group()
1501 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclusive_modifier() local
1503 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_exclusive_modifier()
1504 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_exclusive_modifier()
1505 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_exclusive_modifier()
1506 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_exclusive_modifier()
1507 TEST_ASSERT_VAL("wrong exclusive", evsel->core.attr.exclusive); in test__checkevent_exclusive_modifier()
1514 struct evsel *evsel = NULL, *leader; in test__exclusive_group() local
1521 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__exclusive_group()
1522 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__exclusive_group()
1523 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__exclusive_group()
1524 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__exclusive_group()
1525 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__exclusive_group()
1528 TEST_ASSERT_VAL("wrong exclusive", evsel->core.attr.exclusive); in test__exclusive_group()
1531 evsel = evsel__next(evsel); in test__exclusive_group()
1532 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HARDWARE == evsel->core.attr.type); in test__exclusive_group()
1533 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CACHE_MISSES)); in test__exclusive_group()
1534 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__exclusive_group()
1537 evsel = evsel__next(evsel); in test__exclusive_group()
1538 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_BRANCH_MISSES)); in test__exclusive_group()
1539 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__exclusive_group()
1545 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len() local
1548 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_len()
1549 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_len()
1551 evsel->core.attr.bp_type); in test__checkevent_breakpoint_len()
1553 evsel->core.attr.bp_len); in test__checkevent_breakpoint_len()
1560 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_w() local
1563 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_len_w()
1564 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_len_w()
1566 evsel->core.attr.bp_type); in test__checkevent_breakpoint_len_w()
1568 evsel->core.attr.bp_len); in test__checkevent_breakpoint_len_w()
1576 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_rw_modifier() local
1578 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_len_rw_modifier()
1579 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_len_rw_modifier()
1580 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_len_rw_modifier()
1581 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_len_rw_modifier()
1588 struct evsel *evsel = evlist__first(evlist); in test__checkevent_precise_max_modifier() local
1592 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_precise_max_modifier()
1593 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_TASK_CLOCK)); in test__checkevent_precise_max_modifier()
1599 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_symbol() local
1601 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "insn")); in test__checkevent_config_symbol()
1607 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_raw() local
1609 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "rawpmu")); in test__checkevent_config_raw()
1615 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_num() local
1617 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "numpmu")); in test__checkevent_config_num()
1623 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_cache() local
1625 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "cachepmu")); in test__checkevent_config_cache()
1651 struct evsel *evsel = evlist__first(evlist); in test__intel_pt() local
1653 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "intel_pt//u")); in test__intel_pt()
1659 struct evsel *evsel = evlist__first(evlist); in test__checkevent_complex_name() local
1662 evsel__name_is(evsel, in test__checkevent_complex_name()
1669 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw_pmu() local
1672 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_raw_pmu()
1673 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0x1a)); in test__checkevent_raw_pmu()
1679 struct evsel *evsel = evlist__first(evlist); in test__sym_event_slash() local
1681 TEST_ASSERT_VAL("wrong type", evsel->core.attr.type == PERF_TYPE_HARDWARE); in test__sym_event_slash()
1682 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__sym_event_slash()
1683 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__sym_event_slash()
1689 struct evsel *evsel = evlist__first(evlist); in test__sym_event_dc() local
1691 TEST_ASSERT_VAL("wrong type", evsel->core.attr.type == PERF_TYPE_HARDWARE); in test__sym_event_dc()
1692 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__sym_event_dc()
1693 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__sym_event_dc()
1699 struct evsel *evsel = evlist__first(evlist); in test__term_equal_term() local
1701 TEST_ASSERT_VAL("wrong type", evsel->core.attr.type == PERF_TYPE_HARDWARE); in test__term_equal_term()
1702 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__term_equal_term()
1703 TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "name") == 0); in test__term_equal_term()
1709 struct evsel *evsel = evlist__first(evlist); in test__term_equal_legacy() local
1711 TEST_ASSERT_VAL("wrong type", evsel->core.attr.type == PERF_TYPE_HARDWARE); in test__term_equal_legacy()
1712 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)); in test__term_equal_legacy()
1713 TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "l1d") == 0); in test__term_equal_legacy()
2654 struct evsel *evsel1 = evlist__first(evlist); in test__checkevent_pmu_events_alias()
2655 struct evsel *evsel2 = evlist__last(evlist); in test__checkevent_pmu_events_alias()