Lines Matching refs:sample

148 			    struct perf_sample *sample, struct machine *machine);
151 struct perf_sample *sample, struct machine *machine);
154 struct perf_sample *sample, struct machine *machine);
162 struct perf_sample *sample,
834 struct evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument
837 const char *comm = evsel__strval(evsel, sample, "comm"); in replay_wakeup_event()
838 const u32 pid = evsel__intval(evsel, sample, "pid"); in replay_wakeup_event()
844 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event()
847 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event()
850 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event()
856 struct perf_sample *sample, in replay_switch_event() argument
859 const char *prev_comm = evsel__strval(evsel, sample, "prev_comm"), in replay_switch_event()
860 *next_comm = evsel__strval(evsel, sample, "next_comm"); in replay_switch_event()
861 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in replay_switch_event()
862 next_pid = evsel__intval(evsel, sample, "next_pid"); in replay_switch_event()
863 const u64 prev_state = evsel__intval(evsel, sample, "prev_state"); in replay_switch_event()
865 u64 timestamp0, timestamp = sample->time; in replay_switch_event()
866 int cpu = sample->cpu; in replay_switch_event()
1130 struct perf_sample *sample, in latency_switch_event() argument
1133 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in latency_switch_event()
1134 next_pid = evsel__intval(evsel, sample, "next_pid"); in latency_switch_event()
1135 const u64 prev_state = evsel__intval(evsel, sample, "prev_state"); in latency_switch_event()
1138 u64 timestamp0, timestamp = sample->time; in latency_switch_event()
1139 int cpu = sample->cpu, err = -1; in latency_switch_event()
1200 struct perf_sample *sample, in latency_runtime_event() argument
1203 const u32 pid = evsel__intval(evsel, sample, "pid"); in latency_runtime_event()
1204 const u64 runtime = evsel__intval(evsel, sample, "runtime"); in latency_runtime_event()
1207 u64 timestamp = sample->time; in latency_runtime_event()
1208 int cpu = sample->cpu, err = -1; in latency_runtime_event()
1235 struct perf_sample *sample, in latency_wakeup_event() argument
1238 const u32 pid = evsel__intval(evsel, sample, "pid"); in latency_wakeup_event()
1242 u64 timestamp = sample->time; in latency_wakeup_event()
1296 struct perf_sample *sample, in latency_migrate_task_event() argument
1299 const u32 pid = evsel__intval(evsel, sample, "pid"); in latency_migrate_task_event()
1300 u64 timestamp = sample->time; in latency_migrate_task_event()
1508 struct perf_sample *sample, in process_sched_wakeup_event() argument
1514 return sched->tp_handler->wakeup_event(sched, evsel, sample, machine); in process_sched_wakeup_event()
1552 struct perf_sample *sample, struct machine *machine) in map_switch_event() argument
1554 const u32 next_pid = evsel__intval(evsel, sample, "next_pid"); in map_switch_event()
1558 u64 timestamp0, timestamp = sample->time; in map_switch_event()
1562 .cpu = sample->cpu, in map_switch_event()
1698 struct perf_sample *sample, in process_sched_switch_event() argument
1702 int this_cpu = sample->cpu, err = 0; in process_sched_switch_event()
1703 u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in process_sched_switch_event()
1704 next_pid = evsel__intval(evsel, sample, "next_pid"); in process_sched_switch_event()
1716 err = sched->tp_handler->switch_event(sched, evsel, sample, machine); in process_sched_switch_event()
1724 struct perf_sample *sample, in process_sched_runtime_event() argument
1730 return sched->tp_handler->runtime_event(sched, evsel, sample, machine); in process_sched_runtime_event()
1737 struct perf_sample *sample, in perf_sched__process_fork_event() argument
1743 perf_event__process_fork(tool, event, sample, machine); in perf_sched__process_fork_event()
1754 struct perf_sample *sample, in process_sched_migrate_task_event() argument
1760 return sched->tp_handler->migrate_task_event(sched, evsel, sample, machine); in process_sched_migrate_task_event()
1767 struct perf_sample *sample,
1772 struct perf_sample *sample, in perf_sched__process_tracepoint_sample() argument
1780 err = f(tool, evsel, sample, machine); in perf_sched__process_tracepoint_sample()
1788 struct perf_sample *sample, in perf_sched__process_comm() argument
1795 err = perf_event__process_comm(tool, event, sample, machine); in perf_sched__process_comm()
1799 thread = machine__find_thread(machine, sample->pid, sample->tid); in perf_sched__process_comm()
2030 struct perf_sample *sample, in timehist_print_sample() argument
2036 const char *next_comm = evsel__strval(evsel, sample, "next_comm"); in timehist_print_sample()
2037 const u32 next_pid = evsel__intval(evsel, sample, "next_pid"); in timehist_print_sample()
2043 if (cpu_list && !test_bit(sample->cpu, cpu_bitmap)) in timehist_print_sample()
2047 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_sample()
2056 if (i == sample->cpu) in timehist_print_sample()
2090 sample__fprintf_sym(sample, al, 0, in timehist_print_sample()
2164 static bool is_idle_sample(struct perf_sample *sample, in is_idle_sample() argument
2169 return evsel__intval(evsel, sample, "prev_pid") == 0; in is_idle_sample()
2171 return sample->pid == 0; in is_idle_sample()
2175 struct perf_sample *sample, in save_task_callchain() argument
2183 thread = machine__findnew_thread(machine, sample->pid, sample->pid); in save_task_callchain()
2185 pr_debug("Failed to get thread for pid %d.\n", sample->pid); in save_task_callchain()
2189 if (!sched->show_callchain || sample->callchain == NULL) in save_task_callchain()
2192 if (thread__resolve_callchain(thread, cursor, evsel, sample, in save_task_callchain()
2319 struct perf_sample *sample) in save_idle_callchain() argument
2321 if (!sched->show_callchain || sample->callchain == NULL) in save_idle_callchain()
2328 struct perf_sample *sample, in timehist_get_thread() argument
2334 if (is_idle_sample(sample, evsel)) { in timehist_get_thread()
2335 thread = get_idle_thread(sample->cpu); in timehist_get_thread()
2337 pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu); in timehist_get_thread()
2341 thread = machine__findnew_thread(machine, sample->pid, in timehist_get_thread()
2342 sample->tid ?: sample->pid); in timehist_get_thread()
2345 sample->tid); in timehist_get_thread()
2348 save_task_callchain(sched, sample, evsel, machine); in timehist_get_thread()
2353 idle = get_idle_thread(sample->cpu); in timehist_get_thread()
2355 pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu); in timehist_get_thread()
2366 if (evsel__intval(evsel, sample, "next_pid") == 0) in timehist_get_thread()
2367 save_idle_callchain(sched, itr, sample); in timehist_get_thread()
2377 struct perf_sample *sample) in timehist_skip_sample() argument
2389 else if (evsel__intval(evsel, sample, "prev_pid") != 0 && in timehist_skip_sample()
2390 evsel__intval(evsel, sample, "next_pid") != 0) in timehist_skip_sample()
2399 struct perf_sample *sample, in timehist_print_wakeup_event() argument
2406 thread = machine__findnew_thread(machine, sample->pid, sample->tid); in timehist_print_wakeup_event()
2411 if (timehist_skip_sample(sched, thread, evsel, sample) && in timehist_print_wakeup_event()
2412 timehist_skip_sample(sched, awakened, evsel, sample)) { in timehist_print_wakeup_event()
2416 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in timehist_print_wakeup_event()
2417 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_wakeup_event()
2434 struct perf_sample *sample __maybe_unused, in timehist_sched_wakeup_ignore()
2443 struct perf_sample *sample, in timehist_sched_wakeup_event() argument
2450 const u32 pid = evsel__intval(evsel, sample, "pid"); in timehist_sched_wakeup_event()
2461 tr->ready_to_run = sample->time; in timehist_sched_wakeup_event()
2465 !perf_time__skip_sample(&sched->ptime, sample->time)) in timehist_sched_wakeup_event()
2466 timehist_print_wakeup_event(sched, evsel, sample, machine, thread); in timehist_sched_wakeup_event()
2473 struct perf_sample *sample, in timehist_print_migration_event() argument
2486 ocpu = evsel__intval(evsel, sample, "orig_cpu"); in timehist_print_migration_event()
2487 dcpu = evsel__intval(evsel, sample, "dest_cpu"); in timehist_print_migration_event()
2489 thread = machine__findnew_thread(machine, sample->pid, sample->tid); in timehist_print_migration_event()
2493 if (timehist_skip_sample(sched, thread, evsel, sample) && in timehist_print_migration_event()
2494 timehist_skip_sample(sched, migrated, evsel, sample)) { in timehist_print_migration_event()
2498 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in timehist_print_migration_event()
2499 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_migration_event()
2507 c = (i == sample->cpu) ? 'm' : ' '; in timehist_print_migration_event()
2527 struct perf_sample *sample, in timehist_migrate_task_event() argument
2534 const u32 pid = evsel__intval(evsel, sample, "pid"); in timehist_migrate_task_event()
2547 timehist_print_migration_event(sched, evsel, sample, machine, thread); in timehist_migrate_task_event()
2555 struct perf_sample *sample, in timehist_sched_change_event() argument
2563 u64 tprev, t = sample->time; in timehist_sched_change_event()
2565 int state = evsel__intval(evsel, sample, "prev_state"); in timehist_sched_change_event()
2567 if (machine__resolve(machine, &al, sample) < 0) { in timehist_sched_change_event()
2574 thread = timehist_get_thread(sched, sample, machine, evsel); in timehist_sched_change_event()
2580 if (timehist_skip_sample(sched, thread, evsel, sample)) in timehist_sched_change_event()
2589 tprev = evsel__get_time(evsel, sample->cpu); in timehist_sched_change_event()
2617 if (!cpu_list || test_bit(sample->cpu, cpu_bitmap)) in timehist_sched_change_event()
2654 timehist_print_sample(sched, evsel, sample, &al, thread, t, state); in timehist_sched_change_event()
2664 tr->last_time = sample->time; in timehist_sched_change_event()
2673 evsel__save_time(evsel, sample->time, sample->cpu); in timehist_sched_change_event()
2681 struct perf_sample *sample, in timehist_sched_switch_event() argument
2684 return timehist_sched_change_event(tool, event, evsel, sample, machine); in timehist_sched_switch_event()
2689 struct perf_sample *sample, in process_lost() argument
2694 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in process_lost()
2696 printf("lost %" PRI_lu64 " events on cpu %d\n", event->lost.lost, sample->cpu); in process_lost()
2954 struct perf_sample *sample,
2959 struct perf_sample *sample, in perf_timehist__process_sample() argument
2966 .cpu = sample->cpu, in perf_timehist__process_sample()
2975 err = f(tool, event, evsel, sample, machine); in perf_timehist__process_sample()
3028 sched->tool.sample = perf_timehist__process_sample; in perf_sched__timehist()
3463 .sample = perf_sched__process_tracepoint_sample, in cmd_sched()