cpu,fastmodel: Get rid of the unused ThreadContext::getPhysProxy.
Change-Id: I31abd77235310c8577c4281bbefaea57a25feb73 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45905 Maintainer: Gabe Black <gabe.black@gmail.com> Reviewed-by: Yu-hsin Wang <yuhsingw@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -477,12 +477,10 @@ ThreadContext::getCurrentInstCount()
|
||||
void
|
||||
ThreadContext::initMemProxies(::ThreadContext *tc)
|
||||
{
|
||||
assert(!virtProxy);
|
||||
if (FullSystem) {
|
||||
assert(!physProxy && !virtProxy);
|
||||
physProxy.reset(new PortProxy(tc, _cpu->cacheLineSize()));
|
||||
virtProxy.reset(new TranslatingPortProxy(tc));
|
||||
} else {
|
||||
assert(!virtProxy);
|
||||
virtProxy.reset(new SETranslatingPortProxy(this,
|
||||
SETranslatingPortProxy::NextPage));
|
||||
}
|
||||
|
||||
@@ -95,7 +95,6 @@ class ThreadContext : public ::ThreadContext
|
||||
std::vector<iris::MemorySupportedAddressTranslationResult> translations;
|
||||
|
||||
std::unique_ptr<PortProxy> virtProxy = nullptr;
|
||||
std::unique_ptr<PortProxy> physProxy = nullptr;
|
||||
|
||||
|
||||
// A queue to keep track of instruction count based events.
|
||||
@@ -212,7 +211,6 @@ class ThreadContext : public ::ThreadContext
|
||||
return _isa;
|
||||
}
|
||||
|
||||
PortProxy &getPhysProxy() override { return *physProxy; }
|
||||
PortProxy &getVirtProxy() override { return *virtProxy; }
|
||||
void initMemProxies(::ThreadContext *tc) override;
|
||||
|
||||
|
||||
@@ -149,8 +149,6 @@ class CheckerThreadContext : public ThreadContext
|
||||
|
||||
void setProcessPtr(Process *p) override { actualTC->setProcessPtr(p); }
|
||||
|
||||
PortProxy &getPhysProxy() override { return actualTC->getPhysProxy(); }
|
||||
|
||||
PortProxy &
|
||||
getVirtProxy() override
|
||||
{
|
||||
|
||||
@@ -140,8 +140,6 @@ class ThreadContext : public ::ThreadContext
|
||||
|
||||
void setProcessPtr(Process *p) override { thread->setProcessPtr(p); }
|
||||
|
||||
PortProxy &getPhysProxy() override { return thread->getPhysProxy(); }
|
||||
|
||||
PortProxy &getVirtProxy() override;
|
||||
|
||||
void
|
||||
|
||||
@@ -213,7 +213,6 @@ class SimpleThread : public ThreadState, public ThreadContext
|
||||
|
||||
System *getSystemPtr() override { return system; }
|
||||
|
||||
PortProxy &getPhysProxy() override { return ThreadState::getPhysProxy(); }
|
||||
PortProxy &getVirtProxy() override { return ThreadState::getVirtProxy(); }
|
||||
|
||||
void
|
||||
|
||||
@@ -144,8 +144,6 @@ class ThreadContext : public PCEventScope
|
||||
|
||||
virtual System *getSystemPtr() = 0;
|
||||
|
||||
virtual PortProxy &getPhysProxy() = 0;
|
||||
|
||||
virtual PortProxy &getVirtProxy() = 0;
|
||||
|
||||
virtual void sendFunctional(PacketPtr pkt);
|
||||
|
||||
@@ -43,15 +43,12 @@ 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), physProxy(NULL), virtProxy(NULL),
|
||||
storeCondFailures(0)
|
||||
process(_process), virtProxy(NULL), storeCondFailures(0)
|
||||
{
|
||||
}
|
||||
|
||||
ThreadState::~ThreadState()
|
||||
{
|
||||
if (physProxy != NULL)
|
||||
delete physProxy;
|
||||
if (virtProxy != NULL)
|
||||
delete virtProxy;
|
||||
}
|
||||
@@ -75,27 +72,15 @@ ThreadState::initMemProxies(ThreadContext *tc)
|
||||
// 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) {
|
||||
assert(physProxy == NULL);
|
||||
physProxy = new PortProxy(tc, baseCpu->cacheLineSize());
|
||||
|
||||
assert(virtProxy == NULL);
|
||||
virtProxy = new TranslatingPortProxy(tc);
|
||||
} else {
|
||||
assert(virtProxy == NULL);
|
||||
virtProxy = new SETranslatingPortProxy(
|
||||
tc, SETranslatingPortProxy::NextPage);
|
||||
}
|
||||
}
|
||||
|
||||
PortProxy &
|
||||
ThreadState::getPhysProxy()
|
||||
{
|
||||
assert(FullSystem);
|
||||
assert(physProxy != NULL);
|
||||
return *physProxy;
|
||||
}
|
||||
|
||||
PortProxy &
|
||||
ThreadState::getVirtProxy()
|
||||
{
|
||||
|
||||
@@ -77,8 +77,6 @@ struct ThreadState : public Serializable
|
||||
*/
|
||||
void initMemProxies(ThreadContext *tc);
|
||||
|
||||
PortProxy &getPhysProxy();
|
||||
|
||||
PortProxy &getVirtProxy();
|
||||
|
||||
Process *getProcessPtr() { return process; }
|
||||
@@ -139,10 +137,6 @@ struct ThreadState : public Serializable
|
||||
protected:
|
||||
Process *process;
|
||||
|
||||
/** A port proxy outgoing only for functional accesses to physical
|
||||
* addresses.*/
|
||||
PortProxy *physProxy;
|
||||
|
||||
/** A translating port proxy, outgoing only, for functional
|
||||
* accesse to virtual addresses. */
|
||||
PortProxy *virtProxy;
|
||||
|
||||
Reference in New Issue
Block a user