aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/trace
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/trace')
-rw-r--r--Documentation/trace/tracedump.txt58
-rw-r--r--Documentation/trace/tracelevel.txt42
2 files changed, 100 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
51. Overview
6============
7
8The tracedump module provides additional mechanisms to retrieve tracing data.
9It can be used to retrieve traces after a kernel panic or while the system
10is running in either binary format or plaintext. The dumped data is compressed
11with zlib to conserve space.
12
132. Configuration Options
14========================
15
16CONFIG_TRACEDUMP - enable the tracedump module.
17CONFIG_TRACEDUMP_PANIC - dump to console on kernel panic
18CONFIG_TRACEDUMP_PROCFS - add file /proc/tracedump for userspace access.
19
203. Module Parameters
21====================
22
23format_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
30panic_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
38compress_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
444. Usage
45========
46
47If configured with CONFIG_TRACEDUMP_PROCFS, the tracing data can be pulled
48by reading from /proc/tracedump. For example:
49
50 # cat /proc/tracedump > my_tracedump
51
52Tracedump will surround the dump with a magic word (TRACEDUMP). Between the
53magic words is the compressed data, which can be decompressed with a standard
54zlib implementation. After decompression, if format_ascii == 1, then the
55output should be readable.
56
57If format_ascii == 0, the output should be in binary form, delimited by
58CPU_END. After the last CPU should be the saved cmdlines, delimited by |.
diff --git a/Documentation/trace/tracelevel.txt b/Documentation/trace/tracelevel.txt
new file mode 100644
index 00000000000..b282dd2b329
--- /dev/null
+++ b/Documentation/trace/tracelevel.txt
@@ -0,0 +1,42 @@
1 Tracelevel
2
3 Documentation by Alon Farchy
4
51. Overview
6===========
7
8Tracelevel allows subsystem authors to add trace priorities to
9their tracing events. High priority traces will be enabled
10automatically at boot time.
11
12This module is configured with CONFIG_TRACELEVEL.
13
142. Usage
15=========
16
17To give an event a priority, use the function tracelevel_register
18at any time.
19
20 tracelevel_register(my_event, level);
21
22my_event corresponds directly to the event name as defined in the
23event header file. Available levels are:
24
25 TRACELEVEL_ERR 3
26 TRACELEVEL_WARN 2
27 TRACELEVEL_INFO 1
28 TRACELEVEL_DEBUG 0
29
30Any event registered at boot time as TRACELEVEL_ERR will be enabled
31by default. The header also exposes the function tracelevel_set_level
32to change the trace level at runtime. Any trace event registered with the
33specified level or higher will be enabled with this call.
34
35A userspace handle to tracelevel_set_level is available via the module
36parameter 'level'. For example,
37
38 echo 1 > /sys/module/tracelevel/parameters/level
39
40Is logically equivalent to:
41
42 tracelevel_set_level(TRACELEVEL_INFO);