From 6a65fafa52925ec4278121278b048363a3abd5ac Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Mon, 15 Oct 2012 17:27:15 -0500 Subject: ruby: reset timing after cache warm up Ruby system was recently converted to a clocked object. Such objects maintain state related to the time that has passed so far. During the cache warmup, Ruby system changes its own time and the global time. Later on, the global time is restored. So Ruby system also needs to reset its own time. --- src/mem/ruby/system/System.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mem/ruby') diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc index 8c267654f..6e144a703 100644 --- a/src/mem/ruby/system/System.cc +++ b/src/mem/ruby/system/System.cc @@ -354,8 +354,9 @@ RubySystem::startup() Tick curtick_original = curTick(); // save the event queue head Event* eventq_head = eventq->replaceHead(NULL); - // set curTick to 0 + // set curTick to 0 and reset Ruby System's clock curTick(0); + resetClock(); // Schedule an event to start cache warmup enqueueRubyEvent(curTick()); @@ -369,8 +370,9 @@ RubySystem::startup() m_memory_controller->reset(); // Restore eventq head eventq_head = eventq->replaceHead(eventq_head); - // Restore curTick + // Restore curTick and Ruby System's clock curTick(curtick_original); + resetClock(); } } -- cgit v1.2.3