summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-06-06 12:00:55 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-06-12 20:07:25 +0000
commit8de76e0f14f70da39dc060b6741d54d1432ff9a8 (patch)
treee0700339edd26dfbcc129c9fa2d2a71c15b6b858 /src
parentf54020eb8155371725ab75b0fc5c419287eca084 (diff)
downloadgem5-8de76e0f14f70da39dc060b6741d54d1432ff9a8.tar.xz
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 <nikos.nikoleris@arm.com> Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/mem/ruby/system/WeightedLRUPolicy.cc2
1 files changed, 1 insertions, 1 deletions
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++) {