Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/25146 )
Change subject: fastmodel,cpu,sim: Eliminate EndQuiesceEvent and plumbing.
......................................................................
fastmodel,cpu,sim: Eliminate EndQuiesceEvent and plumbing.
Change-Id: Ifca504bc298c09cbc16ef7cded21da455fb1e118
---
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/SConscript
M src/cpu/checker/thread_context.hh
M src/cpu/o3/cpu.cc
M src/cpu/o3/thread_context.hh
M src/cpu/o3/thread_context_impl.hh
M src/cpu/o3/thread_state.hh
D src/cpu/quiesce_event.cc
D src/cpu/quiesce_event.hh
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/cpu/thread_context.cc
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
M src/sim/pseudo_inst.cc
16 files changed, 1 insertion(+), 163 deletions(-)
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index 5590f7f..5acc813 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -256,12 +256,6 @@
void regStats(const std::string &name) override {}
- EndQuiesceEvent *
- getQuiesceEvent() override
- {
- panic("%s not implemented.", __FUNCTION__);
- }
-
// Not necessarily the best location for these...
// Having an extra function just to read these is obnoxious
Tick
diff --git a/src/cpu/SConscript b/src/cpu/SConscript
index 0cbe013..291b3f7 100644
--- a/src/cpu/SConscript
+++ b/src/cpu/SConscript
@@ -99,7 +99,6 @@
Source('intr_control.cc')
Source('nativetrace.cc')
Source('profile.cc')
-Source('quiesce_event.cc')
Source('reg_class.cc')
Source('static_inst.cc')
Source('simple_thread.cc')
diff --git a/src/cpu/checker/thread_context.hh
b/src/cpu/checker/thread_context.hh
index e01a00d..6a7e5e1 100644
--- a/src/cpu/checker/thread_context.hh
+++ b/src/cpu/checker/thread_context.hh
@@ -51,7 +51,6 @@
#include "cpu/thread_context.hh"
#include "debug/Checker.hh"
-class EndQuiesceEvent;
namespace Kernel {
class Statistics;
};
@@ -223,12 +222,6 @@
checkerTC->regStats(name);
}
- EndQuiesceEvent *
- getQuiesceEvent() override
- {
- return actualTC->getQuiesceEvent();
- }
-
Tick readLastActivate() override { return
actualTC->readLastActivate(); }
Tick readLastSuspend() override { return actualTC->readLastSuspend(); }
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index bf9ff7e..d212303 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -54,7 +54,6 @@
#include "cpu/checker/thread_context.hh"
#include "cpu/o3/isa_specific.hh"
#include "cpu/o3/thread_context.hh"
-#include "cpu/quiesce_event.hh"
#include "cpu/simple_thread.hh"
#include "cpu/thread_context.hh"
#include "debug/Activity.hh"
@@ -353,9 +352,6 @@
assert(o3_tc->cpu);
o3_tc->thread = this->thread[tid];
- // Setup quiesce event.
- this->thread[tid]->quiesceEvent = new EndQuiesceEvent(tc);
-
// Give the thread the TC.
this->thread[tid]->tc = tc;
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index 9607f73..1319ca1 100644
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -48,7 +48,6 @@
#include "cpu/o3/isa_specific.hh"
#include "cpu/thread_context.hh"
-class EndQuiesceEvent;
namespace Kernel {
class Statistics;
}
@@ -456,12 +455,6 @@
/** Reads the funcExeInst counter. */
Counter readFuncExeInst() const override { return thread->funcExeInst;
}
- /** Returns pointer to the quiesce event. */
- EndQuiesceEvent *
- getQuiesceEvent() override
- {
- return this->thread->quiesceEvent;
- }
/** 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/o3/thread_context_impl.hh
b/src/cpu/o3/thread_context_impl.hh
index e05721b..5389407 100644
--- a/src/cpu/o3/thread_context_impl.hh
+++ b/src/cpu/o3/thread_context_impl.hh
@@ -50,7 +50,6 @@
#include "arch/registers.hh"
#include "config/the_isa.hh"
#include "cpu/o3/thread_context.hh"
-#include "cpu/quiesce_event.hh"
#include "debug/O3CPU.hh"
template <class Impl>
diff --git a/src/cpu/o3/thread_state.hh b/src/cpu/o3/thread_state.hh
index bd5c51f..8a81216 100644
--- a/src/cpu/o3/thread_state.hh
+++ b/src/cpu/o3/thread_state.hh
@@ -50,7 +50,6 @@
#include "sim/full_system.hh"
#include "sim/sim_exit.hh"
-class EndQuiesceEvent;
class Event;
class FunctionalMemory;
class FunctionProfile;
diff --git a/src/cpu/quiesce_event.cc b/src/cpu/quiesce_event.cc
deleted file mode 100644
index a152448..0000000
--- a/src/cpu/quiesce_event.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2006 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Kevin Lim
- */
-
-#include "cpu/quiesce_event.hh"
-
-#include "cpu/base.hh"
-#include "cpu/thread_context.hh"
-#include "debug/Quiesce.hh"
-
-EndQuiesceEvent::EndQuiesceEvent(ThreadContext *_tc)
- : tc(_tc)
-{
-}
-
-void
-EndQuiesceEvent::process()
-{
- DPRINTF(Quiesce, "activating %s\n", tc->getCpuPtr()->name());
- tc->activate();
-}
-
-const char*
-EndQuiesceEvent::description() const
-{
- return "End Quiesce";
-}
diff --git a/src/cpu/quiesce_event.hh b/src/cpu/quiesce_event.hh
deleted file mode 100644
index 74db274..0000000
--- a/src/cpu/quiesce_event.hh
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2006 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Kevin Lim
- */
-
-#ifndef __CPU_QUIESCE_EVENT_HH__
-#define __CPU_QUIESCE_EVENT_HH__
-
-#include "sim/eventq.hh"
-
-class ThreadContext;
-
-/** Event for timing out quiesce instruction */
-class EndQuiesceEvent : public Event
-{
- public:
- /** A pointer to the thread context that is quiesced */
- ThreadContext *tc;
-
- EndQuiesceEvent(ThreadContext *_tc);
-
- /** Event process to occur at interrupt*/
- virtual void process();
-
- /** Event description */
- virtual const char *description() const;
-};
-
-#endif // __CPU_QUIESCE_EVENT_HH__
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc
index b7aba52..75a9e19 100644
--- a/src/cpu/simple_thread.cc
+++ b/src/cpu/simple_thread.cc
@@ -58,7 +58,6 @@
#include "config/the_isa.hh"
#include "cpu/base.hh"
#include "cpu/profile.hh"
-#include "cpu/quiesce_event.hh"
#include "cpu/thread_context.hh"
#include "mem/fs_translating_port_proxy.hh"
#include "mem/se_translating_port_proxy.hh"
@@ -82,7 +81,6 @@
system(_sys), itb(_itb), dtb(_dtb), decoder(TheISA::Decoder(_isa))
{
clearArchRegs();
- quiesceEvent = new EndQuiesceEvent(this);
}
SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys,
@@ -93,8 +91,6 @@
comInstEventQueue("instruction-based event queue"),
system(_sys), itb(_itb), dtb(_dtb), decoder(TheISA::Decoder(_isa))
{
- quiesceEvent = new EndQuiesceEvent(this);
-
clearArchRegs();
if (baseCpu->params()->profile) {
diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh
index fabcbb8..6076305 100644
--- a/src/cpu/simple_thread.hh
+++ b/src/cpu/simple_thread.hh
@@ -266,12 +266,6 @@
/// Set the status to Halted.
void halt() override;
- EndQuiesceEvent *
- getQuiesceEvent() override
- {
- return ThreadState::getQuiesceEvent();
- }
-
Tick
readLastActivate() override
{
diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc
index f3c8c4f..ec650b9 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -48,7 +48,6 @@
#include "base/trace.hh"
#include "config/the_isa.hh"
#include "cpu/base.hh"
-#include "cpu/quiesce_event.hh"
#include "debug/Context.hh"
#include "debug/Quiesce.hh"
#include "kern/kernel_stats.hh"
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index fcf39f9..893017c 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -66,7 +66,6 @@
class BaseTLB;
class CheckerCPU;
class Checkpoint;
-class EndQuiesceEvent;
class PortProxy;
class Process;
class System;
@@ -191,8 +190,6 @@
virtual void regStats(const std::string &name) = 0;
- virtual EndQuiesceEvent *getQuiesceEvent() = 0;
-
virtual void scheduleInstCountEvent(Event *event, Tick count) = 0;
virtual void descheduleInstCountEvent(Event *event) = 0;
virtual Tick getCurrentInstCount() = 0;
diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc
index cb9a87c..7e1a8a1 100644
--- a/src/cpu/thread_state.cc
+++ b/src/cpu/thread_state.cc
@@ -33,7 +33,6 @@
#include "base/output.hh"
#include "cpu/base.hh"
#include "cpu/profile.hh"
-#include "cpu/quiesce_event.hh"
#include "kern/kernel_stats.hh"
#include "mem/fs_translating_port_proxy.hh"
#include "mem/port.hh"
@@ -47,7 +46,7 @@
: numInst(0), numOp(0), numLoad(0), startNumLoad(0),
_status(ThreadContext::Halted), baseCpu(cpu),
_contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0),
- profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL),
+ profile(NULL), profileNode(NULL), profilePC(0),
kernelStats(NULL), process(_process), physProxy(NULL),
virtProxy(NULL),
funcExeInst(0), storeCondFailures(0)
{
@@ -71,10 +70,6 @@
if (!FullSystem)
return;
- Tick quiesceEndTick = 0;
- if (quiesceEvent->scheduled())
- quiesceEndTick = quiesceEvent->when();
- SERIALIZE_SCALAR(quiesceEndTick);
if (kernelStats)
kernelStats->serialize(cp);
}
@@ -90,10 +85,6 @@
if (!FullSystem)
return;
- Tick quiesceEndTick;
- UNSERIALIZE_SCALAR(quiesceEndTick);
- if (quiesceEndTick)
- baseCpu->schedule(quiesceEvent, quiesceEndTick);
if (kernelStats)
kernelStats->unserialize(cp);
}
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 3e4b29c..745d7b8 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -38,7 +38,6 @@
#include "cpu/thread_context.hh"
#include "sim/process.hh"
-class EndQuiesceEvent;
class FunctionProfile;
class ProfileNode;
namespace Kernel {
@@ -93,8 +92,6 @@
void dumpFuncProfile();
- EndQuiesceEvent *getQuiesceEvent() { return quiesceEvent; }
-
void profileClear();
void profileSample();
@@ -182,7 +179,6 @@
FunctionProfile *profile;
ProfileNode *profileNode;
Addr profilePC;
- EndQuiesceEvent *quiesceEvent;
Kernel::Statistics *kernelStats;
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index 87a6442..a833790 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -56,7 +56,6 @@
#include "base/output.hh"
#include "config/the_isa.hh"
#include "cpu/base.hh"
-#include "cpu/quiesce_event.hh"
#include "cpu/thread_context.hh"
#include "debug/Loader.hh"
#include "debug/Quiesce.hh"
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/25146
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ifca504bc298c09cbc16ef7cded21da455fb1e118
Gerrit-Change-Number: 25146
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev