summaryrefslogtreecommitdiffstats
path: root/runtime/debug.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-05-29 12:01:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-05-29 12:01:07 +0200
commit04399f5ebe22d4f0c228fceb6766f33a49892e38 (patch)
tree77135e44603df11bab1da7da782b64950dada361 /runtime/debug.h
parent6bc629021eb008e1d48627bdac70b1c8b237937b (diff)
downloadrsyslog-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.h9
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);