From: jjenista Date: Tue, 2 Nov 2010 22:30:22 +0000 (+0000) Subject: new coreprof event, move workschedule dowork label only across the coreprof event... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=69458461a1f591f4fcc5980e5aa5bea9fd07fd27;p=IRC.git new coreprof event, move workschedule dowork label only across the coreprof event to prevent mismatch, split conflict resolver assert into two separate terms, added an rcr remake target --- diff --git a/Robust/src/Benchmarks/oooJava/master-makefile b/Robust/src/Benchmarks/oooJava/master-makefile index 49fccb4e..2d48be42 100644 --- a/Robust/src/Benchmarks/oooJava/master-makefile +++ b/Robust/src/Benchmarks/oooJava/master-makefile @@ -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) diff --git a/Robust/src/IR/Flat/RuntimeConflictResolver.java b/Robust/src/IR/Flat/RuntimeConflictResolver.java index c26f71d8..8c856eb5 100644 --- a/Robust/src/IR/Flat/RuntimeConflictResolver.java +++ b/Robust/src/IR/Flat/RuntimeConflictResolver.java @@ -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"); diff --git a/Robust/src/Runtime/coreprof/coreprof.h b/Robust/src/Runtime/coreprof/coreprof.h index cb294e1e..45922faf 100644 --- a/Robust/src/Runtime/coreprof/coreprof.h +++ b/Robust/src/Runtime/coreprof/coreprof.h @@ -64,6 +64,10 @@ #define CP_EVENTID_WORKSCHEDGRAB 0x20 #endif +#ifdef cpe_workschedsubmit +#define CP_EVENTID_WORKSCHEDSUBMIT 0x21 +#endif + #ifdef cpe_taskdispatch #define CP_EVENTID_TASKDISPATCH 0x30 #endif diff --git a/Robust/src/Runtime/workschedule.c b/Robust/src/Runtime/workschedule.c index a99c0032..07709e85 100644 --- a/Robust/src/Runtime/workschedule.c +++ b/Robust/src/Runtime/workschedule.c @@ -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 ); }