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()
166 static int assert_hw(struct perf_evsel *evsel, enum perf_hw_id id, const char *name) in assert_hw() argument
170 if (evsel->attr.type == PERF_TYPE_HARDWARE) { in assert_hw()
171 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, id)); in assert_hw()
174 pmu = perf_pmus__find_by_type(evsel->attr.type); in assert_hw()
183 struct perf_evsel *evsel; in test__checkevent_symbolic_name() local
187 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_symbolic_name()
188 int ret = assert_hw(evsel, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__checkevent_symbolic_name()
199 struct perf_evsel *evsel; in test__checkevent_symbolic_name_config() local
203 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_symbolic_name_config()
204 int ret = assert_hw(evsel, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__checkevent_symbolic_name_config()
212 TEST_ASSERT_VAL("wrong period", 0 == evsel->attr.sample_period); in test__checkevent_symbolic_name_config()
213 TEST_ASSERT_VAL("wrong config1", 0 == evsel->attr.config1); in test__checkevent_symbolic_name_config()
214 TEST_ASSERT_VAL("wrong config2", 1 == evsel->attr.config2); in test__checkevent_symbolic_name_config()
221 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias() local
224 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_symbolic_alias()
225 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_PAGE_FAULTS)); in test__checkevent_symbolic_alias()
231 struct perf_evsel *evsel; in test__checkevent_genhw() local
235 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_genhw()
236 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HW_CACHE == evsel->attr.type); in test__checkevent_genhw()
237 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, 1 << 16)); in test__checkevent_genhw()
244 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint() local
247 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint()
248 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint()
250 evsel->core.attr.bp_type); in test__checkevent_breakpoint()
252 evsel->core.attr.bp_len); in test__checkevent_breakpoint()
258 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x() local
261 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_x()
262 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_x()
264 HW_BREAKPOINT_X == evsel->core.attr.bp_type); in test__checkevent_breakpoint_x()
265 TEST_ASSERT_VAL("wrong bp_len", default_breakpoint_len() == evsel->core.attr.bp_len); in test__checkevent_breakpoint_x()
271 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r() local
275 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_r()
276 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_r()
278 HW_BREAKPOINT_R == evsel->core.attr.bp_type); in test__checkevent_breakpoint_r()
280 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_r()
286 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w() local
290 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_w()
291 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_w()
293 HW_BREAKPOINT_W == evsel->core.attr.bp_type); in test__checkevent_breakpoint_w()
295 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_w()
301 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw() local
305 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_rw()
306 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_rw()
308 (HW_BREAKPOINT_R|HW_BREAKPOINT_W) == evsel->core.attr.bp_type); in test__checkevent_breakpoint_rw()
310 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_rw()
317 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint_modifier() local
319 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_tracepoint_modifier()
320 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_tracepoint_modifier()
321 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_tracepoint_modifier()
322 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_tracepoint_modifier()
330 struct perf_evsel *evsel; in test__checkevent_tracepoint_multi_modifier() local
334 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_tracepoint_multi_modifier()
335 TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user); in test__checkevent_tracepoint_multi_modifier()
336 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_tracepoint_multi_modifier()
337 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_tracepoint_multi_modifier()
338 TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip); in test__checkevent_tracepoint_multi_modifier()
347 struct perf_evsel *evsel; in test__checkevent_raw_modifier() local
349 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_raw_modifier()
350 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_raw_modifier()
351 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel); in test__checkevent_raw_modifier()
352 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_raw_modifier()
353 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_raw_modifier()
360 struct perf_evsel *evsel; in test__checkevent_numeric_modifier() local
362 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_numeric_modifier()
363 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_numeric_modifier()
364 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_numeric_modifier()
365 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv); in test__checkevent_numeric_modifier()
366 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_numeric_modifier()
373 struct perf_evsel *evsel; in test__checkevent_symbolic_name_modifier() local
378 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_symbolic_name_modifier()
379 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_symbolic_name_modifier()
380 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_symbolic_name_modifier()
381 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv); in test__checkevent_symbolic_name_modifier()
382 TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip); in test__checkevent_symbolic_name_modifier()
389 struct perf_evsel *evsel; in test__checkevent_exclude_host_modifier() local
391 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_exclude_host_modifier()
392 TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest); in test__checkevent_exclude_host_modifier()
393 TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host); in test__checkevent_exclude_host_modifier()
400 struct perf_evsel *evsel; in test__checkevent_exclude_guest_modifier() local
402 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_exclude_guest_modifier()
403 TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest); in test__checkevent_exclude_guest_modifier()
404 TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host); in test__checkevent_exclude_guest_modifier()
411 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias_modifier() local
413 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_symbolic_alias_modifier()
414 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_symbolic_alias_modifier()
415 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_symbolic_alias_modifier()
416 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_symbolic_alias_modifier()
423 struct perf_evsel *evsel; in test__checkevent_genhw_modifier() local
425 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_genhw_modifier()
426 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_genhw_modifier()
427 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel); in test__checkevent_genhw_modifier()
428 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_genhw_modifier()
429 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_genhw_modifier()
436 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier() local
438 TEST_ASSERT_VAL("wrong exclude idle", evsel->core.attr.exclude_idle); in test__checkevent_exclude_idle_modifier()
439 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__checkevent_exclude_idle_modifier()
440 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__checkevent_exclude_idle_modifier()
441 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_exclude_idle_modifier()
442 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_exclude_idle_modifier()
443 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_exclude_idle_modifier()
444 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_exclude_idle_modifier()
451 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier_1() local
453 TEST_ASSERT_VAL("wrong exclude idle", evsel->core.attr.exclude_idle); in test__checkevent_exclude_idle_modifier_1()
454 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__checkevent_exclude_idle_modifier_1()
455 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__checkevent_exclude_idle_modifier_1()
456 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_exclude_idle_modifier_1()
457 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_exclude_idle_modifier_1()
458 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_exclude_idle_modifier_1()
459 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_exclude_idle_modifier_1()
466 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier() local
469 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_modifier()
470 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_modifier()
471 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_modifier()
472 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_modifier()
473 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:u")); in test__checkevent_breakpoint_modifier()
480 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier() local
482 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_x_modifier()
483 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_x_modifier()
484 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_x_modifier()
485 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_x_modifier()
486 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:x:k")); in test__checkevent_breakpoint_x_modifier()
493 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier() local
495 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_r_modifier()
496 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_r_modifier()
497 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_r_modifier()
498 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_r_modifier()
499 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:r:hp")); in test__checkevent_breakpoint_r_modifier()
506 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier() local
508 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_w_modifier()
509 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_w_modifier()
510 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_w_modifier()
511 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_w_modifier()
512 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:w:up")); in test__checkevent_breakpoint_w_modifier()
519 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier() local
521 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_rw_modifier()
522 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_rw_modifier()
523 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_rw_modifier()
524 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_rw_modifier()
525 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:rw:kp")); in test__checkevent_breakpoint_rw_modifier()
532 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier_name() local
534 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_modifier_name()
535 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_modifier_name()
536 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_modifier_name()
537 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_modifier_name()
538 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_modifier_name()
545 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier_name() local
547 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_x_modifier_name()
548 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_x_modifier_name()
549 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_x_modifier_name()
550 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_x_modifier_name()
551 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_x_modifier_name()
558 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier_name() local
560 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_r_modifier_name()
561 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_r_modifier_name()
562 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_r_modifier_name()
563 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_r_modifier_name()
564 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_r_modifier_name()
571 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier_name() local
573 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_w_modifier_name()
574 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_w_modifier_name()
575 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_w_modifier_name()
576 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_w_modifier_name()
577 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_w_modifier_name()
584 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier_name() local
586 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_rw_modifier_name()
587 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_rw_modifier_name()
588 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_rw_modifier_name()
589 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_rw_modifier_name()
590 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_rw_modifier_name()
597 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_2_events() local
601 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_2_events()
602 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint1")); in test__checkevent_breakpoint_2_events()
604 evsel = evsel__next(evsel); in test__checkevent_breakpoint_2_events()
606 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_2_events()
607 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint2")); in test__checkevent_breakpoint_2_events()
615 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu() local
618 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu()
619 TEST_ASSERT_VAL("wrong config", test_config(evsel, 10)); in test__checkevent_pmu()
620 TEST_ASSERT_VAL("wrong config1", 1 == evsel->core.attr.config1); in test__checkevent_pmu()
621 TEST_ASSERT_VAL("wrong config2", 3 == evsel->core.attr.config2); in test__checkevent_pmu()
622 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_pmu()
627 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu()
635 struct evsel *evsel = evlist__first(evlist); in test__checkevent_list() local
640 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT != evsel->core.attr.type); in test__checkevent_list()
641 while (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) { in test__checkevent_list()
642 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_list()
643 TEST_ASSERT_VAL("wrong config1", 0 == evsel->core.attr.config1); in test__checkevent_list()
644 TEST_ASSERT_VAL("wrong config2", 0 == evsel->core.attr.config2); in test__checkevent_list()
645 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_list()
646 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_list()
647 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_list()
648 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_list()
649 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_list()
650 evsel = evsel__next(evsel); in test__checkevent_list()
654 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_list()
656 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_list()
657 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__checkevent_list()
658 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_list()
659 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_list()
660 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_list()
661 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_list()
664 evsel = evsel__next(evsel); in test__checkevent_list()
665 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); in test__checkevent_list()
666 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_list()
667 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_list()
668 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_list()
669 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_list()
670 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_list()
678 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_name() local
682 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_name()
683 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_pmu_name()
684 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "krava")); in test__checkevent_pmu_name()
687 evsel = evsel__next(evsel); in test__checkevent_pmu_name()
689 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_name()
690 TEST_ASSERT_VAL("wrong config", test_config(evsel, 2)); in test__checkevent_pmu_name()
691 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "cpu/config=2/u")); in test__checkevent_pmu_name()
698 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_partial_time_callgraph() local
702 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_partial_time_callgraph()
703 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_pmu_partial_time_callgraph()
708 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu_partial_time_callgraph()
709 TEST_ASSERT_VAL("wrong callgraph", !evsel__has_callchain(evsel)); in test__checkevent_pmu_partial_time_callgraph()
710 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); in test__checkevent_pmu_partial_time_callgraph()
713 evsel = evsel__next(evsel); in test__checkevent_pmu_partial_time_callgraph()
714 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_partial_time_callgraph()
715 TEST_ASSERT_VAL("wrong config", test_config(evsel, 2)); in test__checkevent_pmu_partial_time_callgraph()
720 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu_partial_time_callgraph()
721 TEST_ASSERT_VAL("wrong callgraph", !evsel__has_callchain(evsel)); in test__checkevent_pmu_partial_time_callgraph()
722 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); in test__checkevent_pmu_partial_time_callgraph()
729 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_events() local
732 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type || in test__checkevent_pmu_events()
733 strcmp(evsel->pmu_name, "cpu")); in test__checkevent_pmu_events()
735 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events()
737 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events()
738 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events()
739 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events()
740 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events()
741 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__checkevent_pmu_events()
749 struct evsel *evsel = NULL; in test__checkevent_pmu_events_mix() local
757 evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__checkevent_pmu_events_mix()
760 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events_mix()
762 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events_mix()
763 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events_mix()
764 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events_mix()
765 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
766 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__checkevent_pmu_events_mix()
769 evsel = evsel__next(evsel); in test__checkevent_pmu_events_mix()
770 TEST_ASSERT_VAL("wrong type", evsel__find_pmu(evsel)->is_core); in test__checkevent_pmu_events_mix()
772 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events_mix()
774 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events_mix()
775 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events_mix()
776 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events_mix()
777 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
778 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
865 struct evsel *evsel, *leader; in test__group1() local
876 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group1()
877 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group1()
881 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group1()
882 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group1()
883 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group1()
884 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group1()
885 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group1()
886 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group1()
887 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group1()
888 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group1()
889 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group1()
890 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group1()
893 evsel = evsel__next(evsel); in test__group1()
894 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group1()
898 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group1()
899 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group1()
900 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group1()
902 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group1()
903 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group1()
904 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 2); in test__group1()
905 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group1()
906 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group1()
907 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group1()
914 struct evsel *evsel, *leader = NULL; in test__group2() local
924 evlist__for_each_entry(evlist, evsel) { in test__group2()
927 if (evsel->core.attr.type == PERF_TYPE_SOFTWARE) { in test__group2()
929 leader = evsel; in test__group2()
931 test_config(evsel, PERF_COUNT_SW_PAGE_FAULTS)); in test__group2()
932 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group2()
933 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group2()
934 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
935 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group2()
936 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
937 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
938 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group2()
939 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group2()
940 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group2()
941 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
944 if (evsel->core.attr.type == PERF_TYPE_HARDWARE && in test__group2()
945 test_config(evsel, PERF_COUNT_HW_BRANCH_INSTRUCTIONS)) { in test__group2()
947 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group2()
948 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group2()
949 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
950 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group2()
951 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
952 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
953 if (evsel__has_leader(evsel, leader)) in test__group2()
954 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group2()
955 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
959 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group2()
963 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group2()
964 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group2()
965 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
966 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group2()
967 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
968 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
969 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group2()
970 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
978 struct evsel *evsel, *group1_leader = NULL, *group2_leader = NULL; in test__group3() local
990 evlist__for_each_entry(evlist, evsel) { in test__group3()
991 if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) { in test__group3()
993 group1_leader = evsel; in test__group3()
995 evsel->core.attr.sample_type == PERF_TP_SAMPLE_TYPE); in test__group3()
996 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__group3()
997 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
998 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group3()
999 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group3()
1000 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group3()
1001 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group3()
1002 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1003 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1004 TEST_ASSERT_VAL("wrong group name", !strcmp(evsel->group_name, "group1")); in test__group3()
1005 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group3()
1006 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group3()
1007 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1010 if (evsel->core.attr.type == PERF_TYPE_HARDWARE && in test__group3()
1011 test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)) { in test__group3()
1012 if (evsel->core.attr.exclude_user) { in test__group3()
1015 evsel->core.attr.exclude_user); in test__group3()
1017 !evsel->core.attr.exclude_kernel); in test__group3()
1018 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group3()
1021 evsel->core.attr.exclude_guest); in test__group3()
1023 !evsel->core.attr.exclude_host); in test__group3()
1025 evsel->core.attr.precise_ip == 3); in test__group3()
1026 if (evsel__has_leader(evsel, group1_leader)) { in test__group3()
1027 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group3()
1029 evsel__group_idx(evsel) == 1); in test__group3()
1031 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1034 group2_leader = evsel; in test__group3()
1036 !evsel->core.attr.exclude_kernel); in test__group3()
1038 !evsel->core.attr.exclude_hv); in test__group3()
1040 !evsel->core.attr.exclude_guest); in test__group3()
1042 evsel->core.attr.exclude_host); in test__group3()
1043 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1044 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1045 if (evsel->core.nr_members == 2) { in test__group3()
1047 evsel__group_idx(evsel) == 0); in test__group3()
1049 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1053 if (evsel->core.attr.type == 1) { in test__group3()
1055 TEST_ASSERT_VAL("wrong config", test_config(evsel, 3)); in test__group3()
1056 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
1057 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group3()
1058 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group3()
1059 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group3()
1060 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group3()
1061 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1062 if (evsel__has_leader(evsel, group2_leader)) in test__group3()
1063 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group3()
1064 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1068 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group3()
1072 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
1073 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group3()
1074 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group3()
1075 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group3()
1076 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group3()
1077 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1078 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1079 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1087 struct evsel *evsel, *leader; in test__group4() local
1098 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group4()
1099 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group4()
1103 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group4()
1104 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group4()
1105 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group4()
1107 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group4()
1108 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group4()
1109 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 1); in test__group4()
1110 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group4()
1111 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group4()
1112 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group4()
1113 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group4()
1114 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group4()
1117 evsel = evsel__next(evsel); in test__group4()
1118 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group4()
1122 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group4()
1123 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group4()
1124 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group4()
1126 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group4()
1127 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group4()
1128 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 2); in test__group4()
1129 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group4()
1130 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group4()
1131 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group4()
1138 struct evsel *evsel = NULL, *leader; in test__group5() local
1148 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group5()
1149 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "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 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group5()
1171 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1172 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1173 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1174 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1175 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1176 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1177 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group5()
1178 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group5()
1179 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1183 evsel = leader = evsel__next(evsel); in test__group5()
1184 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group5()
1188 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1189 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1190 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1191 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1192 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1193 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1194 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group5()
1195 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1196 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group5()
1197 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group5()
1198 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1201 evsel = evsel__next(evsel); in test__group5()
1202 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group5()
1206 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1207 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1208 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1209 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1210 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1211 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1212 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group5()
1213 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group5()
1217 evsel = evsel__next(evsel); in test__group5()
1218 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group5()
1222 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1223 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1224 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1225 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group5()
1226 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group5()
1227 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1228 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1235 struct evsel *evsel = NULL, *leader; in test__group_gh1() local
1246 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh1()
1247 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh1()
1251 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh1()
1252 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh1()
1253 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh1()
1254 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group_gh1()
1255 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh1()
1256 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh1()
1257 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh1()
1258 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh1()
1259 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh1()
1260 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh1()
1263 evsel = evsel__next(evsel); in test__group_gh1()
1264 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh1()
1268 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh1()
1269 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh1()
1270 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh1()
1271 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh1()
1272 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh1()
1273 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh1()
1274 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh1()
1275 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh1()
1282 struct evsel *evsel = NULL, *leader; in test__group_gh2() local
1293 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh2()
1294 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh2()
1298 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh2()
1299 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh2()
1300 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh2()
1301 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh2()
1302 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh2()
1303 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh2()
1304 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh2()
1305 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh2()
1306 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh2()
1307 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh2()
1310 evsel = evsel__next(evsel); in test__group_gh2()
1311 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh2()
1315 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh2()
1316 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh2()
1317 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh2()
1318 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh2()
1319 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh2()
1320 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh2()
1321 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh2()
1322 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh2()
1329 struct evsel *evsel = NULL, *leader; in test__group_gh3() local
1340 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh3()
1341 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh3()
1345 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh3()
1346 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh3()
1347 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh3()
1348 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh3()
1349 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh3()
1350 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh3()
1351 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh3()
1352 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh3()
1353 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh3()
1354 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh3()
1357 evsel = evsel__next(evsel); in test__group_gh3()
1358 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh3()
1362 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh3()
1363 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh3()
1364 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh3()
1365 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group_gh3()
1366 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh3()
1367 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh3()
1368 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh3()
1369 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh3()
1376 struct evsel *evsel = NULL, *leader; in test__group_gh4() local
1387 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh4()
1388 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh4()
1392 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh4()
1393 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh4()
1394 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh4()
1395 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh4()
1396 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh4()
1397 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh4()
1398 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh4()
1399 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh4()
1400 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh4()
1401 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh4()
1404 evsel = evsel__next(evsel); in test__group_gh4()
1405 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh4()
1409 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh4()
1410 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh4()
1411 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh4()
1412 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh4()
1413 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh4()
1414 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh4()
1415 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh4()
1416 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh4()
1423 struct evsel *evsel = NULL, *leader; in test__leader_sample1() local
1432 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__leader_sample1()
1433 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__leader_sample1()
1437 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1438 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1439 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1440 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample1()
1441 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1442 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1443 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample1()
1444 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1445 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1448 evsel = evsel__next(evsel); in test__leader_sample1()
1449 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__leader_sample1()
1453 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1454 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1455 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1456 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample1()
1457 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1458 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1459 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1460 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1463 evsel = evsel__next(evsel); in test__leader_sample1()
1464 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__leader_sample1()
1468 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1469 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1470 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1471 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample1()
1472 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1473 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1474 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample1()
1475 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1476 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1483 struct evsel *evsel = NULL, *leader; in test__leader_sample2() local
1492 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__leader_sample2()
1493 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__leader_sample2()
1497 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample2()
1498 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__leader_sample2()
1499 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__leader_sample2()
1500 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample2()
1501 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample2()
1502 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample2()
1503 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample2()
1504 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample2()
1505 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample2()
1508 evsel = evsel__next(evsel); in test__leader_sample2()
1509 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__leader_sample2()
1513 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample2()
1514 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__leader_sample2()
1515 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__leader_sample2()
1516 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__leader_sample2()
1517 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample2()
1518 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample2()
1519 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample2()
1520 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample2()
1521 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample2()
1528 struct evsel *evsel = NULL; in test__checkevent_pinned_modifier() local
1534 evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__checkevent_pinned_modifier()
1535 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_pinned_modifier()
1536 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_pinned_modifier()
1537 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pinned_modifier()
1538 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_pinned_modifier()
1539 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); in test__checkevent_pinned_modifier()
1546 struct evsel *evsel = NULL, *leader; in test__pinned_group() local
1555 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__pinned_group()
1556 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__pinned_group()
1560 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__pinned_group()
1561 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__pinned_group()
1564 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); in test__pinned_group()
1567 evsel = evsel__next(evsel); in test__pinned_group()
1568 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__pinned_group()
1572 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__pinned_group()
1575 evsel = evsel__next(evsel); in test__pinned_group()
1576 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__pinned_group()
1580 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__pinned_group()
1587 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclusive_modifier() local
1589 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_exclusive_modifier()
1590 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_exclusive_modifier()
1591 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_exclusive_modifier()
1592 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_exclusive_modifier()
1593 TEST_ASSERT_VAL("wrong exclusive", evsel->core.attr.exclusive); in test__checkevent_exclusive_modifier()
1600 struct evsel *evsel = NULL, *leader; in test__exclusive_group() local
1609 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__exclusive_group()
1610 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__exclusive_group()
1614 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__exclusive_group()
1615 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__exclusive_group()
1618 TEST_ASSERT_VAL("wrong exclusive", evsel->core.attr.exclusive); in test__exclusive_group()
1621 evsel = evsel__next(evsel); in test__exclusive_group()
1622 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__exclusive_group()
1626 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__exclusive_group()
1629 evsel = evsel__next(evsel); in test__exclusive_group()
1630 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__exclusive_group()
1634 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__exclusive_group()
1640 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len() local
1643 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_len()
1644 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_len()
1646 evsel->core.attr.bp_type); in test__checkevent_breakpoint_len()
1648 evsel->core.attr.bp_len); in test__checkevent_breakpoint_len()
1655 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_w() local
1658 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_len_w()
1659 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_len_w()
1661 evsel->core.attr.bp_type); in test__checkevent_breakpoint_len_w()
1663 evsel->core.attr.bp_len); in test__checkevent_breakpoint_len_w()
1671 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_rw_modifier() local
1673 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_len_rw_modifier()
1674 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_len_rw_modifier()
1675 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_len_rw_modifier()
1676 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_len_rw_modifier()
1683 struct evsel *evsel = evlist__first(evlist); in test__checkevent_precise_max_modifier() local
1687 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_precise_max_modifier()
1688 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_TASK_CLOCK)); in test__checkevent_precise_max_modifier()
1694 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_symbol() local
1696 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "insn")); in test__checkevent_config_symbol()
1702 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_raw() local
1704 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "rawpmu")); in test__checkevent_config_raw()
1710 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_num() local
1712 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "numpmu")); in test__checkevent_config_num()
1718 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_cache() local
1720 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "cachepmu")); in test__checkevent_config_cache()
1746 struct evsel *evsel = evlist__first(evlist); in test__intel_pt() local
1748 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "intel_pt//u")); in test__intel_pt()
1754 struct evsel *evsel = evlist__first(evlist); in test__checkevent_complex_name() local
1757 evsel__name_is(evsel, in test__checkevent_complex_name()
1764 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw_pmu() local
1767 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_raw_pmu()
1768 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0x1a)); in test__checkevent_raw_pmu()
1774 struct evsel *evsel = evlist__first(evlist); in test__sym_event_slash() local
1775 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__sym_event_slash()
1780 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__sym_event_slash()
1786 struct evsel *evsel = evlist__first(evlist); in test__sym_event_dc() local
1787 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__sym_event_dc()
1792 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__sym_event_dc()
1798 struct evsel *evsel = evlist__first(evlist); in test__term_equal_term() local
1799 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__term_equal_term()
1804 TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "name") == 0); in test__term_equal_term()
1810 struct evsel *evsel = evlist__first(evlist); in test__term_equal_legacy() local
1811 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__term_equal_legacy()
1816 TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "l1d") == 0); in test__term_equal_legacy()
2804 struct evsel *evsel1 = evlist__first(evlist); in test__checkevent_pmu_events_alias()
2805 struct evsel *evsel2 = evlist__last(evlist); in test__checkevent_pmu_events_alias()