aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r--tools/perf/util/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 7bd5bdaeb235..f2203a0946bc 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -134,6 +134,15 @@ extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1,
134extern int error(const char *err, ...) __attribute__((format (printf, 1, 2))); 134extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
135extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2))); 135extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
136 136
137#include "../../../include/linux/stringify.h"
138
139#define DIE_IF(cnd) \
140 do { if (cnd) \
141 die(" at (" __FILE__ ":" __stringify(__LINE__) "): " \
142 __stringify(cnd) "\n"); \
143 } while (0)
144
145
137extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN); 146extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
138 147
139extern int prefixcmp(const char *str, const char *prefix); 148extern int prefixcmp(const char *str, const char *prefix);