mem-cache: Add multiple eviction stats
[gem5.git] / src / arch / arm / stacktrace.hh
index 3f9c9109698a976202772d66af7c848aa6891c5a..b0a4a8adcee66b1400cd19d9a9630c6cf8c83fd0 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (c) 2005 The Regents of The University of Michigan
- * Copyright (c) 2007-2008 The Florida State University
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,8 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * Authors: Ali Saidi
- *          Stephen Hines
+ * Authors: Nathan Binkert
  */
 
 #ifndef __ARCH_ARM_STACKTRACE_HH__
 
 #include "base/trace.hh"
 #include "cpu/static_inst.hh"
+#include "debug/Stack.hh"
 
 class ThreadContext;
-class StackTrace;
-
 namespace ArmISA
 {
 
+class StackTrace;
+
 class ProcessInfo
 {
   private:
@@ -64,7 +63,7 @@ class ProcessInfo
 class StackTrace
 {
   protected:
-    typedef TheISA::MachInst MachInst;
+    typedef ArmISA::MachInst MachInst;
   private:
     ThreadContext *tc;
     std::vector<Addr> stack;
@@ -79,7 +78,7 @@ class StackTrace
 
   public:
     StackTrace();
-    StackTrace(ThreadContext *tc, StaticInstPtr inst);
+    StackTrace(ThreadContext *tc, const StaticInstPtr &inst);
     ~StackTrace();
 
     void clear()
@@ -89,15 +88,11 @@ class StackTrace
     }
 
     bool valid() const { return tc != NULL; }
-    bool trace(ThreadContext *tc, StaticInstPtr inst);
+    bool trace(ThreadContext *tc, const StaticInstPtr &inst);
 
   public:
     const std::vector<Addr> &getstack() const { return stack; }
 
-    static const int user = 1;
-    static const int console = 2;
-    static const int unknown = 3;
-
 #if TRACING_ON
   private:
     void dump();
@@ -111,7 +106,7 @@ class StackTrace
 };
 
 inline bool
-StackTrace::trace(ThreadContext *tc, StaticInstPtr inst)
+StackTrace::trace(ThreadContext *tc, const StaticInstPtr &inst)
 {
     if (!inst->isCall() && !inst->isReturn())
         return false;
@@ -123,6 +118,6 @@ StackTrace::trace(ThreadContext *tc, StaticInstPtr inst)
     return true;
 }
 
-}
+} // Namespace ArmISA
 
 #endif // __ARCH_ARM_STACKTRACE_HH__