Lines Matching defs:evsel

8 #include "util/evsel.h"
146 int (*switch_event)(struct perf_sched *sched, struct evsel *evsel,
149 int (*runtime_event)(struct perf_sched *sched, struct evsel *evsel,
152 int (*wakeup_event)(struct perf_sched *sched, struct evsel *evsel,
160 struct evsel *evsel,
812 struct evsel *evsel, struct perf_sample *sample,
815 const char *comm = evsel__strval(evsel, sample, "comm");
816 const u32 pid = evsel__intval(evsel, sample, "pid");
820 printf("sched_wakeup event %p\n", evsel);
833 struct evsel *evsel,
837 const char *prev_comm = evsel__strval(evsel, sample, "prev_comm"),
838 *next_comm = evsel__strval(evsel, sample, "next_comm");
839 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"),
840 next_pid = evsel__intval(evsel, sample, "next_pid");
841 const u64 prev_state = evsel__intval(evsel, sample, "prev_state");
848 printf("sched_switch event %p\n", evsel);
1107 struct evsel *evsel,
1111 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"),
1112 next_pid = evsel__intval(evsel, sample, "next_pid");
1113 const u64 prev_state = evsel__intval(evsel, sample, "prev_state");
1177 struct evsel *evsel,
1181 const u32 pid = evsel__intval(evsel, sample, "pid");
1182 const u64 runtime = evsel__intval(evsel, sample, "runtime");
1212 struct evsel *evsel,
1216 const u32 pid = evsel__intval(evsel, sample, "pid");
1273 struct evsel *evsel,
1277 const u32 pid = evsel__intval(evsel, sample, "pid");
1485 struct evsel *evsel,
1492 return sched->tp_handler->wakeup_event(sched, evsel, sample, machine);
1529 static int map_switch_event(struct perf_sched *sched, struct evsel *evsel,
1532 const u32 next_pid = evsel__intval(evsel, sample, "next_pid");
1670 struct evsel *evsel,
1676 u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"),
1677 next_pid = evsel__intval(evsel, sample, "next_pid");
1689 err = sched->tp_handler->switch_event(sched, evsel, sample, machine);
1696 struct evsel *evsel,
1703 return sched->tp_handler->runtime_event(sched, evsel, sample, machine);
1726 struct evsel *evsel,
1733 return sched->tp_handler->migrate_task_event(sched, evsel, sample, machine);
1739 struct evsel *evsel,
1746 struct evsel *evsel,
1751 if (evsel->handler != NULL) {
1752 tracepoint_handler f = evsel->handler;
1753 err = f(tool, evsel, sample, machine);
1854 static struct evsel_runtime *evsel__get_runtime(struct evsel *evsel)
1856 struct evsel_runtime *r = evsel->priv;
1860 evsel->priv = r;
1869 static void evsel__save_time(struct evsel *evsel, u64 timestamp, u32 cpu)
1871 struct evsel_runtime *r = evsel__get_runtime(evsel);
1895 static u64 evsel__get_time(struct evsel *evsel, u32 cpu)
1897 struct evsel_runtime *r = evsel__get_runtime(evsel);
2002 struct evsel *evsel,
2009 const char *next_comm = evsel__strval(evsel, sample, "next_comm");
2010 const u32 next_pid = evsel__intval(evsel, sample, "next_pid");
2138 struct evsel *evsel)
2141 if (strcmp(evsel__name(evsel), "sched:sched_switch") == 0)
2142 return evsel__intval(evsel, sample, "prev_pid") == 0;
2149 struct evsel *evsel,
2165 if (thread__resolve_callchain(thread, cursor, evsel, sample,
2303 struct evsel *evsel)
2307 if (is_idle_sample(sample, evsel)) {
2321 save_task_callchain(sched, sample, evsel, machine);
2339 if (evsel__intval(evsel, sample, "next_pid") == 0)
2349 struct evsel *evsel,
2360 if (strcmp(evsel__name(evsel), "sched:sched_switch"))
2362 else if (evsel__intval(evsel, sample, "prev_pid") != 0 &&
2363 evsel__intval(evsel, sample, "next_pid") != 0)
2371 struct evsel *evsel,
2384 if (timehist_skip_sample(sched, thread, evsel, sample) &&
2385 timehist_skip_sample(sched, awakened, evsel, sample)) {
2406 struct evsel *evsel __maybe_unused,
2415 struct evsel *evsel,
2423 const u32 pid = evsel__intval(evsel, sample, "pid");
2439 timehist_print_wakeup_event(sched, evsel, sample, machine, thread);
2445 struct evsel *evsel,
2459 ocpu = evsel__intval(evsel, sample, "orig_cpu");
2460 dcpu = evsel__intval(evsel, sample, "dest_cpu");
2466 if (timehist_skip_sample(sched, thread, evsel, sample) &&
2467 timehist_skip_sample(sched, migrated, evsel, sample)) {
2499 struct evsel *evsel,
2507 const u32 pid = evsel__intval(evsel, sample, "pid");
2520 timehist_print_migration_event(sched, evsel, sample, machine, thread);
2527 struct evsel *evsel,
2538 int state = evsel__intval(evsel, sample, "prev_state");
2547 thread = timehist_get_thread(sched, sample, machine, evsel);
2553 if (timehist_skip_sample(sched, thread, evsel, sample))
2562 tprev = evsel__get_time(evsel, sample->cpu);
2627 timehist_print_sample(sched, evsel, sample, &al, thread, t, state);
2646 evsel__save_time(evsel, sample->time, sample->cpu);
2653 struct evsel *evsel,
2657 return timehist_sched_change_event(tool, event, evsel, sample, machine);
2926 struct evsel *evsel,
2933 struct evsel *evsel,
2943 if (evsel->handler != NULL) {
2944 sched_handler f = evsel->handler;
2946 err = f(tool, event, evsel, sample, machine);
2955 struct evsel *evsel;
2958 list_for_each_entry(evsel, &evlist->core.entries, core.node) {
2959 er = evsel__get_runtime(evsel);
2961 pr_err("Failed to allocate memory for evsel runtime data\n");
2965 if (sched->show_callchain && !evsel__has_callchain(evsel)) {
3043 /* setup per-evsel handlers */