cpu,fastmodel: Get rid of unused (read|set)FuncExeInst.

These zombie methods were plumbed around and looked like they might do
something, but nothing actually uses them.

Change-Id: I1e85669202e2ecb10370e6c6eb8364eb47085cf3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45919
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
Gabe Black
2021-05-23 01:34:53 -07:00
parent d583a9a227
commit d9bda9c2be
13 changed files with 1 additions and 77 deletions

View File

@@ -379,13 +379,6 @@ class ThreadContext : public ::ThreadContext
panic("%s not implemented.", __FUNCTION__);
}
// Same with st cond failures.
Counter
readFuncExeInst() const override
{
panic("%s not implemented.", __FUNCTION__);
}
/** @{ */
/**
* Flat register interfaces

View File

@@ -361,7 +361,6 @@ Checker<DynInstPtr>::verify(const DynInstPtr &completed_inst)
}
if (fault == NoFault && unverifiedFault == NoFault) {
thread->funcExeInst++;
// Checks to make sure instrution results are correct.
validateExecution(unverifiedInst);

View File

@@ -400,12 +400,6 @@ class CheckerThreadContext : public ThreadContext
actualTC->setStCondFailures(sc_failures);
}
Counter
readFuncExeInst() const override
{
return actualTC->readFuncExeInst();
}
RegVal
readIntRegFlat(RegIndex idx) const override
{

View File

@@ -1013,13 +1013,6 @@ Commit::commitInsts()
} else {
pc[tid] = head_inst->pcState();
// Increment the total number of non-speculative instructions
// executed.
// Hack for now: it really shouldn't happen until after the
// commit is deemed to be successful, but this count is needed
// for syscalls.
thread[tid]->funcExeInst++;
// Try to commit the head instruction.
bool commit_success = commitHead(head_inst, num_committed);
@@ -1155,10 +1148,6 @@ Commit::commitHead(const DynInstPtr &head_inst, unsigned inst_num)
// If the instruction is not executed yet, then it will need extra
// handling. Signal backwards that it should be executed.
if (!head_inst->isExecuted()) {
// Keep this number correct. We have not yet actually executed
// and committed this instruction.
thread[tid]->funcExeInst--;
// Make sure we are only trying to commit un-executed instructions we
// think are possible.
assert(head_inst->isNonSpeculative() || head_inst->isStoreConditional()

View File

@@ -348,9 +348,6 @@ CPU::CPU(const O3CPUParams &params)
fatal("O3CPU %s has no interrupt controller.\n"
"Ensure createInterruptController() is called.\n", name());
}
for (ThreadID tid = 0; tid < numThreads; tid++)
thread[tid]->setFuncExeInst(0);
}
void

View File

@@ -65,8 +65,6 @@ ThreadContext::takeOverFrom(::ThreadContext *old_context)
TheISA::Decoder *oldDecoder = old_context->getDecoderPtr();
newDecoder->takeOverFrom(oldDecoder);
thread->funcExeInst = old_context->readFuncExeInst();
thread->noSquashFromTC = false;
thread->trapPending = false;
}
@@ -149,9 +147,6 @@ ThreadContext::copyArchRegs(::ThreadContext *tc)
thread->noSquashFromTC = true;
getIsaPtr()->copyRegsFrom(tc);
thread->noSquashFromTC = false;
if (!FullSystem)
thread->funcExeInst = tc->readFuncExeInst();
}
void

View File

@@ -355,9 +355,6 @@ class ThreadContext : public ::ThreadContext
thread->storeCondFailures = sc_failures;
}
/** Reads the funcExeInst counter. */
Counter readFuncExeInst() const override { return thread->funcExeInst; }
/** check if the cpu is currently in state update mode and squash if not.
* This function will return true if a trap is pending or if a fault or
* similar is currently writing to the thread context and doesn't want

View File

@@ -162,8 +162,6 @@ BaseSimpleCPU::countInst()
if (!curStaticInst->isMicroop() || curStaticInst->isLastMicroop()) {
t_info.numInst++;
t_info.execContextStats.numInsts++;
t_info.thread->funcExeInst++;
}
t_info.numOp++;
t_info.execContextStats.numOps++;

View File

@@ -95,7 +95,6 @@ SimpleThread::takeOverFrom(ThreadContext *oldContext)
isa->takeOverFrom(this, oldContext);
funcExeInst = oldContext->readFuncExeInst();
storeCondFailures = 0;
}
@@ -105,8 +104,6 @@ SimpleThread::copyState(ThreadContext *oldContext)
// copy over functional state
_status = oldContext->status();
copyArchRegs(oldContext);
if (FullSystem)
funcExeInst = oldContext->readFuncExeInst();
_threadId = oldContext->threadId();
_contextId = oldContext->contextId();

View File

@@ -490,12 +490,6 @@ class SimpleThread : public ThreadState, public ThreadContext
storeCondFailures = sc_failures;
}
Counter
readFuncExeInst() const override
{
return ThreadState::readFuncExeInst();
}
RegVal readIntRegFlat(RegIndex idx) const override { return intRegs[idx]; }
void
setIntRegFlat(RegIndex idx, RegVal val) override

View File

@@ -268,9 +268,6 @@ class ThreadContext : public PCEventScope
virtual void setStCondFailures(unsigned sc_failures) = 0;
// Same with st cond failures.
virtual Counter readFuncExeInst() const = 0;
// This function exits the thread context in the CPU and returns
// 1 if the CPU has no more active threads (meaning it's OK to exit);
// Used in syscall-emulation mode when a thread calls the exit syscall.

View File

@@ -44,7 +44,7 @@ ThreadState::ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process)
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
process(_process), physProxy(NULL), virtProxy(NULL),
funcExeInst(0), storeCondFailures(0)
storeCondFailures(0)
{
}
@@ -60,23 +60,12 @@ void
ThreadState::serialize(CheckpointOut &cp) const
{
SERIALIZE_ENUM(_status);
// thread_num and cpu_id are deterministic from the config
SERIALIZE_SCALAR(funcExeInst);
if (!FullSystem)
return;
}
void
ThreadState::unserialize(CheckpointIn &cp)
{
UNSERIALIZE_ENUM(_status);
// thread_num and cpu_id are deterministic from the config
UNSERIALIZE_SCALAR(funcExeInst);
if (!FullSystem)
return;
}
void

View File

@@ -87,16 +87,6 @@ struct ThreadState : public Serializable
void setProcessPtr(Process *p) { process = p; }
/** Reads the number of instructions functionally executed and
* committed.
*/
Counter readFuncExeInst() const { return funcExeInst; }
/** Sets the total number of instructions functionally executed
* and committed.
*/
void setFuncExeInst(Counter new_val) { funcExeInst = new_val; }
/** Returns the status of this thread. */
Status status() const { return _status; }
@@ -160,11 +150,6 @@ struct ThreadState : public Serializable
PortProxy *virtProxy;
public:
/*
* number of executed instructions, for matching with syscall trace
* points in EIO files.
*/
Counter funcExeInst;
//
// Count failed store conditionals so we can warn of apparent