new coreprof event, move workschedule dowork label only across the coreprof event...
authorjjenista <jjenista>
Tue, 2 Nov 2010 22:30:22 +0000 (22:30 +0000)
committerjjenista <jjenista>
Tue, 2 Nov 2010 22:30:22 +0000 (22:30 +0000)
Robust/src/Benchmarks/oooJava/master-makefile
Robust/src/IR/Flat/RuntimeConflictResolver.java
Robust/src/Runtime/coreprof/coreprof.h
Robust/src/Runtime/workschedule.c

index 49fccb4edc14ac97838c6e71d060fce0c3fa33ec..2d48be42743f28aaf91b57f3f74da471d615c90e 100644 (file)
@@ -16,22 +16,23 @@ COREPROFOVERFLOW= #-coreprof-checkoverflow
 USECOREPROF= #-coreprof $(COREPROFOVERFLOW) \
        -coreprof-eventwords 1024*1024*128 \
        -coreprof-enable cpe_main \
-       -coreprof-enable cpe_runmalloc \
        -coreprof-enable cpe_taskexecute \
-       -coreprof-enable cpe_taskdispatch \
-       -coreprof-enable cpe_poolalloc
-#      -coreprof-enable cpe_preparememq
+       -coreprof-enable cpe_taskretire \
+       -coreprof-enable cpe_workschedsubmit \
+       -coreprof-enable cpe_workschedgrab \
+       -coreprof-enable cpe_taskdispatch
+#      -coreprof-enable cpe_runmalloc \
+#      -coreprof-enable cpe_poolalloc \
+#      -coreprof-enable cpe_preparememq \
 #      -coreprof-enable cpe_runfree \
 #      -coreprof-enable cpe_count_poolalloc \
 #      -coreprof-enable cpe_count_poolreuse \
-#      -coreprof-enable cpe_workschedgrab \
-#      -coreprof-enable cpe_taskretire \
 #      -coreprof-enable cpe_taskstallvar \
 #      -coreprof-enable cpe_taskstallmem
 
 
-USEOOO= -ooojava 24 2  -ooodebug # -ooodebug-disable-task-mem-pool
-USERCR= -ooojava 24 2  -rcr -ooodebug
+USEOOO= -ooojava 24 2  -ooodebug #-squeue -ooodebug-disable-task-mem-pool
+USERCR= -ooojava 24 2 -rcr -ooodebug
 BSFLAGS= -64bit -mainclass $(PROGRAM)  -heapsize-mb 8000 -garbagestats -joptimize -noloop -optimize -debug #-nooptimize #src-after-pp #-debug
 
 DRELEASEMODE=-disjoint-release-mode -disjoint-dvisit-stack-callees-on-top -disjoint-alias-file aliases.txt tabbed
@@ -40,6 +41,10 @@ DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-
 default:
        $(BUILDSCRIPT) -nojava $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES)
 
+rcr-remake-c:
+       $(BUILDSCRIPT) -nojava $(BSFLAGS) $(USECOREPROF) $(USERCR) $(DISJOINT) -o $(PROGRAM)r -builddir rcr  $(SOURCE_FILES) 
+
+
 single:
        $(BUILDSCRIPT) -thread $(BSFLAGS) $(USECOREPROF)                       -o $(PROGRAM)s -builddir sing $(SOURCE_FILES) 
 
index c26f71d85158fe5dd33aecb0325a15a1cf430f5a..8c856eb521ec33ac40a4944b567a76c3340ba9ca 100644 (file)
@@ -718,7 +718,8 @@ public class RuntimeConflictResolver {
                           int depth) {
     StringBuilder currCase = possibleContinuingCase;
     if(qualifiesForCaseStatement(node)) {
-      assert prefix.equals("ptr") && !cases.containsKey(node.allocSite);
+      assert prefix.equals("ptr");
+      assert !cases.containsKey(node.allocSite);
       currCase = new StringBuilder();
       cases.put(node.allocSite, currCase);
       currCase.append("  case " + node.getAllocationSite() + ": {\n");
index cb294e1e3ccba4c6ae1c0235b5bda3e3541dd18f..45922faf541edee2eab15af9cc4f49460c9a3db9 100644 (file)
 #define CP_EVENTID_WORKSCHEDGRAB      0x20
 #endif
 
+#ifdef cpe_workschedsubmit
+#define CP_EVENTID_WORKSCHEDSUBMIT    0x21
+#endif
+
 #ifdef cpe_taskdispatch
 #define CP_EVENTID_TASKDISPATCH       0x30
 #endif
index a99c003223a711951a0706f5e8204123faad60c4..07709e85278f1655a5369835b9c49cfa6743db23 100644 (file)
@@ -182,17 +182,12 @@ void* workerMain( void* arg ) {
 #ifdef CP_EVENTID_WORKSCHEDGRAB
     CP_LOGEVENT( CP_EVENTID_WORKSCHEDGRAB, CP_EVENTTYPE_BEGIN );
 #endif
-    haveWork = FALSE;
 
+    haveWork = FALSE;
     while( !haveWork ) {
 
       workUnit = dqPopBottom( myDeque );
 
-#if defined(DEBUG_DEQUE)&&!defined(SQUEUE)
-      if( workUnit == NULL ) {
-        printf( "Got invalid work from the deque bottom.\n" );
-      }
-#endif
 
       if( workUnit != DQ_POP_EMPTY ) {
         haveWork = TRUE;
@@ -202,13 +197,8 @@ void* workerMain( void* arg ) {
         // with the last successful victim, don't check
         // your own deque
         for( i = 0; i < numWorkSchedWorkers - 1; ++i ) {
-          workUnit = dqPopTop( &(deques[lastVictim]) );
 
-#if defined(DEBUG_DEQUE)&&!defined(SQUEUE)
-          if( workUnit == NULL ) {
-            printf( "Got invalid work from the deque top.\n" );
-          }
-#endif
+          workUnit = dqPopTop( &(deques[lastVictim]) );
           
 #ifdef SQUEUE
           if( workUnit != DQ_POP_EMPTY ) {
@@ -255,11 +245,12 @@ void* workerMain( void* arg ) {
 
     } // end the while-not-have-work loop
 
+    dowork:
+
 #ifdef CP_EVENTID_WORKSCHEDGRAB
     CP_LOGEVENT( CP_EVENTID_WORKSCHEDGRAB, CP_EVENTTYPE_END );
 #endif
 
-    dowork:
     // when is no work left we will pop out
     // here, so only do work if any left
     if( haveWork ) {
@@ -348,16 +339,9 @@ void workScheduleInit( int numProcessors,
 
 
 void workScheduleSubmit( void* workUnit ) {
-
-#ifdef DEBUG_DEQUE
-  if( workUnit == 0x0 ) {
-    printf( "Submitting invalid task record as work.\n" );
-  }
-#endif
-
-    CP_LOGEVENT( CP_EVENTID_DEBUG_A, CP_EVENTTYPE_BEGIN );
-    dqPushBottom( &(deques[myWorkerID]), workUnit );
-    CP_LOGEVENT( CP_EVENTID_DEBUG_A, CP_EVENTTYPE_END );
+  CP_LOGEVENT( CP_EVENTID_WORKSCHEDSUBMIT, CP_EVENTTYPE_BEGIN );
+  dqPushBottom( &(deques[myWorkerID]), workUnit );
+  CP_LOGEVENT( CP_EVENTID_WORKSCHEDSUBMIT, CP_EVENTTYPE_END );
 }