Makefile: break long line
[fio.git] / debug.h
CommitLineData
a3d741fa
JA
1#ifndef FIO_DEBUG_H
2#define FIO_DEBUG_H
3
4#include <assert.h>
5#include "log.h"
6
7enum {
8 FD_PROCESS = 0,
9 FD_FILE,
10 FD_IO,
11 FD_MEM,
12 FD_BLKTRACE,
13 FD_VERIFY,
14 FD_RANDOM,
15 FD_PARSE,
cd991b9e 16 FD_DISKUTIL,
5e1d306e 17 FD_JOB,
29adda3c 18 FD_MUTEX,
79d16311 19 FD_PROFILE,
c223da83 20 FD_TIME,
eb7976ef 21 FD_NET,
a3d741fa
JA
22 FD_DEBUG_MAX,
23};
24
69b98d4c
JA
25extern unsigned int fio_debug_jobno, *fio_debug_jobp;
26
a3d741fa
JA
27#ifdef FIO_INC_DEBUG
28struct debug_level {
29 const char *name;
30 unsigned long shift;
5e1d306e 31 unsigned int jobno;
a3d741fa
JA
32};
33extern struct debug_level debug_levels[];
34
35extern unsigned long fio_debug;
36
bf84eacb
JA
37void __dprint(int type, const char *str, ...);
38
39#define dprint(type, str, args...) \
40 do { \
41 if ((((1 << type)) & fio_debug) == 0) \
42 break; \
43 __dprint((type), (str), ##args); \
44 } while (0) \
a3d741fa
JA
45
46#else
47
bf84eacb
JA
48static inline void dprint(int type, const char *str, ...)
49{
50}
a3d741fa
JA
51#endif
52
53#endif