Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45905 )
Change subject: cpu,fastmodel: Get rid of the unused
ThreadContext::getPhysProxy.
......................................................................
cpu,fastmodel: Get rid of the unused ThreadContext::getPhysProxy.
Change-Id: I31abd77235310c8577c4281bbefaea57a25feb73
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45905
Maintainer: Gabe Black <[email protected]>
Reviewed-by: Yu-hsin Wang <[email protected]>
Tested-by: kokoro <[email protected]>
---
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.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
8 files changed, 3 insertions(+), 35 deletions(-)
Approvals:
Yu-hsin Wang: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/fastmodel/iris/thread_context.cc
b/src/arch/arm/fastmodel/iris/thread_context.cc
index 3116139..2392592 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -477,12 +477,10 @@
void
ThreadContext::initMemProxies(::ThreadContext *tc)
{
+ assert(!virtProxy);
if (FullSystem) {
- assert(!physProxy && !virtProxy);
- physProxy.reset(new PortProxy(tc, _cpu->cacheLineSize()));
virtProxy.reset(new TranslatingPortProxy(tc));
} else {
- assert(!virtProxy);
virtProxy.reset(new SETranslatingPortProxy(this,
SETranslatingPortProxy::NextPage));
}
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index 52085a0..5c8d82f 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -95,7 +95,6 @@
std::vector<iris::MemorySupportedAddressTranslationResult>
translations;
std::unique_ptr<PortProxy> virtProxy = nullptr;
- std::unique_ptr<PortProxy> physProxy = nullptr;
// A queue to keep track of instruction count based events.
@@ -212,7 +211,6 @@
return _isa;
}
- PortProxy &getPhysProxy() override { return *physProxy; }
PortProxy &getVirtProxy() override { return *virtProxy; }
void initMemProxies(::ThreadContext *tc) override;
diff --git a/src/cpu/checker/thread_context.hh
b/src/cpu/checker/thread_context.hh
index 933df42..1e961c5 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -149,8 +149,6 @@
void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
- PortProxy &getPhysProxy() override { return actualTC->getPhysProxy(); }
-
PortProxy &
getVirtProxy() override
{
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 351836e..e0fd11f 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -140,8 +140,6 @@
void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
- PortProxy &getPhysProxy() override { return thread->getPhysProxy(); }
-
PortProxy &getVirtProxy() override;
void
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 5763da6..f64f2c1 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -213,7 +213,6 @@
System *getSystemPtr() override { return system; }
- PortProxy &getPhysProxy() override { return
ThreadState::getPhysProxy(); }
PortProxy &getVirtProxy() override { return
ThreadState::getVirtProxy(); }
void
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index aec573e..5203869 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -144,8 +144,6 @@
virtual System *getSystemPtr() = 0;
- virtual PortProxy &getPhysProxy() = 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 ba1cd6e..6956196 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -43,15 +43,12 @@
numLoad(0), startNumLoad(0),
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
- process(_process), physProxy(NULL), virtProxy(NULL),
- storeCondFailures(0)
+ process(_process), virtProxy(NULL), storeCondFailures(0)
{
}
ThreadState::~ThreadState()
{
- if (physProxy != NULL)
- delete physProxy;
if (virtProxy != NULL)
delete virtProxy;
}
@@ -75,28 +72,16 @@
// 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) {
- assert(physProxy == NULL);
- physProxy = new PortProxy(tc, baseCpu->cacheLineSize());
-
- assert(virtProxy == NULL);
virtProxy = new TranslatingPortProxy(tc);
} else {
- assert(virtProxy == NULL);
virtProxy = new SETranslatingPortProxy(
tc, SETranslatingPortProxy::NextPage);
}
}
PortProxy &
-ThreadState::getPhysProxy()
-{
- assert(FullSystem);
- assert(physProxy != NULL);
- return *physProxy;
-}
-
-PortProxy &
ThreadState::getVirtProxy()
{
assert(virtProxy != NULL);
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 661dff2..4c8a006 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -77,8 +77,6 @@
*/
void initMemProxies(ThreadContext *tc);
- PortProxy &getPhysProxy();
-
PortProxy &getVirtProxy();
Process *getProcessPtr() { return process; }
@@ -139,10 +137,6 @@
protected:
Process *process;
- /** A port proxy outgoing only for functional accesses to physical
- * addresses.*/
- PortProxy *physProxy;
-
/** A translating port proxy, outgoing only, for functional
* accesse to virtual addresses. */
PortProxy *virtProxy;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45905
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: I31abd77235310c8577c4281bbefaea57a25feb73
Gerrit-Change-Number: 45905
Gerrit-PatchSet: 5
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: Yu-hsin Wang <[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