From 16e902e090e000bd111d64b7301d22e39fd907e7 Mon Sep 17 00:00:00 2001 From: jzhou Date: Tue, 19 Jul 2011 03:45:35 +0000 Subject: [PATCH] remove sampling for policy1&2, tmp solution --- Robust/src/Runtime/bamboo/multicorecache.h | 9 +++------ Robust/src/Runtime/bamboo/multicoregarbage.c | 4 ++-- Robust/src/Runtime/bamboo/multicoregcprofile.h | 1 + Robust/src/Runtime/bamboo/multicoremsg.c | 4 +--- Robust/src/buildscript | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Robust/src/Runtime/bamboo/multicorecache.h b/Robust/src/Runtime/bamboo/multicorecache.h index 68c9f8eb..9312674b 100644 --- a/Robust/src/Runtime/bamboo/multicorecache.h +++ b/Robust/src/Runtime/bamboo/multicorecache.h @@ -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 diff --git a/Robust/src/Runtime/bamboo/multicoregarbage.c b/Robust/src/Runtime/bamboo/multicoregarbage.c index 4518fed8..0c53142f 100644 --- a/Robust/src/Runtime/bamboo/multicoregarbage.c +++ b/Robust/src/Runtime/bamboo/multicoregarbage.c @@ -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(); diff --git a/Robust/src/Runtime/bamboo/multicoregcprofile.h b/Robust/src/Runtime/bamboo/multicoregcprofile.h index 899c7b70..f88c7ecf 100644 --- a/Robust/src/Runtime/bamboo/multicoregcprofile.h +++ b/Robust/src/Runtime/bamboo/multicoregcprofile.h @@ -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; diff --git a/Robust/src/Runtime/bamboo/multicoremsg.c b/Robust/src/Runtime/bamboo/multicoremsg.c index a92d30e8..43b335c2 100644 --- a/Robust/src/Runtime/bamboo/multicoremsg.c +++ b/Robust/src/Runtime/bamboo/multicoremsg.c @@ -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); } diff --git a/Robust/src/buildscript b/Robust/src/buildscript index 0f3aa0f8..eadd5c62 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -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} ######################### -- 2.34.1