Mem: Put prefetcher notify call before packet is deleted.

This commit is contained in:
Ali Saidi 2011-08-19 15:08:08 -05:00
parent 2fd2b44b86
commit c9c2d979b8

View file

@ -514,18 +514,18 @@ Cache<TagStore>::timingAccess(PacketPtr pkt)
bool needsResponse = pkt->needsResponse(); bool needsResponse = pkt->needsResponse();
if (satisfied) { if (satisfied) {
if (prefetcher && (prefetchOnAccess || (blk && blk->wasPrefetched()))) {
if (blk)
blk->status &= ~BlkHWPrefetched;
next_pf_time = prefetcher->notify(pkt, time);
}
if (needsResponse) { if (needsResponse) {
pkt->makeTimingResponse(); pkt->makeTimingResponse();
cpuSidePort->respond(pkt, curTick()+lat); cpuSidePort->respond(pkt, curTick()+lat);
} else { } else {
delete pkt; delete pkt;
} }
if (prefetcher && (prefetchOnAccess || (blk && blk->wasPrefetched()))) {
if (blk)
blk->status &= ~BlkHWPrefetched;
next_pf_time = prefetcher->notify(pkt, time);
}
} else { } else {
// miss // miss