Changed CCS strings to comply to a predefined format (described in my thesis)
authorFilippo Gioachin <gioachin@uiuc.edu>
Sat, 16 Oct 2010 02:55:32 +0000 (21:55 -0500)
committerFilippo Gioachin <gioachin@uiuc.edu>
Sat, 16 Oct 2010 02:55:32 +0000 (21:55 -0500)
src/ck-core/debug-charm.C
src/ck-core/debug-charm.h
src/conv-ccs/ccs-builtins.C
src/conv-core/debug-conv.c

index fa3afbc45fa4dc7f257609d44fb64ed8c4815e9c..d9d1e3f9099a7160ea919dbae8ce003ce9682d14 100644 (file)
@@ -1035,30 +1035,29 @@ extern "C" {
 
 void CpdCharmInit()
 {
-  CpdListRegister(new CpdListAccessor_c("converse/memory",cpd_memory_length,0,cpd_memory_pup,0));
-  //CpdListRegister(new CpdListAccessor_c("converse/memory/leak",cpd_memory_length,0,cpd_memory_leak,0));
-  CpdListRegister(new CpdListAccessor_c("converse/memory/data",cpd_memory_getLength,0,cpd_memory_get,0,false));
+  CpdListRegister(new CpdListAccessor_c("memory/list",cpd_memory_length,0,cpd_memory_pup,0));
+  CpdListRegister(new CpdListAccessor_c("memory/data",cpd_memory_getLength,0,cpd_memory_get,0,false));
 
   //CpdBreakPointInit();
-  CcsRegisterHandler("ccs_set_break_point",(CmiHandler)CpdSetBreakPoint);
-  CcsSetMergeFn("ccs_set_break_point",CcsMerge_logical_and);
-  CcsRegisterHandler("ccs_remove_break_point",(CmiHandler)CpdRemoveBreakPoint);
-  CcsSetMergeFn("ccs_remove_break_point",CcsMerge_logical_and);
-  CcsRegisterHandler("ccs_remove_all_break_points",(CmiHandler)CpdRemoveAllBreakPoints);
-  CcsSetMergeFn("ccs_remove_all_break_points",CmiReduceMergeFn_random);
-  CcsRegisterHandler("ccs_continue_break_point",(CmiHandler)CpdContinueFromBreakPoint);
-  CcsSetMergeFn("ccs_continue_break_point",CmiReduceMergeFn_random);
-  CcsRegisterHandler("ccs_single_step",(CmiHandler)CpdDeliverSingleMessage);
-  CcsSetMergeFn("ccs_single_step",CmiReduceMergeFn_random);
-  CcsRegisterHandler("ccs_debug_quit",(CmiHandler)CpdQuitDebug);
-  CcsSetMergeFn("ccs_debug_quit",CmiReduceMergeFn_random);
-  CcsRegisterHandler("ccs_debug_startgdb",(CmiHandler)CpdStartGdb);
+  CcsRegisterHandler("debug/charm/bp/set",(CmiHandler)CpdSetBreakPoint);
+  CcsSetMergeFn("debug/charm/bp/set",CcsMerge_logical_and);
+  CcsRegisterHandler("debug/charm/bp/remove",(CmiHandler)CpdRemoveBreakPoint);
+  CcsSetMergeFn("debug/charm/bp/remove",CcsMerge_logical_and);
+  CcsRegisterHandler("debug/charm/bp/removeall",(CmiHandler)CpdRemoveAllBreakPoints);
+  CcsSetMergeFn("debug/charm/bp/removeall",CmiReduceMergeFn_random);
+  CcsRegisterHandler("debug/charm/continue",(CmiHandler)CpdContinueFromBreakPoint);
+  CcsSetMergeFn("debug/charm/continue",CmiReduceMergeFn_random);
+  CcsRegisterHandler("debug/charm/next",(CmiHandler)CpdDeliverSingleMessage);
+  CcsSetMergeFn("debug/charm/next",CmiReduceMergeFn_random);
+  CcsRegisterHandler("debug/converse/quit",(CmiHandler)CpdQuitDebug);
+  CcsSetMergeFn("debug/converse/quit",CmiReduceMergeFn_random);
+  CcsRegisterHandler("debug/converse/startgdb",(CmiHandler)CpdStartGdb);
   CpdListRegister(new CpdListAccessor_c("hostinfo",hostInfoLength,0,hostInfo,0));
   CpdListRegister(new CpdList_localQ());
-  CcsRegisterHandler("deliverMessage",(CmiHandler)CpdDeliverMessage);
-  CcsRegisterHandler("deliverConditional",(CmiHandler)CpdDeliverMessageConditionally);
-  CcsRegisterHandler("endConditional",(CmiHandler)CpdEndConditionalDelivery);
-  CcsRegisterHandler("commitConditional",(CmiHandler)CpdCommitConditionalDelivery);
+  CcsRegisterHandler("debug/charm/deliver",(CmiHandler)CpdDeliverMessage);
+  CcsRegisterHandler("debug/provisional/deliver",(CmiHandler)CpdDeliverMessageConditionally);
+  CcsRegisterHandler("debug/provisional/rollback",(CmiHandler)CpdEndConditionalDelivery);
+  CcsRegisterHandler("debug/provisional/commit",(CmiHandler)CpdCommitConditionalDelivery);
   CpdListRegister(new CpdList_arrayElementNames());
   CpdListRegister(new CpdList_arrayElements());
   CpdListRegister(new CpdList_objectNames());
index 3ee5210445e517d02a46dc130461d038e9f51763..23629b9fcba00fe3c1bc73f2d4558fff5ee663d3 100644 (file)
@@ -15,7 +15,7 @@
 #include "cklists.h"
 
 #define CHARMDEBUG_MAJOR   10
-#define CHARMDEBUG_MINOR    5
+#define CHARMDEBUG_MINOR    6
 
 void *CpdGetCurrentObject();
 void *CpdGetCurrentMsg();
index a4f687dd55c9ab5b4c636a1e1d302d34101232af..080d49186fd712dcd6837652781a12cffb45f2af 100644 (file)
@@ -406,7 +406,7 @@ static void CpdListInit(void) {
   CcsRegisterHandler("ccs_list_items.txt",(CmiHandler)CpdList_ccs_list_items_txt);
   CcsRegisterHandler("ccs_list_items.fmt",(CmiHandler)CpdList_ccs_list_items_fmt);
   CcsRegisterHandler("ccs_list_items.set",(CmiHandler)CpdList_ccs_list_items_set);
-  CcsRegisterHandler("ccs_machine_architecture",(CmiHandler)CpdMachineArchitecture);
+  CcsRegisterHandler("debug/converse/arch",(CmiHandler)CpdMachineArchitecture);
 }
 
 #if CMK_WEB_MODE
index 44b710c75ae295534c88b9dc317ff7613b70e15a..f1bfb6f34da79dd41ad6bf79b6ddc7306873719b 100644 (file)
@@ -199,39 +199,19 @@ static void CpdDebugCallMemStat(char *msg) {
   CmiFree(msg);
 }
 
-static void CpdDebugHandler(char *msg)
-{
-    char name[128];
-    sscanf(msg+CmiReservedHeaderSize, "%s", name);
-
-    if (strcmp(name, "freeze") == 0) {
-      CpdFreeze();
-    }
-    else if (strcmp(name, "unfreeze") == 0) {
-      CpdUnFreeze();
-    }
-    else if (strncmp(name, "step", strlen("step")) == 0){
-      /*CmiPrintf("step received\n");*/
-      CpvAccess(stepFlag) = 1;
-      CpdUnFreeze();
-    }
-    else if (strncmp(name, "continue", strlen("continue")) == 0){
-      /*CmiPrintf("continue received\n");*/
-      CpvAccess(continueFlag) = 1;
-      CpdUnFreeze();
-    }
-#if ! CMK_NO_SOCKETS
-    else if (strncmp(name, "status", strlen("status")) == 0) {
-      ChMessageInt_t reply[2];
-      reply[0] = ChMessageInt_new(CmiMyPe());
-      reply[1] = ChMessageInt_new(CpdIsFrozen() ? 0 : 1);
-      CcsSendReply(2*sizeof(ChMessageInt_t), reply);
-    }
+static void CpdDebugHandlerStatus(char *msg) {
+#if ! CMK_NO_SOCKETS    
+  ChMessageInt_t reply[2];
+  reply[0] = ChMessageInt_new(CmiMyPe());
+  reply[1] = ChMessageInt_new(CpdIsFrozen() ? 0 : 1);
+  CcsSendReply(2*sizeof(ChMessageInt_t), reply);
 #endif
-    else{
-      CmiPrintf("bad debugger command:%s received,len=%ld\n",name,strlen(name));
-    }
-    CmiFree(msg);
+  CmiFree(msg);
+}
+
+static void CpdDebugHandlerFreeze(char *msg) {
+  CpdFreeze();
+  CmiFree(msg);
 }
 
 
@@ -327,25 +307,26 @@ void CpdInit(void)
   CpvInitialize(void *, conditionalQueue);
   CpvAccess(conditionalQueue) = CdsFifo_Create();
   
-  CcsRegisterHandler("ccs_debug", (CmiHandler)CpdDebugHandler);
-  CcsSetMergeFn("ccs_debug", CcsMerge_concat);
+  CcsRegisterHandler("debug/converse/freeze", (CmiHandler)CpdDebugHandlerFreeze);
+  CcsRegisterHandler("debug/converse/status", (CmiHandler)CpdDebugHandlerStatus);
+  CcsSetMergeFn("debug/converse/status", CcsMerge_concat);
 
-  CcsRegisterHandler("ccs_debug_allocationTree", (CmiHandler)CpdDebugCallAllocationTree);
+  CcsRegisterHandler("debug/memory/allocationTree", (CmiHandler)CpdDebugCallAllocationTree);
   CpvInitialize(int, CpdDebugCallAllocationTree_Index);
   CpvAccess(CpdDebugCallAllocationTree_Index) = CmiRegisterHandler((CmiHandler)CpdDebugCallAllocationTree);
   
-  CcsRegisterHandler("ccs_debug_memStat", (CmiHandler)CpdDebugCallMemStat);
+  CcsRegisterHandler("debug/memory/stat", (CmiHandler)CpdDebugCallMemStat);
   CpvInitialize(int, CpdDebugCallMemStat_Index);
   CpvAccess(CpdDebugCallMemStat_Index) = CmiRegisterHandler((CmiHandler)CpdDebugCallMemStat);
 
-  CcsRegisterHandler("converse_memory_leak",(CmiHandler)CpdSearchLeaks);
+  CcsRegisterHandler("debug/memory/leak",(CmiHandler)CpdSearchLeaks);
   CpvInitialize(int, CpdSearchLeaks_Index);
   CpvAccess(CpdSearchLeaks_Index) = CmiRegisterHandler((CmiHandler)CpdSearchLeaks);
   CpvInitialize(int, CpdSearchLeaksDone_Index);
   CpvAccess(CpdSearchLeaksDone_Index) = CmiRegisterHandler((CmiHandler)CpdSearchLeaksDone);
   
-  CcsRegisterHandler("converse_memory_mark",(CmiHandler)CpdMemoryMarkClean);
-  CcsSetMergeFn("converse_memory_mark", CcsMerge_concat);
+  CcsRegisterHandler("debug/memory/mark",(CmiHandler)CpdMemoryMarkClean);
+  CcsSetMergeFn("debug/memory/mark", CcsMerge_concat);
 
   _debugHandlerIdx = CmiRegisterHandler((CmiHandler)handleDebugMessage);
 #if 0