From 25d27928c6c81b4776b586c25b72760eac155e93 Mon Sep 17 00:00:00 2001 From: jzhou Date: Wed, 20 Jul 2011 19:02:36 +0000 Subject: [PATCH] Add GC_CACHE_COHERENT_ON --- Robust/src/Runtime/bamboo/multicorecache.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Robust/src/Runtime/bamboo/multicorecache.c b/Robust/src/Runtime/bamboo/multicorecache.c index c8f50fd0..52a725a7 100644 --- a/Robust/src/Runtime/bamboo/multicorecache.c +++ b/Robust/src/Runtime/bamboo/multicorecache.c @@ -103,6 +103,18 @@ void cacheadapt_finish_dst_page(void *origptr, void *tostart, void *toptr, unsig // -- clean dtlb entries // -- change cache strategy void cacheAdapt_gc(bool isgccachestage) { +#ifdef GC_CACHE_COHERENT_ON + if(!isgccachestage) { + // get out of GC +#if defined(GC_CACHE_ADAPT_POLICY3)&&defined(GC_CACHE_ADAPT_POLICY4) + // flush the shared heap + BAMBOO_CACHE_FLUSH_L2(); + + // clean the dtlb entries + BAMBOO_CLEAN_DTLB(); +#endif + } +#else // flush the shared heap BAMBOO_CACHE_FLUSH_L2(); @@ -114,6 +126,7 @@ void cacheAdapt_gc(bool isgccachestage) { } else { bamboo_install_dtlb_handler_for_mutator(); } +#endif } // the master core decides how to adapt cache strategy for the mutator -- 2.34.1