diff options
Diffstat (limited to 'Documentation/trace/tracedump.txt')
-rw-r--r-- | Documentation/trace/tracedump.txt | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Documentation/trace/tracedump.txt b/Documentation/trace/tracedump.txt new file mode 100644 index 00000000000..cba0decc3fc --- /dev/null +++ b/Documentation/trace/tracedump.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | Tracedump | ||
2 | |||
3 | Documentation written by Alon Farchy | ||
4 | |||
5 | 1. Overview | ||
6 | ============ | ||
7 | |||
8 | The tracedump module provides additional mechanisms to retrieve tracing data. | ||
9 | It can be used to retrieve traces after a kernel panic or while the system | ||
10 | is running in either binary format or plaintext. The dumped data is compressed | ||
11 | with zlib to conserve space. | ||
12 | |||
13 | 2. Configuration Options | ||
14 | ======================== | ||
15 | |||
16 | CONFIG_TRACEDUMP - enable the tracedump module. | ||
17 | CONFIG_TRACEDUMP_PANIC - dump to console on kernel panic | ||
18 | CONFIG_TRACEDUMP_PROCFS - add file /proc/tracedump for userspace access. | ||
19 | |||
20 | 3. Module Parameters | ||
21 | ==================== | ||
22 | |||
23 | format_ascii | ||
24 | |||
25 | If 1, data will dump in human-readable format, ordered by time. | ||
26 | If 0, data will be dumped as raw pages from the ring buffer, | ||
27 | ordered by CPU, followed by the saved cmdlines so that the | ||
28 | raw data can be decoded. Default: 0 | ||
29 | |||
30 | panic_size | ||
31 | |||
32 | Maximum amount of compressed data to dump during a kernel panic | ||
33 | in kilobytes. This only applies if format_ascii == 1. In this case, | ||
34 | tracedump will compress the data, check the size, and if it is too big | ||
35 | toss out some data, compress again, etc, until the size is below | ||
36 | panic_size. Default: 512KB | ||
37 | |||
38 | compress_level | ||
39 | |||
40 | Determines the compression level that zlib will use. Available levels | ||
41 | are 0-9, with 0 as no compression and 9 as maximum compression. | ||
42 | Default: 9. | ||
43 | |||
44 | 4. Usage | ||
45 | ======== | ||
46 | |||
47 | If configured with CONFIG_TRACEDUMP_PROCFS, the tracing data can be pulled | ||
48 | by reading from /proc/tracedump. For example: | ||
49 | |||
50 | # cat /proc/tracedump > my_tracedump | ||
51 | |||
52 | Tracedump will surround the dump with a magic word (TRACEDUMP). Between the | ||
53 | magic words is the compressed data, which can be decompressed with a standard | ||
54 | zlib implementation. After decompression, if format_ascii == 1, then the | ||
55 | output should be readable. | ||
56 | |||
57 | If format_ascii == 0, the output should be in binary form, delimited by | ||
58 | CPU_END. After the last CPU should be the saved cmdlines, delimited by |. | ||