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 expects_response(pkt->needsResponse() &&
252 !pkt->cacheResponding());
253
254 // If a cache miss is served by a cache, a monitor near the memory
255 // would see a request which needs a response, but this response
256 // would not come back from the memory. Therefore we additionally
257 // have to check the cacheResponding flag
258 if (expects_response && !stats.disableLatencyHists) {

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

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

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

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

--- 218 unchanged lines hidden ---