diff options
-rw-r--r-- | kernel/trace/Kconfig | 39 |
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 | ||
214 | config TRACE_BRANCH_PROFILING | 214 | config TRACE_BRANCH_PROFILING |
215 | bool "Trace likely/unlikely profiler" | 215 | bool |
216 | select TRACING | 216 | select TRACING |
217 | |||
218 | choice | ||
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 | |||
235 | config 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 | |||
242 | config 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 | |||
228 | config PROFILE_ALL_BRANCHES | 254 | config 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 | 269 | endchoice | |
242 | Say N if unsure. | ||
243 | 270 | ||
244 | config TRACING_BRANCHES | 271 | config TRACING_BRANCHES |
245 | bool | 272 | bool |