renamed CMK_TRACE_DISABLE to CMK_TRACE_ENABLE
authorGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Apr 2010 04:45:37 +0000 (23:45 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Tue, 27 Apr 2010 04:45:37 +0000 (23:45 -0500)
fixed a bug in charmconfig that failed to catch the --disable-error-checking option.

20 files changed:
src/ck-core/ck.C
src/ck-perf/trace-bluegene.h
src/ck-perf/trace-common.C
src/ck-perf/trace-converse.c
src/ck-perf/trace-projections.C
src/ck-perf/trace-projector.C
src/ck-perf/trace-summary.C
src/ck-perf/trace.h
src/conv-core/conv-config.h
src/conv-core/conv-trace.h
src/conv-core/convcore.c
src/conv-core/threads.c
src/conv-ldb/cldb.neighbor.c
src/conv-perf/traceCore.C
src/conv-perf/traceCoreAPI.h
src/conv-perf/traceCoreCommon.C
src/libs/ck-libs/ampi/ampi.C
src/scripts/configure
src/scripts/configure.in
src/scripts/conv-autoconfig.h.in

index 1ece270af443392a57a2be1e862d53b25609e476..edfb7c0ec8d5bfe1919b8cef088f1a69fab76794 100644 (file)
@@ -569,7 +569,7 @@ static inline void _invokeEntryNoTrace(int epIdx,envelope *env,void *obj)
 static inline void _invokeEntry(int epIdx,envelope *env,void *obj)
 {
 
-#if !CMK_TRACE_DISABLED 
+#if CMK_TRACE_ENABLED 
   if (_entryTable[epIdx]->traceEnabled) {
     _TRACE_BEGIN_EXECUTE(env);
     _invokeEntryNoTrace(epIdx,env,obj);
@@ -2331,7 +2331,7 @@ extern "C" void CthResumeNormalThreadDebug(CthThreadToken* token)
     free(token);
     return;
   }
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if ! CMK_TRACE_IN_CHARM
   if(CpvAccess(traceOn))
     CthTraceResume(t);
index 9777451e60c7f93ae90735552969728e66b17b65..064fad7c8932e038373b481789148a9db2b8fb80 100644 (file)
@@ -52,14 +52,14 @@ class TraceBluegene : public Trace {
 CkpvExtern(TraceBluegene*, _tracebg);
 extern int traceBluegeneLinked;
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #  define _TRACE_BG_ONLY(code) do{ BgGetTime(); if(traceBluegeneLinked && CpvAccess(traceOn)){ code; } resetVTime(); } while(0)
 #else
 #  define _TRACE_BG_ONLY(code) /*empty*/
 #endif
 
 /* tracing for Blue Gene - before trace projector era */
-#if !CMK_TRACE_DISABLED && CMK_TRACE_IN_CHARM
+#if CMK_TRACE_ENABLED && CMK_TRACE_IN_CHARM
 // for Sdag only
 // fixme - think of better api for tracing sdag code
 #define BgPrint(x)  _TRACE_BG_ONLY(CkpvAccess(_tracebg)->bgPrint(x))
index a6dd0dcc8a0a2cc1389c217dc20280a678ab3ee6..4a5c1b33b2d997773e5476b33384697b66418afc 100644 (file)
@@ -23,9 +23,9 @@
 
 CpvCExtern(int, _traceCoreOn);   // projector
 
-#if CMK_TRACE_DISABLED
+#if ! CMK_TRACE_ENABLED
 static int warned = 0;
-#define OPTIMIZE_WARNING if (!warned) { warned=1;  CmiPrintf("\n\n!!!! Warning: tracing not available with CMK_TRACE_DISABLED!\n");  return;  }
+#define OPTIMIZE_WARNING if (!warned) { warned=1;  CmiPrintf("\n\n!!!! Warning: tracing not available without CMK_TRACE_ENABLED!\n");  return;  }
 #else
 #define OPTIMIZE_WARNING /*empty*/
 #endif
@@ -250,7 +250,7 @@ void TraceArray::traceEndOnCommThread() {
 
 /*Install the beginIdle/endIdle condition handlers.*/
 extern "C" void traceBegin(void) {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   DEBUGF(("[%d] traceBegin called with %d at %f\n", CkMyPe(), CpvAccess(traceOn), TraceTimer()));
   
 #if CMK_SMP_TRACE_COMMTHREAD
@@ -270,7 +270,7 @@ extern "C" void traceBegin(void) {
 
 /*Cancel the beginIdle/endIdle condition handlers.*/
 extern "C" void traceEnd(void) {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   DEBUGF(("[%d] traceEnd called with %d at %f\n", CkMyPe(), CpvAccess(traceOn), TraceTimer()));
 
 #if CMK_SMP_TRACE_COMMTHREAD
@@ -286,7 +286,7 @@ if(CmiMyRank()==0){
        
   if (CpvAccess(traceOn)==0) return;
   if (CkpvAccess(_traces) == NULL) {
-    CmiPrintf("Warning: did you mix compilation with and without -DCMK_TRACE_DISABLED? \n");
+    CmiPrintf("Warning: did you mix compilation with and without -DCMK_TRACE_ENABLED? \n");
   }
   CkpvAccess(_traces)->traceEnd();
   CpvAccess(traceOn) = 0;
@@ -377,7 +377,7 @@ extern "C" void traceCharmInit(char **argv)
 #endif
 }
 
-// CMK_TRACE_DISABLED is already guarded in convcore.c
+// CMK_TRACE_ENABLED is already guarded in convcore.c
 extern "C"
 void traceMessageRecv(char *msg, int pe)
 {
@@ -386,7 +386,7 @@ void traceMessageRecv(char *msg, int pe)
 #endif
 }
 
-// CMK_TRACE_DISABLED is already guarded in convcore.c
+// CMK_TRACE_ENABLED is already guarded in convcore.c
 // converse thread tracing is not supported in blue gene simulator
 // in BigSim, threads need to be traced manually (because virtual processors
 // themselves are implemented as threads and we don't want them to be traced
@@ -414,7 +414,7 @@ void traceAwaken(CthThread t)
 extern "C"
 void traceUserEvent(int e)
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   if (CpvAccess(traceOn))
     CkpvAccess(_traces)->userEvent(e);
 #endif
@@ -423,7 +423,7 @@ void traceUserEvent(int e)
 extern "C"
 void traceUserBracketEvent(int e, double beginT, double endT)
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   if (CpvAccess(traceOn) && CkpvAccess(_traces))
     CkpvAccess(_traces)->userBracketEvent(e, beginT, endT);
 #endif
@@ -432,7 +432,7 @@ void traceUserBracketEvent(int e, double beginT, double endT)
 extern "C"
 void traceUserSuppliedData(int d)
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   if (CpvAccess(traceOn) && CkpvAccess(_traces))
     CkpvAccess(_traces)->userSuppliedData(d);
 #endif
@@ -441,7 +441,7 @@ void traceUserSuppliedData(int d)
 extern "C"
 void traceUserSuppliedNote(char * note)
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   if (CpvAccess(traceOn) && CkpvAccess(_traces))
     CkpvAccess(_traces)->userSuppliedNote(note);
 #endif
@@ -452,7 +452,7 @@ extern "C"
 void traceUserSuppliedBracketedNote(char *note, int eventID, double bt, double et)
 {
   //CkPrintf("traceUserSuppliedBracketedNote(char *note, int eventID, double bt, double et)\n");
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   if (CpvAccess(traceOn) && CkpvAccess(_traces))
     CkpvAccess(_traces)->userSuppliedBracketedNote(note, eventID, bt, et);
 #endif
@@ -462,7 +462,7 @@ void traceUserSuppliedBracketedNote(char *note, int eventID, double bt, double e
 extern "C"
 void traceMemoryUsage()
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   double d = CmiMemoryUsage()*1.0;
 
   if (CpvAccess(traceOn) && CkpvAccess(_traces))
@@ -495,7 +495,7 @@ void (*registerMachineUserEvents())() {
 extern "C"
 int traceRegisterUserEvent(const char*x, int e)
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   return CkpvAccess(_traces)->traceRegisterUserEvent(x, e);
 #else
   return 0;
@@ -579,7 +579,7 @@ int CkIsCharmMessage(char *msg)
 // return 1 if any one of tracing modules is linked.
 int  traceAvailable()
 {
-#if CMK_TRACE_DISABLED
+#if ! CMK_TRACE_ENABLED
   return 0;
 #else
   return CkpvAccess(_traces)->length()>0;
@@ -613,7 +613,7 @@ void registerFunction(char *name){
 
 extern "C"
 int traceRegisterFunction(const char* name, int idx) {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   if(idx==-999){
     CkpvAccess(_traces)->regFunc(name, idx);
   } else {
index 28a4b8f63a7d314761574f697962dbbf504652ea..cb9e5129fb4745fd5f8026814f86bcf035446490 100644 (file)
@@ -18,7 +18,7 @@ int traceBluegeneLinked = 0;
 void traceInit(char **argv) {
   CpvInitialize(int, traceOn);
   CpvAccess(traceOn)=0;
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   CpvInitialize(int, _traceCoreOn); 
   CpvAccess(_traceCoreOn)=0; 
   /* initTraceCore(argv); */
index f786ab1d1aba412d3ec317caba193103dc6eb214..48b4c3caa5035bf920f454256e6ddf29d8538ee7 100644 (file)
@@ -82,14 +82,14 @@ void flushTraceLog()
   CkpvAccess(_trace)->traceFlushLog();
 }
 
-#if CMK_TRACE_DISABLED
+#if ! CMK_TRACE_ENABLED
 static int warned=0;
 #define OPTIMIZED_VERSION      \
        if (!warned) { warned=1;        \
        CmiPrintf("\n\n!!!! Warning: traceUserEvent not available in optimized version!!!!\n\n\n"); }
 #else
 #define OPTIMIZED_VERSION /*empty*/
-#endif // CMK_TRACE_DISABLED
+#endif // CMK_TRACE_ENABLED
 
 /*
 On T3E, we need to have file number control by open/close files only when needed.
@@ -171,7 +171,7 @@ void traceThreadListener_free(struct CthThreadListener *l)
 
 void TraceProjections::traceAddThreadListeners(CthThread tid, envelope *e)
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   /* strip essential information from the envelope */
   TraceThreadListener *a= new TraceThreadListener;
   
@@ -1690,7 +1690,7 @@ void registerOutlierReduction() {
 // FIXME: WHY extern "C"???
 extern "C" void TraceProjectionsExitHandler()
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   // CkPrintf("[%d] TraceProjectionsExitHandler called!\n", CkMyPe());
   CProxy_TraceProjectionsBOC bocProxy(traceProjectionsGID);
   bocProxy.traceProjectionsParallelShutdown(CkMyPe());
index 4b41a7f167890de679ef01ec8b56accdf3ea0018..7e3b3be9073686b56a328ffaf36dae6cc890c675 100644 (file)
@@ -17,7 +17,7 @@ typedef CkVec<UsrEvent *>   UsrEventVec;
 CkpvStaticDeclare(UsrEventVec, usrEvents);
 
 
-#if CMK_TRACE_DISABLED
+#if ! CMK_TRACE_ENABLED
 static int warned=0;
 #define OPTIMIZED_VERSION      \
        if (!warned) { warned=1;        \
index 7a9f6b8e8ea55646e88b8f287cdd8d5d8e074a4d..a85802c46e6567be3c52d322d12796e877c23cbf 100644 (file)
@@ -1166,7 +1166,7 @@ void TraceSummaryBOC::write(void)
 
 extern "C" void CombineSummary()
 {
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   CmiPrintf("[%d] CombineSummary called!\n", CkMyPe());
   if (sumonly) {
     CmiPrintf("[%d] Sum Only start!\n", CkMyPe());
index 50d2fcb4b80ca0e7c563df900d9286209f7f0efb..7ce7114c5b7095a1fa731877d99ced2943915579 100644 (file)
@@ -284,7 +284,7 @@ public:
 
 CkpvExtern(TraceArray*, _traces);
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if CMK_BLUEGENE_CHARM
 extern void    resetVTime();
 #  define _TRACE_ONLY(code) do{ BgGetTime(); if(CpvAccess(traceOn) && CkpvAccess(_traces)->length()>0) { code; }  resetVTime(); } while(0)
index 8e0b9cc4f6bb744e6351e91ad0b38b0e54707df6..a3ba926fd9e24288abdd8d9d8a63195b38878827 100644 (file)
@@ -92,8 +92,8 @@
 #define  CMK_CHARMDEBUG             0
 #endif
 
-#ifndef CMK_TRACE_DISABLED
-#define CMK_TRACE_DISABLED          0
+#ifndef CMK_TRACE_ENABLED
+#define CMK_TRACE_ENABLED          1
 #endif
 
 #endif
index 2069fdb8e62b625fa4be7c67d42fd1aa0a724d14..bbbb1ac921a50dd9ad1768ac58f9f9997c5316ec 100644 (file)
@@ -53,7 +53,7 @@ void traceEnd(void);
 void traceWriteSts(void);
 void traceFlushLog(void);
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 CpvExtern(int, traceOn);
 #define traceIsOn()  (CpvAccess(traceOn))
 #else 
index 9ba99b4b9e911c399ae7fa5705c6edba0d9c0909..5222fc202b6a854ab88674f1967bb53c9fe2d05b 100644 (file)
@@ -1405,7 +1405,7 @@ void CmiHandleMessage(void *msg)
        CpvAccess(cQdState)->mProcessed++;
 */
        CmiHandlerInfo *h;
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
        CmiUInt2 handler=CmiGetHandler(msg); /* Save handler for use after msg is gone */
        _LOG_E_HANDLER_BEGIN(handler); /* projector */
        /* setMemoryStatus(1) */ /* charmdebug */
@@ -1422,7 +1422,7 @@ void CmiHandleMessage(void *msg)
 
        h=&CmiGetHandlerInfo(msg);
        (h->hdlr)(msg,h->userPtr);
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
        /* setMemoryStatus(0) */ /* charmdebug */
        _LOG_E_HANDLER_END(handler);    /* projector */
 #endif
@@ -1745,7 +1745,7 @@ void CthResumeNormalThread(CthThreadToken* token)
     free(token);
     return;
   }
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if ! CMK_TRACE_IN_CHARM
   if(CpvAccess(traceOn))
     CthTraceResume(t);
@@ -1773,7 +1773,7 @@ void CthResumeSchedulingThread(CthThreadToken  *token)
     CpvAccess(CthSleepingStandins) = me;
   }
   CpvAccess(CthSchedulingThread) = t;
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if ! CMK_TRACE_IN_CHARM
   if(CpvAccess(traceOn))
     CthTraceResume(t);
@@ -3231,7 +3231,7 @@ void ConverseCommonInit(char **argv)
    }
 #endif
        
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   traceInit(argv);
 /*initTraceCore(argv);*/ /* projector */
 #endif
@@ -3280,7 +3280,7 @@ void ConverseCommonExit(void)
 {
   CcsImpl_kill();
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   traceClose();
 /*closeTraceCore();*/ /* projector */
 #endif
index 62baf385c025ee8877d8b5c039746611f5d96ed9..91f874a89ce14114db0150e7a951e1e98a39e49b 100644 (file)
@@ -682,7 +682,7 @@ void CthSuspend(void)
     CmiAbort("A thread's scheduler should not be less than 0!\n");
 #endif    
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if !CMK_TRACE_IN_CHARM
   if(CpvAccess(traceOn))
     traceSuspend();
@@ -701,7 +701,7 @@ void CthAwaken(CthThread th)
     return;
   } */
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if ! CMK_TRACE_IN_CHARM
   if(CpvAccess(traceOn))
     traceAwaken(th);
@@ -722,7 +722,7 @@ void CthYield()
 void CthAwakenPrio(CthThread th, int s, int pb, unsigned int *prio)
 {
   if (B(th)->awakenfn == 0) CthNoStrategy();
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
 #if ! CMK_TRACE_IN_CHARM
   if(CpvAccess(traceOn))
     traceAwaken(th);
index 0828e3a386f5d48dd567a6573725e2b36f4a355d..a4c06776b0b084636b53c881d44308a7444c4daa 100644 (file)
@@ -88,7 +88,7 @@ static void CldStillIdle(void *dummy, double curT)
 #endif
   cldData->sent = 1;
 
-#if ! CMK_TRACE_DISABLED && TRACE_USEREVENTS
+#if CMK_TRACE_ENABLED && TRACE_USEREVENTS
   traceUserBracketEvent(cldData->idleEvt, now, CmiWallTimer());
 #endif
 }
@@ -124,7 +124,7 @@ static void CldAskLoadHandler(requestmsg *msg)
     CpvAccess(neighbors)[i].load += sendLoad;
     CldMultipleSend(receiver, sendLoad, rank, 0);
 #if 0
-#if ! CMK_TRACE_DISABLED && TRACE_USEREVENTS
+#if CMK_TRACE_ENABLED && TRACE_USEREVENTS
     /* this is dangerous since projections logging is not thread safe */
     {
     CldProcInfo  cldData = CpvAccessOther(CldData, rank);
@@ -210,7 +210,7 @@ void CldBalance(void *dummy, double curT)
   int i, j, overload, numToMove=0, avgLoad;
   int totalUnderAvg=0, numUnderAvg=0, maxUnderAvg=0;
 
-#if !CMK_TRACE_DISABLED && TRACE_USEREVENTS
+#if CMK_TRACE_ENABLED && TRACE_USEREVENTS
   double startT = curT;
 #endif
 
@@ -254,7 +254,7 @@ void CldBalance(void *dummy, double curT)
       }
   }
   CldSendLoad();
-#if !CMK_TRACE_DISABLED && TRACE_USEREVENTS
+#if CMK_TRACE_ENABLED && TRACE_USEREVENTS
   traceUserBracketEvent(CpvAccess(CldData)->balanceEvt, startT, CmiWallTimer());
 #endif
   CcdCallFnAfterOnPE((CcdVoidFn)CldBalance, NULL, PERIOD, CmiMyPe());
@@ -530,7 +530,7 @@ void CldGraphModuleInit(char **argv)
   CpvAccess(CldData) = (CldProcInfo)CmiAlloc(sizeof(struct CldProcInfo_s));
   CpvAccess(CldData)->lastCheck = -1;
   CpvAccess(CldData)->sent = 0;
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   CpvAccess(CldData)->balanceEvt = traceRegisterUserEvent("CldBalance", -1);
   CpvAccess(CldData)->idleEvt = traceRegisterUserEvent("CldBalanceIdle", -1);
   CpvAccess(CldData)->idleprocEvt = traceRegisterUserEvent("CldBalanceProcIdle", -1);
index 23c194f2679c11dcf4cfd07b4898b4877828d977..37d934578bc728cec1c039d594a4578ad7260b93 100644 (file)
@@ -185,7 +185,7 @@ void TraceCore::LogEvent(int lID, int eID, int iLen, const int* iData,double t){
                return;
        }
        CmiPrintf("TraceCore LogEvent called \n");
-#if ! CMK_TRACE_DISABLED       
+#if CMK_TRACE_ENABLED  
        int *iDataalloc;
        if(iLen != 0){
                iDataalloc = (int *)malloc(iLen*sizeof(int));
@@ -216,7 +216,7 @@ void TraceCore::LogEvent(int lID, int eID, int iLen, const int* iData, int sLen,
        }
                
 
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
        int *iDataalloc;
        char *sDataalloc;
        if(iLen != 0){
index 4d317bc8d443a6f705e6318b19ef21a059ad3c2d..739eeddea815d0f86e1c6f6ed87ac70d40828791 100644 (file)
@@ -7,7 +7,7 @@ CpvCExtern(int,_traceCoreOn);
 extern "C" {
 #endif
 /* Tracing API */
-#if CMK_TRACE_IN_CHARM || CMK_TRACE_DISABLED
+#if CMK_TRACE_IN_CHARM || ! CMK_TRACE_ENABLED
 #define LOGCONDITIONAL(x) 
 #else 
 #define LOGCONDITIONAL(x) do { if(CpvAccess(_traceCoreOn)!=0){ \
index 9feadbed80ffbd63e6f06c2992e1b00a834b1093..b57c514b2d04cc1dc5762ac00fa5a2b86ae6eb46 100644 (file)
@@ -85,7 +85,7 @@ extern "C" void RegisterLanguage(int lID, const char* ln)
 extern "C" void RegisterEvent(int lID, int eID)
 { LOGCONDITIONAL(CpvAccess(_traceCore)->RegisterEvent(lID, eID)); }
 
-/* These Log routines will segfault if called under CMK_TRACE_DISABLED;
+/* These Log routines will segfault if called under ! CMK_TRACE_ENABLED;
    the solution is to surround their callers with LOGCONDITIONAL. */
 extern "C" void LogEvent(int lID, int eID)
 { CpvAccess(_traceCore)->LogEvent(lID, eID); }
index 8885aaa1d125e8abc0c49c379e0b01300c51f76d..dd0f464ff812c0e0e9e0ba7f7dda6124a24d7c19 100644 (file)
@@ -1876,7 +1876,7 @@ ampi::delesend(int t, int sRank, const void* buf, int count, int type,  int rank
   arrproxy[destIdx].generic(makeAmpiMsg(destIdx,t,sRank,buf,count,type,destcomm,sync));
 
 #if 0
-#if ! CMK_TRACE_DISABLED
+#if CMK_TRACE_ENABLED
   int size=0;
   MPI_Type_size(type,&size);
   _LOG_E_AMPI_MSG_SEND(t,destIdx,count,size)
index 7c42a0f829418af2d0395e432c75e3de145be154..eca6ac9f76d3928a54ca0fa0ab48c2f0c3ddef77 100755 (executable)
@@ -1641,13 +1641,13 @@ Echo() {
 # enable/disable error checking
 # Check whether --enable-error-checking was given.
 if test "${enable_error_checking+set}" = set; then
-  enableval=$enable_error_checking; enable_errorchecking=$enableval
+  enableval=$enable_error_checking;
 else
-  enable_errorchecking=yes
+  enable_error_checking=yes
 fi
 
 
-if test "$enable_errorchecking" = "no"
+if test "$enable_error_checking" = "no"
 then
   Echo "Error checking is disabled"
 
@@ -1666,7 +1666,7 @@ fi
 # check enable/disable
 # Check whether --enable-tracing was given.
 if test "${enable_tracing+set}" = set; then
-  enableval=$enable_tracing; enable_tracing=$enableval
+  enableval=$enable_tracing;
 else
   enable_tracing=yes
 fi
@@ -1677,14 +1677,20 @@ then
   Echo "Charm tracing is disabled"
 
 cat >>confdefs.h <<_ACEOF
-#define CMK_TRACE_DISABLED 1
+#define CMK_TRACE_ENABLED 0
+_ACEOF
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define CMK_TRACE_ENABLED 1
 _ACEOF
 
 fi
 
 # Check whether --enable-charmdebug was given.
 if test "${enable_charmdebug+set}" = set; then
-  enableval=$enable_charmdebug; enable_charmdebug=$enableval
+  enableval=$enable_charmdebug;
 else
   enable_charmdebug=yes
 fi
index 0874a572160d50b43f7a345a0976f512467e169f..30b9e9abaf874ae653ec98725f0322adf3eeb077 100644 (file)
@@ -22,11 +22,10 @@ Echo() {
 # enable/disable error checking
 AC_ARG_ENABLE([error-checking],
             [AS_HELP_STRING([--enable-error-checking],
-              [enable error checking])],
-            [enable_errorchecking=$enableval],
-            [enable_errorchecking=yes])
+              [enable error checking])], ,
+            [enable_error_checking=yes])
 
-if test "$enable_errorchecking" = "no"
+if test "$enable_error_checking" = "no"
 then
   Echo "Error checking is disabled" 
   AC_DEFINE_UNQUOTED(CMK_ERROR_CHECKING, 0, [disable error checking])
@@ -37,20 +36,20 @@ fi
 # check enable/disable
 AC_ARG_ENABLE([tracing],
             [AS_HELP_STRING([--enable-tracing],
-              [enable tracing modules])],
-            [enable_tracing=$enableval],
+              [enable tracing modules])], ,
             [enable_tracing=yes])
 
 if test "$enable_tracing" = "no"
 then
   Echo "Charm tracing is disabled"
-  AC_DEFINE_UNQUOTED(CMK_TRACE_DISABLED, 1, [disable tracing])
+  AC_DEFINE_UNQUOTED(CMK_TRACE_ENABLED, 0, [disable tracing])
+else
+  AC_DEFINE_UNQUOTED(CMK_TRACE_ENABLED, 1, [disable tracing])
 fi
 
 AC_ARG_ENABLE([charmdebug],
             [AS_HELP_STRING([--enable-charmdebug],
-              [enable charmDebug])],
-            [enable_charmdebug=$enableval],
+              [enable charmDebug])], ,
             [enable_charmdebug=yes])
 
 if test "$enable_charmdebug" = "no"
index 06c4cb85c36e4a6035700074f958a47e6a18cda5..238c474eb892e9a25e80673ccf28b45c2925a674 100644 (file)
 #undef CMK_TLS_THREAD
 
 /* disable tracing */
-#undef CMK_TRACE_DISABLED
+#undef CMK_TRACE_ENABLED
 
 /* whether glibc backtrace works */
 #undef CMK_USE_BACKTRACE