summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/System.hh
diff options
context:
space:
mode:
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