diff options
Diffstat (limited to 'Documentation/trace')
-rw-r--r-- | Documentation/trace/kprobetrace.txt | 9 | ||||
-rw-r--r-- | Documentation/trace/tracedump.txt | 58 | ||||
-rw-r--r-- | Documentation/trace/tracelevel.txt | 42 |
3 files changed, 105 insertions, 4 deletions
diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt index c83bd6b4e6e..d0d0bb9e3e2 100644 --- a/Documentation/trace/kprobetrace.txt +++ b/Documentation/trace/kprobetrace.txt | |||
@@ -22,14 +22,15 @@ current_tracer. Instead of that, add probe points via | |||
22 | 22 | ||
23 | Synopsis of kprobe_events | 23 | Synopsis of kprobe_events |
24 | ------------------------- | 24 | ------------------------- |
25 | p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe | 25 | p[:[GRP/]EVENT] [MOD:]SYM[+offs]|MEMADDR [FETCHARGS] : Set a probe |
26 | r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe | 26 | r[:[GRP/]EVENT] [MOD:]SYM[+0] [FETCHARGS] : Set a return probe |
27 | -:[GRP/]EVENT : Clear a probe | 27 | -:[GRP/]EVENT : Clear a probe |
28 | 28 | ||
29 | GRP : Group name. If omitted, use "kprobes" for it. | 29 | GRP : Group name. If omitted, use "kprobes" for it. |
30 | EVENT : Event name. If omitted, the event name is generated | 30 | EVENT : Event name. If omitted, the event name is generated |
31 | based on SYMBOL+offs or MEMADDR. | 31 | based on SYM+offs or MEMADDR. |
32 | SYMBOL[+offs] : Symbol+offset where the probe is inserted. | 32 | MOD : Module name which has given SYM. |
33 | SYM[+offs] : Symbol+offset where the probe is inserted. | ||
33 | MEMADDR : Address where the probe is inserted. | 34 | MEMADDR : Address where the probe is inserted. |
34 | 35 | ||
35 | FETCHARGS : Arguments. Each probe can have up to 128 args. | 36 | FETCHARGS : Arguments. Each probe can have up to 128 args. |
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 |. | ||
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 | |||
5 | 1. Overview | ||
6 | =========== | ||
7 | |||
8 | Tracelevel allows subsystem authors to add trace priorities to | ||
9 | their tracing events. High priority traces will be enabled | ||
10 | automatically at boot time. | ||
11 | |||
12 | This module is configured with CONFIG_TRACELEVEL. | ||
13 | |||
14 | 2. Usage | ||
15 | ========= | ||
16 | |||
17 | To give an event a priority, use the function tracelevel_register | ||
18 | at any time. | ||
19 | |||
20 | tracelevel_register(my_event, level); | ||
21 | |||
22 | my_event corresponds directly to the event name as defined in the | ||
23 | event header file. Available levels are: | ||
24 | |||
25 | TRACELEVEL_ERR 3 | ||
26 | TRACELEVEL_WARN 2 | ||
27 | TRACELEVEL_INFO 1 | ||
28 | TRACELEVEL_DEBUG 0 | ||
29 | |||
30 | Any event registered at boot time as TRACELEVEL_ERR will be enabled | ||
31 | by default. The header also exposes the function tracelevel_set_level | ||
32 | to change the trace level at runtime. Any trace event registered with the | ||
33 | specified level or higher will be enabled with this call. | ||
34 | |||
35 | A userspace handle to tracelevel_set_level is available via the module | ||
36 | parameter 'level'. For example, | ||
37 | |||
38 | echo 1 > /sys/module/tracelevel/parameters/level | ||
39 | |||
40 | Is logically equivalent to: | ||
41 | |||
42 | tracelevel_set_level(TRACELEVEL_INFO); | ||