changeset dd43f1c9fa0a in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=dd43f1c9fa0a
description:
        SE/FS: Make the functions available from the TC consistent between SE 
and FS.

diffstat:

 src/arch/alpha/SConscript         |   6 +++---
 src/arch/arm/SConscript           |   2 +-
 src/cpu/SConscript                |   3 +--
 src/cpu/inorder/cpu.cc            |  10 +---------
 src/cpu/inorder/cpu.hh            |   4 +---
 src/cpu/inorder/thread_context.cc |   3 ---
 src/cpu/inorder/thread_context.hh |   5 ++---
 src/cpu/inorder/thread_state.cc   |   3 ---
 src/cpu/inorder/thread_state.hh   |   2 --
 src/cpu/o3/cpu.cc                 |   4 ----
 src/cpu/o3/cpu.hh                 |   2 --
 src/cpu/o3/thread_context.hh      |  15 +++++----------
 src/cpu/o3/thread_context_impl.hh |   4 ----
 src/cpu/o3/thread_state.hh        |  15 +++------------
 src/cpu/simple_thread.cc          |  24 +++++++++---------------
 src/cpu/simple_thread.hh          |  20 ++++----------------
 src/cpu/thread_context.cc         |   2 --
 src/cpu/thread_context.hh         |  19 ++-----------------
 src/cpu/thread_state.cc           |   2 --
 src/cpu/thread_state.hh           |   8 ++------
 src/kern/SConscript               |   2 +-
 src/kern/kernel_stats.cc          |   7 +++++--
 src/kern/kernel_stats.hh          |   2 ++
 src/sim/pseudo_inst.cc            |   5 +----
 24 files changed, 43 insertions(+), 126 deletions(-)

diffs (truncated from 849 to 300 lines):

diff -r 17efd86a39d3 -r dd43f1c9fa0a src/arch/alpha/SConscript
--- a/src/arch/alpha/SConscript Sun Oct 30 18:52:30 2011 -0700
+++ b/src/arch/alpha/SConscript Mon Oct 31 02:58:22 2011 -0700
@@ -37,9 +37,12 @@
     Source('interrupts.cc')
     Source('ipr.cc')
     Source('isa.cc')
+    Source('kernel_stats.cc')
+    Source('osfpal.cc')
     Source('pagetable.cc')
     Source('regredir.cc')
     Source('remote_gdb.cc')
+    Source('stacktrace.cc')
     Source('tlb.cc')
     Source('utility.cc')
     Source('vtophys.cc')
@@ -51,9 +54,6 @@
         SimObject('AlphaSystem.py')
 
         Source('idle_event.cc')
-        Source('kernel_stats.cc')
-        Source('osfpal.cc')
-        Source('stacktrace.cc')
         Source('system.cc')
 
         Source('freebsd/system.cc')
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/arch/arm/SConscript
--- a/src/arch/arm/SConscript   Sun Oct 30 18:52:30 2011 -0700
+++ b/src/arch/arm/SConscript   Mon Oct 31 02:58:22 2011 -0700
@@ -60,6 +60,7 @@
     Source('nativetrace.cc')
     Source('predecoder.cc')
     Source('remote_gdb.cc')
+    Source('stacktrace.cc')
     Source('table_walker.cc')
     Source('tlb.cc')
     Source('utility.cc')
@@ -74,7 +75,6 @@
     DebugFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
     DebugFlag('Predecoder', "Instructions returned by the predecoder")
     if env['FULL_SYSTEM']:
-        Source('stacktrace.cc')
         Source('system.cc')
         Source('linux/system.cc')
         
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/SConscript
--- a/src/cpu/SConscript        Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/SConscript        Mon Oct 31 02:58:22 2011 -0700
@@ -122,6 +122,7 @@
 Source('intr_control.cc')
 Source('nativetrace.cc')
 Source('pc_event.cc')
+Source('profile.cc')
 Source('quiesce_event.cc')
 Source('static_inst.cc')
 Source('simple_thread.cc')
@@ -129,8 +130,6 @@
 Source('thread_state.cc')
 
 if env['FULL_SYSTEM']:
