From: Daniel R. Carvalho Date: Wed, 6 Jun 2018 10:00:55 +0000 (+0200) Subject: ruby: Fix initial weight in weighted LRU X-Git-Tag: v19.0.0.0~2069 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8de76e0f14f70da39dc060b6741d54d1432ff9a8;p=gem5.git ruby: Fix initial weight in weighted LRU Initial weight was using the timestamp instead of the weight. Change-Id: I61d3c8424f85fd6856957087c477afda111f8ca7 Reviewed-on: https://gem5-review.googlesource.com/10801 Reviewed-by: Nikos Nikoleris Reviewed-by: Anthony Gutierrez Reviewed-by: Jason Lowe-Power Maintainer: Anthony Gutierrez --- diff --git a/src/mem/ruby/system/WeightedLRUPolicy.cc b/src/mem/ruby/system/WeightedLRUPolicy.cc index 20ae5ad67..2899f73a7 100644 --- a/src/mem/ruby/system/WeightedLRUPolicy.cc +++ b/src/mem/ruby/system/WeightedLRUPolicy.cc @@ -92,7 +92,7 @@ WeightedLRUPolicy::getVictim(int64_t set) const smallest_index = 0; smallest_time = m_last_ref_ptr[set][0]; - int smallest_weight = m_last_ref_ptr[set][0]; + int smallest_weight = m_last_occ_ptr[set][0]; for (unsigned i = 1; i < m_assoc; i++) {