1PERF-SCHED(1)                     perf Manual                    PERF-SCHED(1)
2
3
4

NAME

6       perf-sched - Tool to trace/measure scheduler properties (latencies)
7

SYNOPSIS

9       perf sched {record|latency|map|replay|script|timehist}
10

DESCRIPTION

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

OPTIONS

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
70       -f, --force
71           Don’t complain, do it.
72

OPTIONS FOR PERF SCHED MAP

74       --compact
75           Show only CPUs with activity. Helps visualizing on high core count
76           systems.
77
78       --cpus
79           Show just entries with activities for the given CPUs.
80
81       --color-cpus
82           Highlight the given cpus.
83
84       --color-pids
85           Highlight the given pids.
86

OPTIONS FOR PERF SCHED TIMEHIST

88       -k, --vmlinux=<file>
89           vmlinux pathname
90
91       --kallsyms=<file>
92           kallsyms pathname
93
94       -g, --call-graph
95           Display call chains if present (default on).
96
97       --max-stack
98           Maximum number of functions to display in backtrace, default 5.
99
100       -p=, --pid=
101           Only show events for given process ID (comma separated list).
102
103       -t=, --tid=
104           Only show events for given thread ID (comma separated list).
105
106       -s, --summary
107           Show only a summary of scheduling by thread with min, max, and
108           average run times (in sec) and relative stddev.
109
110       -S, --with-summary
111           Show all scheduling events followed by a summary by thread with
112           min, max, and average run times (in sec) and relative stddev.
113
114       --symfs=<directory>
115           Look for files with symbols relative to this directory.
116
117       -V, --cpu-visual
118           Show visual aid for sched switches by CPU: i marks idle time, s are
119           scheduler events.
120
121       -w, --wakeups
122           Show wakeup events.
123
124       -M, --migrations
125           Show migration events.
126
127       -n, --next
128           Show next task.
129
130       -I, --idle-hist
131           Show idle-related events only.
132
133       --time
134           Only analyze samples within given time window: <start>,<stop>.
135           Times have the format seconds.microseconds. If start is not given
136           (i.e., time string is ,x.y) then analysis starts at the beginning
137           of the file. If stop time is not given (i.e, time string is x.y,)
138           then analysis goes to end of file.
139
140       --state
141           Show task state when it switched out.
142

SEE ALSO

144       perf-record(1)
145
146
147
148perf                              06/03/2019                     PERF-SCHED(1)
Impressum