Quiet constness warnings about string constants passed to REGISTER_LANGUAGE.
[charm.git] / src / conv-perf / traceCoreCommon.C
index 3660aa6a598a19e9ba55a535dbf243005e044c57..fb8d757fda292145820e33d2d770ee64a292b5e5 100644 (file)
@@ -1,5 +1,6 @@
 
 #include "traceCore.h"
+#include "traceCoreAPI.h"
 #include "traceCoreCommon.h"
 #include "charmProjections.h"
 //#include "ampiProjections.h"
@@ -78,12 +79,14 @@ extern "C" void endTraceCore(void) {}
 /* Tracing API 
  * Implementation of functions declared in traceCoreAPI.h 
  *****************************************************************/
-extern "C" void RegisterLanguage(int lID, char* ln)
-{ CpvAccess(_traceCore)->RegisterLanguage(lID, ln); }
+extern "C" void RegisterLanguage(int lID, const char* ln)
+{ LOGCONDITIONAL(CpvAccess(_traceCore)->RegisterLanguage(lID, ln)); }
 
 extern "C" void RegisterEvent(int lID, int eID)
-{ CpvAccess(_traceCore)->RegisterEvent(lID, eID); }
+{ LOGCONDITIONAL(CpvAccess(_traceCore)->RegisterEvent(lID, eID)); }
 
+/* These Log routines will segfault if called under CMK_OPTIMIZE;
+   the solution is to surround their callers with LOGCONDITIONAL. */
 extern "C" void LogEvent(int lID, int eID)
 { CpvAccess(_traceCore)->LogEvent(lID, eID); }