Deleted Added
sdiff udiff text old ( 11804:220375a47eeb ) new ( 11847:22d08b519cb0 )
full compact
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * Copyright (c) 2016 Google Inc.
4 * All rights reserved.
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating

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

243{
244 // should always see a request
245 assert(pkt->isRequest());
246
247 // Store relevant fields of packet, because packet may be modified
248 // or even deleted when sendTiming() is called.
249 const ProbePoints::PacketInfo pkt_info(pkt);
250
251 const bool is_read = pkt->isRead();
252 const bool is_write = pkt->isWrite();
253 const bool expects_response(pkt->needsResponse() &&
254 !pkt->cacheResponding());
255
256 // If a cache miss is served by a cache, a monitor near the memory
257 // would see a request which needs a response, but this response
258 // would not come back from the memory. Therefore we additionally
259 // have to check the cacheResponding flag
260 if (expects_response && !stats.disableLatencyHists) {

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

269 delete pkt->popSenderState();
270 }
271
272 if (successful) {
273 ppPktReq->notify(pkt_info);
274 }
275
276 if (successful) {
277 DPRINTF(CommMonitor, "Forwarded %s request\n",
278 (is_read ? "read" : (is_write ? "write" : "non read/write")));
279 stats.updateReqStats(pkt_info, false, expects_response);
280 }
281 return successful;
282}
283
284bool
285CommMonitor::recvTimingResp(PacketPtr pkt)
286{
287 // should always see responses
288 assert(pkt->isResponse());
289
290 // Store relevant fields of packet, because packet may be modified
291 // or even deleted when sendTiming() is called.
292 const ProbePoints::PacketInfo pkt_info(pkt);
293
294 bool is_read = pkt->isRead();
295 bool is_write = pkt->isWrite();
296 Tick latency = 0;
297 CommMonitorSenderState* received_state =
298 dynamic_cast<CommMonitorSenderState*>(pkt->senderState);
299
300 if (!stats.disableLatencyHists) {
301 // Restore initial sender state
302 if (received_state == NULL)
303 panic("Monitor got a response without monitor sender state\n");

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

320 // Don't delete anything and let the packet look like we
321 // did not touch it
322 pkt->senderState = received_state;
323 }
324 }
325
326 if (successful) {
327 ppPktResp->notify(pkt_info);
328 DPRINTF(CommMonitor, "Received %s response\n",
329 (is_read ? "Read" : (is_write ? "Write" : "non read/write")));
330 stats.updateRespStats(pkt_info, latency, false);
331 }
332 return successful;
333}
334
335void
336CommMonitor::recvTimingSnoopReq(PacketPtr pkt)
337{

--- 218 unchanged lines hidden ---