From: Brad Beckmann Date: Fri, 20 Aug 2010 18:46:13 +0000 (-0700) Subject: ruby: Reset ruby stats in RubySystem unserialize X-Git-Tag: stable_2012_02_02~933 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ac5bb214e3dd8ba91feebd9c50ae7d3d9028668c;p=gem5.git ruby: Reset ruby stats in RubySystem unserialize The main purpose for clearing stats in the unserialize process is so that the profiler can correctly set its start time to the unserialized value of curTick. --- diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc index 801b2a3e9..a6d0d87d6 100644 --- a/src/mem/ruby/system/System.cc +++ b/src/mem/ruby/system/System.cc @@ -147,6 +147,23 @@ RubySystem::printStats(ostream& out) m_network_ptr->printStats(out); } +void +RubySystem::serialize(std::ostream &os) +{ + +} + +void +RubySystem::unserialize(Checkpoint *cp, const string §ion) +{ + // + // The main purpose for clearing stats in the unserialize process is so + // that the profiler can correctly set its start time to the unserialized + // value of curTick + // + clearStats(); +} + void RubySystem::clearStats() const { diff --git a/src/mem/ruby/system/System.hh b/src/mem/ruby/system/System.hh index 77b056faf..608aca1d8 100644 --- a/src/mem/ruby/system/System.hh +++ b/src/mem/ruby/system/System.hh @@ -125,6 +125,9 @@ class RubySystem : public SimObject void print(std::ostream& out) const; + virtual void serialize(std::ostream &os); + virtual void unserialize(Checkpoint *cp, const std::string §ion); + private: // Private copy constructor and assignment operator RubySystem(const RubySystem& obj);