tools/criticalstat: Add new kconfig option to warning message
authorTsai-Wei Wu <wu.tsaiwei@realtek.com>
Tue, 20 Jul 2021 07:00:11 +0000 (15:00 +0800)
committeryonghong-song <ys114321@gmail.com>
Tue, 20 Jul 2021 15:49:20 +0000 (08:49 -0700)
In kernel 4.19 and later, the CONFIG_PREEMPTIRQ_EVENTS option is unused.
Instead, it requires a kernel built with CONFIG_PREEMPTIRQ_TRACEPOINTS.

man/man8/criticalstat.8
tools/criticalstat.py
tools/criticalstat_example.txt

index cdd5e8ed9949a22e4b880539bc55f00c0eaa233b..16736b35d100c5c62d4bd05a275f0641645a0efe 100644 (file)
@@ -17,9 +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 and CONFIG_DEBUG_PREEMPT. Additionally, the
-following options should be DISABLED on older kernels: CONFIG_PROVE_LOCKING,
-CONFIG_LOCKDEP.
+Enable 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
 \-h
index 250cfc4ddde16b34448c3a8c76ceb20c49c0e91d..557fc275dd9f7beca56f5d41357bbbbf9c0fa284 100755 (executable)
@@ -64,7 +64,8 @@ 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 " +
-        "and CONFIG_PREEMPTIRQ_EVENTS enabled. Also please disable " +
+        "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.")
     sys.exit(0)
 
index 10e25a92054891f46053fca52bc970031743d151..4872fac592371b0fe57abbe3bfdcdb7fe4b55ab0 100644 (file)
@@ -10,7 +10,8 @@ sections are a source of long latency/responsive issues for real-time systems.
 This works by probing the preempt/irq and cpuidle tracepoints in the kernel.
 Since this uses BPF, only the root user can use this tool. Further, the kernel
 has to be built with certain CONFIG options enabled inorder for it to work:
-CONFIG_PREEMPTIRQ_EVENTS
+CONFIG_PREEMPTIRQ_EVENTS before kernel 4.19
+CONFIG_PREEMPTIRQ_TRACEPOINTS in kernel 4.19 and later
 CONFIG_DEBUG_PREEMPT
 Additionally, the following options should be turned off on older kernels:
 CONFIG_PROVE_LOCKING