summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-09-29 10:19:35 -0400
committerSteven Rostedt <rostedt@goodmis.org>2015-09-29 13:23:59 -0400
commit4ee4301c4bab22c84df20ce694cc6932dd812be5 (patch)
treef28377d9eff9af7418eb3bdbedbdafeaf7e865f2 /kernel/trace/trace.h
parent729358da95a1b3850ef892e9384f58932da1dc69 (diff)
downloadop-kernel-dev-4ee4301c4bab22c84df20ce694cc6932dd812be5.zip
op-kernel-dev-4ee4301c4bab22c84df20ce694cc6932dd812be5.tar.gz
tracing: Only create branch tracer options when compiled in
When the branch tracer is not compiled in, do not create the option files associated to it. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 33cd097..3f1cc45 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -895,6 +895,13 @@ extern int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
# define FUNCTION_GRAPH_DEFAULT_FLAGS 0UL
#endif
+#ifdef CONFIG_BRANCH_TRACER
+# define BRANCH_FLAGS \
+ C(BRANCH, "branch"),
+#else
+# define BRANCH_FLAGS
+#endif
+
/*
* trace_iterator_flags is an enumeration that defines bit
* positions into trace_flags that controls the output.
@@ -913,7 +920,6 @@ extern int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
C(BLOCK, "block"), \
C(STACKTRACE, "stacktrace"), \
C(PRINTK, "trace_printk"), \
- C(BRANCH, "branch"), \
C(ANNOTATE, "annotate"), \
C(USERSTACKTRACE, "userstacktrace"), \
C(SYM_USEROBJ, "sym-userobj"), \
@@ -926,7 +932,8 @@ extern int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
C(IRQ_INFO, "irq-info"), \
C(MARKERS, "markers"), \
C(FUNCTION, "function-trace"), \
- FGRAPH_FLAGS
+ FGRAPH_FLAGS \
+ BRANCH_FLAGS
/*
* By defining C, we can make TRACE_FLAGS a list of bit names
OpenPOWER on IntegriCloud