changeset d4548b381e87 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=d4548b381e87
description:
O3: Add support of function tracing with O3 CPU.
diffstat:
src/cpu/base.hh | 9 ++++-----
src/cpu/o3/commit_impl.hh | 3 +++
2 files changed, 7 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 2d791d07c59b -r d4548b381e87 src/cpu/base.hh
--- a/src/cpu/base.hh Mon Jan 09 18:08:20 2012 -0600
+++ b/src/cpu/base.hh Mon Jan 09 18:08:20 2012 -0600
@@ -291,17 +291,16 @@
void enableFunctionTrace();
void traceFunctionsInternal(Addr pc);
- protected:
+ private:
+ static std::vector<BaseCPU *> cpuList; //!< Static global cpu list
+
+ public:
void traceFunctions(Addr pc)
{
if (functionTracingEnabled)
traceFunctionsInternal(pc);
}
- private:
- static std::vector<BaseCPU *> cpuList; //!< Static global cpu list
-
- public:
static int numSimulatedCPUs() { return cpuList.size(); }
static Counter numSimulatedInstructions()
{
diff -r 2d791d07c59b -r d4548b381e87 src/cpu/o3/commit_impl.hh
--- a/src/cpu/o3/commit_impl.hh Mon Jan 09 18:08:20 2012 -0600
+++ b/src/cpu/o3/commit_impl.hh Mon Jan 09 18:08:20 2012 -0600
@@ -52,6 +52,7 @@
#include "config/use_checker.hh"
#include "cpu/o3/commit.hh"
#include "cpu/o3/thread_state.hh"
+#include "cpu/base.hh"
#include "cpu/exetrace.hh"
#include "cpu/timebuf.hh"
#include "debug/Activity.hh"
@@ -992,6 +993,8 @@
// Updates misc. registers.
head_inst->updateMiscRegs();
+ cpu->traceFunctions(pc[tid].instAddr());
+
TheISA::advancePC(pc[tid], head_inst->staticInst);
// Keep track of the last sequence number commited
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev