From b44a5205f7f2f072e0154ebbfede6937a4d82abf Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 28 Jan 2008 11:54:34 +0000 Subject: - added "runtime instrumentation" feature to ./configure - some more cleanup --- debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debug.h') diff --git a/debug.h b/debug.h index 565fa04d..a9891d84 100644 --- a/debug.h +++ b/debug.h @@ -96,20 +96,20 @@ void dbgSetThrdName(uchar *pszName); void dbgPrintAllDebugInfo(void); /* macros */ -#if 1 /* DEV debug: set to 1 to get a rough call trace -- rgerhards, 2008-01-13 */ +#ifdef RTINST # define BEGINfunc static dbgFuncDB_t dbgFuncDB=dbgFuncDB_t_INITIALIZER; int dbgCALLStaCK_POP_POINT = dbgEntrFunc(&dbgFuncDB,__LINE__); # define ENDfunc dbgExitFunc(&dbgFuncDB, dbgCALLStaCK_POP_POINT); #else # define BEGINfunc # define ENDfunc #endif -#if 1 /* DEV debug: set to 1 to enable -- rgerhards, 2008-01-13 */ +#ifdef RTINST # define RUNLOG dbgSetExecLocation(dbgCALLStaCK_POP_POINT, __LINE__); dbgprintf("%s:%d: %s: log point\n", __FILE__, __LINE__, __func__) # define RUNLOG_VAR(fmt, x) dbgSetExecLocation(dbgCALLStaCK_POP_POINT, __LINE__);\ dbgprintf("%s:%d: %s: var '%s'[%s]: " fmt "\n", __FILE__, __LINE__, __func__, #x, fmt, x) #else # define RUNLOG -# define RUNLOG_VAR(x) +# define RUNLOG_VAR(fmt, x) #endif /* mutex operations */ @@ -119,7 +119,7 @@ void dbgPrintAllDebugInfo(void); /* debug aides */ -#if 1 +#ifdef RTINST #define d_pthread_mutex_lock(x) dbgMutexLock(x, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #define d_pthread_mutex_unlock(x) dbgMutexUnlock(x, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) #define d_pthread_cond_wait(cond, mut) dbgCondWait(cond, mut, &dbgFuncDB, __LINE__, dbgCALLStaCK_POP_POINT ) -- cgit v1.2.3