Hide ftrace behind a flag so it is disabled by default
We were spending like 10% CPU formatting all the Fetch and Watch
and Send messages for the kernel. Hide those behind a flag so the
default configuration is a lot quieter.
Change-Id: I58a313e27b8ebe41775af76b1529be8d1f258e5c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/ftrace.h b/aos/ftrace.h
index 42147ad..3b5326f 100644
--- a/aos/ftrace.h
+++ b/aos/ftrace.h
@@ -17,9 +17,7 @@
// continue working in that case.
class Ftrace {
public:
- Ftrace()
- : message_fd_(open("/sys/kernel/debug/tracing/trace_marker", O_WRONLY)),
- on_fd_(open("/sys/kernel/debug/tracing/tracing_on", O_WRONLY)) {}
+ Ftrace();
~Ftrace();
// Writes a message with a printf-style format.