Merge branch 'charm' of charmgit:charm into charm
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 18 Oct 2010 07:28:09 +0000 (02:28 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 18 Oct 2010 07:28:09 +0000 (02:28 -0500)
src/ck-perf/tracef.C

index ab96f810eac10f1fd6e4d00610a83f09adc1c2be..249dbce3db99ffa8ff2c3dd8a46c183a235c9fe9 100644 (file)
@@ -37,6 +37,8 @@ FDECL {
 #define ftraceBeginFunc                 FTN_NAME(FTRACEBEGINFUNC,ftracebeginfunc)
 #define ftraceEndFunc           FTN_NAME(FTRACEENDFUNC,ftraceendfunc)
 
+#define fbgprintf               FTN_NAME(FBGPRINTF, fbgprintf)
+
 void ftracebegin()
 {
           checkInit();
@@ -101,6 +103,17 @@ void ftraceEndFunc(int *idx){
        traceEndFuncIndexProj(*idx);
 }
 
+#if CMK_BLUEGENE_CHARM
+void fbgprintf(char *str, int len)
+{
+  char *newstr = new char[len + 1];
+  _MEMCHECK(newstr);
+  strncpy(newstr, str, len);
+  newstr[len] = 0;
+  BgPrintf(newstr);
+  delete [] newstr;
+}
+#endif
 
 }  // FDECL