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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -51,12 +51,6 @@ namespace gem5
|
||||
namespace o3
|
||||
{
|
||||
|
||||
PortProxy&
|
||||
ThreadContext::getVirtProxy()
|
||||
{
|
||||
return thread->getVirtProxy();
|
||||
}
|
||||
|
||||
void
|
||||
ThreadContext::takeOverFrom(gem5::ThreadContext *old_context)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -147,8 +147,6 @@ class ThreadContext : public PCEventScope
|
||||
|
||||
virtual System *getSystemPtr() = 0;
|
||||
|
||||
virtual PortProxy &getVirtProxy() = 0;
|
||||
|
||||
virtual void sendFunctional(PacketPtr pkt);
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user