Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ae5b879 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent f3b9aae1
Loading
Loading
Loading
Loading
+33 −6
Original line number Diff line number Diff line
@@ -212,8 +212,36 @@ config BOOT_TRACER
	  to enable this on bootup.

config TRACE_BRANCH_PROFILING
	bool "Trace likely/unlikely profiler"
	bool
	select TRACING

choice
	prompt "Branch Profiling"
	default BRANCH_PROFILE_NONE
	help
	 The branch profiling is a software profiler. It will add hooks
	 into the C conditionals to test which path a branch takes.

	 The likely/unlikely profiler only looks at the conditions that
	 are annotated with a likely or unlikely macro.

	 The "all branch" profiler will profile every if statement in the
	 kernel. This profiler will also enable the likely/unlikely
	 profiler as well.

	 Either of the above profilers add a bit of overhead to the system.
	 If unsure choose "No branch profiling".

config BRANCH_PROFILE_NONE
	bool "No branch profiling"
	help
	 No branch profiling. Branch profiling adds a bit of overhead.
	 Only enable it if you want to analyse the branching behavior.
	 Otherwise keep it disabled.

config PROFILE_ANNOTATED_BRANCHES
	bool "Trace likely/unlikely profiler"
	select TRACE_BRANCH_PROFILING
	help
	  This tracer profiles all the the likely and unlikely macros
	  in the kernel. It will display the results in:
@@ -223,11 +251,9 @@ config TRACE_BRANCH_PROFILING
	  Note: this will add a significant overhead, only turn this
	  on if you need to profile the system's use of these macros.

	  Say N if unsure.

config PROFILE_ALL_BRANCHES
	bool "Profile all if conditionals"
	depends on TRACE_BRANCH_PROFILING
	select TRACE_BRANCH_PROFILING
	help
	  This tracer profiles all branch conditions. Every if ()
	  taken in the kernel is recorded whether it hit or miss.
@@ -235,11 +261,12 @@ config PROFILE_ALL_BRANCHES

	  /debugfs/tracing/profile_branch

	  This option also enables the likely/unlikely profiler.

	  This configuration, when enabled, will impose a great overhead
	  on the system. This should only be enabled when the system
	  is to be analyzed

	  Say N if unsure.
endchoice

config TRACING_BRANCHES
	bool