aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mtk_ftrace.h
diff options
context:
space:
mode:
authorMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
committerMeizu OpenSource <patchwork@meizu.com>2016-08-15 10:19:42 +0800
commitd2e1446d81725c351dc73a03b397ce043fb18452 (patch)
tree4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/mtk_ftrace.h
downloadandroid_kernel_m2note-d2e1446d81725c351dc73a03b397ce043fb18452.tar.gz
first commit
Diffstat (limited to 'include/linux/mtk_ftrace.h')
-rw-r--r--include/linux/mtk_ftrace.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/linux/mtk_ftrace.h b/include/linux/mtk_ftrace.h
new file mode 100644
index 000000000..aaa5acc8d
--- /dev/null
+++ b/include/linux/mtk_ftrace.h
@@ -0,0 +1,42 @@
+#ifndef _MTK_FTRACE_H
+#define _MTK_FTRACE_H
+
+#include <linux/string.h>
+#include <linux/seq_file.h>
+#include <linux/version.h>
+
+#ifdef CONFIG_MTK_KERNEL_MARKER
+void mt_kernel_trace_begin(char *name);
+void mt_kernel_trace_counter(char *name, int count);
+void mt_kernel_trace_end(void);
+#else
+#define mt_kernel_trace_begin(name)
+#define mt_kernel_trace_counter(name, count)
+#define mt_kernel_trace_end()
+#endif
+
+#if defined(CONFIG_MTK_HIBERNATION) && defined(CONFIG_MTK_SCHED_TRACERS)
+int resize_ring_buffer_for_hibernation(int enable);
+#else
+#define resize_ring_buffer_for_hibernation(on) (0)
+#endif /* CONFIG_MTK_HIBERNATION */
+
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+extern int ring_buffer_expanded;
+ssize_t tracing_resize_ring_buffer(unsigned long size, int cpu_id);
+#else
+extern bool ring_buffer_expanded;
+ssize_t tracing_resize_ring_buffer(struct trace_array *tr, unsigned long size, int cpu_id);
+#endif
+
+#ifdef CONFIG_MTK_SCHED_TRACERS
+/* ftrace's switch function for MTK solution */
+void mt_ftrace_enable_disable(int enable);
+void print_enabled_events(struct seq_file *m);
+#else
+#define mt_ftrace_enable_disable(on)
+#define print_enabled_events(m)
+#endif /* CONFIG_TRACING && CONFIG_MTK_SCHED_TRACERS */
+
+#endif