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()
1515 struct perf_sample *sample, in process_sched_wakeup_event() argument
1521 return sched->tp_handler->wakeup_event(sched, evsel, sample, machine); in process_sched_wakeup_event()
1528 struct perf_sample *sample __maybe_unused, in process_sched_wakeup_ignore()
1567 struct perf_sample *sample, struct machine *machine) in map_switch_event() argument
1569 const u32 next_pid = evsel__intval(evsel, sample, "next_pid"); in map_switch_event()
1573 u64 timestamp0, timestamp = sample->time; in map_switch_event()
1577 .cpu = sample->cpu, in map_switch_event()
1713 struct perf_sample *sample, in process_sched_switch_event() argument
1717 int this_cpu = sample->cpu, err = 0; in process_sched_switch_event()
1718 u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in process_sched_switch_event()
1719 next_pid = evsel__intval(evsel, sample, "next_pid"); in process_sched_switch_event()
1731 err = sched->tp_handler->switch_event(sched, evsel, sample, machine); in process_sched_switch_event()
1739 struct perf_sample *sample, in process_sched_runtime_event() argument
1745 return sched->tp_handler->runtime_event(sched, evsel, sample, machine); in process_sched_runtime_event()
1752 struct perf_sample *sample, in perf_sched__process_fork_event() argument
1758 perf_event__process_fork(tool, event, sample, machine); in perf_sched__process_fork_event()
1769 struct perf_sample *sample, in process_sched_migrate_task_event() argument
1775 return sched->tp_handler->migrate_task_event(sched, evsel, sample, machine); in process_sched_migrate_task_event()
1782 struct perf_sample *sample,
1787 struct perf_sample *sample, in perf_sched__process_tracepoint_sample() argument
1795 err = f(tool, evsel, sample, machine); in perf_sched__process_tracepoint_sample()
1803 struct perf_sample *sample, in perf_sched__process_comm() argument
1810 err = perf_event__process_comm(tool, event, sample, machine); in perf_sched__process_comm()
1814 thread = machine__find_thread(machine, sample->pid, sample->tid); in perf_sched__process_comm()
2050 struct perf_sample *sample, in timehist_print_sample() argument
2056 const char *next_comm = evsel__strval(evsel, sample, "next_comm"); in timehist_print_sample()
2057 const u32 next_pid = evsel__intval(evsel, sample, "next_pid"); in timehist_print_sample()
2063 if (cpu_list && !test_bit(sample->cpu, cpu_bitmap)) in timehist_print_sample()
2067 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_sample()
2076 if (i == sample->cpu) in timehist_print_sample()
2110 sample__fprintf_sym(sample, al, 0, in timehist_print_sample()
2184 static bool is_idle_sample(struct perf_sample *sample, in is_idle_sample() argument
2189 return evsel__intval(evsel, sample, "prev_pid") == 0; in is_idle_sample()
2191 return sample->pid == 0; in is_idle_sample()
2195 struct perf_sample *sample, in save_task_callchain() argument
2203 thread = machine__findnew_thread(machine, sample->pid, sample->pid); in save_task_callchain()
2205 pr_debug("Failed to get thread for pid %d.\n", sample->pid); in save_task_callchain()
2209 if (!sched->show_callchain || sample->callchain == NULL) in save_task_callchain()
2214 if (thread__resolve_callchain(thread, cursor, evsel, sample, in save_task_callchain()
2341 struct perf_sample *sample) in save_idle_callchain() argument
2345 if (!sched->show_callchain || sample->callchain == NULL) in save_idle_callchain()
2356 struct perf_sample *sample, in timehist_get_thread() argument
2362 if (is_idle_sample(sample, evsel)) { in timehist_get_thread()
2363 thread = get_idle_thread(sample->cpu); in timehist_get_thread()
2365 pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu); in timehist_get_thread()
2369 thread = machine__findnew_thread(machine, sample->pid, in timehist_get_thread()
2370 sample->tid ?: sample->pid); in timehist_get_thread()
2373 sample->tid); in timehist_get_thread()
2376 save_task_callchain(sched, sample, evsel, machine); in timehist_get_thread()
2381 idle = get_idle_thread(sample->cpu); in timehist_get_thread()
2383 pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu); in timehist_get_thread()
2394 if (evsel__intval(evsel, sample, "next_pid") == 0) in timehist_get_thread()
2395 save_idle_callchain(sched, itr, sample); in timehist_get_thread()
2405 struct perf_sample *sample) in timehist_skip_sample() argument
2417 else if (evsel__intval(evsel, sample, "prev_pid") != 0 && in timehist_skip_sample()
2418 evsel__intval(evsel, sample, "next_pid") != 0) in timehist_skip_sample()
2427 struct perf_sample *sample, in timehist_print_wakeup_event() argument
2434 thread = machine__findnew_thread(machine, sample->pid, sample->tid); in timehist_print_wakeup_event()
2439 if (timehist_skip_sample(sched, thread, evsel, sample) && in timehist_print_wakeup_event()
2440 timehist_skip_sample(sched, awakened, evsel, sample)) { in timehist_print_wakeup_event()
2444 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in timehist_print_wakeup_event()
2445 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_wakeup_event()
2462 struct perf_sample *sample __maybe_unused, in timehist_sched_wakeup_ignore()
2471 struct perf_sample *sample, in timehist_sched_wakeup_event() argument
2478 const u32 pid = evsel__intval(evsel, sample, "pid"); in timehist_sched_wakeup_event()
2489 tr->ready_to_run = sample->time; in timehist_sched_wakeup_event()
2493 !perf_time__skip_sample(&sched->ptime, sample->time)) in timehist_sched_wakeup_event()
2494 timehist_print_wakeup_event(sched, evsel, sample, machine, thread); in timehist_sched_wakeup_event()
2501 struct perf_sample *sample, in timehist_print_migration_event() argument
2514 ocpu = evsel__intval(evsel, sample, "orig_cpu"); in timehist_print_migration_event()
2515 dcpu = evsel__intval(evsel, sample, "dest_cpu"); in timehist_print_migration_event()
2517 thread = machine__findnew_thread(machine, sample->pid, sample->tid); in timehist_print_migration_event()
2521 if (timehist_skip_sample(sched, thread, evsel, sample) && in timehist_print_migration_event()
2522 timehist_skip_sample(sched, migrated, evsel, sample)) { in timehist_print_migration_event()
2526 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in timehist_print_migration_event()
2527 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_migration_event()
2535 c = (i == sample->cpu) ? 'm' : ' '; in timehist_print_migration_event()
2555 struct perf_sample *sample, in timehist_migrate_task_event() argument
2562 const u32 pid = evsel__intval(evsel, sample, "pid"); in timehist_migrate_task_event()
2575 timehist_print_migration_event(sched, evsel, sample, machine, thread); in timehist_migrate_task_event()
2583 struct perf_sample *sample, in timehist_sched_change_event() argument
2591 u64 tprev, t = sample->time; in timehist_sched_change_event()
2593 int state = evsel__intval(evsel, sample, "prev_state"); in timehist_sched_change_event()
2596 if (machine__resolve(machine, &al, sample) < 0) { in timehist_sched_change_event()
2603 thread = timehist_get_thread(sched, sample, machine, evsel); in timehist_sched_change_event()
2609 if (timehist_skip_sample(sched, thread, evsel, sample)) in timehist_sched_change_event()
2618 tprev = evsel__get_time(evsel, sample->cpu); in timehist_sched_change_event()
2646 if (!cpu_list || test_bit(sample->cpu, cpu_bitmap)) in timehist_sched_change_event()
2683 timehist_print_sample(sched, evsel, sample, &al, thread, t, state); in timehist_sched_change_event()
2693 tr->last_time = sample->time; in timehist_sched_change_event()
2702 evsel__save_time(evsel, sample->time, sample->cpu); in timehist_sched_change_event()
2711 struct perf_sample *sample, in timehist_sched_switch_event() argument
2714 return timehist_sched_change_event(tool, event, evsel, sample, machine); in timehist_sched_switch_event()
2719 struct perf_sample *sample, in process_lost() argument
2724 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in process_lost()
2726 printf("lost %" PRI_lu64 " events on cpu %d\n", event->lost.lost, sample->cpu); in process_lost()
2963 struct perf_sample *sample,
2968 struct perf_sample *sample, in perf_timehist__process_sample() argument
2975 .cpu = sample->cpu, in perf_timehist__process_sample()
2984 err = f(tool, event, evsel, sample, machine); in perf_timehist__process_sample()
3037 sched->tool.sample = perf_timehist__process_sample; in perf_sched__timehist()
3472 .sample = perf_sched__process_tracepoint_sample, in cmd_sched()