From 8de76e0f14f70da39dc060b6741d54d1432ff9a8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Wed, 6 Jun 2018 12:00:55 +0200 Subject: [PATCH] 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 --- src/mem/ruby/system/WeightedLRUPolicy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- 2.30.2