Lines Matching defs:evsel
7 #include "util/evsel.h"
147 int (*switch_event)(struct perf_sched *sched, struct evsel *evsel,
150 int (*runtime_event)(struct perf_sched *sched, struct evsel *evsel,
153 int (*wakeup_event)(struct perf_sched *sched, struct evsel *evsel,
161 struct evsel *evsel,
834 struct evsel *evsel, struct perf_sample *sample,
837 const char *comm = evsel__strval(evsel, sample, "comm");
838 const u32 pid = evsel__intval(evsel, sample, "pid");
842 printf("sched_wakeup event %p\n", evsel);
855 struct evsel *evsel,
859 const char *prev_comm = evsel__strval(evsel, sample, "prev_comm"),
860 *next_comm = evsel__strval(evsel, sample, "next_comm");
861 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"),
862 next_pid = evsel__intval(evsel, sample, "next_pid");
863 const u64 prev_state = evsel__intval(evsel, sample, "prev_state");
870 printf("sched_switch event %p\n", evsel);
1129 struct evsel *evsel,
1133 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"),
1134 next_pid = evsel__intval(evsel, sample, "next_pid");
1135 const u64 prev_state = evsel__intval(evsel, sample, "prev_state");
1199 struct evsel *evsel,
1203 const u32 pid = evsel__intval(evsel, sample, "pid");
1204 const u64 runtime = evsel__intval(evsel, sample, "runtime");
1234 struct evsel *evsel,
1238 const u32 pid = evsel__intval(evsel, sample, "pid");
1295 struct evsel *evsel,
1299 const u32 pid = evsel__intval(evsel, sample, "pid");
1514 struct evsel *evsel,
1521 return sched->tp_handler->wakeup_event(sched, evsel, sample, machine);
1527 struct evsel *evsel __maybe_unused,
1566 static int map_switch_event(struct perf_sched *sched, struct evsel *evsel,
1569 const u32 next_pid = evsel__intval(evsel, sample, "next_pid");
1712 struct evsel *evsel,
1718 u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"),
1719 next_pid = evsel__intval(evsel, sample, "next_pid");
1731 err = sched->tp_handler->switch_event(sched, evsel, sample, machine);
1738 struct evsel *evsel,
1745 return sched->tp_handler->runtime_event(sched, evsel, sample, machine);
1768 struct evsel *evsel,
1775 return sched->tp_handler->migrate_task_event(sched, evsel, sample, machine);
1781 struct evsel *evsel,
1788 struct evsel *evsel,
1793 if (evsel->handler != NULL) {
1794 tracepoint_handler f = evsel->handler;
1795 err = f(tool, evsel, sample, machine);
1901 static struct evsel_runtime *evsel__get_runtime(struct evsel *evsel)
1903 struct evsel_runtime *r = evsel->priv;
1907 evsel->priv = r;
1916 static void evsel__save_time(struct evsel *evsel, u64 timestamp, u32 cpu)
1918 struct evsel_runtime *r = evsel__get_runtime(evsel);
1942 static u64 evsel__get_time(struct evsel *evsel, u32 cpu)
1944 struct evsel_runtime *r = evsel__get_runtime(evsel);
2049 struct evsel *evsel,
2056 const char *next_comm = evsel__strval(evsel, sample, "next_comm");
2057 const u32 next_pid = evsel__intval(evsel, sample, "next_pid");
2185 struct evsel *evsel)
2188 if (strcmp(evsel__name(evsel), "sched:sched_switch") == 0)
2189 return evsel__intval(evsel, sample, "prev_pid") == 0;
2196 struct evsel *evsel,
2214 if (thread__resolve_callchain(thread, cursor, evsel, sample,
2358 struct evsel *evsel)
2362 if (is_idle_sample(sample, evsel)) {
2376 save_task_callchain(sched, sample, evsel, machine);
2394 if (evsel__intval(evsel, sample, "next_pid") == 0)
2404 struct evsel *evsel,
2415 if (strcmp(evsel__name(evsel), "sched:sched_switch"))
2417 else if (evsel__intval(evsel, sample, "prev_pid") != 0 &&
2418 evsel__intval(evsel, sample, "next_pid") != 0)
2426 struct evsel *evsel,
2439 if (timehist_skip_sample(sched, thread, evsel, sample) &&
2440 timehist_skip_sample(sched, awakened, evsel, sample)) {
2461 struct evsel *evsel __maybe_unused,
2470 struct evsel *evsel,
2478 const u32 pid = evsel__intval(evsel, sample, "pid");
2494 timehist_print_wakeup_event(sched, evsel, sample, machine, thread);
2500 struct evsel *evsel,
2514 ocpu = evsel__intval(evsel, sample, "orig_cpu");
2515 dcpu = evsel__intval(evsel, sample, "dest_cpu");
2521 if (timehist_skip_sample(sched, thread, evsel, sample) &&
2522 timehist_skip_sample(sched, migrated, evsel, sample)) {
2554 struct evsel *evsel,
2562 const u32 pid = evsel__intval(evsel, sample, "pid");
2575 timehist_print_migration_event(sched, evsel, sample, machine, thread);
2582 struct evsel *evsel,
2593 int state = evsel__intval(evsel, sample, "prev_state");
2603 thread = timehist_get_thread(sched, sample, machine, evsel);
2609 if (timehist_skip_sample(sched, thread, evsel, sample))
2618 tprev = evsel__get_time(evsel, sample->cpu);
2683 timehist_print_sample(sched, evsel, sample, &al, thread, t, state);
2702 evsel__save_time(evsel, sample->time, sample->cpu);
2710 struct evsel *evsel,
2714 return timehist_sched_change_event(tool, event, evsel, sample, machine);
2962 struct evsel *evsel,
2969 struct evsel *evsel,
2981 if (evsel->handler != NULL) {
2982 sched_handler f = evsel->handler;
2984 err = f(tool, event, evsel, sample, machine);
2993 struct evsel *evsel;
2996 list_for_each_entry(evsel, &evlist->core.entries, core.node) {
2997 er = evsel__get_runtime(evsel);
2999 pr_err("Failed to allocate memory for evsel runtime data\n");
3003 if (sched->show_callchain && !evsel__has_callchain(evsel)) {
3080 /* setup per-evsel handlers */