diff options
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/checker/thread_context.hh | 4 | ||||
-rw-r--r-- | src/cpu/inorder/thread_context.hh | 4 | ||||
-rwxr-xr-x | src/cpu/o3/thread_context.hh | 5 | ||||
-rw-r--r-- | src/cpu/ozone/cpu.hh | 4 | ||||
-rw-r--r-- | src/cpu/simple_thread.cc | 2 | ||||
-rw-r--r-- | src/cpu/simple_thread.hh | 4 | ||||
-rw-r--r-- | src/cpu/thread_context.hh | 8 | ||||
-rw-r--r-- | src/cpu/thread_state.cc | 20 | ||||
-rw-r--r-- | src/cpu/thread_state.hh | 20 |
9 files changed, 36 insertions, 35 deletions
diff --git a/src/cpu/checker/thread_context.hh b/src/cpu/checker/thread_context.hh index 5bd3ed734..197bab0b5 100644 --- a/src/cpu/checker/thread_context.hh +++ b/src/cpu/checker/thread_context.hh @@ -97,8 +97,6 @@ class CheckerThreadContext : public ThreadContext TheISA::Kernel::Statistics *getKernelStats() { return actualTC->getKernelStats(); } - FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); } - VirtualPort *getVirtPort() { return actualTC->getVirtPort(); } #else @@ -107,6 +105,8 @@ class CheckerThreadContext : public ThreadContext Process *getProcessPtr() { return actualTC->getProcessPtr(); } #endif + FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); } + Status status() const { return actualTC->status(); } void setStatus(Status new_status) diff --git a/src/cpu/inorder/thread_context.hh b/src/cpu/inorder/thread_context.hh index 7ec17cb77..2d8d8ba03 100644 --- a/src/cpu/inorder/thread_context.hh +++ b/src/cpu/inorder/thread_context.hh @@ -118,8 +118,6 @@ class InOrderThreadContext : public ThreadContext TheISA::Kernel::Statistics *getKernelStats() { return thread->kernelStats; } - FunctionalPort *getPhysPort() { return thread->getPhysPort(); } - VirtualPort *getVirtPort(); void connectMemPorts(ThreadContext *tc) @@ -153,6 +151,8 @@ class InOrderThreadContext : public ThreadContext Process *getProcessPtr() { return thread->getProcessPtr(); } #endif + FunctionalPort *getPhysPort() { return thread->getPhysPort(); } + /** Returns this thread's status. */ Status status() const { return thread->status(); } diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh index 38c94439a..05b865569 100755 --- a/src/cpu/o3/thread_context.hh +++ b/src/cpu/o3/thread_context.hh @@ -97,8 +97,6 @@ class O3ThreadContext : public ThreadContext virtual TheISA::Kernel::Statistics *getKernelStats() { return thread->kernelStats; } - virtual FunctionalPort *getPhysPort() { return thread->getPhysPort(); } - virtual VirtualPort *getVirtPort(); virtual void connectMemPorts(ThreadContext *tc) { thread->connectMemPorts(tc); } @@ -108,6 +106,9 @@ class O3ThreadContext : public ThreadContext /** Returns a pointer to this thread's process. */ virtual Process *getProcessPtr() { return thread->getProcessPtr(); } #endif + + virtual FunctionalPort *getPhysPort() { return thread->getPhysPort(); } + /** Returns this thread's status. */ virtual Status status() const { return thread->status(); } diff --git a/src/cpu/ozone/cpu.hh b/src/cpu/ozone/cpu.hh index 1867a4c51..98d236b74 100644 --- a/src/cpu/ozone/cpu.hh +++ b/src/cpu/ozone/cpu.hh @@ -124,8 +124,6 @@ class OzoneCPU : public BaseCPU TheISA::Kernel::Statistics *getKernelStats() { return thread->getKernelStats(); } - FunctionalPort *getPhysPort() { return thread->getPhysPort(); } - VirtualPort *getVirtPort() { return thread->getVirtPort(); } #else @@ -134,6 +132,8 @@ class OzoneCPU : public BaseCPU Process *getProcessPtr() { return thread->getProcessPtr(); } #endif + FunctionalPort *getPhysPort() { return thread->getPhysPort(); } + Status status() const { return thread->status(); } void setStatus(Status new_status); diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index 61174dd4e..d9a2005a9 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -117,8 +117,8 @@ SimpleThread::SimpleThread() SimpleThread::~SimpleThread() { -#if FULL_SYSTEM delete physPort; +#if FULL_SYSTEM delete virtPort; #endif delete tc; diff --git a/src/cpu/simple_thread.hh b/src/cpu/simple_thread.hh index 2b7b89030..30dca8369 100644 --- a/src/cpu/simple_thread.hh +++ b/src/cpu/simple_thread.hh @@ -208,8 +208,6 @@ class SimpleThread : public ThreadState System *getSystemPtr() { return system; } #if FULL_SYSTEM - FunctionalPort *getPhysPort() { return physPort; } - /** Return a virtual port. This port cannot be cached locally in an object. * After a CPU switch it may point to the wrong memory object which could * mean stale data. @@ -217,6 +215,8 @@ class SimpleThread : public ThreadState VirtualPort *getVirtPort() { return virtPort; } #endif + FunctionalPort *getPhysPort() { return physPort; } + Status status() const { return _status; } void setStatus(Status newStatus) { _status = newStatus; } diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index 3b7f8b3c3..7d98a4049 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -128,8 +128,6 @@ class ThreadContext #if FULL_SYSTEM virtual TheISA::Kernel::Statistics *getKernelStats() = 0; - virtual FunctionalPort *getPhysPort() = 0; - virtual VirtualPort *getVirtPort() = 0; virtual void connectMemPorts(ThreadContext *tc) = 0; @@ -139,6 +137,8 @@ class ThreadContext virtual Process *getProcessPtr() = 0; #endif + virtual FunctionalPort *getPhysPort() = 0; + virtual Status status() const = 0; virtual void setStatus(Status new_status) = 0; @@ -298,8 +298,6 @@ class ProxyThreadContext : public ThreadContext TheISA::Kernel::Statistics *getKernelStats() { return actualTC->getKernelStats(); } - FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); } - VirtualPort *getVirtPort() { return actualTC->getVirtPort(); } void connectMemPorts(ThreadContext *tc) { actualTC->connectMemPorts(tc); } @@ -309,6 +307,8 @@ class ProxyThreadContext : public ThreadContext Process *getProcessPtr() { return actualTC->getProcessPtr(); } #endif + FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); } + Status status() const { return actualTC->status(); } void setStatus(Status new_status) { actualTC->setStatus(new_status); } diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc index dedeccb3e..0abe2bf81 100644 --- a/src/cpu/thread_state.cc +++ b/src/cpu/thread_state.cc @@ -51,11 +51,11 @@ ThreadState::ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process) baseCpu(cpu), _threadId(_tid), lastActivate(0), lastSuspend(0), #if FULL_SYSTEM profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL), - kernelStats(NULL), physPort(NULL), virtPort(NULL), + kernelStats(NULL), virtPort(NULL), #else port(NULL), process(_process), #endif - funcExeInst(0), storeCondFailures(0) + physPort(NULL), funcExeInst(0), storeCondFailures(0) { } @@ -104,14 +104,6 @@ ThreadState::unserialize(Checkpoint *cp, const std::string §ion) #endif } -#if FULL_SYSTEM -void -ThreadState::connectMemPorts(ThreadContext *tc) -{ - connectPhysPort(); - connectVirtPort(tc); -} - void ThreadState::connectPhysPort() { @@ -126,6 +118,14 @@ ThreadState::connectPhysPort() connectToMemFunc(physPort); } +#if FULL_SYSTEM +void +ThreadState::connectMemPorts(ThreadContext *tc) +{ + connectPhysPort(); + connectVirtPort(tc); +} + void ThreadState::connectVirtPort(ThreadContext *tc) { diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index 824579852..b7727f4ee 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -92,11 +92,11 @@ struct ThreadState { Tick readLastSuspend() { return lastSuspend; } + void connectPhysPort(); + #if FULL_SYSTEM void connectMemPorts(ThreadContext *tc); - void connectPhysPort(); - void connectVirtPort(ThreadContext *tc); void dumpFuncProfile(); @@ -109,10 +109,6 @@ struct ThreadState { TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; } - FunctionalPort *getPhysPort() { return physPort; } - - void setPhysPort(FunctionalPort *port) { physPort = port; } - VirtualPort *getVirtPort() { return virtPort; } #else Process *getProcessPtr() { return process; } @@ -122,6 +118,10 @@ struct ThreadState { void setMemPort(TranslatingPort *_port) { port = _port; } #endif + FunctionalPort *getPhysPort() { return physPort; } + + void setPhysPort(FunctionalPort *port) { physPort = port; } + /** Reads the number of instructions functionally executed and * committed. */ @@ -186,10 +186,6 @@ struct ThreadState { TheISA::Kernel::Statistics *kernelStats; protected: - /** A functional port outgoing only for functional accesses to physical - * addresses.*/ - FunctionalPort *physPort; - /** A functional port, outgoing only, for functional accesse to virtual * addresses. */ VirtualPort *virtPort; @@ -199,6 +195,10 @@ struct ThreadState { Process *process; #endif + /** A functional port outgoing only for functional accesses to physical + * addresses.*/ + FunctionalPort *physPort; + public: /* * number of executed instructions, for matching with syscall trace |