summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 6e985054f..5479f8478 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -32,6 +32,7 @@
#define __CPU_THREAD_STATE_HH__
#include "arch/types.hh"
+#include "cpu/profile.hh"
#include "cpu/thread_context.hh"
#if !FULL_SYSTEM
@@ -191,6 +192,21 @@ struct ThreadState {
// simulation only; all functional memory accesses should use
// one of the FunctionalMemory pointers above.
short asid;
+
+#endif
+
+#if FULL_SYSTEM
+ void profileClear()
+ {
+ if (profile)
+ profile->clear();
+ }
+
+ void profileSample()
+ {
+ if (profile)
+ profile->sample(profileNode, profilePC);
+ }
#endif
/** Current instruction the thread is committing. Only set and