path: root/Documentation
diff options
authorAlon Farchy <>2011-12-12 11:21:59 -0600
committerVarun Wadekar <>2011-12-22 11:29:19 +0530
commite744c3588e7a09c8ec80e28efffd6f08c1c2b2b8 (patch)
tree648528218c7374503729cba660fa7950f6d3b5d0 /Documentation
parentc6fe29a6337d4c0be9872e0c97ef66d49cbf2520 (diff)
tracedump: Dump ftrace ring buffer data
Add a new module that will dump the contents of the ftrace ring buffer. Data is compressed and can be in ascii or binary form. Data will automatically dump on kernel panic to console. Data can be dumped by reading /proc/tracedump. See tracedump.h for details. Change-Id: I7b7afc3def0b88629dd120d17e43858306a8f357 Signed-off-by: Liang Cheng <> Reviewed-on: http://git-master/r/69494 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dan Willemsen <>
Diffstat (limited to 'Documentation')
1 files changed, 58 insertions, 0 deletions
diff --git a/Documentation/trace/tracedump.txt b/Documentation/trace/tracedump.txt
new file mode 100644
index 000000000000..cba0decc3fc3
--- /dev/null
+++ b/Documentation/trace/tracedump.txt
@@ -0,0 +1,58 @@
+ Tracedump
+ Documentation written by Alon Farchy
+1. Overview
+The tracedump module provides additional mechanisms to retrieve tracing data.
+It can be used to retrieve traces after a kernel panic or while the system
+is running in either binary format or plaintext. The dumped data is compressed
+with zlib to conserve space.
+2. Configuration Options
+CONFIG_TRACEDUMP - enable the tracedump module.
+CONFIG_TRACEDUMP_PANIC - dump to console on kernel panic
+CONFIG_TRACEDUMP_PROCFS - add file /proc/tracedump for userspace access.
+3. Module Parameters
+ If 1, data will dump in human-readable format, ordered by time.
+ If 0, data will be dumped as raw pages from the ring buffer,
+ ordered by CPU, followed by the saved cmdlines so that the
+ raw data can be decoded. Default: 0
+ Maximum amount of compressed data to dump during a kernel panic
+ in kilobytes. This only applies if format_ascii == 1. In this case,
+ tracedump will compress the data, check the size, and if it is too big
+ toss out some data, compress again, etc, until the size is below
+ panic_size. Default: 512KB
+ Determines the compression level that zlib will use. Available levels
+ are 0-9, with 0 as no compression and 9 as maximum compression.
+ Default: 9.
+4. Usage
+If configured with CONFIG_TRACEDUMP_PROCFS, the tracing data can be pulled
+by reading from /proc/tracedump. For example:
+ # cat /proc/tracedump > my_tracedump
+Tracedump will surround the dump with a magic word (TRACEDUMP). Between the
+magic words is the compressed data, which can be decompressed with a standard
+zlib implementation. After decompression, if format_ascii == 1, then the
+output should be readable.
+If format_ascii == 0, the output should be in binary form, delimited by
+CPU_END. After the last CPU should be the saved cmdlines, delimited by |.