diff options
Diffstat (limited to 'Documentation/trace')
-rw-r--r-- | Documentation/trace/events-nmi.txt | 43 | ||||
-rw-r--r-- | Documentation/trace/events-power.txt | 31 |
2 files changed, 74 insertions, 0 deletions
diff --git a/Documentation/trace/events-nmi.txt b/Documentation/trace/events-nmi.txt new file mode 100644 index 000000000000..c03c8c89f08d --- /dev/null +++ b/Documentation/trace/events-nmi.txt | |||
@@ -0,0 +1,43 @@ | |||
1 | NMI Trace Events | ||
2 | |||
3 | These events normally show up here: | ||
4 | |||
5 | /sys/kernel/debug/tracing/events/nmi | ||
6 | |||
7 | -- | ||
8 | |||
9 | nmi_handler: | ||
10 | |||
11 | You might want to use this tracepoint if you suspect that your | ||
12 | NMI handlers are hogging large amounts of CPU time. The kernel | ||
13 | will warn if it sees long-running handlers: | ||
14 | |||
15 | INFO: NMI handler took too long to run: 9.207 msecs | ||
16 | |||
17 | and this tracepoint will allow you to drill down and get some | ||
18 | more details. | ||
19 | |||
20 | Let's say you suspect that perf_event_nmi_handler() is causing | ||
21 | you some problems and you only want to trace that handler | ||
22 | specifically. You need to find its address: | ||
23 | |||
24 | $ grep perf_event_nmi_handler /proc/kallsyms | ||
25 | ffffffff81625600 t perf_event_nmi_handler | ||
26 | |||
27 | Let's also say you are only interested in when that function is | ||
28 | really hogging a lot of CPU time, like a millisecond at a time. | ||
29 | Note that the kernel's output is in milliseconds, but the input | ||
30 | to the filter is in nanoseconds! You can filter on 'delta_ns': | ||
31 | |||
32 | cd /sys/kernel/debug/tracing/events/nmi/nmi_handler | ||
33 | echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter | ||
34 | echo 1 > enable | ||
35 | |||
36 | Your output would then look like: | ||
37 | |||
38 | $ cat /sys/kernel/debug/tracing/trace_pipe | ||
39 | <idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1 | ||
40 | <idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1 | ||
41 | <idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1 | ||
42 | <idle>-0 [000] d.h3 506.334346: nmi_handler: perf_event_nmi_handler() delta_ns: 3080351 handled: 1 | ||
43 | |||
diff --git a/Documentation/trace/events-power.txt b/Documentation/trace/events-power.txt index e1498ff8cf94..3bd33b8dc7c4 100644 --- a/Documentation/trace/events-power.txt +++ b/Documentation/trace/events-power.txt | |||
@@ -63,3 +63,34 @@ power_domain_target "%s state=%lu cpu_id=%lu" | |||
63 | The first parameter gives the power domain name (e.g. "mpu_pwrdm"). | 63 | The first parameter gives the power domain name (e.g. "mpu_pwrdm"). |
64 | The second parameter is the power domain target state. | 64 | The second parameter is the power domain target state. |
65 | 65 | ||
66 | 4. PM QoS events | ||
67 | ================ | ||
68 | The PM QoS events are used for QoS add/update/remove request and for | ||
69 | target/flags update. | ||
70 | |||
71 | pm_qos_add_request "pm_qos_class=%s value=%d" | ||
72 | pm_qos_update_request "pm_qos_class=%s value=%d" | ||
73 | pm_qos_remove_request "pm_qos_class=%s value=%d" | ||
74 | pm_qos_update_request_timeout "pm_qos_class=%s value=%d, timeout_us=%ld" | ||
75 | |||
76 | The first parameter gives the QoS class name (e.g. "CPU_DMA_LATENCY"). | ||
77 | The second parameter is value to be added/updated/removed. | ||
78 | The third parameter is timeout value in usec. | ||
79 | |||
80 | pm_qos_update_target "action=%s prev_value=%d curr_value=%d" | ||
81 | pm_qos_update_flags "action=%s prev_value=0x%x curr_value=0x%x" | ||
82 | |||
83 | The first parameter gives the QoS action name (e.g. "ADD_REQ"). | ||
84 | The second parameter is the previous QoS value. | ||
85 | The third parameter is the current QoS value to update. | ||
86 | |||
87 | And, there are also events used for device PM QoS add/update/remove request. | ||
88 | |||
89 | dev_pm_qos_add_request "device=%s type=%s new_value=%d" | ||
90 | dev_pm_qos_update_request "device=%s type=%s new_value=%d" | ||
91 | dev_pm_qos_remove_request "device=%s type=%s new_value=%d" | ||
92 | |||
93 | The first parameter gives the device name which tries to add/update/remove | ||
94 | QoS requests. | ||
95 | The second parameter gives the request type (e.g. "DEV_PM_QOS_LATENCY"). | ||
96 | The third parameter is value to be added/updated/removed. | ||