From 0622f30961fc32b967bb1ef784afc5a205b16f6e Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 19 Feb 2013 05:56:05 -0500 Subject: mem: Add predecessor to SenderState base class This patch adds a predecessor field to the SenderState base class to make the process of linking them up more uniform, and enable a traversal of the stack without knowing the specific type of the subclasses. There are a number of simplifications done as part of changing the SenderState, particularly in the RubyTest. --- src/mem/comm_monitor.hh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/mem/comm_monitor.hh') diff --git a/src/mem/comm_monitor.hh b/src/mem/comm_monitor.hh index 271ae5fff..c3cb0d352 100644 --- a/src/mem/comm_monitor.hh +++ b/src/mem/comm_monitor.hh @@ -107,23 +107,18 @@ class CommMonitor : public MemObject public: /** - * Construct a new sender state and remember the original one - * so that we can implement a stack. + * Construct a new sender state and store the time so we can + * calculate round-trip latency. * - * @param _origSenderState Sender state to remember * @param _transmitTime Time of packet transmission */ - CommMonitorSenderState(SenderState* _origSenderState, - Tick _transmitTime) - : origSenderState(_origSenderState), transmitTime(_transmitTime) + CommMonitorSenderState(Tick _transmitTime) + : transmitTime(_transmitTime) { } /** Destructor */ ~CommMonitorSenderState() { } - /** Pointer to old sender state of packet */ - SenderState* origSenderState; - /** Tick when request is transmitted */ Tick transmitTime; -- cgit v1.2.3