Lines Matching refs:evlist
49 static int test__checkevent_tracepoint(struct evlist *evlist) in test__checkevent_tracepoint() argument
51 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint()
53 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_tracepoint()
54 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->core.nr_groups); in test__checkevent_tracepoint()
62 static int test__checkevent_tracepoint_multi(struct evlist *evlist) in test__checkevent_tracepoint_multi() argument
66 TEST_ASSERT_VAL("wrong number of entries", evlist->core.nr_entries > 1); in test__checkevent_tracepoint_multi()
67 TEST_ASSERT_VAL("wrong number of groups", 0 == evlist->core.nr_groups); in test__checkevent_tracepoint_multi()
69 evlist__for_each_entry(evlist, evsel) { in test__checkevent_tracepoint_multi()
80 static int test__checkevent_raw(struct evlist *evlist) in test__checkevent_raw() argument
82 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw()
84 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_raw()
90 static int test__checkevent_numeric(struct evlist *evlist) in test__checkevent_numeric() argument
92 struct evsel *evsel = evlist__first(evlist); in test__checkevent_numeric()
94 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_numeric()
100 static int test__checkevent_symbolic_name(struct evlist *evlist) in test__checkevent_symbolic_name() argument
102 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_name()
104 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_symbolic_name()
111 static int test__checkevent_symbolic_name_config(struct evlist *evlist) in test__checkevent_symbolic_name_config() argument
113 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_name_config()
115 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_symbolic_name_config()
132 static int test__checkevent_symbolic_alias(struct evlist *evlist) in test__checkevent_symbolic_alias() argument
134 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias()
136 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_symbolic_alias()
143 static int test__checkevent_genhw(struct evlist *evlist) in test__checkevent_genhw() argument
145 struct evsel *evsel = evlist__first(evlist); in test__checkevent_genhw()
147 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_genhw()
153 static int test__checkevent_breakpoint(struct evlist *evlist) in test__checkevent_breakpoint() argument
155 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint()
157 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint()
167 static int test__checkevent_breakpoint_x(struct evlist *evlist) in test__checkevent_breakpoint_x() argument
169 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x()
171 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint_x()
180 static int test__checkevent_breakpoint_r(struct evlist *evlist) in test__checkevent_breakpoint_r() argument
182 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r()
184 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint_r()
195 static int test__checkevent_breakpoint_w(struct evlist *evlist) in test__checkevent_breakpoint_w() argument
197 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w()
199 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint_w()
210 static int test__checkevent_breakpoint_rw(struct evlist *evlist) in test__checkevent_breakpoint_rw() argument
212 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw()
214 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint_rw()
225 static int test__checkevent_tracepoint_modifier(struct evlist *evlist) in test__checkevent_tracepoint_modifier() argument
227 struct evsel *evsel = evlist__first(evlist); in test__checkevent_tracepoint_modifier()
234 return test__checkevent_tracepoint(evlist); in test__checkevent_tracepoint_modifier()
238 test__checkevent_tracepoint_multi_modifier(struct evlist *evlist) in test__checkevent_tracepoint_multi_modifier() argument
242 TEST_ASSERT_VAL("wrong number of entries", evlist->core.nr_entries > 1); in test__checkevent_tracepoint_multi_modifier()
244 evlist__for_each_entry(evlist, evsel) { in test__checkevent_tracepoint_multi_modifier()
253 return test__checkevent_tracepoint_multi(evlist); in test__checkevent_tracepoint_multi_modifier()
256 static int test__checkevent_raw_modifier(struct evlist *evlist) in test__checkevent_raw_modifier() argument
258 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw_modifier()
265 return test__checkevent_raw(evlist); in test__checkevent_raw_modifier()
268 static int test__checkevent_numeric_modifier(struct evlist *evlist) in test__checkevent_numeric_modifier() argument
270 struct evsel *evsel = evlist__first(evlist); in test__checkevent_numeric_modifier()
277 return test__checkevent_numeric(evlist); in test__checkevent_numeric_modifier()
280 static int test__checkevent_symbolic_name_modifier(struct evlist *evlist) in test__checkevent_symbolic_name_modifier() argument
282 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_name_modifier()
289 return test__checkevent_symbolic_name(evlist); in test__checkevent_symbolic_name_modifier()
292 static int test__checkevent_exclude_host_modifier(struct evlist *evlist) in test__checkevent_exclude_host_modifier() argument
294 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_host_modifier()
299 return test__checkevent_symbolic_name(evlist); in test__checkevent_exclude_host_modifier()
302 static int test__checkevent_exclude_guest_modifier(struct evlist *evlist) in test__checkevent_exclude_guest_modifier() argument
304 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_guest_modifier()
309 return test__checkevent_symbolic_name(evlist); in test__checkevent_exclude_guest_modifier()
312 static int test__checkevent_symbolic_alias_modifier(struct evlist *evlist) in test__checkevent_symbolic_alias_modifier() argument
314 struct evsel *evsel = evlist__first(evlist); in test__checkevent_symbolic_alias_modifier()
321 return test__checkevent_symbolic_alias(evlist); in test__checkevent_symbolic_alias_modifier()
324 static int test__checkevent_genhw_modifier(struct evlist *evlist) in test__checkevent_genhw_modifier() argument
326 struct evsel *evsel = evlist__first(evlist); in test__checkevent_genhw_modifier()
333 return test__checkevent_genhw(evlist); in test__checkevent_genhw_modifier()
336 static int test__checkevent_exclude_idle_modifier(struct evlist *evlist) in test__checkevent_exclude_idle_modifier() argument
338 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier()
348 return test__checkevent_symbolic_name(evlist); in test__checkevent_exclude_idle_modifier()
351 static int test__checkevent_exclude_idle_modifier_1(struct evlist *evlist) in test__checkevent_exclude_idle_modifier_1() argument
353 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclude_idle_modifier_1()
363 return test__checkevent_symbolic_name(evlist); in test__checkevent_exclude_idle_modifier_1()
366 static int test__checkevent_breakpoint_modifier(struct evlist *evlist) in test__checkevent_breakpoint_modifier() argument
368 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_modifier()
378 return test__checkevent_breakpoint(evlist); in test__checkevent_breakpoint_modifier()
381 static int test__checkevent_breakpoint_x_modifier(struct evlist *evlist) in test__checkevent_breakpoint_x_modifier() argument
383 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_x_modifier()
392 return test__checkevent_breakpoint_x(evlist); in test__checkevent_breakpoint_x_modifier()
395 static int test__checkevent_breakpoint_r_modifier(struct evlist *evlist) in test__checkevent_breakpoint_r_modifier() argument
397 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_r_modifier()
406 return test__checkevent_breakpoint_r(evlist); in test__checkevent_breakpoint_r_modifier()
409 static int test__checkevent_breakpoint_w_modifier(struct evlist *evlist) in test__checkevent_breakpoint_w_modifier() argument
411 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_w_modifier()
420 return test__checkevent_breakpoint_w(evlist); in test__checkevent_breakpoint_w_modifier()
423 static int test__checkevent_breakpoint_rw_modifier(struct evlist *evlist) in test__checkevent_breakpoint_rw_modifier() argument
425 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_rw_modifier()
434 return test__checkevent_breakpoint_rw(evlist); in test__checkevent_breakpoint_rw_modifier()
437 static int test__checkevent_pmu(struct evlist *evlist) in test__checkevent_pmu() argument
440 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu()
442 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_pmu()
456 static int test__checkevent_list(struct evlist *evlist) in test__checkevent_list() argument
458 struct evsel *evsel = evlist__first(evlist); in test__checkevent_list()
460 TEST_ASSERT_VAL("wrong number of entries", 3 == evlist->core.nr_entries); in test__checkevent_list()
495 static int test__checkevent_pmu_name(struct evlist *evlist) in test__checkevent_pmu_name() argument
497 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_name()
500 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__checkevent_pmu_name()
507 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__checkevent_pmu_name()
516 static int test__checkevent_pmu_partial_time_callgraph(struct evlist *evlist) in test__checkevent_pmu_partial_time_callgraph() argument
518 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_partial_time_callgraph()
521 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__checkevent_pmu_partial_time_callgraph()
547 static int test__checkevent_pmu_events(struct evlist *evlist) in test__checkevent_pmu_events() argument
549 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_events()
551 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_pmu_events()
566 static int test__checkevent_pmu_events_mix(struct evlist *evlist) in test__checkevent_pmu_events_mix() argument
568 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pmu_events_mix()
571 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__checkevent_pmu_events_mix()
583 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__checkevent_pmu_events_mix()
668 static int test__group1(struct evlist *evlist) in test__group1() argument
672 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__group1()
673 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group1()
676 evsel = leader = evlist__first(evlist); in test__group1()
710 static int test__group2(struct evlist *evlist) in test__group2() argument
714 TEST_ASSERT_VAL("wrong number of entries", 3 == evlist->core.nr_entries); in test__group2()
715 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group2()
718 evsel = leader = evlist__first(evlist); in test__group2()
765 static int test__group3(struct evlist *evlist __maybe_unused) in test__group3()
769 TEST_ASSERT_VAL("wrong number of entries", 5 == evlist->core.nr_entries); in test__group3()
770 TEST_ASSERT_VAL("wrong number of groups", 2 == evlist->core.nr_groups); in test__group3()
773 evsel = leader = evlist__first(evlist); in test__group3()
857 static int test__group4(struct evlist *evlist __maybe_unused) in test__group4()
861 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__group4()
862 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group4()
865 evsel = leader = evlist__first(evlist); in test__group4()
901 static int test__group5(struct evlist *evlist __maybe_unused) in test__group5()
905 TEST_ASSERT_VAL("wrong number of entries", 5 == evlist->core.nr_entries); in test__group5()
906 TEST_ASSERT_VAL("wrong number of groups", 2 == evlist->core.nr_groups); in test__group5()
909 evsel = leader = evlist__first(evlist); in test__group5()
987 static int test__group_gh1(struct evlist *evlist) in test__group_gh1() argument
991 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__group_gh1()
992 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group_gh1()
995 evsel = leader = evlist__first(evlist); in test__group_gh1()
1027 static int test__group_gh2(struct evlist *evlist) in test__group_gh2() argument
1031 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__group_gh2()
1032 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group_gh2()
1035 evsel = leader = evlist__first(evlist); in test__group_gh2()
1067 static int test__group_gh3(struct evlist *evlist) in test__group_gh3() argument
1071 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__group_gh3()
1072 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group_gh3()
1075 evsel = leader = evlist__first(evlist); in test__group_gh3()
1107 static int test__group_gh4(struct evlist *evlist) in test__group_gh4() argument
1111 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__group_gh4()
1112 TEST_ASSERT_VAL("wrong number of groups", 1 == evlist->core.nr_groups); in test__group_gh4()
1115 evsel = leader = evlist__first(evlist); in test__group_gh4()
1147 static int test__leader_sample1(struct evlist *evlist) in test__leader_sample1() argument
1151 TEST_ASSERT_VAL("wrong number of entries", 3 == evlist->core.nr_entries); in test__leader_sample1()
1154 evsel = leader = evlist__first(evlist); in test__leader_sample1()
1200 static int test__leader_sample2(struct evlist *evlist __maybe_unused) in test__leader_sample2()
1204 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__leader_sample2()
1207 evsel = leader = evlist__first(evlist); in test__leader_sample2()
1239 static int test__checkevent_pinned_modifier(struct evlist *evlist) in test__checkevent_pinned_modifier() argument
1241 struct evsel *evsel = evlist__first(evlist); in test__checkevent_pinned_modifier()
1249 return test__checkevent_symbolic_name(evlist); in test__checkevent_pinned_modifier()
1252 static int test__pinned_group(struct evlist *evlist) in test__pinned_group() argument
1256 TEST_ASSERT_VAL("wrong number of entries", 3 == evlist->core.nr_entries); in test__pinned_group()
1259 evsel = leader = evlist__first(evlist); in test__pinned_group()
1283 static int test__checkevent_exclusive_modifier(struct evlist *evlist) in test__checkevent_exclusive_modifier() argument
1285 struct evsel *evsel = evlist__first(evlist); in test__checkevent_exclusive_modifier()
1293 return test__checkevent_symbolic_name(evlist); in test__checkevent_exclusive_modifier()
1296 static int test__exclusive_group(struct evlist *evlist) in test__exclusive_group() argument
1300 TEST_ASSERT_VAL("wrong number of entries", 3 == evlist->core.nr_entries); in test__exclusive_group()
1303 evsel = leader = evlist__first(evlist); in test__exclusive_group()
1326 static int test__checkevent_breakpoint_len(struct evlist *evlist) in test__checkevent_breakpoint_len() argument
1328 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len()
1330 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint_len()
1341 static int test__checkevent_breakpoint_len_w(struct evlist *evlist) in test__checkevent_breakpoint_len_w() argument
1343 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_w()
1345 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_breakpoint_len_w()
1357 test__checkevent_breakpoint_len_rw_modifier(struct evlist *evlist) in test__checkevent_breakpoint_len_rw_modifier() argument
1359 struct evsel *evsel = evlist__first(evlist); in test__checkevent_breakpoint_len_rw_modifier()
1366 return test__checkevent_breakpoint_rw(evlist); in test__checkevent_breakpoint_len_rw_modifier()
1369 static int test__checkevent_precise_max_modifier(struct evlist *evlist) in test__checkevent_precise_max_modifier() argument
1371 struct evsel *evsel = evlist__first(evlist); in test__checkevent_precise_max_modifier()
1373 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__checkevent_precise_max_modifier()
1380 static int test__checkevent_config_symbol(struct evlist *evlist) in test__checkevent_config_symbol() argument
1382 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_symbol()
1388 static int test__checkevent_config_raw(struct evlist *evlist) in test__checkevent_config_raw() argument
1390 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_raw()
1396 static int test__checkevent_config_num(struct evlist *evlist) in test__checkevent_config_num() argument
1398 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_num()
1404 static int test__checkevent_config_cache(struct evlist *evlist) in test__checkevent_config_cache() argument
1406 struct evsel *evsel = evlist__first(evlist); in test__checkevent_config_cache()
1417 static int test__intel_pt(struct evlist *evlist) in test__intel_pt() argument
1419 struct evsel *evsel = evlist__first(evlist); in test__intel_pt()
1425 static int test__checkevent_complex_name(struct evlist *evlist) in test__checkevent_complex_name() argument
1427 struct evsel *evsel = evlist__first(evlist); in test__checkevent_complex_name()
1433 static int test__checkevent_raw_pmu(struct evlist *evlist) in test__checkevent_raw_pmu() argument
1435 struct evsel *evsel = evlist__first(evlist); in test__checkevent_raw_pmu()
1437 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__checkevent_raw_pmu()
1443 static int test__sym_event_slash(struct evlist *evlist) in test__sym_event_slash() argument
1445 struct evsel *evsel = evlist__first(evlist); in test__sym_event_slash()
1453 static int test__sym_event_dc(struct evlist *evlist) in test__sym_event_dc() argument
1455 struct evsel *evsel = evlist__first(evlist); in test__sym_event_dc()
1509 static int test__all_tracepoints(struct evlist *evlist) in test__all_tracepoints() argument
1512 count_tracepoints() == evlist->core.nr_entries); in test__all_tracepoints()
1514 return test__checkevent_tracepoint_multi(evlist); in test__all_tracepoints()
1517 static int test__hybrid_hw_event_with_pmu(struct evlist *evlist) in test__hybrid_hw_event_with_pmu() argument
1519 struct evsel *evsel = evlist__first(evlist); in test__hybrid_hw_event_with_pmu()
1521 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_hw_event_with_pmu()
1527 static int test__hybrid_hw_group_event(struct evlist *evlist) in test__hybrid_hw_group_event() argument
1531 evsel = leader = evlist__first(evlist); in test__hybrid_hw_group_event()
1532 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_hw_group_event()
1544 static int test__hybrid_sw_hw_group_event(struct evlist *evlist) in test__hybrid_sw_hw_group_event() argument
1548 evsel = leader = evlist__first(evlist); in test__hybrid_sw_hw_group_event()
1549 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_sw_hw_group_event()
1560 static int test__hybrid_hw_sw_group_event(struct evlist *evlist) in test__hybrid_hw_sw_group_event() argument
1564 evsel = leader = evlist__first(evlist); in test__hybrid_hw_sw_group_event()
1565 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_hw_sw_group_event()
1576 static int test__hybrid_group_modifier1(struct evlist *evlist) in test__hybrid_group_modifier1() argument
1580 evsel = leader = evlist__first(evlist); in test__hybrid_group_modifier1()
1581 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_group_modifier1()
1597 static int test__hybrid_raw1(struct evlist *evlist) in test__hybrid_raw1() argument
1599 struct evsel *evsel = evlist__first(evlist); in test__hybrid_raw1()
1602 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_raw1()
1608 TEST_ASSERT_VAL("wrong number of entries", 2 == evlist->core.nr_entries); in test__hybrid_raw1()
1618 static int test__hybrid_raw2(struct evlist *evlist) in test__hybrid_raw2() argument
1620 struct evsel *evsel = evlist__first(evlist); in test__hybrid_raw2()
1622 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_raw2()
1628 static int test__hybrid_cache_event(struct evlist *evlist) in test__hybrid_cache_event() argument
1630 struct evsel *evsel = evlist__first(evlist); in test__hybrid_cache_event()
1632 TEST_ASSERT_VAL("wrong number of entries", 1 == evlist->core.nr_entries); in test__hybrid_cache_event()
1643 int (*check)(struct evlist *evlist);
2045 struct evlist *evlist; in test_event() local
2053 evlist = evlist__new(); in test_event()
2054 if (evlist == NULL) in test_event()
2058 ret = parse_events(evlist, e->name, &err); in test_event()
2064 ret = e->check(evlist); in test_event()
2067 evlist__delete(evlist); in test_event()
2256 static int test__checkevent_pmu_events_alias(struct evlist *evlist) in test__checkevent_pmu_events_alias() argument
2258 struct evsel *evsel1 = evlist__first(evlist); in test__checkevent_pmu_events_alias()
2259 struct evsel *evsel2 = evlist__last(evlist); in test__checkevent_pmu_events_alias()