Skip to content

Commit

Permalink
tracing: Only create branch tracer options when compiled in
Browse files Browse the repository at this point in the history
When the branch tracer is not compiled in, do not create the option files
associated to it.

Signed-off-by: Steven Rostedt <[email protected]>
  • Loading branch information
rostedt committed Sep 29, 2015
1 parent 729358d commit 4ee4301
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"), \
Expand All @@ -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
Expand Down

0 comments on commit 4ee4301

Please sign in to comment.