comm_monitor.cc (9540:9ddb996931d7) comm_monitor.cc (9542:683991c46ac8)
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 153 unchanged lines hidden (view full) ---

162 // or even deleted when sendTiming() is called.
163 bool isRead = pkt->isRead();
164 bool isWrite = pkt->isWrite();
165 int cmd = pkt->cmdToIndex();
166 unsigned size = pkt->getSize();
167 Addr addr = pkt->getAddr();
168 bool needsResponse = pkt->needsResponse();
169 bool memInhibitAsserted = pkt->memInhibitAsserted();
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 153 unchanged lines hidden (view full) ---

162 // or even deleted when sendTiming() is called.
163 bool isRead = pkt->isRead();
164 bool isWrite = pkt->isWrite();
165 int cmd = pkt->cmdToIndex();
166 unsigned size = pkt->getSize();
167 Addr addr = pkt->getAddr();
168 bool needsResponse = pkt->needsResponse();
169 bool memInhibitAsserted = pkt->memInhibitAsserted();
170 Packet::SenderState* senderState = pkt->senderState;
171
172 // If a cache miss is served by a cache, a monitor near the memory
173 // would see a request which needs a response, but this response
174 // would be inhibited and not come back from the memory. Therefore
175 // we additionally have to check the inhibit flag.
176 if (needsResponse && !memInhibitAsserted && !stats.disableLatencyHists) {
170
171 // If a cache miss is served by a cache, a monitor near the memory
172 // would see a request which needs a response, but this response
173 // would be inhibited and not come back from the memory. Therefore
174 // we additionally have to check the inhibit flag.
175 if (needsResponse && !memInhibitAsserted && !stats.disableLatencyHists) {
177 pkt->senderState = new CommMonitorSenderState(senderState,
178 curTick());
176 pkt->pushSenderState(new CommMonitorSenderState(curTick()));
179 }
180
181 // Attempt to send the packet (always succeeds for inhibited
182 // packets)
183 bool successful = masterPort.sendTimingReq(pkt);
184
185 // If not successful, restore the sender state
186 if (!successful && needsResponse && !stats.disableLatencyHists) {
177 }
178
179 // Attempt to send the packet (always succeeds for inhibited
180 // packets)
181 bool successful = masterPort.sendTimingReq(pkt);
182
183 // If not successful, restore the sender state
184 if (!successful && needsResponse && !stats.disableLatencyHists) {
187 delete pkt->senderState;
188 pkt->senderState = senderState;
185 delete pkt->popSenderState();
189 }
190
191 if (successful && traceStream != NULL) {
192 // Create a protobuf message representing the
193 // packet. Currently we do not preserve the flags in the
194 // trace.
195 Message::Packet pkt_msg;
196 pkt_msg.set_tick(curTick());

--- 104 unchanged lines hidden (view full) ---

301 dynamic_cast<CommMonitorSenderState*>(pkt->senderState);
302
303 if (!stats.disableLatencyHists) {
304 // Restore initial sender state
305 if (commReceivedState == NULL)
306 panic("Monitor got a response without monitor sender state\n");
307
308 // Restore the sate
186 }
187
188 if (successful && traceStream != NULL) {
189 // Create a protobuf message representing the
190 // packet. Currently we do not preserve the flags in the
191 // trace.
192 Message::Packet pkt_msg;
193 pkt_msg.set_tick(curTick());

--- 104 unchanged lines hidden (view full) ---

298 dynamic_cast<CommMonitorSenderState*>(pkt->senderState);
299
300 if (!stats.disableLatencyHists) {
301 // Restore initial sender state
302 if (commReceivedState == NULL)
303 panic("Monitor got a response without monitor sender state\n");
304
305 // Restore the sate
309 pkt->senderState = commReceivedState->origSenderState;
306 pkt->senderState = commReceivedState->predecessor;
310 }
311
312 // Attempt to send the packet
313 bool successful = slavePort.sendTimingResp(pkt);
314
315 if (!stats.disableLatencyHists) {
316 // If packet successfully send, sample value of latency,
317 // afterwards delete sender state, otherwise restore state

--- 271 unchanged lines hidden ---
307 }
308
309 // Attempt to send the packet
310 bool successful = slavePort.sendTimingResp(pkt);
311
312 if (!stats.disableLatencyHists) {
313 // If packet successfully send, sample value of latency,
314 // afterwards delete sender state, otherwise restore state

--- 271 unchanged lines hidden ---