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
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)
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");
#define CP_EVENTID_WORKSCHEDGRAB 0x20
#endif
+#ifdef cpe_workschedsubmit
+#define CP_EVENTID_WORKSCHEDSUBMIT 0x21
+#endif
+
#ifdef cpe_taskdispatch
#define CP_EVENTID_TASKDISPATCH 0x30
#endif
#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;
// 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 ) {
} // 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 ) {
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 );
}