Commit 15ba0538 authored by Changbin Du's avatar Changbin Du Committed by Jonathan Corbet

trace doc: convert trace/events-nmi.txt to rst format

This converts the plain text documentation to reStructuredText format and
add it into Sphinx TOC tree. No essential content change.

Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 47e073d2
================
NMI Trace Events NMI Trace Events
================
These events normally show up here: These events normally show up here:
/sys/kernel/debug/tracing/events/nmi /sys/kernel/debug/tracing/events/nmi
--
nmi_handler: nmi_handler
-----------
You might want to use this tracepoint if you suspect that your You might want to use this tracepoint if you suspect that your
NMI handlers are hogging large amounts of CPU time. The kernel NMI handlers are hogging large amounts of CPU time. The kernel
will warn if it sees long-running handlers: will warn if it sees long-running handlers::
INFO: NMI handler took too long to run: 9.207 msecs INFO: NMI handler took too long to run: 9.207 msecs
...@@ -19,7 +21,7 @@ more details. ...@@ -19,7 +21,7 @@ more details.
Let's say you suspect that perf_event_nmi_handler() is causing Let's say you suspect that perf_event_nmi_handler() is causing
you some problems and you only want to trace that handler you some problems and you only want to trace that handler
specifically. You need to find its address: specifically. You need to find its address::
$ grep perf_event_nmi_handler /proc/kallsyms $ grep perf_event_nmi_handler /proc/kallsyms
ffffffff81625600 t perf_event_nmi_handler ffffffff81625600 t perf_event_nmi_handler
...@@ -27,17 +29,17 @@ specifically. You need to find its address: ...@@ -27,17 +29,17 @@ specifically. You need to find its address:
Let's also say you are only interested in when that function is Let's also say you are only interested in when that function is
really hogging a lot of CPU time, like a millisecond at a time. really hogging a lot of CPU time, like a millisecond at a time.
Note that the kernel's output is in milliseconds, but the input Note that the kernel's output is in milliseconds, but the input
to the filter is in nanoseconds! You can filter on 'delta_ns': to the filter is in nanoseconds! You can filter on 'delta_ns'::
cd /sys/kernel/debug/tracing/events/nmi/nmi_handler cd /sys/kernel/debug/tracing/events/nmi/nmi_handler
echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter
echo 1 > enable echo 1 > enable
Your output would then look like: Your output would then look like::
$ cat /sys/kernel/debug/tracing/trace_pipe $ cat /sys/kernel/debug/tracing/trace_pipe
<idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1 <idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1
<idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1 <idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1
<idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1 <idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1
<idle>-0 [000] d.h3 506.334346: nmi_handler: perf_event_nmi_handler() delta_ns: 3080351 handled: 1 <idle>-0 [000] d.h3 506.334346: nmi_handler: perf_event_nmi_handler() delta_ns: 3080351 handled: 1
...@@ -15,3 +15,4 @@ Linux Tracing Technologies ...@@ -15,3 +15,4 @@ Linux Tracing Technologies
events events
events-kmem events-kmem
events-power events-power
events-nmi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment