summaryrefslogtreecommitdiff
path: root/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'debug.h')
-rw-r--r--debug.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/debug.h b/debug.h
index 22577a8a..883628da 100644
--- a/debug.h
+++ b/debug.h
@@ -14,6 +14,7 @@ enum {
FD_RANDOM,
FD_PARSE,
FD_DISKUTIL,
+ FD_JOB,
FD_DEBUG_MAX,
};
@@ -21,17 +22,24 @@ enum {
struct debug_level {
const char *name;
unsigned long shift;
+ unsigned int jobno;
};
extern struct debug_level debug_levels[];
extern unsigned long fio_debug;
+extern unsigned int fio_debug_jobno, *fio_debug_jobp;
#define dprint(type, str, args...) \
do { \
+ pid_t pid = getpid(); \
assert(type < FD_DEBUG_MAX); \
if ((((1 << type)) & fio_debug) == 0) \
break; \
+ if (fio_debug_jobp && *fio_debug_jobp != -1U \
+ && pid != *fio_debug_jobp) \
+ break; \
log_info("%-8s ", debug_levels[(type)].name); \
+ log_info("%-5u ", pid); \
log_info(str, ##args); \
} while (0)