summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlon Farchy <afarchy@nvidia.com>2011-12-12 11:21:59 -0600
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-22 11:29:19 +0530
commite744c3588e7a09c8ec80e28efffd6f08c1c2b2b8 (patch)
tree648528218c7374503729cba660fa7950f6d3b5d0 /include
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 <licheng@nvidia.com> Reviewed-on: http://git-master/r/69494 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tracedump.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/linux/tracedump.h b/include/linux/tracedump.h
new file mode 100644
index 000000000000..9e86946e354e
--- /dev/null
+++ b/include/linux/tracedump.h
@@ -0,0 +1,43 @@
+/*
+ * include/linux/tracedump.h
+ *
+ * Copyright (c) 2011, NVIDIA CORPORATION. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef _LINUX_KERNEL_TRACEDUMP_H
+#define _LINUX_KERNEL_TRACEDUMP_H
+
+/* tracedump
+ * This module provides additional mechanisms for retreiving tracing data.
+ * For details on configurations, parameters and usage, see tracedump.txt.
+ */
+
+#define TD_NO_PRINT 0
+#define TD_PRINT_CONSOLE 1
+#define TD_PRINT_USER 2
+
+/* Dump the tracer to console */
+int tracedump_dump(size_t max_out);
+
+/* Dumping functions */
+int tracedump_init(void);
+ssize_t tracedump_all(int print_to);
+ssize_t tracedump_next(size_t max_out, int print_to);
+int tracedump_reset(void);
+int tracedump_deinit(void);
+
+#endif /* _LINUX_KERNEL_TRACEDUMP_H */