Remove threadnum from cache everywhere for now
Fix so that blocking for the same reason doesn't fail. I.E. multiple writebacks want to set the blocked flag. src/mem/cache/miss/blocking_buffer.cc: src/mem/cache/miss/miss_queue.cc: src/mem/cache/miss/mshr.cc: Remove threadnum from cache everywhere for now --HG-- extra : convert_revision : 7890712147655280b4f1439d486feafbd5b18b2b
This commit is contained in:
parent
212c5aefb5
commit
1b6653b6f7
4 changed files with 25 additions and 19 deletions
18
src/mem/cache/base_cache.hh
vendored
18
src/mem/cache/base_cache.hh
vendored
|
@ -394,9 +394,12 @@ class BaseCache : public MemObject
|
|||
blocked_causes[cause]++;
|
||||
blockedCycle = curTick;
|
||||
}
|
||||
blocked |= flag;
|
||||
DPRINTF(Cache,"Blocking for cause %s\n", cause);
|
||||
cpuSidePort->setBlocked();
|
||||
if (!(blocked & flag)) {
|
||||
//Wasn't already blocked for this cause
|
||||
blocked |= flag;
|
||||
DPRINTF(Cache,"Blocking for cause %s\n", cause);
|
||||
cpuSidePort->setBlocked();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -407,8 +410,11 @@ class BaseCache : public MemObject
|
|||
void setBlockedForSnoop(BlockedCause cause)
|
||||
{
|
||||
uint8_t flag = 1 << cause;
|
||||
blockedSnoop |= flag;
|
||||
memSidePort->setBlocked();
|
||||
if (!(blocked & flag)) {
|
||||
//Wasn't already blocked for this cause
|
||||
blockedSnoop |= flag;
|
||||
memSidePort->setBlocked();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -527,7 +533,7 @@ class BaseCache : public MemObject
|
|||
void respondToMiss(Packet *pkt, Tick time)
|
||||
{
|
||||
if (!pkt->req->isUncacheable()) {
|
||||
missLatency[pkt->cmdToIndex()][pkt->req->getThreadNum()] += time - pkt->time;
|
||||
missLatency[pkt->cmdToIndex()][0/*pkt->req->getThreadNum()*/] += time - pkt->time;
|
||||
}
|
||||
CacheEvent *reqCpu = new CacheEvent(cpuSidePort, pkt);
|
||||
reqCpu->schedule(time);
|
||||
|
|
6
src/mem/cache/miss/blocking_buffer.cc
vendored
6
src/mem/cache/miss/blocking_buffer.cc
vendored
|
@ -189,7 +189,7 @@ BlockingBuffer::squash(int threadNum)
|
|||
if (miss.threadNum == threadNum) {
|
||||
Packet * target = miss.getTarget();
|
||||
miss.popTarget();
|
||||
assert(target->req->getThreadNum() == threadNum);
|
||||
assert(0/*target->req->getThreadNum()*/ == threadNum);
|
||||
target = NULL;
|
||||
assert(!miss.hasTargets());
|
||||
miss.ntargets=0;
|
||||
|
@ -218,7 +218,7 @@ BlockingBuffer::doWriteback(Addr addr,
|
|||
}
|
||||
|
||||
///All writebacks charged to same thread @todo figure this out
|
||||
writebacks[pkt->req->getThreadNum()]++;
|
||||
writebacks[0/*pkt->req->getThreadNum()*/]++;
|
||||
|
||||
wb.allocateAsBuffer(pkt);
|
||||
cache->setMasterRequest(Request_WB, curTick);
|
||||
|
@ -230,7 +230,7 @@ BlockingBuffer::doWriteback(Addr addr,
|
|||
void
|
||||
BlockingBuffer::doWriteback(Packet * &pkt)
|
||||
{
|
||||
writebacks[pkt->req->getThreadNum()]++;
|
||||
writebacks[0/*pkt->req->getThreadNum()*/]++;
|
||||
|
||||
wb.allocateAsBuffer(pkt);
|
||||
|
||||
|
|
18
src/mem/cache/miss/miss_queue.cc
vendored
18
src/mem/cache/miss/miss_queue.cc
vendored
|
@ -413,8 +413,8 @@ MissQueue::handleMiss(Packet * &pkt, int blkSize, Tick time)
|
|||
mshr = mq.findMatch(blkAddr);
|
||||
if (mshr) {
|
||||
//@todo remove hw_pf here
|
||||
mshr_hits[pkt->cmdToIndex()][pkt->req->getThreadNum()]++;
|
||||
if (mshr->threadNum != pkt->req->getThreadNum()) {
|
||||
mshr_hits[pkt->cmdToIndex()][0/*pkt->req->getThreadNum()*/]++;
|
||||
if (mshr->threadNum != 0/*pkt->req->getThreadNum()*/) {
|
||||
mshr->threadNum = -1;
|
||||
}
|
||||
mq.allocateTarget(mshr, pkt);
|
||||
|
@ -434,11 +434,11 @@ MissQueue::handleMiss(Packet * &pkt, int blkSize, Tick time)
|
|||
mshr_no_allocate_misses++;
|
||||
}
|
||||
else {
|
||||
mshr_misses[pkt->cmdToIndex()][pkt->req->getThreadNum()]++;
|
||||
mshr_misses[pkt->cmdToIndex()][0/*pkt->req->getThreadNum()*/]++;
|
||||
}
|
||||
} else {
|
||||
//Count uncacheable accesses
|
||||
mshr_uncacheable[pkt->cmdToIndex()][pkt->req->getThreadNum()]++;
|
||||
mshr_uncacheable[pkt->cmdToIndex()][0/*pkt->req->getThreadNum()*/]++;
|
||||
size = pkt->getSize();
|
||||
}
|
||||
if (pkt->isWrite() && (pkt->req->isUncacheable() || !writeAllocate ||
|
||||
|
@ -499,7 +499,7 @@ MissQueue::getPacket()
|
|||
pkt = prefetcher->getPacket();
|
||||
if (pkt) {
|
||||
//Update statistic on number of prefetches issued (hwpf_mshr_misses)
|
||||
mshr_misses[pkt->cmdToIndex()][pkt->req->getThreadNum()]++;
|
||||
mshr_misses[pkt->cmdToIndex()][0/*pkt->req->getThreadNum()*/]++;
|
||||
//It will request the bus for the future, but should clear that immedieatley
|
||||
allocateMiss(pkt, pkt->getSize(), curTick);
|
||||
pkt = mq.getReq();
|
||||
|
@ -592,7 +592,7 @@ MissQueue::handleResponse(Packet * &pkt, Tick time)
|
|||
BlockedCause cause = NUM_BLOCKED_CAUSES;
|
||||
|
||||
if (pkt->isCacheFill() && !pkt->isNoAllocate()) {
|
||||
mshr_miss_latency[mshr->originalCmd][pkt->req->getThreadNum()] +=
|
||||
mshr_miss_latency[mshr->originalCmd][0/*pkt->req->getThreadNum()*/] +=
|
||||
curTick - pkt->time;
|
||||
// targets were handled in the cache tags
|
||||
if (mshr == noTargetMSHR) {
|
||||
|
@ -619,7 +619,7 @@ MissQueue::handleResponse(Packet * &pkt, Tick time)
|
|||
}
|
||||
} else {
|
||||
if (pkt->req->isUncacheable()) {
|
||||
mshr_uncacheable_lat[pkt->cmd][pkt->req->getThreadNum()] +=
|
||||
mshr_uncacheable_lat[pkt->cmd][0/*pkt->req->getThreadNum()*/] +=
|
||||
curTick - pkt->time;
|
||||
}
|
||||
if (mshr->hasTargets() && pkt->req->isUncacheable()) {
|
||||
|
@ -725,7 +725,7 @@ MissQueue::doWriteback(Addr addr,
|
|||
}
|
||||
|
||||
///All writebacks charged to same thread @todo figure this out
|
||||
writebacks[pkt->req->getThreadNum()]++;
|
||||
writebacks[0/*pkt->req->getThreadNum()*/]++;
|
||||
|
||||
allocateWrite(pkt, 0, curTick);
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ MissQueue::doWriteback(Addr addr,
|
|||
void
|
||||
MissQueue::doWriteback(Packet * &pkt)
|
||||
{
|
||||
writebacks[pkt->req->getThreadNum()]++;
|
||||
writebacks[0/*pkt->req->getThreadNum()*/]++;
|
||||
allocateWrite(pkt, 0, curTick);
|
||||
}
|
||||
|
||||
|
|
2
src/mem/cache/miss/mshr.cc
vendored
2
src/mem/cache/miss/mshr.cc
vendored
|
@ -88,7 +88,7 @@ void
|
|||
MSHR::allocateAsBuffer(Packet * &target)
|
||||
{
|
||||
addr = target->getAddr();
|
||||
threadNum = target->req->getThreadNum();
|
||||
threadNum = 0/*target->req->getThreadNum()*/;
|
||||
pkt = new Packet(target->req, target->cmd, -1);
|
||||
pkt->allocate();
|
||||
pkt->senderState = (Packet::SenderState*)this;
|
||||
|
|
Loading…
Reference in a new issue