-    Source('profile.cc')
-
     if env['TARGET_ISA'] == 'sparc':
         SimObject('LegionTrace.py')
         Source('legiontrace.cc')
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/inorder/cpu.cc
--- a/src/cpu/inorder/cpu.cc    Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/inorder/cpu.cc    Mon Oct 31 02:58:22 2011 -0700
@@ -46,6 +46,7 @@
 #include "cpu/activity.hh"
 #include "cpu/base.hh"
 #include "cpu/exetrace.hh"
+#include "cpu/quiesce_event.hh"
 #include "cpu/simple_thread.hh"
 #include "cpu/thread_context.hh"
 #include "debug/Activity.hh"
@@ -57,11 +58,7 @@
 #include "params/InOrderCPU.hh"
 #include "sim/process.hh"
 #include "sim/stat_control.hh"
-
-#if FULL_SYSTEM
-#include "cpu/quiesce_event.hh"
 #include "sim/system.hh"
-#endif
 
 #if THE_ISA == ALPHA_ISA
 #include "arch/alpha/osfpal.hh"
@@ -786,7 +783,6 @@
     return resPool->getPort(if_name, idx);
 }
 
-#if FULL_SYSTEM
 Fault
 InOrderCPU::hwrei(ThreadID tid)
 {
@@ -891,7 +887,6 @@
     trap(interrupt, threadContexts[0]->contextId(), dummyBufferInst);
 }
 
-
 void
 InOrderCPU::updateMemPorts()
 {
@@ -901,7 +896,6 @@
     for (ThreadID i = 0; i < size; ++i)
         thread[i]->connectMemPorts(thread[i]->getTC());
 }
-#endif
 
 void
 InOrderCPU::trapContext(Fault fault, ThreadID tid, DynInstPtr inst, int delay)
@@ -1709,7 +1703,6 @@
 }
 #endif
 
-#if !FULL_SYSTEM
 void
 InOrderCPU::syscallContext(Fault fault, ThreadID tid, DynInstPtr inst, int 
delay)
 {
@@ -1747,7 +1740,6 @@
     // Clear Non-Speculative Block Variable
     nonSpecInstActive[tid] = false;
 }
-#endif
 
 TheISA::TLB*
 InOrderCPU::getITBPtr()
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/inorder/cpu.hh
--- a/src/cpu/inorder/cpu.hh    Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/inorder/cpu.hh    Mon Oct 31 02:58:22 2011 -0700
@@ -413,7 +413,6 @@
     /** Get a Memory Port */
     Port* getPort(const std::string &if_name, int idx = 0);
 
-#if FULL_SYSTEM
     /** HW return from error interrupt. */
     Fault hwrei(ThreadID tid);
 
@@ -439,14 +438,13 @@
 
     /** Check if this address is a valid data address. */
     bool validDataAddr(Addr addr) { return true; }
-#else
+
     /** Schedule a syscall on the CPU */
     void syscallContext(Fault fault, ThreadID tid, DynInstPtr inst,
                         int delay = 0);
 
     /** Executes a syscall.*/
     void syscall(int64_t callnum, ThreadID tid);
-#endif
 
     /** Schedule a trap on the CPU */
     void trapContext(Fault fault, ThreadID tid, DynInstPtr inst, int delay = 
0);
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/inorder/thread_context.cc
--- a/src/cpu/inorder/thread_context.cc Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/inorder/thread_context.cc Mon Oct 31 02:58:22 2011 -0700
@@ -43,8 +43,6 @@
     return thread->getVirtPort();
 }
 
