Re: [PATCH] perf sched: Fix record failed when CONFIG_SCHEDSTATS is not set
From: Arnaldo Carvalho de Melo <acme@kernel.org>
Date: 2021-07-18 13:38:07
Also in:
lkml
From: Arnaldo Carvalho de Melo <acme@kernel.org>
Date: 2021-07-18 13:38:07
Also in:
lkml
Em Tue, Jul 13, 2021 at 07:23:58PM +0800, Yang Jihong escreveu:
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 to be executed.
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.Thanks, applied. - Arnaldo