From 60dcc26a9396fe2416fbe3685bdb6ee0e1dda795 Mon Sep 17 00:00:00 2001 From: jjenista Date: Wed, 10 Nov 2010 23:41:08 +0000 Subject: [PATCH] coreprof in RCR, just one event for now showing begin and end of traverse call --- Robust/src/Benchmarks/oooJava/master-makefile | 27 ++++++++++--------- Robust/src/Runtime/oooJava/rcr_runtime.c | 17 ++++++++++++ Robust/src/Runtime/oooJava/trqueue.c | 1 + 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/Robust/src/Benchmarks/oooJava/master-makefile b/Robust/src/Benchmarks/oooJava/master-makefile index 0b11a873..9a75c5aa 100644 --- a/Robust/src/Benchmarks/oooJava/master-makefile +++ b/Robust/src/Benchmarks/oooJava/master-makefile @@ -17,21 +17,22 @@ USECOREPROF= #-coreprof $(COREPROFOVERFLOW) \ -coreprof-eventwords 1024*1024*128 \ -coreprof-enable cpe_main \ -coreprof-enable cpe_taskexecute \ - -coreprof-enable cpe_taskretire \ + -coreprof-enable cpe_taskdispatch \ + -coreprof-enable cpe_runmalloc \ + -coreprof-enable cpe_rcr_traverse +# -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_taskstallvar \ -# -coreprof-enable cpe_taskstallmem - - -USEOOO= -ooojava 24 2 -ooodebug -squeue #-ooodebug-disable-task-mem-pool + -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_taskstallvar \ + -coreprof-enable cpe_taskstallmem + + +USEOOO= -ooojava 24 2 -ooodebug -squeue #-ooodebug-disable-task-mem-pool USERCR= -ooojava 23 2 -rcr -ooodebug -squeue BSFLAGS= -64bit -mainclass $(PROGRAM) -heapsize-mb 8000 -garbagestats -joptimize -noloop -optimize -debug #-nooptimize #src-after-pp #-debug diff --git a/Robust/src/Runtime/oooJava/rcr_runtime.c b/Robust/src/Runtime/oooJava/rcr_runtime.c index fc7c1894..3887636e 100644 --- a/Robust/src/Runtime/oooJava/rcr_runtime.c +++ b/Robust/src/Runtime/oooJava/rcr_runtime.c @@ -1,24 +1,41 @@ #include "trqueue.h" +#include "coreprof/coreprof.h" #include "mlp_runtime.h" #include "rcr_runtime.h" #include "hashStructure.h" #include "structdefs.h" #include "RuntimeConflictResolver.h" + void * workerTR(void *x) { struct trQueue * queue=(struct trQueue *)x; allHashStructures=queue->allHashStructures; + + CP_CREATE(); + while(1) { SESEcommon * tmp; do { tmp=(SESEcommon *) dequeueTR(queue); if (tmp!=NULL) { + +#ifdef CP_EVENTID_RCR_TRAVERSE + CP_LOGEVENT( CP_EVENTID_RCR_TRAVERSE, CP_EVENTTYPE_BEGIN ); +#endif tasktraverse(tmp); + +#ifdef CP_EVENTID_RCR_TRAVERSE + CP_LOGEVENT( CP_EVENTID_RCR_TRAVERSE, CP_EVENTTYPE_END ); +#endif + } else { sched_yield(); } } while(1); } + + CP_EXIT(); + return NULL; } diff --git a/Robust/src/Runtime/oooJava/trqueue.c b/Robust/src/Runtime/oooJava/trqueue.c index 68ef603f..1b63685d 100644 --- a/Robust/src/Runtime/oooJava/trqueue.c +++ b/Robust/src/Runtime/oooJava/trqueue.c @@ -6,6 +6,7 @@ #include "structdefs.h" #include "RuntimeConflictResolver.h" + struct trQueue * queuelist=NULL; pthread_mutex_t queuelock; -- 2.34.1