Merge branch 'charm' of charmgit:charm into charm
authorGengbin Zheng <gzheng@illinois.edu>
Sun, 17 Oct 2010 00:48:30 +0000 (19:48 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Sun, 17 Oct 2010 00:48:30 +0000 (19:48 -0500)
smart-build.pl
src/arch/lapi/cc-mpcc64.sh
src/ck-core/debug-charm.C
src/ck-core/debug-charm.h
src/ck-perf/trace-converse.c
src/conv-ccs/ccs-builtins.C
src/conv-core/debug-conv.c
src/langs/charj/src/charj/translator/Charj.g

index d6259ab1a7ffca31b1c2acdc613625b4c28d5215..69d3f766b6dd8b59925b97795e1a18571ed0eef4 100755 (executable)
@@ -431,9 +431,9 @@ print << "EOF";
        
 Choose a set of compiler flags [1-5]
        1) none
-       2) debug                      -g -O0
-       3) optimized [default]        -O2
-       4) optimized no projections   -O2 -DCMK_OPTIMIZE
+       2) debug mode                        -g -O0
+       3) production build [default]        --with-production
+       4) production build w/ projections   --with-production --enable-tracing
        5) custom
        
 EOF
@@ -448,10 +448,10 @@ while($line = <>){
                $compiler_flags = "-g -O0";
                last;
        } elsif($line eq "4" ){
-               $compiler_flags = "-O2 -DCMK_OPTIMIZE";
+               $compiler_flags = "--with-production --enable-tracing";
                last;
        } elsif($line eq "3" || $line eq ""){ 
-                $compiler_flags = "-O2"; 
+                $compiler_flags = "--with-production";
                 last; 
         }  elsif($line eq "5"){
 
index 0c73ce36d6ff978cf173f89c56a149dea35dde9d..35b5eb2efdb9eb023dee2aa8cbcc80e79592844e 100644 (file)
@@ -10,8 +10,8 @@ CMK_SEQ_LDXX='xlC_r -q64'
 CMK_CF77='mpxlf_r -q64 '
 CMK_CF90='mpxlf90_r -q64 -qsuffix=f=f90' 
 CMK_CF90_FIXED='mpxlf90_r -q64 ' 
-CMK_C_OPTIMIZE='-O3 -qstrict - '
-CMK_CXX_OPTIMIZE='-O3 -qstrict -Q '
+CMK_C_OPTIMIZE='-O3 -qstrict -qnohot '
+CMK_CXX_OPTIMIZE='-O3 -qstrict -qnohot '
 CMK_AR='ar -X 64 cq'
 CMK_QT='aix64'
 CMK_NM='nm -X 64'
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 b7961bb9f85c2a21b3abfba892fd7add88f1e1be..92842cab94a2614b9f64a22f5aaa6ea284dde08e 100644 (file)
@@ -52,3 +52,7 @@ void traceUserSuppliedNote(char *note) {}
    Here is a place where it gets included only in converse, and not in Charm++ (thus not generating conflicts). */
 void EmergencyExit(void) {}
 void CpdEndConditionalDeliver_master() {}
+
+
+int _lb_version;
+
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
index 261e80e5f3a65755c1dcf99edcbf64f721a5e42e..9da829872543e5b1410889b6225d719c8555f18d 100644 (file)
@@ -349,23 +349,37 @@ typeList
     ;
 
 classScopeDeclaration
-    :   modifierList?
-        (   genericTypeParameterList?
-            (   type IDENT formalParameterList (';' | block)
-                ->  ^(FUNCTION_METHOD_DECL modifierList? genericTypeParameterList? type IDENT
-                    formalParameterList block?)
-            |   ident=IDENT formalParameterList block
-                ->  ^(CONSTRUCTOR_DECL[$ident, "CONSTRUCTOR_DECL"] modifierList? genericTypeParameterList? IDENT
-                        formalParameterList block)
-            )
-        |   type IDENT formalParameterList divconBlock
-            ->  ^(DIVCON_METHOD_DECL modifierList? type IDENT formalParameterList divconBlock)
-        |   simpleType classFieldDeclaratorList ';'
-            ->  ^(PRIMITIVE_VAR_DECLARATION modifierList? simpleType classFieldDeclaratorList)
-        |   objectType classFieldDeclaratorList ';'
-            ->  ^(OBJECT_VAR_DECLARATION modifierList? objectType classFieldDeclaratorList)
-        )
-    ;
+    :   functionMethodDeclaration
+       |       constructorDeclaration
+       |       divconMethodDeclaration
+       |       primitiveVariableDeclaration
+       |       objectVariableDeclaration
+    ;
+
+functionMethodDeclaration
+       :       modifierList? genericTypeParameterList? type IDENT formalParameterList (';' | block)
+               ->  ^(FUNCTION_METHOD_DECL modifierList? genericTypeParameterList? type IDENT formalParameterList block?)
+       ;
+
+constructorDeclaration
+       :       modifierList? genericTypeParameterList? ident=IDENT formalParameterList block
+               ->  ^(CONSTRUCTOR_DECL[$ident, "CONSTRUCTOR_DECL"] modifierList? genericTypeParameterList? IDENT formalParameterList block)
+       ;
+
+divconMethodDeclaration
+       :       modifierList? type IDENT formalParameterList divconBlock
+               ->  ^(DIVCON_METHOD_DECL modifierList? type IDENT formalParameterList divconBlock)
+       ;
+
+primitiveVariableDeclaration
+       :       modifierList? simpleType classFieldDeclaratorList ';'
+               ->  ^(PRIMITIVE_VAR_DECLARATION modifierList? simpleType classFieldDeclaratorList)
+       ;
+
+objectVariableDeclaration
+       :       modifierList? objectType classFieldDeclaratorList ';'
+               ->  ^(OBJECT_VAR_DECLARATION modifierList? objectType classFieldDeclaratorList)
+       ;
 
 interfaceScopeDeclaration
     :   modifierList?
@@ -508,7 +522,7 @@ objectType
         ->  ^(PROXY_TYPE qualifiedTypeIdent domainExpression?)
     |   qualifiedTypeIdent domainExpression?
         ->  ^(POINTER_TYPE qualifiedTypeIdent domainExpression?)
-       |       MOD qualifiedTypeIdent AT
+       |       qualifiedTypeIdent '[' MOD ']' AT
                ->      ^(ARRAY_SECTION_TYPE qualifiedTypeIdent)
     ;
 
@@ -592,11 +606,19 @@ blockStatement
     ;
 
 localVariableDeclaration
-    :   localModifierList? simpleType classFieldDeclaratorList
+    :  primitiveVarDeclaration
+       |   objectVarDeclaration
+       ;
+
+primitiveVarDeclaration
+       :       localModifierList? simpleType classFieldDeclaratorList
         ->  ^(PRIMITIVE_VAR_DECLARATION localModifierList? simpleType classFieldDeclaratorList)
-    |   localModifierList? objectType classFieldDeclaratorList
+       ;
+
+objectVarDeclaration
+       :       localModifierList? objectType classFieldDeclaratorList
         ->  ^(OBJECT_VAR_DECLARATION localModifierList? objectType classFieldDeclaratorList)
-    ;
+       ;
 
 statement
     :   nonBlockStatement