src/mem/ruby/structures/CacheMemory.cc
//added by Hongyu for prefetch-guard
added by Hongyu for prefetch-guard
added by Hongyu for prefetch - guard
bool 
CacheMemory::getTrigger(Addr address, int core_id){
  int64_t cacheSet = addressToCacheSet(address);
  int loc = findTagInSet(cacheSet, address);
  int evicted_core_id = m_cache[cacheSet][loc]->getCoreId();
  if (core_id!=evicted_core_id){
    for (int i=0; i<triggered_core_id.size(); i++){
      if (evicted_core_id==triggered_core_id[i]){
        return true;
      }
    }
  }
  return false;
}
bool CacheMemory :: getTrigger ( Addr address , int core_id ) { int64_t cacheSet = addressToCacheSet ( address ) ; int loc = findTagInSet ( cacheSet , address ) ; int evicted_core_id = m_cache [ cacheSet ] [ loc ] -> getCoreId ( ) ; if ( core_id != evicted_core_id ) { for ( int i = 0 ; i < triggered_core_id . size ( ) ; i ++ ) { if ( evicted_core_id == triggered_core_id [ i ] ) { return true ; } } } return false ; }
added by Hongyu for prefetch-guard
added by Hongyu for prefetch - guard
//check whether the cores involved in eviction get triggered before, if so, return true and the notification would be sent to the prefetcher of the core.