changeset 20322354b80b in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=20322354b80b
description:
SE/FS: Build/expose vport in SE mode.
diffstat:
src/cpu/checker/thread_context.hh | 6 +++---
src/cpu/inorder/thread_context.cc | 3 +--
src/cpu/inorder/thread_context.hh | 3 +--
src/cpu/o3/thread_context.hh | 4 ++--
src/cpu/o3/thread_context_impl.hh | 2 +-
src/cpu/ozone/cpu.hh | 6 +++---
src/cpu/simple_thread.cc | 4 +---
src/cpu/simple_thread.hh | 6 ++----
src/cpu/thread_context.hh | 8 ++++----
src/cpu/thread_state.cc | 22 +++++++++++-----------
src/cpu/thread_state.hh | 15 ++++++++-------
src/mem/SConscript | 7 +++----
12 files changed, 40 insertions(+), 46 deletions(-)
diffs (truncated from 354 to 300 lines):
diff -r df5f2151161d -r 20322354b80b src/cpu/checker/thread_context.hh
--- a/src/cpu/checker/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/checker/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
@@ -96,15 +96,15 @@
TheISA::Kernel::Statistics *getKernelStats()
{ return actualTC->getKernelStats(); }
-
- VirtualPort *getVirtPort()
- { return actualTC->getVirtPort(); }
#else
TranslatingPort *getMemPort() { return actualTC->getMemPort(); }
Process *getProcessPtr() { return actualTC->getProcessPtr(); }
#endif
+ VirtualPort *getVirtPort()
+ { return actualTC->getVirtPort(); }
+
FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); }
Status status() const { return actualTC->status(); }
diff -r df5f2151161d -r 20322354b80b src/cpu/inorder/thread_context.cc
--- a/src/cpu/inorder/thread_context.cc Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/inorder/thread_context.cc Sun Oct 16 05:06:39 2011 -0700
@@ -37,14 +37,13 @@
using namespace TheISA;
-#if FULL_SYSTEM
-
VirtualPort *
InOrderThreadContext::getVirtPort()
{
return thread->getVirtPort();
}
+#if FULL_SYSTEM
void
InOrderThreadContext::dumpFuncProfile()
diff -r df5f2151161d -r 20322354b80b src/cpu/inorder/thread_context.hh
--- a/src/cpu/inorder/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/inorder/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
@@ -118,8 +118,6 @@
TheISA::Kernel::Statistics *getKernelStats()
{ return thread->kernelStats; }
- VirtualPort *getVirtPort();
-
void connectMemPorts(ThreadContext *tc)
{ thread->connectMemPorts(tc); }
@@ -151,6 +149,7 @@
Process *getProcessPtr() { return thread->getProcessPtr(); }
#endif
+ VirtualPort *getVirtPort();
FunctionalPort *getPhysPort() { return thread->getPhysPort(); }
/** Returns this thread's status. */
diff -r df5f2151161d -r 20322354b80b src/cpu/o3/thread_context.hh
--- a/src/cpu/o3/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/o3/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
@@ -97,8 +97,6 @@
virtual TheISA::Kernel::Statistics *getKernelStats()
{ return thread->kernelStats; }
- virtual VirtualPort *getVirtPort();
-
virtual void connectMemPorts(ThreadContext *tc) {
thread->connectMemPorts(tc); }
#else
virtual TranslatingPort *getMemPort() { return thread->getMemPort(); }
@@ -107,6 +105,8 @@
virtual Process *getProcessPtr() { return thread->getProcessPtr(); }
#endif
+ virtual VirtualPort *getVirtPort();
+
virtual FunctionalPort *getPhysPort() { return thread->getPhysPort(); }
/** Returns this thread's status. */
diff -r df5f2151161d -r 20322354b80b src/cpu/o3/thread_context_impl.hh
--- a/src/cpu/o3/thread_context_impl.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/o3/thread_context_impl.hh Sun Oct 16 05:06:39 2011 -0700
@@ -47,7 +47,6 @@
#include "cpu/quiesce_event.hh"
#include "debug/O3CPU.hh"
-#if FULL_SYSTEM
template <class Impl>
VirtualPort *
O3ThreadContext<Impl>::getVirtPort()
@@ -55,6 +54,7 @@
return thread->getVirtPort();
}
+#if FULL_SYSTEM
template <class Impl>
void
O3ThreadContext<Impl>::dumpFuncProfile()
diff -r df5f2151161d -r 20322354b80b src/cpu/ozone/cpu.hh
--- a/src/cpu/ozone/cpu.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/ozone/cpu.hh Sun Oct 16 05:06:39 2011 -0700
@@ -123,15 +123,15 @@
TheISA::Kernel::Statistics *getKernelStats()
{ return thread->getKernelStats(); }
-
- VirtualPort *getVirtPort()
- { return thread->getVirtPort(); }
#else
TranslatingPort *getMemPort() { return thread->getMemPort(); }
Process *getProcessPtr() { return thread->getProcessPtr(); }
#endif
+ VirtualPort *getVirtPort()
+ { return thread->getVirtPort(); }
+
FunctionalPort *getPhysPort() { return thread->getPhysPort(); }
Status status() const { return thread->status(); }
diff -r df5f2151161d -r 20322354b80b src/cpu/simple_thread.cc
--- a/src/cpu/simple_thread.cc Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/simple_thread.cc Sun Oct 16 05:06:39 2011 -0700
@@ -39,6 +39,7 @@
#include "cpu/base.hh"
#include "cpu/simple_thread.hh"
#include "cpu/thread_context.hh"
+#include "mem/vport.hh"
#include "params/BaseCPU.hh"
#if FULL_SYSTEM
@@ -50,7 +51,6 @@
#include "base/trace.hh"
#include "cpu/profile.hh"
#include "cpu/quiesce_event.hh"
-#include "mem/vport.hh"
#include "sim/serialize.hh"
#include "sim/sim_exit.hh"
#else
@@ -118,9 +118,7 @@
SimpleThread::~SimpleThread()
{
delete physPort;
-#if FULL_SYSTEM
delete virtPort;
-#endif
delete tc;
}
diff -r df5f2151161d -r 20322354b80b src/cpu/simple_thread.hh
--- a/src/cpu/simple_thread.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/simple_thread.hh Sun Oct 16 05:06:39 2011 -0700
@@ -207,15 +207,13 @@
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.
*/
VirtualPort *getVirtPort() { return virtPort; }
-#endif
-
- FunctionalPort *getPhysPort() { return physPort; }
Status status() const { return _status; }
diff -r df5f2151161d -r 20322354b80b src/cpu/thread_context.hh
--- a/src/cpu/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/thread_context.hh Sun Oct 16 05:06:39 2011 -0700
@@ -128,8 +128,6 @@
#if FULL_SYSTEM
virtual TheISA::Kernel::Statistics *getKernelStats() = 0;
- virtual VirtualPort *getVirtPort() = 0;
-
virtual void connectMemPorts(ThreadContext *tc) = 0;
#else
virtual TranslatingPort *getMemPort() = 0;
@@ -137,6 +135,8 @@
virtual Process *getProcessPtr() = 0;
#endif
+ virtual VirtualPort *getVirtPort() = 0;
+
virtual FunctionalPort *getPhysPort() = 0;
virtual Status status() const = 0;
@@ -298,8 +298,6 @@
TheISA::Kernel::Statistics *getKernelStats()
{ return actualTC->getKernelStats(); }
- VirtualPort *getVirtPort() { return actualTC->getVirtPort(); }
-
void connectMemPorts(ThreadContext *tc) { actualTC->connectMemPorts(tc); }
#else
TranslatingPort *getMemPort() { return actualTC->getMemPort(); }
@@ -307,6 +305,8 @@
Process *getProcessPtr() { return actualTC->getProcessPtr(); }
#endif
+ VirtualPort *getVirtPort() { return actualTC->getVirtPort(); }
+
FunctionalPort *getPhysPort() { return actualTC->getPhysPort(); }
Status status() const { return actualTC->status(); }
diff -r df5f2151161d -r 20322354b80b src/cpu/thread_state.cc
--- a/src/cpu/thread_state.cc Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/thread_state.cc Sun Oct 16 05:06:39 2011 -0700
@@ -34,12 +34,12 @@
#include "cpu/thread_state.hh"
#include "mem/port.hh"
#include "mem/translating_port.hh"
+#include "mem/vport.hh"
#include "sim/serialize.hh"
#if FULL_SYSTEM
#include "arch/kernel_stats.hh"
#include "cpu/quiesce_event.hh"
-#include "mem/vport.hh"
#endif
#if FULL_SYSTEM
@@ -51,11 +51,11 @@
baseCpu(cpu), _threadId(_tid), lastActivate(0), lastSuspend(0),
#if FULL_SYSTEM
profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL),
- kernelStats(NULL), virtPort(NULL),
+ kernelStats(NULL),
#else
port(NULL), process(_process),
#endif
- physPort(NULL), funcExeInst(0), storeCondFailures(0)
+ virtPort(NULL), physPort(NULL), funcExeInst(0), storeCondFailures(0)
{
}
@@ -118,14 +118,6 @@
connectToMemFunc(physPort);
}
-#if FULL_SYSTEM
-void
-ThreadState::connectMemPorts(ThreadContext *tc)
-{
- connectPhysPort();
- connectVirtPort(tc);
-}
-
void
ThreadState::connectVirtPort(ThreadContext *tc)
{
@@ -140,6 +132,14 @@
connectToMemFunc(virtPort);
}
+#if FULL_SYSTEM
+void
+ThreadState::connectMemPorts(ThreadContext *tc)
+{
+ connectPhysPort();
+ connectVirtPort(tc);
+}
+
void
ThreadState::profileClear()
{
diff -r df5f2151161d -r 20322354b80b src/cpu/thread_state.hh
--- a/src/cpu/thread_state.hh Sun Oct 16 05:06:39 2011 -0700
+++ b/src/cpu/thread_state.hh Sun Oct 16 05:06:39 2011 -0700
@@ -94,11 +94,11 @@
void connectPhysPort();
+ void connectVirtPort(ThreadContext *tc);
+
#if FULL_SYSTEM
void connectMemPorts(ThreadContext *tc);
- void connectVirtPort(ThreadContext *tc);
-
void dumpFuncProfile();
EndQuiesceEvent *getQuiesceEvent() { return quiesceEvent; }
@@ -108,8 +108,6 @@
void profileSample();
TheISA::Kernel::Statistics *getKernelStats() { return kernelStats; }
-
- VirtualPort *getVirtPort() { return virtPort; }
#else
Process *getProcessPtr() { return process; }
@@ -118,6 +116,8 @@
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev