summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-09-09 10:39:14 +0200
committerIngo Molnar <mingo@kernel.org>2012-09-09 10:39:14 +0200
commitd5cb2aef4fda355fbafe8db4f425b73ea94d2019 (patch)
treef6812e5248557bd16803f787e0cbc9d57ab60133 /tools/perf/util/include/linux
parentef34eb4da3eb62a1511592adf7c76d74faca0b14 (diff)
parent6c7f631261064762a8ba1ee34fc2b76d117ef3fa (diff)
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: * Don't pass const char pointers to basename, so that we can unconditionally use libgen.h and thus avoid ifdef BIONIC lines, from David Ahern * Fix assert/BUG_ON when NDEBUG is defined, from Irina Tirdea. * Refactor hist formatting so that it can be reused with the GTK browser, From Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/include/linux')
-rw-r--r--tools/perf/util/include/linux/kernel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/include/linux/kernel.h b/tools/perf/util/include/linux/kernel.h
index b6842c1d02a..4af9a10cc2d 100644
--- a/tools/perf/util/include/linux/kernel.h
+++ b/tools/perf/util/include/linux/kernel.h
@@ -47,8 +47,12 @@
#endif
#ifndef BUG_ON
+#ifdef NDEBUG
+#define BUG_ON(cond) do { if (cond) {} } while (0)
+#else
#define BUG_ON(cond) assert(!(cond))
#endif
+#endif
/*
* Both need more care to handle endianness