summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorAlon Farchy <afarchy@nvidia.com>2011-07-05 17:12:29 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:21 -0800
commit14dcbce77792e27a94adb242650c50809435af30 (patch)
treef42e38a8aadc7e42df038173091eb017c3f4aa96 /Documentation
parentd11fc993854d3356b17a61057e6ae00fb1d8e264 (diff)
tracelevel module: Prioritize trace events
This module lets subsystem authors prioritize ftrace events by calling tracelevel_register(...). High priority traces will be automatically enabled on boot. See tracelevel.h for more details Original-Change-Id: If03699e96c598bdcf93b9a9f73918ce7b0c750cb Reviewed-on: http://git-master/r/40290 Reviewed-by: Alon Farchy <afarchy@nvidia.com> Tested-by: Alon Farchy <afarchy@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Tested-by: Daniel Solomon <daniels@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> Rebase-Id: R49f59f81d61907f66fdf892130a1b4dc6575d40e
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/trace/tracelevel.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/Documentation/trace/tracelevel.txt b/Documentation/trace/tracelevel.txt
new file mode 100644
index 000000000000..b282dd2b329b
--- /dev/null
+++ b/Documentation/trace/tracelevel.txt
@@ -0,0 +1,42 @@
+ Tracelevel
+
+ Documentation by Alon Farchy
+
+1. Overview
+===========
+
+Tracelevel allows subsystem authors to add trace priorities to
+their tracing events. High priority traces will be enabled
+automatically at boot time.
+
+This module is configured with CONFIG_TRACELEVEL.
+
+2. Usage
+=========
+
+To give an event a priority, use the function tracelevel_register
+at any time.
+
+ tracelevel_register(my_event, level);
+
+my_event corresponds directly to the event name as defined in the
+event header file. Available levels are:
+
+ TRACELEVEL_ERR 3
+ TRACELEVEL_WARN 2
+ TRACELEVEL_INFO 1
+ TRACELEVEL_DEBUG 0
+
+Any event registered at boot time as TRACELEVEL_ERR will be enabled
+by default. The header also exposes the function tracelevel_set_level
+to change the trace level at runtime. Any trace event registered with the
+specified level or higher will be enabled with this call.
+
+A userspace handle to tracelevel_set_level is available via the module
+parameter 'level'. For example,
+
+ echo 1 > /sys/module/tracelevel/parameters/level
+
+Is logically equivalent to:
+
+ tracelevel_set_level(TRACELEVEL_INFO);