clean up dtlb sample code...mostly fixing multisample bug
authorbdemsky <bdemsky>
Sun, 10 Jul 2011 23:44:20 +0000 (23:44 +0000)
committerbdemsky <bdemsky>
Sun, 10 Jul 2011 23:44:20 +0000 (23:44 +0000)
Robust/src/Runtime/bamboo/multicorecache.c
Robust/src/Runtime/bamboo/multicorecache.h
Robust/src/Runtime/bamboo/multicoregarbage.c

index 90c6d04e8bf9c2318a1b7b66958ee8d6978a3134..fc7c769cac9838848db0ffe4a08864b120d6f62b 100644 (file)
@@ -421,7 +421,7 @@ void cacheAdapt_phase_client() {
   //send init finish msg to core coordinator
   send_msg_2(STARTUPCORE, GCFINISHPREF, BAMBOO_NUM_OF_CORE);
   GC_PRINTF("Finish prefinish phase\n");
-  CACHEADAPT_SAMPING_RESET();
+  CACHEADAPT_SAMPLING_RESET();
   if(BAMBOO_NUM_OF_CORE < NUMCORESACTIVE) {
     // zero out the gccachesamplingtbl
     BAMBOO_MEMSET_WH(gccachesamplingtbl_local,0,size_cachesamplingtbl_local);  
@@ -456,8 +456,8 @@ void cacheAdapt_phase_master() {
   cacheAdapt_mutator();
   cacheAdapt_gc(false);
   GC_CHECK_ALL_CORE_STATUS();
-
-  CACHEADAPT_SAMPING_RESET();
+  
+  CACHEADAPT_SAMPLING_RESET();
   if(BAMBOO_NUM_OF_CORE < NUMCORESACTIVE) {
     // zero out the gccachesamplingtbl
     BAMBOO_MEMSET_WH(gccachesamplingtbl_local,0,size_cachesamplingtbl_local);
index d71b470a8dbaa5dce66a3ea5e379859d4cf5ab99..c3e42b7feafb754bc28fd85c2c9b0cf48dc06c6e 100644 (file)
@@ -88,9 +88,9 @@ void gc_output_cache_sampling_r();
 
 #ifdef GC_CACHE_SAMPLING
 // reset the sampling arrays
-#define CACHEADAPT_SAMPING_RESET()  bamboo_dtlb_sampling_reset()
+#define CACHEADAPT_SAMPLING_RESET()  bamboo_dtlb_sampling_reset()
 #else // GC_CACHE_SAMPING
-#define CACHEADAPT_SAMPING_RESET() 
+#define CACHEADAPT_SAMPLING_RESET() 
 #endif
 
 #define CACHEADAPT_SAMPLING_DATA_REVISE_INIT(o,t) \
index 2853466c582487afb9e546ee207885fcd587cb62..5e015351c7875a4658f1e1d52aec1c34115550a6 100644 (file)
@@ -511,8 +511,6 @@ void pregcprocessing() {
 #if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)
   // disable the timer interrupt
   bamboo_mask_timer_intr();
-#endif
-#if defined(GC_CACHE_ADAPT)&&defined(GC_CACHE_SAMPLING)
   // get the sampling data 
   bamboo_output_dtlb_sampling();
 #endif
@@ -523,6 +521,8 @@ void postgcprocessing() {
   // enable the timer interrupt
   bamboo_tile_timer_set_next_event(GC_TILE_TIMER_EVENT_SETTING); 
   bamboo_unmask_timer_intr();
+  //turn on sampling again
+  bamboo_dtlb_sampling_init();
 #endif
 }