[PATCH] Disable branch profiling macros when sparsed.

From: Alexey Zaytsev
Date: Sat Jan 10 2009 - 00:48:33 EST


The macros produce lots of unneeded warnings when
recursive if(({ .. if() {..} ..})) {..} and such
are substituted. And there is no point in sparsing
them anyway. This is useful if someone decides to
sparse an allyesconfig kernel.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@xxxxxxxxx>
---

Also, there is little point in profiling unlikely() inside
WARN_ON() and friends, so maybe they should be replaced
with the _notrace counterparts?

include/linux/compiler.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index d95da10..f5f173b 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -17,6 +17,7 @@
# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
extern void __chk_user_ptr(const volatile void __user *);
extern void __chk_io_ptr(const volatile void __iomem *);
+# define DISABLE_BRANCH_PROFILING
#else
# define __user
# define __kernel

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/