COREPROFOVERFLOW= #-coreprof-checkoverflow
-USECOREPROF= #-coreprof $(COREPROFOVERFLOW) \
-# -coreprof-eventwords 1024*1024*128 \
-# -coreprof-enable cpe_main \
-# -coreprof-enable cpe_taskdispatch \
-# -coreprof-enable cpe_runmalloc
-# -coreprof-enable cpe_taskexecute \
+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_preparememq
# -coreprof-enable cpe_runfree \
# -coreprof-enable cpe_count_poolalloc \
# -coreprof-enable cpe_count_poolreuse \
# -coreprof-enable cpe_taskstallmem
-USEOOO= -ooojava 24 2 -ooodebug-disable-task-mem-pool -ooodebug
-BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 1024 -garbagestats -joptimize -noloop -optimize #-debug
+USEOOO= -ooojava 24 2 #-ooodebug-disable-task-mem-pool #-ooodebug
+BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 8000 -garbagestats -joptimize -noloop -optimize #src-after-pp #-debug
DRELEASEMODE=-disjoint-release-mode -disjoint-dvisit-stack-callees-on-top -disjoint-alias-file aliases.txt tabbed
DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-desire-determinism
clean:
rm -f $(PROGRAM)p.bin $(PROGRAM)s.bin
rm -fr par sing
+ rm -f tmp.c
rm -f *~
rm -f *.dot
rm -f *.png
Iterator<SESEandAgePair> pItr = callerSESEplaceholder.getNeededStaticNames().iterator();
while( pItr.hasNext() ) {
SESEandAgePair pair = pItr.next();
- output.println(" void* "+pair+";");
+ output.println(" void* "+pair+" = NULL;");
}
// declare variables for tracking dynamic sources
output.println(" CP_LOGEVENT( CP_EVENTID_TASKDISPATCH, CP_EVENTTYPE_BEGIN );");
output.println("#endif");
}
-
+
+
// before doing anything, lock your own record and increment the running children
if( (state.MLP && fsen != mlpa.getMainSESE()) ||
(state.OOOJAVA && fsen != oooa.getMainSESE())
output.println(" atomic_inc(&(runningSESE->numRunningChildren));");
}
+
+
+
// allocate the space for this record
output.println( "#ifndef OOO_DISABLE_TASKMEMPOOL" );
if( (state.MLP && fsen != mlpa.getMainSESE()) ||
(state.OOOJAVA && fsen != oooa.getMainSESE())
) {
+
+ //output.println(" CP_LOGEVENT( CP_EVENTID_DEBUG_B, CP_EVENTTYPE_BEGIN );");
output.println(" "+
fsen.getSESErecordName()+"* seseToIssue = ("+
fsen.getSESErecordName()+"*) poolalloc( runningSESE->taskRecordMemPool );");
+ //output.println(" CP_LOGEVENT( CP_EVENTID_DEBUG_B, CP_EVENTTYPE_END );");
+
} else {
output.println(" "+
fsen.getSESErecordName()+"* seseToIssue = ("+
output.println( "#endif // OOO_DISABLE_TASKMEMPOOL" );
+
+
+
+
// set up the SESE in-set and out-set objects, which look
// like a garbage list
output.println(" struct garbagelist * gl= (struct garbagelist *)&(((SESEcommon*)(seseToIssue))[1]);");
// before potentially adding this SESE to other forwarding lists,
// create it's lock
output.println(" pthread_mutex_init( &(seseToIssue->common.lock), NULL );");
+
if( (state.MLP && fsen != mlpa.getMainSESE()) ||
(state.OOOJAVA && fsen != oooa.getMainSESE())
}
+
+
// maintain pointers for finding dynamic SESE
// instances from static names
SESEandAgePair pairNewest = new SESEandAgePair( fsen, 0 );
if( fsen.getParent() != null &&
fsen.getParent().getNeededStaticNames().contains( pairNewest )
) {
+ output.println(" {");
+ output.println("#ifndef OOO_DISABLE_TASKMEMPOOL" );
+ output.println(" SESEcommon* oldest = "+pairOldest+";");
+ output.println("#endif // OOO_DISABLE_TASKMEMPOOL" );
for( int i = fsen.getOldestAgeToTrack(); i > 0; --i ) {
SESEandAgePair pair1 = new SESEandAgePair( fsen, i );
SESEandAgePair pair2 = new SESEandAgePair( fsen, i-1 );
- output.println(" "+pair1+" = "+pair2+";");
+ output.println(" "+pair1+" = "+pair2+";");
}
- output.println(" "+pairNewest+" = &(seseToIssue->common);");
+ output.println(" "+pairNewest+" = &(seseToIssue->common);");
// no need to add a reference to whatever is the newest record, because
// we initialized seseToIssue->refCount to *2*
// but release a reference to whatever was the oldest BEFORE the shift
output.println("#ifndef OOO_DISABLE_TASKMEMPOOL" );
- output.println(" if( "+pairOldest+" != NULL ) {");
- output.println(" RELEASE_REFERENCE_TO( "+pairOldest+" );");
- output.println(" }");
+ output.println(" if( oldest != NULL ) {");
+ output.println(" RELEASE_REFERENCE_TO( oldest );");
+ output.println(" }");
output.println("#endif // OOO_DISABLE_TASKMEMPOOL" );
+ output.println(" }");
}
if (state.RCR) {
}
+ if( state.COREPROF ) {
+ output.println("#ifdef CP_EVENTID_PREPAREMEMQ");
+ output.println(" CP_LOGEVENT( CP_EVENTID_PREPAREMEMQ, CP_EVENTTYPE_BEGIN );");
+ output.println("#endif");
+ }
+
+
////////////////
// count up memory conflict dependencies,
// eom
}
}
+ if( state.COREPROF ) {
+ output.println("#ifdef CP_EVENTID_PREPAREMEMQ");
+ output.println(" CP_LOGEVENT( CP_EVENTID_PREPAREMEMQ, CP_EVENTTYPE_END );");
+ output.println("#endif");
+ }
+
// Enqueue Task Record
if (state.RCR) {
output.println(" enqueueTR((void *)seseToIssue);");
output.println(" workScheduleSubmit( (void*)seseToIssue );");
output.println(" }");
+
+
if( state.COREPROF ) {
output.println("#ifdef CP_EVENTID_TASKDISPATCH");
output.println(" CP_LOGEVENT( CP_EVENTID_TASKDISPATCH, CP_EVENTTYPE_END );");
#define CP_EVENTID_TASKDISPATCH 0x30
#endif
+#ifdef cpe_preparememq
+#define CP_EVENTID_PREPAREMEMQ 0x31
+#endif
+
#ifdef cpe_taskexecute
-#define CP_EVENTID_TASKEXECUTE 0x31
+#define CP_EVENTID_TASKEXECUTE 0x40
#endif
#ifdef cpe_taskretire
-#define CP_EVENTID_TASKRETIRE 0x32
+#define CP_EVENTID_TASKRETIRE 0x50
#endif
#ifdef cpe_taskstallvar
-#define CP_EVENTID_TASKSTALLVAR 0x40
+#define CP_EVENTID_TASKSTALLVAR 0x60
#endif
#ifdef cpe_taskstallmem
-#define CP_EVENTID_TASKSTALLMEM 0x41
-#endif
+#define CP_EVENTID_TASKSTALLMEM 0x61
+#endif
+
+// debug events don't require a preprocessor
+// guard because normally they are not in the code
+// base--its helpful to define them in case you
+// want to debug events that aren't worth keeping
+// forever
+#define CP_EVENTID_DEBUG_A 0x180
+#define CP_EVENTID_DEBUG_B 0x181
+#define CP_EVENTID_DEBUG_C 0x182
+#define CP_EVENTID_DEBUG_D 0x183
+#define CP_EVENTID_DEBUG_E 0x184
+#define CP_EVENTID_DEBUG_F 0x185
+#define CP_EVENTID_DEBUG_G 0x186
+#define CP_EVENTID_DEBUG_H 0x187
+#define CP_EVENTID_DEBUG_I 0x188
+#define CP_EVENTID_DEBUG_J 0x189
// Note: application-specific events (assigned