Skip to content

Commit 27f3987

Browse files
netedwardwuyonghong-song
authored andcommitted
tools/criticalstat: Include CONFIG_PREEMPT_TRACER dependency in warning 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]>
1 parent 5226d0f commit 27f3987

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

man/man8/criticalstat.8

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ Since this uses BPF, only the root user can use this tool. Further, the kernel
1717
has to be built with certain CONFIG options enabled. See below.
1818

1919
.SH REQUIREMENTS
20-
Enable CONFIG_PREEMPTIRQ_EVENTS (CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19
21-
and later) and CONFIG_DEBUG_PREEMPT. Additionally, the following options
20+
Enable CONFIG_PREEMPT_TRACER, CONFIG_PREEMPTIRQ_EVENTS
21+
(CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19 and later)
22+
and CONFIG_DEBUG_PREEMPT. Additionally, the following options
2223
should be DISABLED on older kernels: CONFIG_PROVE_LOCKING, CONFIG_LOCKDEP.
2324
.SH OPTIONS
2425
.TP

tools/criticalstat.py

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
not os.path.exists(trace_path + b"preempt_enable")):
6565
print("ERROR: required tracing events are not available\n" +
6666
"Make sure the kernel is built with CONFIG_DEBUG_PREEMPT " +
67+
"CONFIG_PREEMPT_TRACER " +
6768
"and CONFIG_PREEMPTIRQ_EVENTS (CONFIG_PREEMPTIRQ_TRACEPOINTS in "
6869
"kernel 4.19 and later) enabled. Also please disable " +
6970
"CONFIG_PROVE_LOCKING and CONFIG_LOCKDEP on older kernels.")

tools/criticalstat_example.txt

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ has to be built with certain CONFIG options enabled inorder for it to work:
1313
CONFIG_PREEMPTIRQ_EVENTS before kernel 4.19
1414
CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19 and later
1515
CONFIG_DEBUG_PREEMPT
16+
CONFIG_PREEMPT_TRACER
1617
Additionally, the following options should be turned off on older kernels:
1718
CONFIG_PROVE_LOCKING
1819
CONFIG_LOCKDEP

0 commit comments

Comments
 (0)