diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-05-29 12:01:07 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-05-29 12:01:07 +0200 |
commit | 04399f5ebe22d4f0c228fceb6766f33a49892e38 (patch) | |
tree | 77135e44603df11bab1da7da782b64950dada361 /runtime/debug.h | |
parent | 6bc629021eb008e1d48627bdac70b1c8b237937b (diff) | |
download | rsyslog-04399f5ebe22d4f0c228fceb6766f33a49892e38.tar.gz rsyslog-04399f5ebe22d4f0c228fceb6766f33a49892e38.tar.xz rsyslog-04399f5ebe22d4f0c228fceb6766f33a49892e38.zip |
added --enable-debugless configure option for very high demanding environments
This actually at compile time disables a lot of debug code, resulting
in some speedup (but serious loss of debugging capabilities)
Diffstat (limited to 'runtime/debug.h')
-rw-r--r-- | runtime/debug.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/debug.h b/runtime/debug.h index 26672c3e..5bd26bd8 100644 --- a/runtime/debug.h +++ b/runtime/debug.h @@ -106,8 +106,13 @@ void dbgPrintAllDebugInfo(void); void *dbgmalloc(size_t size); /* macros */ -#define DBGPRINTF(...) if(Debug) { dbgprintf(__VA_ARGS__); } -#define DBGOPRINT(...) if(Debug) { dbgoprint(__VA_ARGS__); } +#ifdef DEBUGLESS +# define DBGPRINTF(...) {} +# define DBGOPRINT(...) {} +#else +# define DBGPRINTF(...) if(Debug) { dbgprintf(__VA_ARGS__); } +# define DBGOPRINT(...) if(Debug) { dbgoprint(__VA_ARGS__); } +#endif #ifdef RTINST # define BEGINfunc static dbgFuncDB_t *pdbgFuncDB; int dbgCALLStaCK_POP_POINT = dbgEntrFunc(&pdbgFuncDB, __FILE__, __func__, __LINE__); # define ENDfunc dbgExitFunc(pdbgFuncDB, dbgCALLStaCK_POP_POINT, RS_RET_NO_IRET); |