Lines Matching full:sample

147 			    struct perf_sample *sample, struct machine *machine);
150 struct perf_sample *sample, struct machine *machine);
153 struct perf_sample *sample, struct machine *machine);
161 struct perf_sample *sample,
812 struct evsel *evsel, struct perf_sample *sample, in replay_wakeup_event() argument
815 const char *comm = evsel__strval(evsel, sample, "comm"); in replay_wakeup_event()
816 const u32 pid = evsel__intval(evsel, sample, "pid"); in replay_wakeup_event()
822 printf(" ... pid %d woke up %s/%d\n", sample->tid, comm, pid); in replay_wakeup_event()
825 waker = register_pid(sched, sample->tid, "<unknown>"); in replay_wakeup_event()
828 add_sched_event_wakeup(sched, waker, sample->time, wakee); in replay_wakeup_event()
834 struct perf_sample *sample, in replay_switch_event() argument
837 const char *prev_comm = evsel__strval(evsel, sample, "prev_comm"), in replay_switch_event()
838 *next_comm = evsel__strval(evsel, sample, "next_comm"); in replay_switch_event()
839 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in replay_switch_event()
840 next_pid = evsel__intval(evsel, sample, "next_pid"); in replay_switch_event()
841 const u64 prev_state = evsel__intval(evsel, sample, "prev_state"); in replay_switch_event()
843 u64 timestamp0, timestamp = sample->time; in replay_switch_event()
844 int cpu = sample->cpu; in replay_switch_event()
1108 struct perf_sample *sample, in latency_switch_event() argument
1111 const u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in latency_switch_event()
1112 next_pid = evsel__intval(evsel, sample, "next_pid"); in latency_switch_event()
1113 const u64 prev_state = evsel__intval(evsel, sample, "prev_state"); in latency_switch_event()
1116 u64 timestamp0, timestamp = sample->time; in latency_switch_event()
1117 int cpu = sample->cpu, err = -1; in latency_switch_event()
1178 struct perf_sample *sample, in latency_runtime_event() argument
1181 const u32 pid = evsel__intval(evsel, sample, "pid"); in latency_runtime_event()
1182 const u64 runtime = evsel__intval(evsel, sample, "runtime"); in latency_runtime_event()
1185 u64 timestamp = sample->time; in latency_runtime_event()
1186 int cpu = sample->cpu, err = -1; in latency_runtime_event()
1213 struct perf_sample *sample, in latency_wakeup_event() argument
1216 const u32 pid = evsel__intval(evsel, sample, "pid"); in latency_wakeup_event()
1220 u64 timestamp = sample->time; in latency_wakeup_event()
1274 struct perf_sample *sample, in latency_migrate_task_event() argument
1277 const u32 pid = evsel__intval(evsel, sample, "pid"); in latency_migrate_task_event()
1278 u64 timestamp = sample->time; in latency_migrate_task_event()
1486 struct perf_sample *sample, in process_sched_wakeup_event() argument
1492 return sched->tp_handler->wakeup_event(sched, evsel, sample, machine); in process_sched_wakeup_event()
1530 struct perf_sample *sample, struct machine *machine) in map_switch_event() argument
1532 const u32 next_pid = evsel__intval(evsel, sample, "next_pid"); in map_switch_event()
1536 u64 timestamp0, timestamp = sample->time; in map_switch_event()
1538 int i, this_cpu = sample->cpu; in map_switch_event()
1671 struct perf_sample *sample, in process_sched_switch_event() argument
1675 int this_cpu = sample->cpu, err = 0; in process_sched_switch_event()
1676 u32 prev_pid = evsel__intval(evsel, sample, "prev_pid"), in process_sched_switch_event()
1677 next_pid = evsel__intval(evsel, sample, "next_pid"); in process_sched_switch_event()
1689 err = sched->tp_handler->switch_event(sched, evsel, sample, machine); in process_sched_switch_event()
1697 struct perf_sample *sample, in process_sched_runtime_event() argument
1703 return sched->tp_handler->runtime_event(sched, evsel, sample, machine); in process_sched_runtime_event()
1710 struct perf_sample *sample, in perf_sched__process_fork_event() argument
1716 perf_event__process_fork(tool, event, sample, machine); in perf_sched__process_fork_event()
1727 struct perf_sample *sample, in process_sched_migrate_task_event() argument
1733 return sched->tp_handler->migrate_task_event(sched, evsel, sample, machine); in process_sched_migrate_task_event()
1740 struct perf_sample *sample,
1745 struct perf_sample *sample, in perf_sched__process_tracepoint_sample() argument
1753 err = f(tool, evsel, sample, machine); in perf_sched__process_tracepoint_sample()
1761 struct perf_sample *sample, in perf_sched__process_comm() argument
1768 err = perf_event__process_comm(tool, event, sample, machine); in perf_sched__process_comm()
1772 thread = machine__find_thread(machine, sample->pid, sample->tid); in perf_sched__process_comm()
2003 struct perf_sample *sample, in timehist_print_sample() argument
2009 const char *next_comm = evsel__strval(evsel, sample, "next_comm"); in timehist_print_sample()
2010 const u32 next_pid = evsel__intval(evsel, sample, "next_pid"); in timehist_print_sample()
2016 if (cpu_list && !test_bit(sample->cpu, cpu_bitmap)) in timehist_print_sample()
2020 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_sample()
2029 if (i == sample->cpu) in timehist_print_sample()
2063 sample__fprintf_sym(sample, al, 0, in timehist_print_sample()
2137 static bool is_idle_sample(struct perf_sample *sample, in is_idle_sample() argument
2142 return evsel__intval(evsel, sample, "prev_pid") == 0; in is_idle_sample()
2144 return sample->pid == 0; in is_idle_sample()
2148 struct perf_sample *sample, in save_task_callchain() argument
2156 thread = machine__findnew_thread(machine, sample->pid, sample->pid); in save_task_callchain()
2158 pr_debug("Failed to get thread for pid %d.\n", sample->pid); in save_task_callchain()
2162 if (!sched->show_callchain || sample->callchain == NULL) in save_task_callchain()
2165 if (thread__resolve_callchain(thread, cursor, evsel, sample, in save_task_callchain()
2292 struct perf_sample *sample) in save_idle_callchain() argument
2294 if (!sched->show_callchain || sample->callchain == NULL) in save_idle_callchain()
2301 struct perf_sample *sample, in timehist_get_thread() argument
2307 if (is_idle_sample(sample, evsel)) { in timehist_get_thread()
2308 thread = get_idle_thread(sample->cpu); in timehist_get_thread()
2310 pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu); in timehist_get_thread()
2314 thread = machine__findnew_thread(machine, sample->pid, in timehist_get_thread()
2315 sample->tid ?: sample->pid); in timehist_get_thread()
2317 pr_debug("Failed to get thread for tid %d. skipping sample.\n", in timehist_get_thread()
2318 sample->tid); in timehist_get_thread()
2321 save_task_callchain(sched, sample, evsel, machine); in timehist_get_thread()
2326 idle = get_idle_thread(sample->cpu); in timehist_get_thread()
2328 pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu); in timehist_get_thread()
2339 if (evsel__intval(evsel, sample, "next_pid") == 0) in timehist_get_thread()
2340 save_idle_callchain(sched, itr, sample); in timehist_get_thread()
2350 struct perf_sample *sample) in timehist_skip_sample() argument
2362 else if (evsel__intval(evsel, sample, "prev_pid") != 0 && in timehist_skip_sample()
2363 evsel__intval(evsel, sample, "next_pid") != 0) in timehist_skip_sample()
2372 struct perf_sample *sample, in timehist_print_wakeup_event() argument
2379 thread = machine__findnew_thread(machine, sample->pid, sample->tid); in timehist_print_wakeup_event()
2384 if (timehist_skip_sample(sched, thread, evsel, sample) && in timehist_print_wakeup_event()
2385 timehist_skip_sample(sched, awakened, evsel, sample)) { in timehist_print_wakeup_event()
2389 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in timehist_print_wakeup_event()
2390 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_wakeup_event()
2407 struct perf_sample *sample __maybe_unused, in timehist_sched_wakeup_ignore()
2416 struct perf_sample *sample, in timehist_sched_wakeup_event() argument
2422 /* want pid of awakened task not pid in sample */ in timehist_sched_wakeup_event()
2423 const u32 pid = evsel__intval(evsel, sample, "pid"); in timehist_sched_wakeup_event()
2434 tr->ready_to_run = sample->time; in timehist_sched_wakeup_event()
2438 !perf_time__skip_sample(&sched->ptime, sample->time)) in timehist_sched_wakeup_event()
2439 timehist_print_wakeup_event(sched, evsel, sample, machine, thread); in timehist_sched_wakeup_event()
2446 struct perf_sample *sample, in timehist_print_migration_event() argument
2459 ocpu = evsel__intval(evsel, sample, "orig_cpu"); in timehist_print_migration_event()
2460 dcpu = evsel__intval(evsel, sample, "dest_cpu"); in timehist_print_migration_event()
2462 thread = machine__findnew_thread(machine, sample->pid, sample->tid); in timehist_print_migration_event()
2466 if (timehist_skip_sample(sched, thread, evsel, sample) && in timehist_print_migration_event()
2467 timehist_skip_sample(sched, migrated, evsel, sample)) { in timehist_print_migration_event()
2471 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in timehist_print_migration_event()
2472 printf("%15s [%04d] ", tstr, sample->cpu); in timehist_print_migration_event()
2480 c = (i == sample->cpu) ? 'm' : ' '; in timehist_print_migration_event()
2500 struct perf_sample *sample, in timehist_migrate_task_event() argument
2506 /* want pid of migrated task not pid in sample */ in timehist_migrate_task_event()
2507 const u32 pid = evsel__intval(evsel, sample, "pid"); in timehist_migrate_task_event()
2520 timehist_print_migration_event(sched, evsel, sample, machine, thread); in timehist_migrate_task_event()
2528 struct perf_sample *sample, in timehist_sched_change_event() argument
2536 u64 tprev, t = sample->time; in timehist_sched_change_event()
2538 int state = evsel__intval(evsel, sample, "prev_state"); in timehist_sched_change_event()
2540 if (machine__resolve(machine, &al, sample) < 0) { in timehist_sched_change_event()
2547 thread = timehist_get_thread(sched, sample, machine, evsel); in timehist_sched_change_event()
2553 if (timehist_skip_sample(sched, thread, evsel, sample)) in timehist_sched_change_event()
2562 tprev = evsel__get_time(evsel, sample->cpu); in timehist_sched_change_event()
2566 * - sample time is under window user cares about - skip sample in timehist_sched_change_event()
2578 * - sample time is beyond window user cares about - reset it in timehist_sched_change_event()
2590 if (!cpu_list || test_bit(sample->cpu, cpu_bitmap)) in timehist_sched_change_event()
2627 timehist_print_sample(sched, evsel, sample, &al, thread, t, state); in timehist_sched_change_event()
2637 tr->last_time = sample->time; in timehist_sched_change_event()
2646 evsel__save_time(evsel, sample->time, sample->cpu); in timehist_sched_change_event()
2654 struct perf_sample *sample, in timehist_sched_switch_event() argument
2657 return timehist_sched_change_event(tool, event, evsel, sample, machine); in timehist_sched_switch_event()
2662 struct perf_sample *sample, in process_lost() argument
2667 timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr)); in process_lost()
2669 printf("lost %" PRI_lu64 " events on cpu %d\n", event->lost.lost, sample->cpu); in process_lost()
2927 struct perf_sample *sample,
2932 struct perf_sample *sample, in perf_timehist__process_sample() argument
2938 int this_cpu = sample->cpu; in perf_timehist__process_sample()
2946 err = f(tool, event, evsel, sample, machine); in perf_timehist__process_sample()
2999 sched->tool.sample = perf_timehist__process_sample; in perf_sched__timehist()
3394 .sample = perf_sched__process_tracepoint_sample, in cmd_sched()