linux-stable/tools
Irina Tirdea 8bf98b8968 perf bench: fix assert when NDEBUG is defined
When NDEBUG is defined, the assert macro will be expanded to nothing.
Some assert calls used in perf are also including some functionality
(e.g. system calls), not only validity checks. Therefore, if NDEBUG is
defined, this functionality will be removed along with the assert.  Perf
also defines BUG_ON based on assert, so it has the same problem.

Define BUG_ON so that the condition will be executed when NDEBUG is
defined.  Replace the assert statements that have these side effects
with BUG_ON.

For defining BUG_ON, use "if (cond) {}" insted of "if (cond) ;" because
in the latter case build fails with "error: suggest braces around empty
body in an ‘if’ statement [-Werror=empty-body]"

Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1347082551-2394-1-git-send-email-irina.tirdea@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-09-08 13:18:54 -03:00
..
firewire tools/firewire: nosy-dump: increment program version 2010-07-27 11:04:12 +02:00
hv Tools: hv: verify origin of netlink connector message 2012-06-10 00:29:46 +09:00
include/tools tools/include: Add byteshift headers for endian access 2012-02-28 10:22:51 -08:00
lguest lguest: move the lguest tool to the tools directory 2012-01-12 15:44:47 +10:30
lib/traceevent tools lib traceevent: replace mempcpy with memcpy 2012-09-07 22:11:20 -03:00
nfsd NFSD: Added fault injection script 2011-11-07 21:10:47 -05:00
perf perf bench: fix assert when NDEBUG is defined 2012-09-08 13:18:54 -03:00
power tools/power: turbostat: fix large c1% issue 2012-07-19 22:26:33 -04:00
scripts perf tools: Let O= makes handle relative paths 2012-08-16 14:11:11 -03:00
testing fault-injection: fix failcmd.sh warning 2012-07-31 18:42:38 -07:00
usb testusb: expose looping forever option "l" to user 2012-06-13 16:15:03 -07:00
virtio virtio/tools: add delayed interupt mode 2012-05-02 18:22:14 +03:00
vm mm: Fix signal SIGFPE in slabinfo.c. 2012-07-02 23:11:14 +03:00
Makefile tools: Connect to the kernel build system 2012-04-11 15:00:17 -03:00