summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/System.hh
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:21 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:21 -0800
commit1907e39fd2c30ead9589f0bb6995972cbd0e153f (patch)
tree2e5c96fcd6dfc18af9b5a7e717590292f810ff52 /src/mem/ruby/system/System.hh
parent020716cab3dca04d3f6b24b6dce67d5f5cbc4e5e (diff)
downloadgem5-1907e39fd2c30ead9589f0bb6995972cbd0e153f.tar.xz
ruby: added ruby stats print
Moved the previous rubymem stats print feature to ruby System so that ruby stats are printed on simulation exit.
Diffstat (limited to 'src/mem/ruby/system/System.hh')
-rw-r--r--src/mem/ruby/system/System.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mem/ruby/system/System.hh b/src/mem/ruby/system/System.hh
index 1aebad748..bc5cd3f3d 100644
--- a/src/mem/ruby/system/System.hh
+++ b/src/mem/ruby/system/System.hh
@@ -48,6 +48,7 @@
#include <map>
#include "sim/sim_object.hh"
#include "params/RubySystem.hh"
+#include "base/callback.hh"
class Profiler;
class Network;
@@ -201,6 +202,27 @@ ostream& operator<<(ostream& out, const RubySystem& obj)
return out;
}
+class RubyExitCallback : public Callback
+{
+ private:
+ string stats_filename;
+
+ public:
+ /**
+ * virtualize the destructor to make sure that the correct one
+ * gets called.
+ */
+
+ virtual ~RubyExitCallback() {}
+
+ RubyExitCallback(const string& _stats_filename)
+ {
+ stats_filename = _stats_filename;
+ }
+
+ virtual void process();
+};
+
#endif //SYSTEM_H