aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/Kconfig10
-rw-r--r--kernel/trace/Makefile7
-rw-r--r--kernel/trace/trace.c2
-rw-r--r--kernel/trace/trace.h6
-rw-r--r--kernel/trace/trace_unlikely.c4
5 files changed, 14 insertions, 15 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 8abcaf821beb..9c89526b6b7c 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -159,7 +159,7 @@ config BOOT_TRACER
159 selected, because the self-tests are an initcall as well and that 159 selected, because the self-tests are an initcall as well and that
160 would invalidate the boot trace. ) 160 would invalidate the boot trace. )
161 161
162config TRACE_UNLIKELY_PROFILE 162config TRACE_BRANCH_PROFILING
163 bool "Trace likely/unlikely profiler" 163 bool "Trace likely/unlikely profiler"
164 depends on DEBUG_KERNEL 164 depends on DEBUG_KERNEL
165 select TRACING 165 select TRACING
@@ -175,7 +175,7 @@ config TRACE_UNLIKELY_PROFILE
175 175
176 Say N if unsure. 176 Say N if unsure.
177 177
178config TRACING_UNLIKELY 178config TRACING_BRANCHES
179 bool 179 bool
180 help 180 help
181 Selected by tracers that will trace the likely and unlikely 181 Selected by tracers that will trace the likely and unlikely
@@ -183,10 +183,10 @@ config TRACING_UNLIKELY
183 profiled. Profiling the tracing infrastructure can only happen 183 profiled. Profiling the tracing infrastructure can only happen
184 when the likelys and unlikelys are not being traced. 184 when the likelys and unlikelys are not being traced.
185 185
186config UNLIKELY_TRACER 186config BRANCH_TRACER
187 bool "Trace likely/unlikely instances" 187 bool "Trace likely/unlikely instances"
188 depends on TRACE_UNLIKELY_PROFILE 188 depends on TRACE_BRANCH_PROFILING
189 select TRACING_UNLIKELY 189 select TRACING_BRANCHES
190 help 190 help
191 This traces the events of likely and unlikely condition 191 This traces the events of likely and unlikely condition
192 calls in the kernel. The difference between this and the 192 calls in the kernel. The difference between this and the
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index c938d03516c0..0087df7ba44e 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -11,9 +11,8 @@ obj-y += trace_selftest_dynamic.o
11endif 11endif
12 12
13# If unlikely tracing is enabled, do not trace these files 13# If unlikely tracing is enabled, do not trace these files
14ifdef CONFIG_TRACING_UNLIKELY 14ifdef CONFIG_TRACING_BRANCHES
15KBUILD_CFLAGS += '-Dlikely(x)=likely_notrace(x)' 15KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
16KBUILD_CFLAGS += '-Dunlikely(x)=unlikely_notrace(x)'
17endif 16endif
18 17
19obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o 18obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
@@ -31,6 +30,6 @@ obj-$(CONFIG_STACK_TRACER) += trace_stack.o
31obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o 30obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o
32obj-$(CONFIG_BOOT_TRACER) += trace_boot.o 31obj-$(CONFIG_BOOT_TRACER) += trace_boot.o
33obj-$(CONFIG_FUNCTION_RET_TRACER) += trace_functions_return.o 32obj-$(CONFIG_FUNCTION_RET_TRACER) += trace_functions_return.o
34obj-$(CONFIG_TRACE_UNLIKELY_PROFILE) += trace_unlikely.o 33obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_unlikely.o
35 34
36libftrace-y := ftrace.o 35libftrace-y := ftrace.o
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d842db14a59b..bad59d32a4a9 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -258,7 +258,7 @@ static const char *trace_options[] = {
258 "sched-tree", 258 "sched-tree",
259 "ftrace_printk", 259 "ftrace_printk",
260 "ftrace_preempt", 260 "ftrace_preempt",
261#ifdef CONFIG_UNLIKELY_TRACER 261#ifdef CONFIG_BRANCH_TRACER
262 "unlikely", 262 "unlikely",
263#endif 263#endif
264 NULL 264 NULL
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 9635aa2c4fc1..dccae6312941 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -468,7 +468,7 @@ enum trace_iterator_flags {
468 TRACE_ITER_SCHED_TREE = 0x200, 468 TRACE_ITER_SCHED_TREE = 0x200,
469 TRACE_ITER_PRINTK = 0x400, 469 TRACE_ITER_PRINTK = 0x400,
470 TRACE_ITER_PREEMPTONLY = 0x800, 470 TRACE_ITER_PREEMPTONLY = 0x800,
471#ifdef CONFIG_UNLIKELY_TRACER 471#ifdef CONFIG_BRANCH_TRACER
472 TRACE_ITER_UNLIKELY = 0x1000, 472 TRACE_ITER_UNLIKELY = 0x1000,
473#endif 473#endif
474}; 474};
@@ -530,7 +530,7 @@ static inline void ftrace_preempt_enable(int resched)
530 preempt_enable_notrace(); 530 preempt_enable_notrace();
531} 531}
532 532
533#ifdef CONFIG_UNLIKELY_TRACER 533#ifdef CONFIG_BRANCH_TRACER
534extern int enable_unlikely_tracing(struct trace_array *tr); 534extern int enable_unlikely_tracing(struct trace_array *tr);
535extern void disable_unlikely_tracing(void); 535extern void disable_unlikely_tracing(void);
536static inline int trace_unlikely_enable(struct trace_array *tr) 536static inline int trace_unlikely_enable(struct trace_array *tr)
@@ -552,6 +552,6 @@ static inline int trace_unlikely_enable(struct trace_array *tr)
552static inline void trace_unlikely_disable(void) 552static inline void trace_unlikely_disable(void)
553{ 553{
554} 554}
555#endif /* CONFIG_UNLIKELY_TRACER */ 555#endif /* CONFIG_BRANCH_TRACER */
556 556
557#endif /* _LINUX_KERNEL_TRACE_H */ 557#endif /* _LINUX_KERNEL_TRACE_H */
diff --git a/kernel/trace/trace_unlikely.c b/kernel/trace/trace_unlikely.c
index 7290e0e7b4e3..856eb3b7f694 100644
--- a/kernel/trace/trace_unlikely.c
+++ b/kernel/trace/trace_unlikely.c
@@ -15,7 +15,7 @@
15#include <asm/local.h> 15#include <asm/local.h>
16#include "trace.h" 16#include "trace.h"
17 17
18#ifdef CONFIG_UNLIKELY_TRACER 18#ifdef CONFIG_BRANCH_TRACER
19 19
20static int unlikely_tracing_enabled __read_mostly; 20static int unlikely_tracing_enabled __read_mostly;
21static DEFINE_MUTEX(unlikely_tracing_mutex); 21static DEFINE_MUTEX(unlikely_tracing_mutex);
@@ -119,7 +119,7 @@ static inline
119void trace_likely_condition(struct ftrace_likely_data *f, int val, int expect) 119void trace_likely_condition(struct ftrace_likely_data *f, int val, int expect)
120{ 120{
121} 121}
122#endif /* CONFIG_UNLIKELY_TRACER */ 122#endif /* CONFIG_BRANCH_TRACER */
123 123
124void ftrace_likely_update(struct ftrace_likely_data *f, int val, int expect) 124void ftrace_likely_update(struct ftrace_likely_data *f, int val, int expect)
125{ 125{