1PERF-SCHED(1) perf Manual PERF-SCHED(1)
2
3
4
6 perf-sched - Tool to trace/measure scheduler properties (latencies)
7
9 perf sched {record|latency|map|replay|script|timehist}
10
12 There are several variants of perf sched:
13
14 'perf sched record <command>' to record the scheduling events
15 of an arbitrary workload.
16
17 'perf sched latency' to report the per task scheduling latencies
18 and other scheduling properties of the workload.
19
20 'perf sched script' to see a detailed trace of the workload that
21 was recorded (aliased to 'perf script' for now).
22
23 'perf sched replay' to simulate the workload that was recorded
24 via perf sched record. (this is done by starting up mockup threads
25 that mimic the workload based on the events in the trace. These
26 threads can then replay the timings (CPU runtime and sleep patterns)
27 of the workload as it occurred when it was recorded - and can repeat
28 it a number of times, measuring its performance.)
29
30 'perf sched map' to print a textual context-switching outline of
31 workload captured via perf sched record. Columns stand for
32 individual CPUs, and the two-letter shortcuts stand for tasks that
33 are running on a CPU. A '*' denotes the CPU that had the event, and
34 a dot signals an idle CPU.
35
36 'perf sched timehist' provides an analysis of scheduling events.
37
38 Example usage:
39 perf sched record -- sleep 1
40 perf sched timehist
41
42 By default it shows the individual schedule events, including the wait
43 time (time between sched-out and next sched-in events for the task), the
44 task scheduling delay (time between wakeup and actually running) and run
45 time for the task:
46
47 time cpu task name wait time sch delay run time
48 [tid/pid] (msec) (msec) (msec)
49 -------------- ------ -------------------- --------- --------- ---------
50 79371.874569 [0011] gcc[31949] 0.014 0.000 1.148
51 79371.874591 [0010] gcc[31951] 0.000 0.000 0.024
52 79371.874603 [0010] migration/10[59] 3.350 0.004 0.011
53 79371.874604 [0011] <idle> 1.148 0.000 0.035
54 79371.874723 [0005] <idle> 0.016 0.000 1.383
55 79371.874746 [0005] gcc[31949] 0.153 0.078 0.022
56 ...
57
58 Times are in msec.usec.
59
61 -i, --input=<file>
62 Input file name. (default: perf.data unless stdin is a fifo)
63
64 -v, --verbose
65 Be more verbose. (show symbol address, etc)
66
67 -D, --dump-raw-trace=
68 Display verbose dump of the sched data.
69
71 --compact
72 Show only CPUs with activity. Helps visualizing on high core count
73 systems.
74
75 --cpus
76 Show just entries with activities for the given CPUs.
77
78 --color-cpus
79 Highlight the given cpus.
80
81 --color-pids
82 Highlight the given pids.
83
85 -k, --vmlinux=<file>
86 vmlinux pathname
87
88 --kallsyms=<file>
89 kallsyms pathname
90
91 -g, --no-call-graph
92 Do not display call chains if present.
93
94 --max-stack
95 Maximum number of functions to display in backtrace, default 5.
96
97 -p=, --pid=
98 Only show events for given process ID (comma separated list).
99
100 -t=, --tid=
101 Only show events for given thread ID (comma separated list).
102
103 -s, --summary
104 Show only a summary of scheduling by thread with min, max, and
105 average run times (in sec) and relative stddev.
106
107 -S, --with-summary
108 Show all scheduling events followed by a summary by thread with
109 min, max, and average run times (in sec) and relative stddev.
110
111 --symfs=<directory>
112 Look for files with symbols relative to this directory.
113
114 -V, --cpu-visual
115 Show visual aid for sched switches by CPU: i marks idle time, s are
116 scheduler events.
117
118 -w, --wakeups
119 Show wakeup events.
120
121 -M, --migrations
122 Show migration events.
123
124 -n, --next
125 Show next task.
126
127 -I, --idle-hist
128 Show idle-related events only.
129
130 --time
131 Only analyze samples within given time window: <start>,<stop>.
132 Times have the format seconds.microseconds. If start is not given
133 (i.e., time string is ,x.y) then analysis starts at the beginning
134 of the file. If stop time is not given (i.e, time string is x.y,)
135 then analysis goes to end of file.
136
137 --state
138 Show task state when it switched out.
139
141 perf-record(1)
142
143
144
145perf 06/18/2019 PERF-SCHED(1)