changeset ec3b148b14f3 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=ec3b148b14f3
description:
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.
diffstat:
src/mem/ruby/system/System.cc | 17 +++++++++++++++++
src/mem/ruby/system/System.hh | 3 +++
2 files changed, 20 insertions(+), 0 deletions(-)
diffs (40 lines):
diff -r 02a9a597fce4 -r ec3b148b14f3 src/mem/ruby/system/System.cc
--- a/src/mem/ruby/system/System.cc Fri Aug 20 11:46:13 2010 -0700
+++ b/src/mem/ruby/system/System.cc Fri Aug 20 11:46:13 2010 -0700
@@ -148,6 +148,23 @@
}
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
{
m_profiler_ptr->clearStats();
diff -r 02a9a597fce4 -r ec3b148b14f3 src/mem/ruby/system/System.hh
--- a/src/mem/ruby/system/System.hh Fri Aug 20 11:46:13 2010 -0700
+++ b/src/mem/ruby/system/System.hh Fri Aug 20 11:46:13 2010 -0700
@@ -125,6 +125,9 @@
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);
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev