From c22f8828806f08ae3adfab1968fc1eefdd52b7d1 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 12 Nov 2008 13:17:38 +0100 Subject: [PATCH] --- yaml --- r: 121101 b: refs/heads/master c: 2b7d0390a6d6d595f43ea3806639664afe5b9ebe h: refs/heads/master i: 121099: 483b37606847ce81e007a7ad8ad77772f3b8a28d v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/vsyscall_64.c | 9 ++------- trunk/arch/x86/vdso/vclock_gettime.c | 3 +++ trunk/include/linux/compiler.h | 6 +++++- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 378f2bf979a0..6b9a2b1ee99c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f88c4ae9f8c3939bee4337c75c7a673b5de7a8a7 +refs/heads/master: 2b7d0390a6d6d595f43ea3806639664afe5b9ebe diff --git a/trunk/arch/x86/kernel/vsyscall_64.c b/trunk/arch/x86/kernel/vsyscall_64.c index 2f90202e59b3..ece02932ea57 100644 --- a/trunk/arch/x86/kernel/vsyscall_64.c +++ b/trunk/arch/x86/kernel/vsyscall_64.c @@ -17,13 +17,8 @@ * want per guest time just set the kernel.vsyscall64 sysctl to 0. */ -/* Protect userspace from profiling */ -#ifdef CONFIG_TRACE_UNLIKELY_PROFILE -# undef likely -# undef unlikely -# define likely(x) likely_notrace(x) -# define unlikely(x) unlikely_notrace(x) -#endif +/* Disable profiling for userspace code: */ +#define DISABLE_UNLIKELY_PROFILE #include #include diff --git a/trunk/arch/x86/vdso/vclock_gettime.c b/trunk/arch/x86/vdso/vclock_gettime.c index 1ef0f90813d6..6e667631e7dc 100644 --- a/trunk/arch/x86/vdso/vclock_gettime.c +++ b/trunk/arch/x86/vdso/vclock_gettime.c @@ -9,6 +9,9 @@ * Also alternative() doesn't work. */ +/* Disable profiling for userspace code: */ +#define DISABLE_UNLIKELY_PROFILE + #include #include #include diff --git a/trunk/include/linux/compiler.h b/trunk/include/linux/compiler.h index 935e30cfaf3c..63b7d9089d6e 100644 --- a/trunk/include/linux/compiler.h +++ b/trunk/include/linux/compiler.h @@ -59,7 +59,11 @@ extern void __chk_io_ptr(const volatile void __iomem *); * specific implementations come from the above header files */ -#ifdef CONFIG_TRACE_UNLIKELY_PROFILE +/* + * 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 { const char *func; const char *file;