diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2009-02-26 19:29:17 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2009-02-26 19:29:17 -0500 |
commit | d447ccb2c61a9225e5663ac29c999ac0a52a412f (patch) | |
tree | 4bec20ac0e8d9d3fcc2c3b0166733d24e45d49cc /src/cpu/o3/commit_impl.hh | |
parent | 6fd4bc34a154601ba0a74e41875094c20076e091 (diff) | |
download | gem5-d447ccb2c61a9225e5663ac29c999ac0a52a412f.tar.xz |
CPA: Add code to automatically record function symbols as CPU executes.
Diffstat (limited to 'src/cpu/o3/commit_impl.hh')
-rw-r--r-- | src/cpu/o3/commit_impl.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh index e215fe49e..7cd88b49b 100644 --- a/src/cpu/o3/commit_impl.hh +++ b/src/cpu/o3/commit_impl.hh @@ -36,6 +36,7 @@ #include <string> #include "arch/utility.hh" +#include "base/cp_annotate.hh" #include "base/loader/symtab.hh" #include "base/timebuf.hh" #include "cpu/exetrace.hh" @@ -1097,6 +1098,12 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num) if (node) thread[tid]->profileNode = node; } + if (CPA::available()) { + if (head_inst->isControl()) { + ThreadContext *tc = thread[tid]->getTC(); + CPA::cpa()->swAutoBegin(tc, head_inst->readNextPC()); + } + } #endif if (head_inst->traceData) { |