[PATCH -v6 09/13] tracing: Add __arch_notrace for arch specific requirement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some arch need to not trace the common functions, but the other archs do
not need it, so, we add a new __arch_notrace to solve this problem, if
your arch need it, define it in your arch specific ftrace.h, otherwise,
ignore it! and if you just need to enable it with function graph tracer,
wrap it with "#ifdef CONFIG_FUNCTION_GRAPH_TRACER ... #endif".

Signed-off-by: Wu Zhangjin <wuzhangjin@xxxxxxxxx>
---
 include/linux/ftrace.h |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 0b4f97d..b3bd349 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -511,4 +511,23 @@ static inline void trace_hw_branch_oops(void) {}
 
 #endif /* CONFIG_HW_BRANCH_TRACER */
 
+/* Arch Specific notrace
+ *
+ * If your arch need it, define it in the arch specific ftrace.h
+ *
+ *	#define __arch_notrace
+ *
+ * If only need it with function graph tracer, wrap it.
+ *
+ *	#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+ *	#define __arch_notrace
+ *	#endif
+ */
+#ifndef __arch_notrace
+#define __arch_notrace
+#else
+#undef __arch_notrace
+#define __arch_notrace	notrace
+#endif
+
 #endif /* _LINUX_FTRACE_H */
-- 
1.6.2.1



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux