diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-08-24 17:43:08 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-08-24 17:43:08 -0400 |
commit | ad2fa1e1c9587e8c2a2b7f3e5a9c592312042eb4 (patch) | |
tree | e52b0443cc937e127c5d31b49f0c2dcf280c4d50 /cpu/thread_state.hh | |
parent | 74e8abd37ecd637a607f90e36aed1a3a16eea7da (diff) | |
download | gem5-ad2fa1e1c9587e8c2a2b7f3e5a9c592312042eb4.tar.xz |
Support profiling.
--HG--
extra : convert_revision : eab02dea68442bd3f8c5d1d16b7f93f43cbda2a5
Diffstat (limited to 'cpu/thread_state.hh')
-rw-r--r-- | cpu/thread_state.hh | 15 |
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. |