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

From: Wu Zhangjin
Date: Mon Oct 26 2009 - 11:15:42 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/