Gabe Black has uploaded this change for review. ( 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
---
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/checker/thread_context.hh
M src/cpu/o3/cpu.cc
M src/cpu/o3/thread_context.cc
M src/cpu/o3/thread_context.hh
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.hh
9 files changed, 0 insertions(+), 51 deletions(-)



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/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/cpu.cc b/src/cpu/o3/cpu.cc
index ce83b5b..8c7cc03 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -347,9 +347,6 @@
         fatal("FullO3CPU %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 c4f5366..2487543 100644
--- a/src/cpu/o3/thread_context.cc
+++ b/src/cpu/o3/thread_context.cc
@@ -62,8 +62,6 @@
     TheISA::Decoder *oldDecoder = old_context->getDecoderPtr();
     newDecoder->takeOverFrom(oldDecoder);

-    thread->funcExeInst = old_context->readFuncExeInst();
-
     thread->noSquashFromTC = false;
     thread->trapPending = false;
 }
@@ -146,9 +144,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 23bc5a3..2465b9d 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -352,9 +352,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_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.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: 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

Reply via email to