aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-04-20 10:27:58 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-04-20 11:07:48 -0400
commit9ae5b8790037d05d32746f521af146c32089bfec (patch)
tree29b0ef5bc534490fa8a25a906d41b8d44ebcfe48 /kernel/trace
parentf3b9aae16219aaeca2dd5a9ca69f7a10faa063df (diff)
tracing: change branch profiling to a choice selection
This patch makes the branch profiling into a choice selection: None - no branch profiling likely/unlikely - only profile likely/unlikely branches all - profile all branches The all profiler will also enable the likely/unlikely branches. This does not change the way the profiler works or the dependencies between the profilers. What this patch does, is keep the branch profiling from being selected by an allyesconfig make. The branch profiler is very intrusive and it is known to break various architecture builds when selected as an allyesconfig. [ Impact: prevent branch profiler from being selected in allyesconfig ] Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reported-by: Al Viro <viro@zeniv.linux.org.uk> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/Kconfig39
1 files changed, 33 insertions, 6 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 57981d338d1f..3ee28db69be6 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -212,8 +212,36 @@ config BOOT_TRACER
212 to enable this on bootup. 212 to enable this on bootup.
213 213
214config TRACE_BRANCH_PROFILING 214config TRACE_BRANCH_PROFILING
215 bool "Trace likely/unlikely profiler" 215 bool
216 select TRACING 216 select TRACING
217
218choice
219 prompt "Branch Profiling"
220 default BRANCH_PROFILE_NONE
221 help
222 The branch profiling is a software profiler. It will add hooks
223 into the C conditionals to test which path a branch takes.
224
225 The likely/unlikely profiler only looks at the conditions that
226 are annotated with a likely or unlikely macro.
227
228 The "all branch" profiler will profile every if statement in the
229 kernel. This profiler will also enable the likely/unlikely
230 profiler as well.
231
232 Either of the above profilers add a bit of overhead to the system.
233 If unsure choose "No branch profiling".
234
235config BRANCH_PROFILE_NONE
236 bool "No branch profiling"
237 help
238 No branch profiling. Branch profiling adds a bit of overhead.
239 Only enable it if you want to analyse the branching behavior.
240 Otherwise keep it disabled.
241
242config PROFILE_ANNOTATED_BRANCHES
243 bool "Trace likely/unlikely profiler"
244 select TRACE_BRANCH_PROFILING
217 help 245 help
218 This tracer profiles all the the likely and unlikely macros 246 This tracer profiles all the the likely and unlikely macros
219 in the kernel. It will display the results in: 247 in the kernel. It will display the results in:
@@ -223,11 +251,9 @@ config TRACE_BRANCH_PROFILING
223 Note: this will add a significant overhead, only turn this 251 Note: this will add a significant overhead, only turn this
224 on if you need to profile the system's use of these macros. 252 on if you need to profile the system's use of these macros.
225 253
226 Say N if unsure.
227
228config PROFILE_ALL_BRANCHES 254config PROFILE_ALL_BRANCHES
229 bool "Profile all if conditionals" 255 bool "Profile all if conditionals"
230 depends on TRACE_BRANCH_PROFILING 256 select TRACE_BRANCH_PROFILING
231 help 257 help
232 This tracer profiles all branch conditions. Every if () 258 This tracer profiles all branch conditions. Every if ()
233 taken in the kernel is recorded whether it hit or miss. 259 taken in the kernel is recorded whether it hit or miss.
@@ -235,11 +261,12 @@ config PROFILE_ALL_BRANCHES
235 261
236 /debugfs/tracing/profile_branch 262 /debugfs/tracing/profile_branch
237 263
264 This option also enables the likely/unlikely profiler.
265
238 This configuration, when enabled, will impose a great overhead 266 This configuration, when enabled, will impose a great overhead
239 on the system. This should only be enabled when the system 267 on the system. This should only be enabled when the system
240 is to be analyzed 268 is to be analyzed
241 269endchoice
242 Say N if unsure.
243 270
244config TRACING_BRANCHES 271config TRACING_BRANCHES
245 bool 272 bool