From fa0fca32273444fb2451397c255b0a8e0763147a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 30 Aug 2006 19:08:24 -0400 Subject: Change the cpu pointer in the InstRecord object to a thread context pointer. --HG-- extra : convert_revision : 7efb2680cef4219281b94d680a4a7c75c123f89d --- src/cpu/exetrace.hh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/cpu/exetrace.hh') diff --git a/src/cpu/exetrace.hh b/src/cpu/exetrace.hh index 8cc98b777..02ea162f0 100644 --- a/src/cpu/exetrace.hh +++ b/src/cpu/exetrace.hh @@ -41,7 +41,7 @@ #include "cpu/thread_context.hh" #include "cpu/static_inst.hh" -class BaseCPU; +class ThreadContext; namespace Trace { @@ -53,13 +53,12 @@ class InstRecord : public Record // The following fields are initialized by the constructor and // thus guaranteed to be valid. - BaseCPU *cpu; + ThreadContext *thread; // need to make this ref-counted so it doesn't go away before we // dump the record StaticInstPtr staticInst; Addr PC; bool misspeculating; - unsigned thread; // The remaining fields are only valid for particular instruction // types (e.g, addresses for memory ops) or when particular @@ -95,11 +94,12 @@ class InstRecord : public Record bool regs_valid; public: - InstRecord(Tick _cycle, BaseCPU *_cpu, + InstRecord(Tick _cycle, ThreadContext *_thread, const StaticInstPtr &_staticInst, - Addr _pc, bool spec, int _thread) - : Record(_cycle), cpu(_cpu), staticInst(_staticInst), PC(_pc), - misspeculating(spec), thread(_thread) + Addr _pc, bool spec) + : Record(_cycle), thread(_thread), + staticInst(_staticInst), PC(_pc), + misspeculating(spec) { data_status = DataInvalid; addr_valid = false; @@ -174,14 +174,14 @@ InstRecord::setRegs(const IntRegFile ®s) inline InstRecord * -getInstRecord(Tick cycle, ThreadContext *tc, BaseCPU *cpu, +getInstRecord(Tick cycle, ThreadContext *tc, const StaticInstPtr staticInst, - Addr pc, int thread = 0) + Addr pc) { if (DTRACE(InstExec) && (InstRecord::traceMisspec() || !tc->misspeculating())) { - return new InstRecord(cycle, cpu, staticInst, pc, - tc->misspeculating(), thread); + return new InstRecord(cycle, tc, staticInst, pc, + tc->misspeculating()); } return NULL; -- cgit v1.2.3