fastmodel,cpu: Eliminate the unused getVirtProxy.

Change-Id: I84683a3297143102a74ac6dfe744cd5804b83fe4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45908
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-05-23 03:36:49 -07:00
committed by Gabe Black
parent 83b14e569b
commit a6e023906e
9 changed files with 4 additions and 74 deletions

View File

@@ -477,18 +477,6 @@ ThreadContext::getCurrentInstCount()
return count;
}
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)
{

View File

@@ -98,9 +98,6 @@ class ThreadContext : public gem5::ThreadContext
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 @@ class ThreadContext : public gem5::ThreadContext
return _isa;
}
PortProxy &getVirtProxy() override { return *virtProxy; }
void initMemProxies(gem5::ThreadContext *tc) override;
void initMemProxies(gem5::ThreadContext *tc) override {}
void sendFunctional(PacketPtr pkt) override;

View File

@@ -167,12 +167,6 @@ class CheckerThreadContext : public ThreadContext
void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
PortProxy &
getVirtProxy() override
{
return actualTC->getVirtProxy();
}
void
initMemProxies(ThreadContext *tc) override
{

View File

@@ -51,12 +51,6 @@ namespace gem5
namespace o3
{
PortProxy&
ThreadContext::getVirtProxy()
{
return thread->getVirtProxy();
}
void
ThreadContext::takeOverFrom(gem5::ThreadContext *old_context)
{

View File

@@ -143,8 +143,6 @@ class ThreadContext : public gem5::ThreadContext
void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
PortProxy &getVirtProxy() override;
void
initMemProxies(gem5::ThreadContext *tc) override
{

View File

@@ -216,8 +216,6 @@ class SimpleThread : public ThreadState, public ThreadContext
System *getSystemPtr() override { return system; }
PortProxy &getVirtProxy() override { return ThreadState::getVirtProxy(); }
void
initMemProxies(ThreadContext *tc) override
{

View File

@@ -147,8 +147,6 @@ class ThreadContext : public PCEventScope
virtual System *getSystemPtr() = 0;
virtual PortProxy &getVirtProxy() = 0;
virtual void sendFunctional(PacketPtr pkt);
/**

View File

@@ -46,16 +46,10 @@ ThreadState::ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process)
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 @@ ThreadState::unserialize(CheckpointIn &cp)
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 @@ ThreadState::ThreadStateStats::ThreadStateStats(BaseCPU *cpu,
ADD_STAT(numMemRefs, statistics::units::Count::get(),
"Number of Memory References")
{
}
} // namespace gem5

View File

@@ -50,7 +50,7 @@ struct ThreadState : public Serializable
ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process);
virtual ~ThreadState();
virtual ~ThreadState() = default;
void serialize(CheckpointOut &cp) const override;
@@ -78,9 +78,7 @@ struct ThreadState : public Serializable
*
* @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 @@ struct ThreadState : public Serializable
protected:
Process *process;
/** A translating port proxy, outgoing only, for functional
* accesse to virtual addresses. */
PortProxy *virtProxy;
public:
//