Lines Matching refs:evsel
8 static int perf_evsel__test_field(struct evsel *evsel, const char *name, in perf_evsel__test_field() argument
11 struct tep_format_field *field = perf_evsel__field(evsel, name); in perf_evsel__test_field()
16 pr_debug("%s: \"%s\" field not found!\n", evsel->name, name); in perf_evsel__test_field()
23 evsel->name, name, is_signed, should_be_signed); in perf_evsel__test_field()
29 evsel->name, name, field->size, size); in perf_evsel__test_field()
38 struct evsel *evsel = perf_evsel__newtp("sched", "sched_switch"); in test__perf_evsel__tp_sched_test() local
41 if (IS_ERR(evsel)) { in test__perf_evsel__tp_sched_test()
42 pr_debug("perf_evsel__newtp failed with %ld\n", PTR_ERR(evsel)); in test__perf_evsel__tp_sched_test()
46 if (perf_evsel__test_field(evsel, "prev_comm", 16, false)) in test__perf_evsel__tp_sched_test()
49 if (perf_evsel__test_field(evsel, "prev_pid", 4, true)) in test__perf_evsel__tp_sched_test()
52 if (perf_evsel__test_field(evsel, "prev_prio", 4, true)) in test__perf_evsel__tp_sched_test()
55 if (perf_evsel__test_field(evsel, "prev_state", sizeof(long), true)) in test__perf_evsel__tp_sched_test()
58 if (perf_evsel__test_field(evsel, "next_comm", 16, false)) in test__perf_evsel__tp_sched_test()
61 if (perf_evsel__test_field(evsel, "next_pid", 4, true)) in test__perf_evsel__tp_sched_test()
64 if (perf_evsel__test_field(evsel, "next_prio", 4, true)) in test__perf_evsel__tp_sched_test()
67 evsel__delete(evsel); in test__perf_evsel__tp_sched_test()
69 evsel = perf_evsel__newtp("sched", "sched_wakeup"); in test__perf_evsel__tp_sched_test()
71 if (IS_ERR(evsel)) { in test__perf_evsel__tp_sched_test()
72 pr_debug("perf_evsel__newtp failed with %ld\n", PTR_ERR(evsel)); in test__perf_evsel__tp_sched_test()
76 if (perf_evsel__test_field(evsel, "comm", 16, false)) in test__perf_evsel__tp_sched_test()
79 if (perf_evsel__test_field(evsel, "pid", 4, true)) in test__perf_evsel__tp_sched_test()
82 if (perf_evsel__test_field(evsel, "prio", 4, true)) in test__perf_evsel__tp_sched_test()
85 if (perf_evsel__test_field(evsel, "target_cpu", 4, true)) in test__perf_evsel__tp_sched_test()
88 evsel__delete(evsel); in test__perf_evsel__tp_sched_test()