comm_monitor.cc (11804:220375a47eeb) | comm_monitor.cc (11847:22d08b519cb0) |
---|---|
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 | 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) { | 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) { |
277 DPRINTF(CommMonitor, "Forwarded %s request\n", 278 (is_read ? "read" : (is_write ? "write" : "non read/write"))); | 275 DPRINTF(CommMonitor, "Forwarded %s request\n", pkt->isRead() ? "read" : 276 pkt->isWrite() ? "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 | 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 |
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); | 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); |
328 DPRINTF(CommMonitor, "Received %s response\n", 329 (is_read ? "Read" : (is_write ? "Write" : "non read/write"))); | 324 DPRINTF(CommMonitor, "Received %s response\n", pkt->isRead() ? "read" : 325 pkt->isWrite() ? "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 --- | 326 stats.updateRespStats(pkt_info, latency, false); 327 } 328 return successful; 329} 330 331void 332CommMonitor::recvTimingSnoopReq(PacketPtr pkt) 333{ --- 218 unchanged lines hidden --- |