BUILDSCRIPT=../../../buildscript
-COREPROFOVERFLOW= -coreprof-checkoverflow
-USECOREPROF= -coreprof $(COREPROFOVERFLOW) \
+COREPROFOVERFLOW= #-coreprof-checkoverflow
+USECOREPROF= #-coreprof $(COREPROFOVERFLOW) \
-coreprof-eventwords 1024*1024*512 \
-coreprof-enable cpe_main \
- -coreprof-enable cpe_runmalloc \
+ -coreprof-enable cpe_workschedgrab
+# -coreprof-enable cpe_runmalloc \
-coreprof-enable cpe_taskexecute \
-coreprof-enable cpe_taskdispatch \
-coreprof-enable cpe_poolalloc \
-coreprof-enable cpe_taskretire \
- -coreprof-enable cpe_workschedgrab
-# -coreprof-enable cpe_preparememq
-# -coreprof-enable cpe_runfree \
-# -coreprof-enable cpe_count_poolalloc \
-# -coreprof-enable cpe_count_poolreuse \
-# -coreprof-enable cpe_taskstallvar \
-# -coreprof-enable cpe_taskstallmem
+ -coreprof-enable cpe_preparememq \
+ -coreprof-enable cpe_runfree \
+ -coreprof-enable cpe_count_poolalloc \
+ -coreprof-enable cpe_count_poolreuse \
+ -coreprof-enable cpe_taskstallvar \
+ -coreprof-enable cpe_taskstallmem
-USEOOO= -ooojava 24 2 #-ooodebug-disable-task-mem-pool #-ooodebug
-BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 2000 -garbagestats -joptimize -noloop -debug #-debug-deque #-optimize src-after-pp
+USEOOO= -ooojava 8 2 #-ooodebug-disable-task-mem-pool #-ooodebug
+BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 50 -garbagestats -joptimize -noloop -debug -debug-deque #-optimize src-after-pp
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
static inline dequeNode* dqGet4096aligned( void* fromAllocator ) {
INTPTR aligned = ((INTPTR)fromAllocator + 4095) & (~4095);
+
#ifdef DEBUG_DEQUE
- printf( "from allocator: 0x%08x to 0x%08x\n", (INTPTR)fromAllocator, (INTPTR)fromAllocator + DQNODE_SIZETOREQUEST );
- printf( "aligned: 0x%08x to 0x%08x\n", aligned, aligned + sizeof( dequeNode ) );
- memset( (void*) aligned, 0, sizeof( dequeNode ) );
+ //printf( "from allocator: 0x%08x to 0x%08x\n", (INTPTR)fromAllocator, (INTPTR)fromAllocator + DQNODE_SIZETOREQUEST );
+ //printf( "aligned: 0x%08x to 0x%08x\n", aligned, aligned + sizeof( dequeNode ) );
+ //memset( (void*) aligned, 0, sizeof( dequeNode ) );
#endif
+
return (dequeNode*) aligned;
}
void dqPushBottom( deque* dq, void* item ) {
+#ifdef DEBUG_DEQUE
+ if( item == 0x0 ) {
+ printf( "Pushing invalid work into the deque.\n" );
+ }
+#endif
+
dequeNode* currNode = dqDecodePtr( dq->bottom );
int currIndx = dqDecodeIdx( dq->bottom );
// the memory pool must always have at least one
// item in it
static MemPool* poolcreate( int itemSize ) {
- MemPool* p = calloc( 1, sizeof( MemPool ) );
+ MemPool* p = RUNMALLOC( sizeof( MemPool ) );
p->itemSize = itemSize;
- p->head = calloc( 1, itemSize );
+ p->head = RUNMALLOC( itemSize );
p->head->next = NULL;
p->tail = p->head;
return p;
}
static MemPool* taskpoolcreate( int itemSize ) {
- MemPool* p = calloc( 1, sizeof( MemPool ) );
+ MemPool* p = RUNMALLOC( 1, sizeof( MemPool ) );
SESEcommon *c = (SESEcommon *) p;
pthread_cond_init( &(c->runningChildrenCond), NULL );
pthread_mutex_init( &(c->lock), NULL );
p->itemSize = itemSize;
- p->head = calloc( 1, itemSize );
+ p->head = RUNMALLOC( 1, itemSize );
p->head->next = NULL;
p->tail = p->head;
return p;
workUnit = dqPopBottom( myDeque );
+#ifdef DEBUG_DEQUE
+ if( workUnit == 0x0 ) {
+ printf( "Got invalid work from the deque bottom.\n" );
+ }
+#endif
+
if( workUnit != DQ_POP_EMPTY ) {
haveWork = TRUE;
break;
// your own deque
for( i = 0; i < numWorkSchedWorkers - 1; ++i ) {
workUnit = dqPopTop( &(deques[lastVictim]) );
+
+#ifdef DEBUG_DEQUE
+ if( workUnit == 0x0 ) {
+ printf( "Got invalid work from the deque top.\n" );
+ }
+#endif
if( workUnit != DQ_POP_ABORT &&
workUnit != DQ_POP_EMPTY ) {
void workScheduleSubmit( void* workUnit ) {
+#ifdef DEBUG_DEQUE
+ if( workUnit == 0x0 ) {
+ printf( "Submitting invalid task record as work.\n" );
+ }
+#endif
+
if( myWorkerID == workerID_NOTAWORKER ) {
CP_LOGEVENT( CP_EVENTID_DEBUG_A, CP_EVENTTYPE_BEGIN );
dqPushBottom( &(deques[0]), workUnit );