diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-07-27 00:52:01 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-07-27 00:52:01 -0700 |
commit | a41e1320077fc12869827899d034d5e3de155ffd (patch) | |
tree | ded3453c84e95f7fe31786b5b5cf98630f03b221 /src/arch/arm/nativetrace.hh | |
parent | 519ace4dfdb5150915336735a34e21fb6c70b1dd (diff) | |
download | gem5-a41e1320077fc12869827899d034d5e3de155ffd.tar.xz |
ARM: Make native trace only print when registers are changing value.
When registers have incorrect values but aren't actively changing, it's likely
they're not being modified at all. The fact that they're still wrong isn't
very important.
Diffstat (limited to 'src/arch/arm/nativetrace.hh')
-rw-r--r-- | src/arch/arm/nativetrace.hh | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/arch/arm/nativetrace.hh b/src/arch/arm/nativetrace.hh index a347040fb..d39bdcfa8 100644 --- a/src/arch/arm/nativetrace.hh +++ b/src/arch/arm/nativetrace.hh @@ -39,6 +39,56 @@ namespace Trace { class ArmNativeTrace : public NativeTrace { public: + enum StateID { + STATE_R0, + STATE_R1, + STATE_R2, + STATE_R3, + STATE_R4, + STATE_R5, + STATE_R6, + STATE_R7, + STATE_R8, + STATE_R9, + STATE_R10, + STATE_R11, + STATE_FP = STATE_R11, + STATE_R12, + STATE_R13, + STATE_SP = STATE_R13, + STATE_R14, + STATE_LR = STATE_R14, + STATE_R15, + STATE_PC = STATE_R15, + STATE_CPSR, + STATE_NUMVALS + }; + + protected: + struct ThreadState { + bool changed[STATE_NUMVALS]; + uint32_t state[2][STATE_NUMVALS]; + uint32_t *newState; + uint32_t *oldState; + int current; + void update(NativeTrace *parent); + void update(ThreadContext *tc); + + ThreadState() + { + for (int i = 0; i < STATE_NUMVALS; i++) { + changed[i] = false; + state[0][i] = state[1][i] = 0; + current = 0; + newState = state[0]; + oldState = state[1]; + } + } + }; + + ThreadState nState, mState; + + public: ArmNativeTrace(const Params *p) : NativeTrace(p) {} |