summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
authorChris Emmons <chris.emmons@arm.com>2011-12-01 00:15:25 -0800
committerChris Emmons <chris.emmons@arm.com>2011-12-01 00:15:25 -0800
commit5bde1d359f0a0ce1d5ed46c3a9bb0ba33882f7b6 (patch)
tree348fc397dc9bb90a8233ce4f38bd0edd2dbbbcdd /src/cpu/base.cc
parent5d50ee420d78114e90ef4eb1207838d5eb153789 (diff)
downloadgem5-5bde1d359f0a0ce1d5ed46c3a9bb0ba33882f7b6.tar.xz
Output: Add hierarchical output support and cleanup existing codebase.
--HG-- extra : rebase_source : 3301137733cdf5fdb471d56ef7990e7a3a865442
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 76c7c964b..c37f45856 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -190,7 +190,11 @@ BaseCPU::BaseCPU(Params *p)
functionTracingEnabled = false;
if (p->function_trace) {
- functionTraceStream = simout.find(csprintf("ftrace.%s", name()));
+ const string fname = csprintf("ftrace.%s", name());
+ functionTraceStream = simout.find(fname);
+ if (!functionTraceStream)
+ functionTraceStream = simout.create(fname);
+
currentFunctionStart = currentFunctionEnd = 0;
functionEntryTick = p->function_trace_start;