#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
CommMonitor(Params* params);
/** Destructor */
- ~CommMonitor() { }
+ ~CommMonitor() {}
- virtual MasterPort& getMasterPort(const std::string& if_name,
- int idx = -1);
+ /**
+ * 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 SlavePort& getSlavePort(const std::string& if_name,
- int idx = -1);
+ virtual BaseMasterPort& getMasterPort(const std::string& if_name,
+ PortID idx = InvalidPortID);
+
+ virtual BaseSlavePort& getSlavePort(const std::string& if_name,
+ PortID idx = InvalidPortID);
virtual void init();
return mon.deviceBlockSizeSlave();
}
- AddrRangeList getAddrRanges()
+ AddrRangeList getAddrRanges() const
{
return mon.getAddrRanges();
}
unsigned deviceBlockSizeSlave();
- AddrRangeList getAddrRanges();
+ AddrRangeList getAddrRanges() const;
bool isSnooping() const;
/** Instantiate stats */
MonitorStats stats;
+
+ /** Output stream for a potential trace. */
+ ProtoOutputStream* traceStream;
};
#endif //__MEM_COMM_MONITOR_HH__