-#if FULL_SYSTEM
-
 void
 InOrderThreadContext::dumpFuncProfile()
 {
@@ -78,7 +76,6 @@
 {
     thread->profileSample();
 }
-#endif
 
 void
 InOrderThreadContext::takeOverFrom(ThreadContext *old_context)
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/inorder/thread_context.hh
--- a/src/cpu/inorder/thread_context.hh Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/inorder/thread_context.hh Mon Oct 31 02:58:22 2011 -0700
@@ -113,6 +113,7 @@
     /** Returns a pointer to physical memory. */
     PhysicalMemory *getPhysMemPtr()
     { assert(0); return 0; /*return cpu->physmem;*/ }
+#endif
 
     /** Returns a pointer to this thread's kernel statistics. */
     TheISA::Kernel::Statistics *getKernelStats()
@@ -142,7 +143,7 @@
     {
         return this->thread->quiesceEvent;
     }
-#endif
+
     /** Returns a pointer to this thread's process. */
     Process *getProcessPtr() { return thread->getProcessPtr(); }
 
@@ -271,11 +272,9 @@
      * misspeculating, this is set as false. */
     bool misspeculating() { return false; }
 
-#if !FULL_SYSTEM
     /** Executes a syscall in SE mode. */
     void syscall(int64_t callnum)
     { return cpu->syscall(callnum, thread->threadId()); }
-#endif
 
     /** Reads the funcExeInst counter. */
     Counter readFuncExeInst() { return thread->funcExeInst; }
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/inorder/thread_state.cc
--- a/src/cpu/inorder/thread_state.cc   Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/inorder/thread_state.cc   Mon Oct 31 02:58:22 2011 -0700
@@ -36,12 +36,9 @@
 
 using namespace TheISA;
 
-#if FULL_SYSTEM
 void 
 InOrderThreadState::dumpFuncProfile()    
 {
     std::ostream *os = simout.create(csprintf("profile.%s.dat", cpu->name()));
     profile->dump(tc, *os);
 }
-#endif
-
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/inorder/thread_state.hh
--- a/src/cpu/inorder/thread_state.hh   Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/inorder/thread_state.hh   Mon Oct 31 02:58:22 2011 -0700
@@ -86,9 +86,7 @@
     /** Handles the syscall. */
     void syscall(int64_t callnum) { process->syscall(callnum, tc); }
 
-#if FULL_SYSTEM
     void dumpFuncProfile();    
-#endif
 
     /** Pointer to the ThreadContext of this thread. */
     ThreadContext *tc;
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/o3/cpu.cc
--- a/src/cpu/o3/cpu.cc Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/o3/cpu.cc Mon Oct 31 02:58:22 2011 -0700
@@ -983,8 +983,6 @@
     fault->invoke(this->threadContexts[tid], inst);
 }
 
-#if !FULL_SYSTEM
-
 template <class Impl>
 void
 FullO3CPU<Impl>::syscall(int64_t callnum, ThreadID tid)
@@ -1005,8 +1003,6 @@
     --(this->thread[tid]->funcExeInst);
 }
 
-#endif
-
 template <class Impl>
 void
 FullO3CPU<Impl>::serialize(std::ostream &os)
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/o3/cpu.hh
--- a/src/cpu/o3/cpu.hh Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/o3/cpu.hh Mon Oct 31 02:58:22 2011 -0700
@@ -350,12 +350,10 @@
     virtual void unserialize(Checkpoint *cp, const std::string &section);
 
   public:
-#if !FULL_SYSTEM
     /** Executes a syscall.
      * @todo: Determine if this needs to be virtual.
      */
     void syscall(int64_t callnum, ThreadID tid);
-#endif
 
     /** Starts draining the CPU's pipeline of all instructions in
      * order to stop all memory accesses. */
diff -r 17efd86a39d3 -r dd43f1c9fa0a src/cpu/o3/thread_context.hh
--- a/src/cpu/o3/thread_context.hh      Sun Oct 30 18:52:30 2011 -0700
+++ b/src/cpu/o3/thread_context.hh      Mon Oct 31 02:58:22 2011 -0700
@@ -92,13 +92,13 @@
     /** Returns a pointer to the system. */
     virtual System *getSystemPtr() { return cpu->system; }
 
-#if FULL_SYSTEM
     /** Returns a pointer to this thread's kernel statistics. */
     virtual TheISA::Kernel::Statistics *getKernelStats()
     { return thread->kernelStats; }
 
-    virtual void connectMemPorts(ThreadContext *tc) { 
thread->connectMemPorts(tc); }
-#endif
+    virtual void connectMemPorts(ThreadContext *tc)
+    { thread->connectMemPorts(tc); }
+
     /** Returns a pointer to this thread's process. */
     virtual Process *getProcessPtr() { return thread->getProcessPtr(); }
 
@@ -125,12 +125,11 @@
     /** Set the status to Halted. */
     virtual void halt(int delay = 0);
 
-#if FULL_SYSTEM
     /** Dumps the function profiling information.
      * @todo: Implement.
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to