diff options
Diffstat (limited to 'tools/perf/util/include/linux/kernel.h')
| -rw-r--r-- | tools/perf/util/include/linux/kernel.h | 4 |
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 b6842c1d02a8..4af9a10cc2d2 100644 --- a/tools/perf/util/include/linux/kernel.h +++ b/tools/perf/util/include/linux/kernel.h | |||
| @@ -47,8 +47,12 @@ | |||
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #ifndef BUG_ON | 49 | #ifndef BUG_ON |
| 50 | #ifdef NDEBUG | ||
| 51 | #define BUG_ON(cond) do { if (cond) {} } while (0) | ||
| 52 | #else | ||
| 50 | #define BUG_ON(cond) assert(!(cond)) | 53 | #define BUG_ON(cond) assert(!(cond)) |
| 51 | #endif | 54 | #endif |
| 55 | #endif | ||
| 52 | 56 | ||
| 53 | /* | 57 | /* |
| 54 | * Both need more care to handle endianness | 58 | * Both need more care to handle endianness |
