Gabe Black has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45908
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[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.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(+), 74 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.cc b/src/arch/arm/fastmodel/iris/thread_context.cc
index 0ff5bd7..e2b32f4 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -478,18 +478,6 @@
 }

 void
-ThreadContext::initMemProxies(gem5::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 6d42288..0266053 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -98,9 +98,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
@@ -215,8 +212,7 @@
         return _isa;
     }

-    PortProxy &getVirtProxy() override { return *virtProxy; }
-    void initMemProxies(gem5::ThreadContext *tc) override;
+    void initMemProxies(gem5::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 30056d7..b9abf53 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -167,12 +167,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 225e03d..0fbdf67 100644
--- a/src/cpu/o3/thread_context.cc
+++ b/src/cpu/o3/thread_context.cc
@@ -51,12 +51,6 @@
 namespace o3
 {

-PortProxy&
-ThreadContext::getVirtProxy()
-{
-    return thread->getVirtProxy();
-}
-
 void
 ThreadContext::takeOverFrom(gem5::ThreadContext *old_context)
 {
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index a1fabb6..e022abd 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -143,8 +143,6 @@

     void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }

-    PortProxy &getVirtProxy() override;
-
     void
     initMemProxies(gem5::ThreadContext *tc) override
     {
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index d95b2ba..bec4bf5 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -216,8 +216,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 d7002a9..355bd85 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -147,8 +147,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 853c47b..272b89e 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -46,16 +46,10 @@
       numLoad(0), startNumLoad(0),
       _status(ThreadContext::Halted), baseCpu(cpu),
       _contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
-      process(_process), virtProxy(NULL), storeCondFailures(0)
+      process(_process), storeCondFailures(0)
 {
 }

-ThreadState::~ThreadState()
-{
-    if (virtProxy != NULL)
-        delete virtProxy;
-}
-
 void
 ThreadState::serialize(CheckpointOut &cp) const
 {
@@ -68,29 +62,6 @@
     UNSERIALIZE_ENUM(_status);
 }

-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,
                                                 const ThreadID& tid)
       : statistics::Group(cpu, csprintf("thread_%i", tid).c_str()),
@@ -101,7 +72,6 @@
       ADD_STAT(numMemRefs, statistics::units::Count::get(),
                "Number of Memory References")
 {
-
 }

 } // namespace gem5
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 8d0835f..b98eee2 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -50,7 +50,7 @@

     ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process);

-    virtual ~ThreadState();
+    virtual ~ThreadState() = default;

     void serialize(CheckpointOut &cp) const override;

@@ -78,9 +78,7 @@
      *
      * @param tc ThreadContext for the virtual-to-physical translation
      */
-    void initMemProxies(ThreadContext *tc);
-
-    PortProxy &getVirtProxy();
+    void initMemProxies(ThreadContext *tc) {}

     Process *getProcessPtr() { return process; }

@@ -140,10 +138,6 @@
   protected:
     Process *process;

-    /** A translating port proxy, outgoing only, for functional
-     * accesse to virtual addresses. */
-    PortProxy *virtProxy;
-
   public:

     //

--
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: 7
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[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

Reply via email to