diff options
Diffstat (limited to 'Documentation/trace/tracelevel.txt')
-rw-r--r-- | Documentation/trace/tracelevel.txt | 42 |
1 files changed, 42 insertions, 0 deletions
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); | ||