diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-10-16 20:08:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-17 03:54:01 -0400 |
commit | 9769833b8e4425dc93fc837bf124c6cb02a51abb (patch) | |
tree | 3e5d2a12e8df8528e50f35c4f122d56b4f59b2cd /tools/perf/util/probe-finder.h | |
parent | 89c69c0eee7515cdc217f4278de43547284b3458 (diff) |
perf: Add DIE_IF() macro for error checking
Add DIE_IF() macro and replace ERR_IF() with it, and use
linux/stringify.h.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20091017000818.16556.82452.stgit@dhcp-100-2-132.bos.redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-finder.h')
-rw-r--r-- | tools/perf/util/probe-finder.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tools/perf/util/probe-finder.h b/tools/perf/util/probe-finder.h index 6a7cb0c04e9e..d17fafc21351 100644 --- a/tools/perf/util/probe-finder.h +++ b/tools/perf/util/probe-finder.h | |||
@@ -1,16 +1,6 @@ | |||
1 | #ifndef _PROBE_FINDER_H | 1 | #ifndef _PROBE_FINDER_H |
2 | #define _PROBE_FINDER_H | 2 | #define _PROBE_FINDER_H |
3 | 3 | ||
4 | #define _stringify(n) #n | ||
5 | #define stringify(n) _stringify(n) | ||
6 | |||
7 | #define ERR_IF(cnd) \ | ||
8 | do { if (cnd) { \ | ||
9 | fprintf(stderr, "Error (" __FILE__ ":" stringify(__LINE__) \ | ||
10 | "): " stringify(cnd) "\n"); \ | ||
11 | exit(1); \ | ||
12 | } } while (0) | ||
13 | |||
14 | #define MAX_PATH_LEN 256 | 4 | #define MAX_PATH_LEN 256 |
15 | #define MAX_PROBE_BUFFER 1024 | 5 | #define MAX_PROBE_BUFFER 1024 |
16 | #define MAX_PROBES 128 | 6 | #define MAX_PROBES 128 |