tools/criticalstat: Include CONFIG_PREEMPT_TRACER dependency in warning msg
authorEdward Wu <edwardwu@realtek.com>
Mon, 30 Aug 2021 00:07:17 +0000 (08:07 +0800)
committeryonghong-song <ys114321@gmail.com>
Mon, 30 Aug 2021 21:09:31 +0000 (14:09 -0700)
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 <edwardwu@realtek.com>
man/man8/criticalstat.8
tools/criticalstat.py
tools/criticalstat_example.txt

index 16736b35d100c5c62d4bd05a275f0641645a0efe..6b1c111035e30f0cb7310cff5306a191678cc63c 100644 (file)
@@ -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
index 557fc275dd9f7beca56f5d41357bbbbf9c0fa284..6d15b622d2f25862af11e696893161c20bca7137 100755 (executable)
@@ -64,6 +64,7 @@ if (not os.path.exists(trace_path + b"irq_disable") or
    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.")
index 4872fac592371b0fe57abbe3bfdcdb7fe4b55ab0..14b6a9619aa9342059a955839e03853b57d1fa6f 100644 (file)
@@ -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