remove sampling for policy1&2, tmp solution
authorjzhou <jzhou>
Tue, 19 Jul 2011 03:45:35 +0000 (03:45 +0000)
committerjzhou <jzhou>
Tue, 19 Jul 2011 03:45:35 +0000 (03:45 +0000)
Robust/src/Runtime/bamboo/multicorecache.h
Robust/src/Runtime/bamboo/multicoregarbage.c
Robust/src/Runtime/bamboo/multicoregcprofile.h
Robust/src/Runtime/bamboo/multicoremsg.c
Robust/src/buildscript

index 68c9f8ebe2fddce280911a78f3dce88970db7d9c..9312674ba3f55260714ef2d77fd74e6dc3f5f7c4 100644 (file)
@@ -51,7 +51,7 @@ void cacheAdapt_phase_master();
 void gc_output_cache_sampling();
 void gc_output_cache_sampling_r();
 
-#ifdef GC_CACHE_SAMPLING
+#if defined(GC_CACHE_SAMPLING)&&defined(GC_CACHE_ADAPT_POLICY4)
 // enable the timer interrupt
 #define CACHEADAPT_ENABLE_TIMER() \
   { \
@@ -59,16 +59,13 @@ void gc_output_cache_sampling_r();
     bamboo_unmask_timer_intr(); \
     bamboo_dtlb_sampling_process(); \
   }
-#else
-#define CACHEADAPT_ENABLE_TIMER() 
-#endif
 // disable the TILE_TIMER interrupt
 #define CACHEADAPT_DISABLE_TIMER() bamboo_mask_timer_intr() 
-
-#ifdef GC_CACHE_SAMPLING
 // reset the sampling arrays
 #define CACHEADAPT_SAMPLING_RESET()  bamboo_dtlb_sampling_reset()
 #else // GC_CACHE_SAMPING
+#define CACHEADAPT_ENABLE_TIMER()
+#define CACHEADAPT_DISABLE_TIMER()
 #define CACHEADAPT_SAMPLING_RESET() 
 #endif
 
index 4518fed89c10057533a9a19906e331d67af6d4b0..0c53142f565004fb2b6850365ce77a6b5e00af88 100644 (file)
@@ -507,7 +507,7 @@ void pregccheck() {
 }
 
 void pregcprocessing() {
-#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)
+#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&defined(GC_CACHE_ADAPT_POLICY4)
   // disable the timer interrupt
   bamboo_mask_timer_intr();
   // get the sampling data 
@@ -516,7 +516,7 @@ void pregcprocessing() {
 }
 
 void postgcprocessing() {
-#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)
+#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&defined(GC_CACHE_ADAPT_POLICY4)
   // enable the timer interrupt
   bamboo_tile_timer_set_next_event(GC_TILE_TIMER_EVENT_SETTING); 
   bamboo_unmask_timer_intr();
index 899c7b70f8ffa7900969ed201c5c19e8a157e50e..f88c7ecf36bbb61b3b9d9417f3dd373aec92959d 100644 (file)
@@ -85,6 +85,7 @@ INLINE static void gc_profileEnd_master(void) {
     gcInfo->time[gcInfo->index++] = gc_num_liveobj;
     gcInfo->time[gcInfo->index++] = gc_num_forwardobj;
     gc_infoIndex++;
+    if(gcInfo->index != GC_PROFILE_NUM_FIELD) BAMBOO_EXIT();
     gc_size_allocatedobj = 0; // reset the counter of allocated obj
     if(gc_infoIndex == GCINFOLENGTH) {
       gc_infoOverflow = true;
index a92d30e8703a7c5dcfba4ef5cc6fab5e1aa4e9a8..43b335c23ea5da4ed039a3ae9f9559b64092c1d1 100644 (file)
@@ -353,10 +353,8 @@ void processmsg_statusreport_I() {
 
 void processmsg_terminate_I() {
   disruntimedata();
-#ifdef MULTICORE_GC
-#ifdef GC_CACHE_ADAPT
+#if defined(MULTICORE_GC)&&defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)&&defined(GC_CACHE_ADAPT_POLICY4)
   bamboo_mask_timer_intr(); // disable the TILE_TIMER interrupt
-#endif
 #endif
   BAMBOO_EXIT_APP(0);
 }
index 0f3aa0f8519bf6563d8b62942ec212b28a902569..eadd5c6227b9195002bd28a9617467cb377748be 100755 (executable)
@@ -819,7 +819,7 @@ JAVAOPTS="$JAVAOPTS -struct structfile"
 fi
 
 # for tilera code, generate multicorememsize.h
-./generate_memsize.sh ${TILERA_PAGE_SIZE} ${TILERA_PAGE_SIZE_BITS} ${TILERA_NUM_BLOCKS} ${TILERA_NUM_PAGES_PER_BLOCK}
+./generate_memsize.sh ${TILERA_PAGE_SIZE} ${TILERA_PAGE_SIZE_BITS} ${TILERA_NUM_BLOCKS} ${TILERA_NUM_PAGES_PER_BLOCK} ${BUILDDIR}
 
 
 #########################