path: root/Makefile
diff options
authorYang Jihong <>2021-07-13 19:23:58 +0800
committerArnaldo Carvalho de Melo <>2021-07-18 09:36:37 -0300
commitb0f008551f0bf4d5f6db9b5f0e071b02790d6a2e (patch)
tree911265a67f84dda5f500690f0558faf3ef54b868 /Makefile
parent22a665513b34df458da1d3b7ee0b919c3f3d4653 (diff)
perf sched: Fix record failure when CONFIG_SCHEDSTATS is not set
The tracepoints trace_sched_stat_{wait, sleep, iowait} are not exposed to user if CONFIG_SCHEDSTATS is not set, "perf sched record" records the three events. As a result, the command fails. Before: #perf sched record sleep 1 event syntax error: 'sched:sched_stat_wait' \___ unknown tracepoint Error: File /sys/kernel/tracing/events/sched/sched_stat_wait not found. Hint: Perhaps this kernel misses some CONFIG_ setting to enable this feature?. Run 'perf list' for a list of valid events Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>] -e, --event <event> event selector. use 'perf list' to list available events Solution: Check whether schedstat tracepoints are exposed. If no, these events are not recorded. After: # perf sched record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.163 MB (1091 samples) ] # perf sched report run measurement overhead: 4736 nsecs sleep measurement overhead: 9059979 nsecs the run test took 999854 nsecs the sleep test took 8945271 nsecs nr_run_events: 716 nr_sleep_events: 785 nr_wakeup_events: 0 ... ------------------------------------------------------------ Fixes: 2a09b5de235a6 ("sched/fair: do not expose some tracepoints to user if CONFIG_SCHEDSTATS is not set") Signed-off-by: Yang Jihong <> Cc: Alexander Shishkin <> Cc: Jiri Olsa <> Cc: Mark Rutland <> Cc: Namhyung Kim <> Cc: Peter Zijlstra <> Cc: Steven Rostedt (VMware) <> Cc: Yafang Shao <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions