diff options
Diffstat (limited to 'src/mem/comm_monitor.hh')
-rw-r--r-- | src/mem/comm_monitor.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mem/comm_monitor.hh b/src/mem/comm_monitor.hh index e59b8c467..271ae5fff 100644 --- a/src/mem/comm_monitor.hh +++ b/src/mem/comm_monitor.hh @@ -45,6 +45,7 @@ #include "base/time.hh" #include "mem/mem_object.hh" #include "params/CommMonitor.hh" +#include "proto/protoio.hh" /** * The communication monitor is a MemObject which can monitor statistics of @@ -75,7 +76,13 @@ class CommMonitor : public MemObject CommMonitor(Params* params); /** Destructor */ - ~CommMonitor() { } + ~CommMonitor() {} + + /** + * Callback to flush and close all open output streams on exit. If + * we were calling the destructor it could be done there. + */ + void closeStreams(); virtual BaseMasterPort& getMasterPort(const std::string& if_name, PortID idx = InvalidPortID); @@ -427,6 +434,9 @@ class CommMonitor : public MemObject /** Instantiate stats */ MonitorStats stats; + + /** Output stream for a potential trace. */ + ProtoOutputStream* traceStream; }; #endif //__MEM_COMM_MONITOR_HH__ |