summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-11-12 23:24:24 +0300
committerIngo Molnar <mingo@elte.hu>2008-11-13 00:27:58 +0300
commit2ed84eeb8808cf3c9f039213ca137ffd7d753f0e (patch)
tree3aa22269a1fd5ed0b66826120ca9b572400962b5 /include
parent68d119f0a66f7e3663304343b072e56a2693446b (diff)
downloadlinux-2ed84eeb8808cf3c9f039213ca137ffd7d753f0e.tar.xz
trace: rename unlikely profiler to branch profiler
Impact: name change of unlikely tracer and profiler Ingo Molnar suggested changing the config from UNLIKELY_PROFILE to BRANCH_PROFILING. I never did like the "unlikely" name so I went one step farther, and renamed all the unlikely configurations to a "BRANCH" variant. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h2
-rw-r--r--include/linux/compiler.h19
2 files changed, 11 insertions, 10 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index e10beb5335c9..a5e4ed9baec8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -45,7 +45,7 @@
#define MCOUNT_REC()
#endif
-#ifdef CONFIG_TRACE_UNLIKELY_PROFILE
+#ifdef CONFIG_TRACE_BRANCH_PROFILING
#define LIKELY_PROFILE() VMLINUX_SYMBOL(__start_likely_profile) = .; \
*(_ftrace_likely) \
VMLINUX_SYMBOL(__stop_likely_profile) = .; \
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 63b7d9089d6e..c7d804a7a4d6 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -59,26 +59,27 @@ extern void __chk_io_ptr(const volatile void __iomem *);
* specific implementations come from the above header files
*/
-/*
- * Note: DISABLE_UNLIKELY_PROFILE can be used by special lowlevel code
- * to disable branch tracing on a per file basis.
- */
-#if defined(CONFIG_TRACE_UNLIKELY_PROFILE) && !defined(DISABLE_UNLIKELY_PROFILE)
-struct ftrace_likely_data {
+struct ftrace_branch_data {
const char *func;
const char *file;
unsigned line;
unsigned long correct;
unsigned long incorrect;
};
-void ftrace_likely_update(struct ftrace_likely_data *f, int val, int expect);
+
+/*
+ * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
+ * to disable branch tracing on a per file basis.
+ */
+#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING)
+void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
#define likely_notrace(x) __builtin_expect(!!(x), 1)
#define unlikely_notrace(x) __builtin_expect(!!(x), 0)
#define likely_check(x) ({ \
int ______r; \
- static struct ftrace_likely_data \
+ static struct ftrace_branch_data \
__attribute__((__aligned__(4))) \
__attribute__((section("_ftrace_likely"))) \
______f = { \
@@ -93,7 +94,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, int expect);
})
#define unlikely_check(x) ({ \
int ______r; \
- static struct ftrace_likely_data \
+ static struct ftrace_branch_data \
__attribute__((__aligned__(4))) \
__attribute__((section("_ftrace_unlikely"))) \
______f = { \