Gabe Black has uploaded this change for review. (
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
---
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(+), 34 deletions(-)
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 d093138..cc7ec6e 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 661c710..43bbf89 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 23bc5a3..85743a3 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 &getPhysProxy() override { return thread->getPhysProxy(); }
-
PortProxy &getVirtProxy() override;
void
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index 9d2d3d5..77a5b9d 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 921135c..012484b 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 740f8a5..09d840c 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -43,15 +43,13 @@
numLoad(0), startNumLoad(0),
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
- process(_process), physProxy(NULL), virtProxy(NULL),
+ process(_process), virtProxy(NULL),
funcExeInst(0), storeCondFailures(0)
{
}
ThreadState::~ThreadState()
{
- if (physProxy != NULL)
- delete physProxy;
if (virtProxy != NULL)
delete virtProxy;
}
@@ -86,28 +84,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 90d2a48..e1a4734 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -79,8 +79,6 @@
*/
void initMemProxies(ThreadContext *tc);
- PortProxy &getPhysProxy();
-
PortProxy &getVirtProxy();
Process *getProcessPtr() { return process; }
@@ -151,10 +149,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: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s