Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/45908 )
Change subject: fastmodel,cpu: Eliminate the unused getVirtProxy.
......................................................................
fastmodel,cpu: Eliminate the unused getVirtProxy.
Change-Id: I84683a3297143102a74ac6dfe744cd5804b83fe4
---
M src/arch/arm/fastmodel/iris/thread_context.cc
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/checker/thread_context.hh
M src/cpu/o3/thread_context.cc
M src/cpu/o3/thread_context.hh
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
9 files changed, 4 insertions(+), 82 deletions(-)
diff --git a/src/arch/arm/fastmodel/iris/thread_context.cc
b/src/arch/arm/fastmodel/iris/thread_context.cc
index 2392592..af925cf 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -475,18 +475,6 @@
}
void
-ThreadContext::initMemProxies(::ThreadContext *tc)
-{
- assert(!virtProxy);
- if (FullSystem) {
- virtProxy.reset(new TranslatingPortProxy(tc));
- } else {
- virtProxy.reset(new SETranslatingPortProxy(this,
- SETranslatingPortProxy::NextPage));
- }
-}
-
-void
ThreadContext::sendFunctional(PacketPtr pkt)
{
auto *iris_cpu = dynamic_cast<Iris::BaseCPU *>(getCpuPtr());
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index cc7ec6e..54a3c5a 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -94,9 +94,6 @@
std::vector<iris::MemorySpaceInfo> memorySpaces;
std::vector<iris::MemorySupportedAddressTranslationResult>
translations;
- std::unique_ptr<PortProxy> virtProxy = nullptr;
-
-
// A queue to keep track of instruction count based events.
EventQueue comInstEventQueue;
// A helper function to maintain the IRIS step count. This makes sure
the
@@ -211,8 +208,7 @@
return _isa;
}
- PortProxy &getVirtProxy() override { return *virtProxy; }
- void initMemProxies(::ThreadContext *tc) override;
+ void initMemProxies(::ThreadContext *tc) override {}
void sendFunctional(PacketPtr pkt) override;
diff --git a/src/cpu/checker/thread_context.hh
b/src/cpu/checker/thread_context.hh
index 43bbf89..9b7d73b 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -149,12 +149,6 @@
void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
- PortProxy &
- getVirtProxy() override
- {
- return actualTC->getVirtProxy();
- }
-
void
initMemProxies(ThreadContext *tc) override
{
diff --git a/src/cpu/o3/thread_context.cc b/src/cpu/o3/thread_context.cc
index c4f5366..c336c47 100644
--- a/src/cpu/o3/thread_context.cc
+++ b/src/cpu/o3/thread_context.cc
@@ -45,12 +45,6 @@
#include "config/the_isa.hh"
#include "debug/O3CPU.hh"
-PortProxy&
-O3ThreadContext::getVirtProxy()
-{
- return thread->getVirtProxy();
-}
-
void
O3ThreadContext::takeOverFrom(ThreadContext *old_context)
{
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 85743a3..8a6ea2d 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -137,8 +137,6 @@
void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
- PortProxy &getVirtProxy() override;
-
void
initMemProxies(ThreadContext *tc) override
{
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 77a5b9d..61cadec 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -213,8 +213,6 @@
System *getSystemPtr() override { return system; }
- PortProxy &getVirtProxy() override { return
ThreadState::getVirtProxy(); }
-
void
initMemProxies(ThreadContext *tc) override
{
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 012484b..6831caf 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -144,8 +144,6 @@
virtual System *getSystemPtr() = 0;
- virtual PortProxy &getVirtProxy() = 0;
-
virtual void sendFunctional(PacketPtr pkt);
/**
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index 09d840c..4e9d532 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -43,61 +43,24 @@
numLoad(0), startNumLoad(0),
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
- process(_process), virtProxy(NULL),
- funcExeInst(0), storeCondFailures(0)
+ process(_process), funcExeInst(0), storeCondFailures(0)
{
}
-ThreadState::~ThreadState()
-{
- if (virtProxy != NULL)
- delete virtProxy;
-}
-
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
-ThreadState::initMemProxies(ThreadContext *tc)
-{
- // The port proxies only refer to the data port on the CPU side
- // and can safely be done at init() time even if the CPU is not
- // connected, i.e. when restoring from a checkpoint and later
- // switching the CPU in.
- assert(virtProxy == NULL);
- if (FullSystem) {
- virtProxy = new TranslatingPortProxy(tc);
- } else {
- virtProxy = new SETranslatingPortProxy(
- tc, SETranslatingPortProxy::NextPage);
- }
-}
-
-PortProxy &
-ThreadState::getVirtProxy()
-{
- assert(virtProxy != NULL);
- return *virtProxy;
}
ThreadState::ThreadStateStats::ThreadStateStats(BaseCPU *cpu,
@@ -109,5 +72,4 @@
ADD_STAT(numMemRefs, Stats::Units::Count::get(),
"Number of Memory References")
{
-
}
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index e1a4734..2571ae5 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -49,7 +49,7 @@
ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process);
- virtual ~ThreadState();
+ virtual ~ThreadState() = default;
void serialize(CheckpointOut &cp) const override;
@@ -77,9 +77,7 @@
*
* @param tc ThreadContext for the virtual-to-physical translation
*/
- void initMemProxies(ThreadContext *tc);
-
- PortProxy &getVirtProxy();
+ void initMemProxies(ThreadContext *tc) {}
Process *getProcessPtr() { return process; }
@@ -149,10 +147,6 @@
protected:
Process *process;
- /** A translating port proxy, outgoing only, for functional
- * accesse to virtual addresses. */
- PortProxy *virtProxy;
-
public:
/*
* number of executed instructions, for matching with syscall trace
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45908
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: I84683a3297143102a74ac6dfe744cd5804b83fe4
Gerrit-Change-Number: 45908
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s