Merge with head.
[gem5.git] / src / cpu / profile.hh
index 8f5be4001bb245b33abe4da7b6a6219d0e84ead8..27bb4efec9c54faa1bf0963f1c39b2ca054800cf 100644 (file)
 
 #include <map>
 
+#include "arch/stacktrace.hh"
 #include "cpu/static_inst.hh"
 #include "sim/host.hh"
-#include "arch/stacktrace.hh"
 
-class ExecContext;
+class ThreadContext;
 
 class ProfileNode
 {
@@ -66,23 +66,23 @@ class FunctionProfile
     const SymbolTable *symtab;
     ProfileNode top;
     std::map<Addr, Counter> pc_count;
-    StackTrace trace;
+    TheISA::StackTrace trace;
 
   public:
     FunctionProfile(const SymbolTable *symtab);
     ~FunctionProfile();
 
-    ProfileNode *consume(ExecContext *xc, StaticInstPtr inst);
+    ProfileNode *consume(ThreadContext *tc, StaticInstPtr inst);
     ProfileNode *consume(const std::vector<Addr> &stack);
     void clear();
-    void dump(ExecContext *xc, std::ostream &out) const;
+    void dump(ThreadContext *tc, std::ostream &out) const;
     void sample(ProfileNode *node, Addr pc);
 };
 
 inline ProfileNode *
-FunctionProfile::consume(ExecContext *xc, StaticInstPtr inst)
+FunctionProfile::consume(ThreadContext *tc, StaticInstPtr inst)
 {
-    if (!trace.trace(xc, inst))
+    if (!trace.trace(tc, inst))
         return NULL;
     trace.dprintf();
     return consume(trace.getstack());