diff options
Diffstat (limited to 'Documentation/trace/mmiotrace.txt')
-rw-r--r-- | Documentation/trace/mmiotrace.txt | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Documentation/trace/mmiotrace.txt b/Documentation/trace/mmiotrace.txt index 5731c67abc55..162effbfbdec 100644 --- a/Documentation/trace/mmiotrace.txt +++ b/Documentation/trace/mmiotrace.txt | |||
@@ -32,41 +32,41 @@ is no way to automatically detect if you are losing events due to CPUs racing. | |||
32 | Usage Quick Reference | 32 | Usage Quick Reference |
33 | --------------------- | 33 | --------------------- |
34 | 34 | ||
35 | $ mount -t debugfs debugfs /debug | 35 | $ mount -t debugfs debugfs /sys/kernel/debug |
36 | $ echo mmiotrace > /debug/tracing/current_tracer | 36 | $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer |
37 | $ cat /debug/tracing/trace_pipe > mydump.txt & | 37 | $ cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt & |
38 | Start X or whatever. | 38 | Start X or whatever. |
39 | $ echo "X is up" > /debug/tracing/trace_marker | 39 | $ echo "X is up" > /sys/kernel/debug/tracing/trace_marker |
40 | $ echo nop > /debug/tracing/current_tracer | 40 | $ echo nop > /sys/kernel/debug/tracing/current_tracer |
41 | Check for lost events. | 41 | Check for lost events. |
42 | 42 | ||
43 | 43 | ||
44 | Usage | 44 | Usage |
45 | ----- | 45 | ----- |
46 | 46 | ||
47 | Make sure debugfs is mounted to /debug. If not, (requires root privileges) | 47 | Make sure debugfs is mounted to /sys/kernel/debug. If not, (requires root privileges) |
48 | $ mount -t debugfs debugfs /debug | 48 | $ mount -t debugfs debugfs /sys/kernel/debug |
49 | 49 | ||
50 | Check that the driver you are about to trace is not loaded. | 50 | Check that the driver you are about to trace is not loaded. |
51 | 51 | ||
52 | Activate mmiotrace (requires root privileges): | 52 | Activate mmiotrace (requires root privileges): |
53 | $ echo mmiotrace > /debug/tracing/current_tracer | 53 | $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer |
54 | 54 | ||
55 | Start storing the trace: | 55 | Start storing the trace: |
56 | $ cat /debug/tracing/trace_pipe > mydump.txt & | 56 | $ cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt & |
57 | The 'cat' process should stay running (sleeping) in the background. | 57 | The 'cat' process should stay running (sleeping) in the background. |
58 | 58 | ||
59 | Load the driver you want to trace and use it. Mmiotrace will only catch MMIO | 59 | Load the driver you want to trace and use it. Mmiotrace will only catch MMIO |
60 | accesses to areas that are ioremapped while mmiotrace is active. | 60 | accesses to areas that are ioremapped while mmiotrace is active. |
61 | 61 | ||
62 | During tracing you can place comments (markers) into the trace by | 62 | During tracing you can place comments (markers) into the trace by |
63 | $ echo "X is up" > /debug/tracing/trace_marker | 63 | $ echo "X is up" > /sys/kernel/debug/tracing/trace_marker |
64 | This makes it easier to see which part of the (huge) trace corresponds to | 64 | This makes it easier to see which part of the (huge) trace corresponds to |
65 | which action. It is recommended to place descriptive markers about what you | 65 | which action. It is recommended to place descriptive markers about what you |
66 | do. | 66 | do. |
67 | 67 | ||
68 | Shut down mmiotrace (requires root privileges): | 68 | Shut down mmiotrace (requires root privileges): |
69 | $ echo nop > /debug/tracing/current_tracer | 69 | $ echo nop > /sys/kernel/debug/tracing/current_tracer |
70 | The 'cat' process exits. If it does not, kill it by issuing 'fg' command and | 70 | The 'cat' process exits. If it does not, kill it by issuing 'fg' command and |
71 | pressing ctrl+c. | 71 | pressing ctrl+c. |
72 | 72 | ||
@@ -78,10 +78,10 @@ to view your kernel log and look for "mmiotrace has lost events" warning. If | |||
78 | events were lost, the trace is incomplete. You should enlarge the buffers and | 78 | events were lost, the trace is incomplete. You should enlarge the buffers and |
79 | try again. Buffers are enlarged by first seeing how large the current buffers | 79 | try again. Buffers are enlarged by first seeing how large the current buffers |
80 | are: | 80 | are: |
81 | $ cat /debug/tracing/buffer_size_kb | 81 | $ cat /sys/kernel/debug/tracing/buffer_size_kb |
82 | gives you a number. Approximately double this number and write it back, for | 82 | gives you a number. Approximately double this number and write it back, for |
83 | instance: | 83 | instance: |
84 | $ echo 128000 > /debug/tracing/buffer_size_kb | 84 | $ echo 128000 > /sys/kernel/debug/tracing/buffer_size_kb |
85 | Then start again from the top. | 85 | Then start again from the top. |
86 | 86 | ||
87 | If you are doing a trace for a driver project, e.g. Nouveau, you should also | 87 | If you are doing a trace for a driver project, e.g. Nouveau, you should also |