From 04399f5ebe22d4f0c228fceb6766f33a49892e38 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 29 May 2012 12:01:07 +0200 Subject: 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) --- runtime/debug.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'runtime/debug.h') 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); -- cgit v1.2.3