Merge branch 'perf/core' into perf/probes
[safe/jmp/linux-2.6] / tools / perf / util / util.h
index 7bd5bda..f2203a0 100644 (file)
@@ -134,6 +134,15 @@ extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1,
 extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
 extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
 
+#include "../../../include/linux/stringify.h"
+
+#define DIE_IF(cnd)    \
+       do { if (cnd)   \
+               die(" at (" __FILE__ ":" __stringify(__LINE__) "): "    \
+                   __stringify(cnd) "\n");                             \
+       } while (0)
+
+
 extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
 
 extern int prefixcmp(const char *str, const char *prefix);