summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2015-09-29 10:15:10 -0400
committerSteven Rostedt <rostedt@goodmis.org>2015-09-29 13:23:58 -0400
commit729358da95a1b3850ef892e9384f58932da1dc69 (patch)
treed7d4ad01b17ed7490e9689d1eb79396b9dbb7099 /kernel/trace/trace.h
parenta3418a364ec3c8f0c29bf3f4cfc71dc6f240150e (diff)
downloadblackbird-obmc-linux-729358da95a1b3850ef892e9384f58932da1dc69.tar.gz
blackbird-obmc-linux-729358da95a1b3850ef892e9384f58932da1dc69.zip
tracing: Only create function graph options when it is compiled in
Do not create fuction graph tracer options when function graph tracer is not even compiled in. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index d164845edddd..33cd09799ceb 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -880,6 +880,22 @@ extern int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
size_t cnt, loff_t *ppos);
/*
+ * Only create function graph options if function graph is configured.
+ */
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+# define FGRAPH_FLAGS \
+ C(SLEEP_TIME, "sleep-time"), \
+ C(GRAPH_TIME, "graph-time"), \
+ C(DISPLAY_GRAPH, "display-graph"),
+/* Initially set for trace_flags */
+# define FUNCTION_GRAPH_DEFAULT_FLAGS \
+ (TRACE_ITER_SLEEP_TIME | TRACE_ITER_GRAPH_TIME)
+#else
+# define FGRAPH_FLAGS
+# define FUNCTION_GRAPH_DEFAULT_FLAGS 0UL
+#endif
+
+/*
* trace_iterator_flags is an enumeration that defines bit
* positions into trace_flags that controls the output.
*
@@ -904,15 +920,13 @@ extern int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
C(PRINTK_MSGONLY, "printk-msg-only"), \
C(CONTEXT_INFO, "context-info"), /* Print pid/cpu/time */ \
C(LATENCY_FMT, "latency-format"), \
- C(SLEEP_TIME, "sleep-time"), \
- C(GRAPH_TIME, "graph-time"), \
C(RECORD_CMD, "record-cmd"), \
C(OVERWRITE, "overwrite"), \
C(STOP_ON_FREE, "disable_on_free"), \
C(IRQ_INFO, "irq-info"), \
C(MARKERS, "markers"), \
C(FUNCTION, "function-trace"), \
- C(DISPLAY_GRAPH, "display-graph"),
+ FGRAPH_FLAGS
/*
* By defining C, we can make TRACE_FLAGS a list of bit names
OpenPOWER on IntegriCloud