Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45919 )
Change subject: cpu,fastmodel: Get rid of unused (read|set)FuncExeInst.
......................................................................
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 <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Gabe Black <[email protected]>
---
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/checker/cpu_impl.hh
M src/cpu/checker/thread_context.hh
M src/cpu/o3/commit.cc
M src/cpu/o3/cpu.cc
M src/cpu/o3/thread_context.cc
M src/cpu/o3/thread_context.hh
M src/cpu/simple/base.cc
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
13 files changed, 1 insertion(+), 77 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index d093138..52085a0 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -379,13 +379,6 @@
panic("%s not implemented.", __FUNCTION__);
}
- // Same with st cond failures.
- Counter
- readFuncExeInst() const override
- {
- panic("%s not implemented.", __FUNCTION__);
- }
-
/** @{ */
/**
* Flat register interfaces
diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh
index 7b906d3..6684502 100644
--- a/src/cpu/checker/cpu_impl.hh
+++ b/src/cpu/checker/cpu_impl.hh
@@ -361,7 +361,6 @@
}
if (fault == NoFault && unverifiedFault == NoFault) {
- thread->funcExeInst++;
// Checks to make sure instrution results are correct.
validateExecution(unverifiedInst);
diff --git a/src/cpu/checker/thread_context.hh
b/src/cpu/checker/thread_context.hh
index 661c710..5d404ed 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -400,12 +400,6 @@
actualTC->setStCondFailures(sc_failures);
}
- Counter
- readFuncExeInst() const override
- {
- return actualTC->readFuncExeInst();
- }
-
RegVal
readIntRegFlat(RegIndex idx) const override
{
diff --git a/src/cpu/o3/commit.cc b/src/cpu/o3/commit.cc
index 869c9ae..7f1e9ca 100644
--- a/src/cpu/o3/commit.cc
+++ b/src/cpu/o3/commit.cc
@@ -1013,13 +1013,6 @@
} 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 @@
// 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()
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 915a3db..ad0102d 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -348,9 +348,6 @@
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
diff --git a/src/cpu/o3/thread_context.cc b/src/cpu/o3/thread_context.cc
index aac140a..a10de5a 100644
--- a/src/cpu/o3/thread_context.cc
+++ b/src/cpu/o3/thread_context.cc
@@ -65,8 +65,6 @@
TheISA::Decoder *oldDecoder = old_context->getDecoderPtr();
newDecoder->takeOverFrom(oldDecoder);
- thread->funcExeInst = old_context->readFuncExeInst();
-
thread->noSquashFromTC = false;
thread->trapPending = false;
}
@@ -149,9 +147,6 @@
thread->noSquashFromTC = true;
getIsaPtr()->copyRegsFrom(tc);
thread->noSquashFromTC = false;
-
- if (!FullSystem)
- thread->funcExeInst = tc->readFuncExeInst();
}
void
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index e946b88..351836e 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -355,9 +355,6 @@
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
diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc
index f13019e..820cde8 100644
--- a/src/cpu/simple/base.cc
+++ b/src/cpu/simple/base.cc
@@ -162,8 +162,6 @@
if (!curStaticInst->isMicroop() || curStaticInst->isLastMicroop()) {
t_info.numInst++;
t_info.execContextStats.numInsts++;
-
- t_info.thread->funcExeInst++;
}
t_info.numOp++;
t_info.execContextStats.numOps++;
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index 6a577f0..b3e6e48 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -95,7 +95,6 @@
isa->takeOverFrom(this, oldContext);
- funcExeInst = oldContext->readFuncExeInst();
storeCondFailures = 0;
}
@@ -105,8 +104,6 @@
// copy over functional state
_status = oldContext->status();
copyArchRegs(oldContext);
- if (FullSystem)
- funcExeInst = oldContext->readFuncExeInst();
_threadId = oldContext->threadId();
_contextId = oldContext->contextId();
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 9d2d3d5..fa52c88 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -490,12 +490,6 @@
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
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 921135c..333c084 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -268,9 +268,6 @@
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.
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index 5100e0c..ba1cd6e 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -44,7 +44,7 @@
_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 @@
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
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 90d2a48..9408d66 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -87,16 +87,6 @@
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 @@
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
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45919
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1e85669202e2ecb10370e6c6eb8364eb47085cf3
Gerrit-Change-Number: 45919
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s