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()
85 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint() local
89 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_tracepoint()
91 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_tracepoint()
92 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__checkevent_tracepoint()
98 struct evsel *evsel; in test__checkevent_tracepoint_multi() local
103 evlist__for_each_entry(evlist, evsel) { in test__checkevent_tracepoint_multi()
105 PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_tracepoint_multi()
107 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_tracepoint_multi()
109 1 == evsel->core.attr.sample_period); in test__checkevent_tracepoint_multi()
116 struct perf_evsel *evsel; in test__checkevent_raw() local
121 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_raw()
125 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, 0x1a)); in test__checkevent_raw()
127 evsel->attr.type == PERF_TYPE_RAW); in test__checkevent_raw()
138 if (pmu->type == evsel->attr.type) { in test__checkevent_raw()
154 struct evsel *evsel = evlist__first(evlist); in test__checkevent_numeric() local
157 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); in test__checkevent_numeric()
158 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_numeric()
163 static int assert_hw(struct perf_evsel *evsel, enum perf_hw_id id, const char *name) in assert_hw() argument
167 if (evsel->attr.type == PERF_TYPE_HARDWARE) { in assert_hw()
168 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, id)); in assert_hw()
171 pmu = perf_pmus__find_by_type(evsel->attr.type); in assert_hw()
180 struct perf_evsel *evsel; in test__checkevent_symbolic_name() local
184 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_symbolic_name()
185 int ret = assert_hw(evsel, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__checkevent_symbolic_name()
196 struct perf_evsel *evsel; in test__checkevent_symbolic_name_config() local
200 perf_evlist__for_each_evsel(&evlist->core, evsel) { in test__checkevent_symbolic_name_config()
201 int ret = assert_hw(evsel, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__checkevent_symbolic_name_config()
209 TEST_ASSERT_VAL("wrong period", 0 == evsel->attr.sample_period); in test__checkevent_symbolic_name_config()
210 TEST_ASSERT_VAL("wrong config1", 0 == evsel->attr.config1); in test__checkevent_symbolic_name_config()
211 TEST_ASSERT_VAL("wrong config2", 1 == evsel->attr.config2); in test__checkevent_symbolic_name_config()
218 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias() local
221 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_symbolic_alias()
222 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_PAGE_FAULTS)); in test__checkevent_symbolic_alias()
228 struct perf_evsel *evsel; in test__checkevent_genhw() local
232 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_genhw()
233 TEST_ASSERT_VAL("wrong type", PERF_TYPE_HW_CACHE == evsel->attr.type); in test__checkevent_genhw()
234 TEST_ASSERT_VAL("wrong config", test_perf_config(evsel, 1 << 16)); in test__checkevent_genhw()
241 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint() local
244 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint()
245 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint()
247 evsel->core.attr.bp_type); in test__checkevent_breakpoint()
249 evsel->core.attr.bp_len); in test__checkevent_breakpoint()
255 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x() local
258 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_x()
259 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_x()
261 HW_BREAKPOINT_X == evsel->core.attr.bp_type); in test__checkevent_breakpoint_x()
262 TEST_ASSERT_VAL("wrong bp_len", default_breakpoint_len() == evsel->core.attr.bp_len); in test__checkevent_breakpoint_x()
268 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r() local
272 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_r()
273 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_r()
275 HW_BREAKPOINT_R == evsel->core.attr.bp_type); in test__checkevent_breakpoint_r()
277 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_r()
283 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w() local
287 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_w()
288 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_w()
290 HW_BREAKPOINT_W == evsel->core.attr.bp_type); in test__checkevent_breakpoint_w()
292 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_w()
298 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw() local
302 PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_rw()
303 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_rw()
305 (HW_BREAKPOINT_R|HW_BREAKPOINT_W) == evsel->core.attr.bp_type); in test__checkevent_breakpoint_rw()
307 HW_BREAKPOINT_LEN_4 == evsel->core.attr.bp_len); in test__checkevent_breakpoint_rw()
313 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint_modifier() local
315 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_tracepoint_modifier()
316 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_tracepoint_modifier()
317 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_tracepoint_modifier()
318 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_tracepoint_modifier()
326 struct perf_evsel *evsel; in test__checkevent_tracepoint_multi_modifier() local
330 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_tracepoint_multi_modifier()
331 TEST_ASSERT_VAL("wrong exclude_user", !evsel->attr.exclude_user); in test__checkevent_tracepoint_multi_modifier()
332 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_tracepoint_multi_modifier()
333 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_tracepoint_multi_modifier()
334 TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip); in test__checkevent_tracepoint_multi_modifier()
342 struct perf_evsel *evsel; in test__checkevent_raw_modifier() local
344 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_raw_modifier()
345 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_raw_modifier()
346 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel); in test__checkevent_raw_modifier()
347 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_raw_modifier()
348 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_raw_modifier()
355 struct perf_evsel *evsel; in test__checkevent_numeric_modifier() local
357 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_numeric_modifier()
358 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_numeric_modifier()
359 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_numeric_modifier()
360 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv); in test__checkevent_numeric_modifier()
361 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_numeric_modifier()
368 struct perf_evsel *evsel; in test__checkevent_symbolic_name_modifier() local
373 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_symbolic_name_modifier()
374 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_symbolic_name_modifier()
375 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->attr.exclude_kernel); in test__checkevent_symbolic_name_modifier()
376 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->attr.exclude_hv); in test__checkevent_symbolic_name_modifier()
377 TEST_ASSERT_VAL("wrong precise_ip", !evsel->attr.precise_ip); in test__checkevent_symbolic_name_modifier()
384 struct perf_evsel *evsel; in test__checkevent_exclude_host_modifier() local
386 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_exclude_host_modifier()
387 TEST_ASSERT_VAL("wrong exclude guest", !evsel->attr.exclude_guest); in test__checkevent_exclude_host_modifier()
388 TEST_ASSERT_VAL("wrong exclude host", evsel->attr.exclude_host); in test__checkevent_exclude_host_modifier()
395 struct perf_evsel *evsel; in test__checkevent_exclude_guest_modifier() local
397 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_exclude_guest_modifier()
398 TEST_ASSERT_VAL("wrong exclude guest", evsel->attr.exclude_guest); in test__checkevent_exclude_guest_modifier()
399 TEST_ASSERT_VAL("wrong exclude host", !evsel->attr.exclude_host); in test__checkevent_exclude_guest_modifier()
406 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias_modifier() local
408 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_symbolic_alias_modifier()
409 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_symbolic_alias_modifier()
410 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_symbolic_alias_modifier()
411 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_symbolic_alias_modifier()
418 struct perf_evsel *evsel; in test__checkevent_genhw_modifier() local
420 perf_evlist__for_each_entry(&evlist->core, evsel) { in test__checkevent_genhw_modifier()
421 TEST_ASSERT_VAL("wrong exclude_user", evsel->attr.exclude_user); in test__checkevent_genhw_modifier()
422 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->attr.exclude_kernel); in test__checkevent_genhw_modifier()
423 TEST_ASSERT_VAL("wrong exclude_hv", evsel->attr.exclude_hv); in test__checkevent_genhw_modifier()
424 TEST_ASSERT_VAL("wrong precise_ip", evsel->attr.precise_ip); in test__checkevent_genhw_modifier()
431 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier() local
433 TEST_ASSERT_VAL("wrong exclude idle", evsel->core.attr.exclude_idle); in test__checkevent_exclude_idle_modifier()
434 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__checkevent_exclude_idle_modifier()
435 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__checkevent_exclude_idle_modifier()
436 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_exclude_idle_modifier()
437 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_exclude_idle_modifier()
438 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_exclude_idle_modifier()
439 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_exclude_idle_modifier()
446 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier_1() local
448 TEST_ASSERT_VAL("wrong exclude idle", evsel->core.attr.exclude_idle); in test__checkevent_exclude_idle_modifier_1()
449 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__checkevent_exclude_idle_modifier_1()
450 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__checkevent_exclude_idle_modifier_1()
451 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_exclude_idle_modifier_1()
452 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_exclude_idle_modifier_1()
453 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_exclude_idle_modifier_1()
454 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_exclude_idle_modifier_1()
461 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier() local
464 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_modifier()
465 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_modifier()
466 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_modifier()
467 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_modifier()
468 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:u")); in test__checkevent_breakpoint_modifier()
475 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier() local
477 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_x_modifier()
478 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_x_modifier()
479 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_x_modifier()
480 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_x_modifier()
481 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:x:k")); in test__checkevent_breakpoint_x_modifier()
488 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier() local
490 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_r_modifier()
491 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_r_modifier()
492 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_r_modifier()
493 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_r_modifier()
494 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:r:hp")); in test__checkevent_breakpoint_r_modifier()
501 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier() local
503 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_w_modifier()
504 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_w_modifier()
505 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_w_modifier()
506 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_w_modifier()
507 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:w:up")); in test__checkevent_breakpoint_w_modifier()
514 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier() local
516 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_rw_modifier()
517 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_rw_modifier()
518 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_rw_modifier()
519 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_rw_modifier()
520 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "mem:0:rw:kp")); in test__checkevent_breakpoint_rw_modifier()
527 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier_name() local
529 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_modifier_name()
530 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_modifier_name()
531 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_modifier_name()
532 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_modifier_name()
533 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_modifier_name()
540 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier_name() local
542 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_x_modifier_name()
543 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_x_modifier_name()
544 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_x_modifier_name()
545 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_x_modifier_name()
546 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_x_modifier_name()
553 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier_name() local
555 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_r_modifier_name()
556 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_r_modifier_name()
557 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_r_modifier_name()
558 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_r_modifier_name()
559 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_r_modifier_name()
566 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier_name() local
568 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_w_modifier_name()
569 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_w_modifier_name()
570 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_w_modifier_name()
571 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_w_modifier_name()
572 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_w_modifier_name()
579 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier_name() local
581 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_breakpoint_rw_modifier_name()
582 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_rw_modifier_name()
583 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_rw_modifier_name()
584 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_breakpoint_rw_modifier_name()
585 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "breakpoint")); in test__checkevent_breakpoint_rw_modifier_name()
592 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_2_events() local
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", evsel__name_is(evsel, "breakpoint1")); in test__checkevent_breakpoint_2_events()
599 evsel = evsel__next(evsel); in test__checkevent_breakpoint_2_events()
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, "breakpoint2")); in test__checkevent_breakpoint_2_events()
610 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu() local
613 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu()
614 TEST_ASSERT_VAL("wrong config", test_config(evsel, 10)); in test__checkevent_pmu()
615 TEST_ASSERT_VAL("wrong config1", 1 == evsel->core.attr.config1); in test__checkevent_pmu()
616 TEST_ASSERT_VAL("wrong config2", 3 == evsel->core.attr.config2); in test__checkevent_pmu()
617 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_pmu()
622 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu()
629 struct evsel *evsel = evlist__first(evlist); in test__checkevent_list() local
634 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT != evsel->core.attr.type); in test__checkevent_list()
635 while (evsel->core.attr.type != PERF_TYPE_TRACEPOINT) { in test__checkevent_list()
636 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_list()
637 TEST_ASSERT_VAL("wrong config1", 0 == evsel->core.attr.config1); in test__checkevent_list()
638 TEST_ASSERT_VAL("wrong config2", 0 == evsel->core.attr.config2); in test__checkevent_list()
639 TEST_ASSERT_VAL("wrong config3", 0 == evsel->core.attr.config3); in test__checkevent_list()
640 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_list()
641 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_list()
642 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_list()
643 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_list()
644 evsel = evsel__next(evsel); in test__checkevent_list()
648 TEST_ASSERT_VAL("wrong type", PERF_TYPE_TRACEPOINT == evsel->core.attr.type); in test__checkevent_list()
650 PERF_TP_SAMPLE_TYPE == evsel->core.attr.sample_type); in test__checkevent_list()
651 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__checkevent_list()
652 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_list()
653 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__checkevent_list()
654 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_list()
655 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_list()
658 evsel = evsel__next(evsel); in test__checkevent_list()
659 TEST_ASSERT_VAL("wrong type", 1 == evsel->core.attr.type); in test__checkevent_list()
660 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_list()
661 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__checkevent_list()
662 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_list()
663 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__checkevent_list()
664 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_list()
671 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_name() local
675 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_name()
676 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_pmu_name()
677 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "krava")); in test__checkevent_pmu_name()
680 evsel = evsel__next(evsel); in test__checkevent_pmu_name()
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, 2)); in test__checkevent_pmu_name()
684 TEST_ASSERT_VAL("wrong name", evsel__name_is(evsel, "cpu/config=2/u")); in test__checkevent_pmu_name()
691 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_partial_time_callgraph() local
695 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_partial_time_callgraph()
696 TEST_ASSERT_VAL("wrong config", test_config(evsel, 1)); in test__checkevent_pmu_partial_time_callgraph()
701 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu_partial_time_callgraph()
702 TEST_ASSERT_VAL("wrong callgraph", !evsel__has_callchain(evsel)); in test__checkevent_pmu_partial_time_callgraph()
703 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); in test__checkevent_pmu_partial_time_callgraph()
706 evsel = evsel__next(evsel); in test__checkevent_pmu_partial_time_callgraph()
707 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type); in test__checkevent_pmu_partial_time_callgraph()
708 TEST_ASSERT_VAL("wrong config", test_config(evsel, 2)); in test__checkevent_pmu_partial_time_callgraph()
713 TEST_ASSERT_VAL("wrong period", 0 == evsel->core.attr.sample_period); in test__checkevent_pmu_partial_time_callgraph()
714 TEST_ASSERT_VAL("wrong callgraph", !evsel__has_callchain(evsel)); in test__checkevent_pmu_partial_time_callgraph()
715 TEST_ASSERT_VAL("wrong time", !(PERF_SAMPLE_TIME & evsel->core.attr.sample_type)); in test__checkevent_pmu_partial_time_callgraph()
722 struct evsel *evsel; in test__checkevent_pmu_events() local
726 evlist__for_each_entry(evlist, evsel) { in test__checkevent_pmu_events()
727 TEST_ASSERT_VAL("wrong type", PERF_TYPE_RAW == evsel->core.attr.type || in test__checkevent_pmu_events()
728 strcmp(evsel->pmu->name, "cpu")); in test__checkevent_pmu_events()
729 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_pmu_events()
730 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events()
731 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events()
732 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events()
733 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events()
734 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__checkevent_pmu_events()
742 struct evsel *evsel = NULL; in test__checkevent_pmu_events_mix() local
750 evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__checkevent_pmu_events_mix()
753 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events_mix()
755 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events_mix()
756 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events_mix()
757 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events_mix()
758 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
759 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__checkevent_pmu_events_mix()
762 evsel = evsel__next(evsel); in test__checkevent_pmu_events_mix()
763 TEST_ASSERT_VAL("wrong type", evsel__find_pmu(evsel)->is_core); in test__checkevent_pmu_events_mix()
765 !evsel->core.attr.exclude_user); in test__checkevent_pmu_events_mix()
767 evsel->core.attr.exclude_kernel); in test__checkevent_pmu_events_mix()
768 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pmu_events_mix()
769 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_pmu_events_mix()
770 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
771 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.pinned); in test__checkevent_pmu_events_mix()
858 struct evsel *evsel, *leader; in test__group1() local
869 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group1()
870 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group1()
874 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group1()
875 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group1()
876 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group1()
877 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group1()
878 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group1()
879 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group1()
880 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group1()
881 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group1()
882 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group1()
883 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group1()
886 evsel = evsel__next(evsel); in test__group1()
887 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group1()
891 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group1()
892 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group1()
893 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group1()
894 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group1()
895 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group1()
896 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 2); in test__group1()
897 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group1()
898 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group1()
899 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group1()
906 struct evsel *evsel, *leader = NULL; in test__group2() local
916 evlist__for_each_entry(evlist, evsel) { in test__group2()
919 if (evsel->core.attr.type == PERF_TYPE_SOFTWARE) { in test__group2()
921 leader = evsel; in test__group2()
923 test_config(evsel, PERF_COUNT_SW_PAGE_FAULTS)); in test__group2()
924 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group2()
925 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group2()
926 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
927 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group2()
928 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
929 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
930 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group2()
931 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group2()
932 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group2()
933 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
936 if (evsel->core.attr.type == PERF_TYPE_HARDWARE && in test__group2()
937 test_config(evsel, PERF_COUNT_HW_BRANCH_INSTRUCTIONS)) { in test__group2()
939 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group2()
940 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group2()
941 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
942 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group2()
943 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
944 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
945 if (evsel__has_leader(evsel, leader)) in test__group2()
946 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group2()
947 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
951 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group2()
955 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group2()
956 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group2()
957 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group2()
958 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group2()
959 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group2()
960 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group2()
961 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group2()
962 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group2()
969 struct evsel *evsel, *group1_leader = NULL, *group2_leader = NULL; in test__group3() local
981 evlist__for_each_entry(evlist, evsel) { in test__group3()
982 if (evsel->core.attr.type == PERF_TYPE_TRACEPOINT) { in test__group3()
984 group1_leader = evsel; in test__group3()
986 evsel->core.attr.sample_type == PERF_TP_SAMPLE_TYPE); in test__group3()
987 TEST_ASSERT_VAL("wrong sample_period", 1 == evsel->core.attr.sample_period); in test__group3()
988 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
989 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group3()
990 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group3()
991 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group3()
992 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group3()
993 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
994 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
995 TEST_ASSERT_VAL("wrong group name", !strcmp(evsel->group_name, "group1")); in test__group3()
996 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group3()
997 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group3()
998 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1001 if (evsel->core.attr.type == PERF_TYPE_HARDWARE && in test__group3()
1002 test_config(evsel, PERF_COUNT_HW_CPU_CYCLES)) { in test__group3()
1003 if (evsel->core.attr.exclude_user) { in test__group3()
1006 evsel->core.attr.exclude_user); in test__group3()
1008 !evsel->core.attr.exclude_kernel); in test__group3()
1009 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group3()
1011 !evsel->core.attr.exclude_guest); in test__group3()
1013 !evsel->core.attr.exclude_host); in test__group3()
1015 evsel->core.attr.precise_ip == 3); in test__group3()
1016 if (evsel__has_leader(evsel, group1_leader)) { in test__group3()
1017 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group3()
1019 evsel__group_idx(evsel) == 1); in test__group3()
1021 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1024 group2_leader = evsel; in test__group3()
1026 !evsel->core.attr.exclude_kernel); in test__group3()
1028 !evsel->core.attr.exclude_hv); in test__group3()
1030 !evsel->core.attr.exclude_guest); in test__group3()
1032 evsel->core.attr.exclude_host); in test__group3()
1033 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1034 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1035 if (evsel->core.nr_members == 2) { in test__group3()
1037 evsel__group_idx(evsel) == 0); in test__group3()
1039 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1043 if (evsel->core.attr.type == 1) { in test__group3()
1045 TEST_ASSERT_VAL("wrong config", test_config(evsel, 3)); in test__group3()
1046 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
1047 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group3()
1048 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group3()
1049 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group3()
1050 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group3()
1051 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1052 if (evsel__has_leader(evsel, group2_leader)) in test__group3()
1053 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group3()
1054 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1058 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group3()
1062 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group3()
1063 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group3()
1064 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group3()
1065 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group3()
1066 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group3()
1067 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group3()
1068 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group3()
1069 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group3()
1076 struct evsel *evsel, *leader; in test__group4() local
1087 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group4()
1088 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group4()
1092 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group4()
1093 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group4()
1094 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group4()
1095 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group4()
1096 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group4()
1097 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 1); in test__group4()
1098 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group4()
1099 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group4()
1100 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group4()
1101 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group4()
1102 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group4()
1105 evsel = evsel__next(evsel); in test__group4()
1106 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group4()
1110 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__group4()
1111 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group4()
1112 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group4()
1113 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group4()
1114 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group4()
1115 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip == 2); in test__group4()
1116 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group4()
1117 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group4()
1118 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group4()
1125 struct evsel *evsel = NULL, *leader; in test__group5() local
1135 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group5()
1136 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group5()
1140 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1141 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1142 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1143 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1144 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1145 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1146 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group5()
1147 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1148 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group5()
1149 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group5()
1150 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1153 evsel = evsel__next(evsel); in test__group5()
1154 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group5()
1158 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1159 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1160 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1161 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1162 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1163 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1164 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group5()
1165 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group5()
1166 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1170 evsel = leader = evsel__next(evsel); in test__group5()
1171 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group5()
1175 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1176 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1177 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1178 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1179 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1180 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1181 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group5()
1182 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1183 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group5()
1184 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group5()
1185 TEST_ASSERT_VAL("wrong sample_read", !evsel->sample_read); in test__group5()
1188 evsel = evsel__next(evsel); in test__group5()
1189 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__group5()
1193 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1194 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1195 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1196 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1197 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group5()
1198 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1199 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group5()
1200 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group5()
1204 evsel = evsel__next(evsel); in test__group5()
1205 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group5()
1209 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group5()
1210 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group5()
1211 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group5()
1212 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group5()
1213 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group5()
1214 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group5()
1215 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group5()
1222 struct evsel *evsel = NULL, *leader; in test__group_gh1() local
1233 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh1()
1234 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh1()
1238 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh1()
1239 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh1()
1240 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh1()
1241 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group_gh1()
1242 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh1()
1243 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh1()
1244 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh1()
1245 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh1()
1246 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh1()
1247 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh1()
1250 evsel = evsel__next(evsel); in test__group_gh1()
1251 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh1()
1255 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh1()
1256 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh1()
1257 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh1()
1258 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh1()
1259 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh1()
1260 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh1()
1261 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh1()
1262 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh1()
1269 struct evsel *evsel = NULL, *leader; in test__group_gh2() local
1280 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh2()
1281 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh2()
1285 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh2()
1286 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh2()
1287 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh2()
1288 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh2()
1289 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh2()
1290 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh2()
1291 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh2()
1292 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh2()
1293 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh2()
1294 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh2()
1297 evsel = evsel__next(evsel); in test__group_gh2()
1298 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh2()
1302 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh2()
1303 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__group_gh2()
1304 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__group_gh2()
1305 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh2()
1306 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh2()
1307 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh2()
1308 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh2()
1309 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh2()
1316 struct evsel *evsel = NULL, *leader; in test__group_gh3() local
1327 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh3()
1328 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh3()
1332 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh3()
1333 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh3()
1334 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh3()
1335 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh3()
1336 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh3()
1337 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh3()
1338 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh3()
1339 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh3()
1340 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh3()
1341 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh3()
1344 evsel = evsel__next(evsel); in test__group_gh3()
1345 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh3()
1349 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh3()
1350 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh3()
1351 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh3()
1352 TEST_ASSERT_VAL("wrong exclude guest", evsel->core.attr.exclude_guest); in test__group_gh3()
1353 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh3()
1354 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh3()
1355 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh3()
1356 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh3()
1363 struct evsel *evsel = NULL, *leader; in test__group_gh4() local
1374 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__group_gh4()
1375 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__group_gh4()
1379 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh4()
1380 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh4()
1381 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh4()
1382 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh4()
1383 TEST_ASSERT_VAL("wrong exclude host", evsel->core.attr.exclude_host); in test__group_gh4()
1384 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh4()
1385 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__group_gh4()
1386 TEST_ASSERT_VAL("wrong leader", evsel__is_group_leader(evsel)); in test__group_gh4()
1387 TEST_ASSERT_VAL("wrong core.nr_members", evsel->core.nr_members == 2); in test__group_gh4()
1388 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 0); in test__group_gh4()
1391 evsel = evsel__next(evsel); in test__group_gh4()
1392 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__group_gh4()
1396 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__group_gh4()
1397 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__group_gh4()
1398 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__group_gh4()
1399 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__group_gh4()
1400 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__group_gh4()
1401 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__group_gh4()
1402 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__group_gh4()
1403 TEST_ASSERT_VAL("wrong group_idx", evsel__group_idx(evsel) == 1); in test__group_gh4()
1410 struct evsel *evsel = NULL, *leader; in test__leader_sample1() local
1419 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__leader_sample1()
1420 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__leader_sample1()
1424 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1425 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1426 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1427 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__leader_sample1()
1428 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1429 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1430 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample1()
1431 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1432 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1435 evsel = evsel__next(evsel); in test__leader_sample1()
1436 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__leader_sample1()
1440 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1441 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1442 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1443 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__leader_sample1()
1444 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1445 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1446 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1447 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1450 evsel = evsel__next(evsel); in test__leader_sample1()
1451 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__leader_sample1()
1455 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample1()
1456 TEST_ASSERT_VAL("wrong exclude_kernel", !evsel->core.attr.exclude_kernel); in test__leader_sample1()
1457 TEST_ASSERT_VAL("wrong exclude_hv", !evsel->core.attr.exclude_hv); in test__leader_sample1()
1458 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__leader_sample1()
1459 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample1()
1460 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample1()
1461 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample1()
1462 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample1()
1463 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample1()
1470 struct evsel *evsel = NULL, *leader; in test__leader_sample2() local
1479 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__leader_sample2()
1480 ret = assert_hw(&evsel->core, PERF_COUNT_HW_INSTRUCTIONS, "instructions"); in test__leader_sample2()
1484 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample2()
1485 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__leader_sample2()
1486 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__leader_sample2()
1487 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__leader_sample2()
1488 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample2()
1489 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample2()
1490 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample2()
1491 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample2()
1492 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample2()
1495 evsel = evsel__next(evsel); in test__leader_sample2()
1496 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__leader_sample2()
1500 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__leader_sample2()
1501 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__leader_sample2()
1502 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__leader_sample2()
1503 TEST_ASSERT_VAL("wrong exclude guest", !evsel->core.attr.exclude_guest); in test__leader_sample2()
1504 TEST_ASSERT_VAL("wrong exclude host", !evsel->core.attr.exclude_host); in test__leader_sample2()
1505 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__leader_sample2()
1506 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__leader_sample2()
1507 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__leader_sample2()
1508 TEST_ASSERT_VAL("wrong sample_read", evsel->sample_read); in test__leader_sample2()
1515 struct evsel *evsel = NULL; in test__checkevent_pinned_modifier() local
1521 evsel = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__checkevent_pinned_modifier()
1522 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_pinned_modifier()
1523 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_pinned_modifier()
1524 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_pinned_modifier()
1525 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_pinned_modifier()
1526 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); in test__checkevent_pinned_modifier()
1533 struct evsel *evsel = NULL, *leader; in test__pinned_group() local
1542 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__pinned_group()
1543 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__pinned_group()
1547 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__pinned_group()
1548 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__pinned_group()
1551 TEST_ASSERT_VAL("wrong pinned", evsel->core.attr.pinned); in test__pinned_group()
1554 evsel = evsel__next(evsel); in test__pinned_group()
1555 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__pinned_group()
1559 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__pinned_group()
1562 evsel = evsel__next(evsel); in test__pinned_group()
1563 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__pinned_group()
1567 TEST_ASSERT_VAL("wrong pinned", !evsel->core.attr.pinned); in test__pinned_group()
1574 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclusive_modifier() local
1576 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_exclusive_modifier()
1577 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_exclusive_modifier()
1578 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_exclusive_modifier()
1579 TEST_ASSERT_VAL("wrong precise_ip", evsel->core.attr.precise_ip); in test__checkevent_exclusive_modifier()
1580 TEST_ASSERT_VAL("wrong exclusive", evsel->core.attr.exclusive); in test__checkevent_exclusive_modifier()
1587 struct evsel *evsel = NULL, *leader; in test__exclusive_group() local
1596 evsel = leader = (i == 0 ? evlist__first(evlist) : evsel__next(evsel)); in test__exclusive_group()
1597 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__exclusive_group()
1601 TEST_ASSERT_VAL("wrong group name", !evsel->group_name); in test__exclusive_group()
1602 TEST_ASSERT_VAL("wrong leader", evsel__has_leader(evsel, leader)); in test__exclusive_group()
1605 TEST_ASSERT_VAL("wrong exclusive", evsel->core.attr.exclusive); in test__exclusive_group()
1608 evsel = evsel__next(evsel); in test__exclusive_group()
1609 ret = assert_hw(&evsel->core, PERF_COUNT_HW_CACHE_MISSES, "cache-misses"); in test__exclusive_group()
1613 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__exclusive_group()
1616 evsel = evsel__next(evsel); in test__exclusive_group()
1617 ret = assert_hw(&evsel->core, PERF_COUNT_HW_BRANCH_MISSES, "branch-misses"); in test__exclusive_group()
1621 TEST_ASSERT_VAL("wrong exclusive", !evsel->core.attr.exclusive); in test__exclusive_group()
1627 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len() local
1630 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_len()
1631 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_len()
1633 evsel->core.attr.bp_type); in test__checkevent_breakpoint_len()
1635 evsel->core.attr.bp_len); in test__checkevent_breakpoint_len()
1642 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_w() local
1645 TEST_ASSERT_VAL("wrong type", PERF_TYPE_BREAKPOINT == evsel->core.attr.type); in test__checkevent_breakpoint_len_w()
1646 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0)); in test__checkevent_breakpoint_len_w()
1648 evsel->core.attr.bp_type); in test__checkevent_breakpoint_len_w()
1650 evsel->core.attr.bp_len); in test__checkevent_breakpoint_len_w()
1658 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_rw_modifier() local
1660 TEST_ASSERT_VAL("wrong exclude_user", !evsel->core.attr.exclude_user); in test__checkevent_breakpoint_len_rw_modifier()
1661 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__checkevent_breakpoint_len_rw_modifier()
1662 TEST_ASSERT_VAL("wrong exclude_hv", evsel->core.attr.exclude_hv); in test__checkevent_breakpoint_len_rw_modifier()
1663 TEST_ASSERT_VAL("wrong precise_ip", !evsel->core.attr.precise_ip); in test__checkevent_breakpoint_len_rw_modifier()
1670 struct evsel *evsel = evlist__first(evlist); in test__checkevent_precise_max_modifier() local
1674 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_precise_max_modifier()
1675 TEST_ASSERT_VAL("wrong config", test_config(evsel, PERF_COUNT_SW_TASK_CLOCK)); in test__checkevent_precise_max_modifier()
1681 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_symbol() local
1683 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "insn")); in test__checkevent_config_symbol()
1689 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_raw() local
1691 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "rawpmu")); in test__checkevent_config_raw()
1697 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_num() local
1699 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "numpmu")); in test__checkevent_config_num()
1705 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_cache() local
1707 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "cachepmu")); in test__checkevent_config_cache()
1733 struct evsel *evsel = evlist__first(evlist); in test__intel_pt() local
1735 TEST_ASSERT_VAL("wrong name setting", evsel__name_is(evsel, "intel_pt//u")); in test__intel_pt()
1741 struct evsel *evsel = evlist__first(evlist); in test__checkevent_complex_name() local
1744 evsel__name_is(evsel, in test__checkevent_complex_name()
1751 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw_pmu() local
1754 TEST_ASSERT_VAL("wrong type", PERF_TYPE_SOFTWARE == evsel->core.attr.type); in test__checkevent_raw_pmu()
1755 TEST_ASSERT_VAL("wrong config", test_config(evsel, 0x1a)); in test__checkevent_raw_pmu()
1761 struct evsel *evsel = evlist__first(evlist); in test__sym_event_slash() local
1762 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__sym_event_slash()
1767 TEST_ASSERT_VAL("wrong exclude_kernel", evsel->core.attr.exclude_kernel); in test__sym_event_slash()
1773 struct evsel *evsel = evlist__first(evlist); in test__sym_event_dc() local
1774 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__sym_event_dc()
1779 TEST_ASSERT_VAL("wrong exclude_user", evsel->core.attr.exclude_user); in test__sym_event_dc()
1785 struct evsel *evsel = evlist__first(evlist); in test__term_equal_term() local
1786 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__term_equal_term()
1791 TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "name") == 0); in test__term_equal_term()
1797 struct evsel *evsel = evlist__first(evlist); in test__term_equal_legacy() local
1798 int ret = assert_hw(&evsel->core, PERF_COUNT_HW_CPU_CYCLES, "cycles"); in test__term_equal_legacy()
1803 TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "l1d") == 0); in test__term_equal_legacy()
2777 struct evsel *evsel1 = evlist__first(evlist); in test__checkevent_pmu_events_alias()
2778 struct evsel *evsel2 = evlist__last(evlist); in test__checkevent_pmu_events_alias()