summaryrefslogtreecommitdiff
path: root/cpu/thread_state.hh
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-08-24 17:43:08 -0400
committerKevin Lim <ktlim@umich.edu>2006-08-24 17:43:08 -0400
commitad2fa1e1c9587e8c2a2b7f3e5a9c592312042eb4 (patch)
treee52b0443cc937e127c5d31b49f0c2dcf280c4d50 /cpu/thread_state.hh
parent74e8abd37ecd637a607f90e36aed1a3a16eea7da (diff)
downloadgem5-ad2fa1e1c9587e8c2a2b7f3e5a9c592312042eb4.tar.xz
Support profiling.
--HG-- extra : convert_revision : eab02dea68442bd3f8c5d1d16b7f93f43cbda2a5
Diffstat (limited to 'cpu/thread_state.hh')
-rw-r--r--cpu/thread_state.hh15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpu/thread_state.hh b/cpu/thread_state.hh
index 12146bd11..7a19963c8 100644
--- a/cpu/thread_state.hh
+++ b/cpu/thread_state.hh
@@ -30,6 +30,7 @@
#define __CPU_THREAD_STATE_HH__
#include "cpu/exec_context.hh"
+#include "cpu/profile.hh"
#if FULL_SYSTEM
class EndQuiesceEvent;
@@ -103,6 +104,20 @@ struct ThreadState {
#endif
+#if FULL_SYSTEM
+ void profileClear()
+ {
+ if (profile)
+ profile->clear();
+ }
+
+ void profileSample()
+ {
+ if (profile)
+ profile->sample(profileNode, profilePC);
+ }
+#endif
+
/**
* Temporary storage to pass the source address from copy_load to
* copy_store.