Skip to content

Commit

Permalink
tools/criticalstat: Include CONFIG_PREEMPT_TRACER dependency in warni…
Browse files Browse the repository at this point in the history
…ng msg

CONFIG_PREEMPTIRQ_TRACEPOINTS depends on TRACE_PREEMPT_TOGGLE
or TRACE_IRQFLAGS, TRACE_PREEMPT_TOGGLE will
also turn PREEMPT_TRACER on but NOT TRACE_IRQFLAGS. If you enable
TRACE_IRQFLAGS for PREEMPTIRQ_TRACEPOINTS, you need to enable
PREEMPT_TRACER as well.

Signed-off-by: Edward Wu <[email protected]>
  • Loading branch information
netedwardwu authored and yonghong-song committed Aug 30, 2021
1 parent 5226d0f commit 27f3987
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions man/man8/criticalstat.8
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Since this uses BPF, only the root user can use this tool. Further, the kernel
has to be built with certain CONFIG options enabled. See below.

.SH REQUIREMENTS
Enable CONFIG_PREEMPTIRQ_EVENTS (CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19
and later) and CONFIG_DEBUG_PREEMPT. Additionally, the following options
Enable CONFIG_PREEMPT_TRACER, CONFIG_PREEMPTIRQ_EVENTS
(CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19 and later)
and CONFIG_DEBUG_PREEMPT. Additionally, the following options
should be DISABLED on older kernels: CONFIG_PROVE_LOCKING, CONFIG_LOCKDEP.
.SH OPTIONS
.TP
Expand Down
1 change: 1 addition & 0 deletions tools/criticalstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
not os.path.exists(trace_path + b"preempt_enable")):
print("ERROR: required tracing events are not available\n" +
"Make sure the kernel is built with CONFIG_DEBUG_PREEMPT " +
"CONFIG_PREEMPT_TRACER " +
"and CONFIG_PREEMPTIRQ_EVENTS (CONFIG_PREEMPTIRQ_TRACEPOINTS in "
"kernel 4.19 and later) enabled. Also please disable " +
"CONFIG_PROVE_LOCKING and CONFIG_LOCKDEP on older kernels.")
Expand Down
1 change: 1 addition & 0 deletions tools/criticalstat_example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ has to be built with certain CONFIG options enabled inorder for it to work:
CONFIG_PREEMPTIRQ_EVENTS before kernel 4.19
CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19 and later
CONFIG_DEBUG_PREEMPT
CONFIG_PREEMPT_TRACER
Additionally, the following options should be turned off on older kernels:
CONFIG_PROVE_LOCKING
CONFIG_LOCKDEP
Expand Down

0 comments on commit 27f3987

Please sign in to comment.