diff -r e197009ddb96 -r 0aa205436740 src/SConscript --- a/src/SConscript Tue Dec 21 08:23:35 2010 -0800 +++ b/src/SConscript Tue Dec 21 08:23:53 2010 -0800 @@ -623,81 +623,16 @@ MakeAction(makeEmbeddedSwigInit, " [EMBED SW] $STRIP_TARGET")) Source(init_file) -def getFlags(source_flags): - flagsMap = {} - flagsList = [] - for s in source_flags: - val = eval(s.get_contents()) - name, compound, desc = val - flagsList.append(val) - flagsMap[name] = bool(compound) - - for name, compound, desc in flagsList: - for flag in compound: - if flag not in flagsMap: - raise AttributeError, "Trace flag %s not found" % flag - if flagsMap[flag]: - raise AttributeError, \ - "Compound flag can't point to another compound flag" +# +# Handle trace flags +# +def makeTraceFlagCC(target, source, env): + assert(len(target) == 1 and len(source) == 1) - flagsList.sort() - return flagsList + val = eval(source[0].get_contents()) + name, compound, desc = val + compound = list(sorted(compound)) - -# Generate traceflags.py -def traceFlagsPy(target, source, env): - assert(len(target) == 1) - code = code_formatter() - - allFlags = getFlags(source) - - code('basic = [') - code.indent() - for flag, compound, desc in allFlags: - if not compound: - code("'$flag',") - code(']') - code.dedent() - code() - - code('compound = [') - code.indent() - code("'All',") - for flag, compound, desc in allFlags: - if compound: - code("'$flag',") - code("]") - code.dedent() - code() - - code("all = frozenset(basic + compound)") - code() - - code('compoundMap = {') - code.indent() - all = tuple([flag for flag,compound,desc in allFlags if not compound]) - code("'All' : $all,") - for flag, compound, desc in allFlags: - if compound: - code("'$flag' : $compound,") - code('}') - code.dedent() - code() - - code('descriptions = {') - code.indent() - code("'All' : 'All flags',") - for flag, compound, desc in allFlags: - code("'$flag' : '$desc',") - code("}") - code.dedent() - - code.write(str(target[0])) - -def traceFlagsCC(target, source, env): - assert(len(target) == 1) - - allFlags = getFlags(source) code = code_formatter() # file header @@ -706,75 +641,39 @@ * DO NOT EDIT THIS FILE! Automatically generated */ -#include "base/traceflags.hh" - -using namespace Trace; - -const char *Trace::flagStrings[] = -{''') - - code.indent() - # The string array is used by SimpleEnumParam to map the strings - # provided by the user to enum values. - for flag, compound, desc in allFlags: - if not compound: - code('"$flag",') - - code('"All",') - for flag, compound, desc in allFlags: - if compound: - code('"$flag",') - code.dedent() - - code('''\ -}; - -const int Trace::numFlagStrings = ${{len(allFlags) + 1}}; - +#include "base/debug.hh" ''') - # Now define the individual compound flag arrays. There is an array - # for each compound flag listing the component base flags. - all = tuple([flag for flag,compound,desc in allFlags if not compound]) - code('static const Flags AllMap[] = {') - code.indent() - for flag, compound, desc in allFlags: - if not compound: - code('$flag,') - code.dedent() - code('};') + for flag in compound: + code('#include "trace/$flag.hh"') + code() + code('namespace Trace {') code() - for flag, compound, desc in allFlags: - if not compound: - continue - code('static const Flags ${flag}Map[] = {') + if not compound: + code('Debug::SimpleFlag $name("$name", "$desc");') + else: + code('Debug::CompoundFlag $name("$name", "$desc",') code.indent() - for flag in compound: - code('$flag,') - code('(Flags)-1') + last = len(compound) - 1 + for i,flag in enumerate(compound): + if i != last: + code('$flag,') + else: + code('$flag);') code.dedent() - code('};') - code() - # Finally the compoundFlags[] array maps the compound flags - # to their individual arrays/ - code('const Flags *Trace::compoundFlags[] = {') - code.indent() - code('AllMap,') - for flag, compound, desc in allFlags: - if compound: - code('${flag}Map,') - # file trailer - code.dedent() - code('};') + code() + code('/* namespace Trace */ }') code.write(str(target[0])) -def traceFlagsHH(target, source, env): - assert(len(target) == 1) +def makeTraceFlagHH(target, source, env): + assert(len(target) == 1 and len(source) == 1) - allFlags = getFlags(source) + val = eval(source[0].get_contents()) + name, compound, desc = val + code = code_formatter() # file header boilerplate @@ -782,76 +681,33 @@ /* * DO NOT EDIT THIS FILE! * - * Automatically generated from traceflags.py + * Automatically generated by SCons */ -#ifndef __BASE_TRACE_FLAGS_HH__ -#define __BASE_TRACE_FLAGS_HH__ +#ifndef __TRACE_${name}_HH__ +#define __TRACE_${name}_HH__ namespace Trace { -enum Flags {''') +extern Debug::SimpleFlag $name; - # Generate the enum. Base flags come first, then compound flags. - idx = 0 - code.indent() - for flag, compound, desc in allFlags: - if not compound: - code('$flag = $idx,') - idx += 1 +} - numBaseFlags = idx - code('NumFlags = $idx,') - code.dedent() - code() - - # put a comment in here to separate base from compound flags - code(''' -// The remaining enum values are *not* valid indices for Trace::flags. -// They are "compound" flags, which correspond to sets of base -// flags, and are used by changeFlag.''') - - code.indent() - code('All = $idx,') - idx += 1 - for flag, compound, desc in allFlags: - if compound: - code('$flag = $idx,') - idx += 1 - - numCompoundFlags = idx - numBaseFlags - code('NumCompoundFlags = $numCompoundFlags') - code.dedent() - - # trailer boilerplate - code('''\ -}; // enum Flags - -// Array of strings for SimpleEnumParam -extern const char *flagStrings[]; -extern const int numFlagStrings; - -// Array of arraay pointers: for each compound flag, gives the list of -// base flags to set. Inidividual flag arrays are terminated by -1. -extern const Flags *compoundFlags[]; - -/* namespace Trace */ } - -#endif // __BASE_TRACE_FLAGS_HH__ +#endif // __TRACE_${name}_HH__ ''') code.write(str(target[0])) -flags = map(Value, trace_flags.values()) -env.Command('base/traceflags.py', flags, - MakeAction(traceFlagsPy, " [ TRACING] $STRIP_TARGET")) -PySource('m5', 'base/traceflags.py') +for name,flag in sorted(trace_flags.iteritems()): + n, compound, desc = flag + assert n == name -env.Command('base/traceflags.hh', flags, - MakeAction(traceFlagsHH, " [ TRACING] $STRIP_TARGET")) -env.Command('base/traceflags.cc', flags, - MakeAction(traceFlagsCC, " [ TRACING] $STRIP_TARGET")) -Source('base/traceflags.cc') + if not compound: + env.Command('trace/%s.hh' % name, Value(flag), + MakeAction(makeTraceFlagHH, " [ TRACING] $STRIP_TARGET")) + env.Command('trace/%s.cc' % name, Value(flag), + MakeAction(makeTraceFlagCC, " [ TRACING] $STRIP_TARGET")) + Source('trace/%s.cc' % name) # Embed python files. All .py files that have been indicated by a # PySource() call in a SConscript need to be embedded into the M5 diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/interrupts.hh --- a/src/arch/alpha/interrupts.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/interrupts.hh Tue Dec 21 08:23:53 2010 -0800 @@ -39,6 +39,8 @@ #include "cpu/thread_context.hh" #include "params/AlphaInterrupts.hh" #include "sim/sim_object.hh" +#include "trace/Flow.hh" +#include "trace/Interrupt.hh" namespace AlphaISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/kernel_stats.cc --- a/src/arch/alpha/kernel_stats.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/kernel_stats.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "cpu/thread_context.hh" #include "kern/tru64/tru64_syscalls.hh" #include "sim/system.hh" +#include "trace/Context.hh" using namespace std; using namespace Stats; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/linux/process.cc --- a/src/arch/alpha/linux/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/linux/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "kern/linux/linux.hh" #include "sim/process.hh" #include "sim/syscall_emul.hh" +#include "trace/SyscallVerbose.hh" using namespace std; using namespace AlphaISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/linux/system.cc --- a/src/arch/alpha/linux/system.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/linux/system.cc Tue Dec 21 08:23:53 2010 -0800 @@ -55,6 +55,7 @@ #include "mem/port.hh" #include "sim/arguments.hh" #include "sim/byteswap.hh" +#include "trace/Thread.hh" using namespace std; using namespace AlphaISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/process.cc --- a/src/arch/alpha/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -39,6 +39,7 @@ #include "sim/byteswap.hh" #include "sim/process_impl.hh" #include "sim/system.hh" +#include "trace/Loader.hh" using namespace AlphaISA; using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/remote_gdb.cc --- a/src/arch/alpha/remote_gdb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/remote_gdb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -139,6 +139,8 @@ #include "mem/physical.hh" #include "mem/port.hh" #include "sim/system.hh" +#include "trace/GDBAcc.hh" +#include "trace/GDBMisc.hh" using namespace std; using namespace AlphaISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/stacktrace.hh --- a/src/arch/alpha/stacktrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/stacktrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "base/trace.hh" #include "cpu/static_inst.hh" +#include "trace/Stack.hh" class ThreadContext; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/system.cc --- a/src/arch/alpha/system.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/system.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,7 @@ #include "mem/vport.hh" #include "params/AlphaSystem.hh" #include "sim/byteswap.hh" +#include "trace/Loader.hh" using namespace AlphaISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/tlb.cc --- a/src/arch/alpha/tlb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/tlb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "base/str.hh" #include "base/trace.hh" #include "cpu/thread_context.hh" +#include "trace/TLB.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/alpha/vtophys.cc --- a/src/arch/alpha/vtophys.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/alpha/vtophys.cc Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,7 @@ #include "base/trace.hh" #include "cpu/thread_context.hh" #include "mem/vport.hh" +#include "trace/VtoPhys.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/faults.cc --- a/src/arch/arm/faults.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/faults.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "cpu/thread_context.hh" #include "cpu/base.hh" #include "base/trace.hh" +#include "trace/Faults.hh" namespace ArmISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/isa.hh --- a/src/arch/arm/isa.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/isa.hh Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "arch/arm/registers.hh" #include "arch/arm/tlb.hh" #include "arch/arm/types.hh" +#include "trace/Checkpoint.hh" class ThreadContext; class Checkpoint; diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/isa.cc --- a/src/arch/arm/isa.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/isa.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,8 @@ #include "arch/arm/isa.hh" #include "sim/faults.hh" +#include "trace/Arm.hh" +#include "trace/MiscRegs.hh" namespace ArmISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/isa/includes.isa --- a/src/arch/arm/isa/includes.isa Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/isa/includes.isa Tue Dec 21 08:23:53 2010 -0800 @@ -90,6 +90,7 @@ #include "mem/packet.hh" #include "mem/packet_access.hh" #include "sim/sim_exit.hh" +#include "trace/Arm.hh" using namespace ArmISA; using std::isnan; diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/nativetrace.cc --- a/src/arch/arm/nativetrace.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/nativetrace.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "cpu/thread_context.hh" #include "params/ArmNativeTrace.hh" #include "sim/byteswap.hh" +#include "trace/ExecRegDelta.hh" namespace Trace { diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/predecoder.cc --- a/src/arch/arm/predecoder.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/predecoder.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "arch/arm/utility.hh" #include "base/trace.hh" #include "cpu/thread_context.hh" +#include "trace/Predecoder.hh" namespace ArmISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/process.cc --- a/src/arch/arm/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -53,6 +53,7 @@ #include "sim/byteswap.hh" #include "sim/process_impl.hh" #include "sim/system.hh" +#include "trace/Stack.hh" using namespace std; using namespace ArmISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/remote_gdb.cc --- a/src/arch/arm/remote_gdb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/remote_gdb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -139,22 +139,24 @@ #include "arch/arm/vtophys.hh" #endif +#include "arch/arm/pagetable.hh" +#include "arch/arm/registers.hh" +#include "arch/arm/remote_gdb.hh" #include "arch/arm/utility.hh" -#include "arch/arm/remote_gdb.hh" -#include "arch/arm/registers.hh" #include "arch/arm/vtophys.hh" #include "base/intmath.hh" #include "base/remote_gdb.hh" #include "base/socket.hh" #include "base/trace.hh" +#include "cpu/static_inst.hh" #include "cpu/thread_context.hh" #include "cpu/thread_state.hh" -#include "cpu/static_inst.hh" +#include "mem/page_table.hh" #include "mem/physical.hh" #include "mem/port.hh" #include "sim/system.hh" -#include "arch/arm/pagetable.hh" -#include "mem/page_table.hh" +#include "trace/GDBAcc.hh" +#include "trace/GDBMisc.hh" using namespace std; using namespace ArmISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/stacktrace.hh --- a/src/arch/arm/stacktrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/stacktrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "base/trace.hh" #include "cpu/static_inst.hh" +#include "trace/Stack.hh" class ThreadContext; namespace ArmISA diff -r e197009ddb96 -r 0aa205436740 src/arch/arm/tlb.cc --- a/src/arch/arm/tlb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/arm/tlb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -56,6 +56,9 @@ #include "mem/page_table.hh" #include "params/ArmTLB.hh" #include "sim/process.hh" +#include "trace/Checkpoint.hh" +#include "trace/TLB.hh" +#include "trace/TLBVerbose.hh" #if FULL_SYSTEM #include "arch/arm/table_walker.hh" diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/faults.cc --- a/src/arch/mips/faults.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/faults.cc Tue Dec 21 08:23:53 2010 -0800 @@ -36,6 +36,7 @@ #include "base/trace.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" +#include "trace/MipsPRA.hh" #if !FULL_SYSTEM #include "mem/page_table.hh" diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/isa.cc --- a/src/arch/mips/isa.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/isa.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "base/bitfield.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" +#include "trace/MipsPRA.hh" namespace MipsISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/isa/includes.isa --- a/src/arch/mips/isa/includes.isa Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/isa/includes.isa Tue Dec 21 08:23:53 2010 -0800 @@ -90,6 +90,7 @@ #include "sim/sim_exit.hh" #include "sim/eventq.hh" #include "sim/sim_events.hh" +#include "trace/MipsPRA.hh" using namespace MipsISA; }}; diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/linux/process.cc --- a/src/arch/mips/linux/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/linux/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "sim/system.hh" #include "sim/syscall_emul.hh" #include "sim/eventq.hh" +#include "trace/SyscallVerbose.hh" using namespace std; using namespace MipsISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/locked_mem.hh --- a/src/arch/mips/locked_mem.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/locked_mem.hh Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "mem/request.hh" +#include "trace/LLSC.hh" namespace MipsISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/process.cc --- a/src/arch/mips/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "sim/process.hh" #include "sim/process_impl.hh" #include "sim/system.hh" +#include "trace/Loader.hh" using namespace std; using namespace MipsISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/stacktrace.hh --- a/src/arch/mips/stacktrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/stacktrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "base/trace.hh" #include "cpu/static_inst.hh" +#include "trace/Stack.hh" class ThreadContext; diff -r e197009ddb96 -r 0aa205436740 src/arch/mips/tlb.cc --- a/src/arch/mips/tlb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/mips/tlb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,8 @@ #include "sim/process.hh" #include "mem/page_table.hh" #include "params/MipsTLB.hh" +#include "trace/MipsPRA.hh" +#include "trace/TLB.hh" using namespace std; using namespace MipsISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/power/process.cc --- a/src/arch/power/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/power/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,7 @@ #include "mem/translating_port.hh" #include "sim/process_impl.hh" #include "sim/system.hh" +#include "trace/Stack.hh" using namespace std; using namespace PowerISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/power/stacktrace.hh --- a/src/arch/power/stacktrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/power/stacktrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "base/trace.hh" #include "cpu/static_inst.hh" +#include "trace/Stack.hh" class ThreadContext; class StackTrace; diff -r e197009ddb96 -r 0aa205436740 src/arch/power/tlb.cc --- a/src/arch/power/tlb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/power/tlb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -49,6 +49,8 @@ #include "mem/page_table.hh" #include "params/PowerTLB.hh" #include "sim/process.hh" +#include "trace/Power.hh" +#include "trace/TLB.hh" using namespace std; using namespace PowerISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/interrupts.hh --- a/src/arch/sparc/interrupts.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/interrupts.hh Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,7 @@ #include "cpu/thread_context.hh" #include "params/SparcInterrupts.hh" #include "sim/sim_object.hh" +#include "trace/Interrupt.hh" namespace SparcISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/isa.cc --- a/src/arch/sparc/isa.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/isa.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,8 @@ #include "config/full_system.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" +#include "trace/MiscRegs.hh" +#include "trace/Timer.hh" namespace SparcISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/isa/includes.isa --- a/src/arch/sparc/isa/includes.isa Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/isa/includes.isa Tue Dec 21 08:23:53 2010 -0800 @@ -77,6 +77,7 @@ #include "sim/sim_exit.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" +#include "trace/Sparc.hh" using namespace SparcISA; using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/process.cc --- a/src/arch/sparc/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -43,6 +43,7 @@ #include "sim/process_impl.hh" #include "mem/translating_port.hh" #include "sim/system.hh" +#include "trace/Stack.hh" using namespace std; using namespace SparcISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/remote_gdb.cc --- a/src/arch/sparc/remote_gdb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/remote_gdb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -136,6 +136,7 @@ #include "sim/byteswap.hh" #include "sim/process.hh" #include "sim/system.hh" +#include "trace/GDBRead.hh" using namespace std; using namespace SparcISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/stacktrace.hh --- a/src/arch/sparc/stacktrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/stacktrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "base/types.hh" #include "cpu/static_inst.hh" +#include "trace/Stack.hh" class ThreadContext; namespace SparcISA diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/tlb.cc --- a/src/arch/sparc/tlb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/tlb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,8 @@ #include "mem/packet_access.hh" #include "mem/request.hh" #include "sim/system.hh" +#include "trace/IPR.hh" +#include "trace/TLB.hh" /* @todo remove some of the magic constants. -- ali * */ diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/ua2005.cc --- a/src/arch/sparc/ua2005.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/ua2005.cc Tue Dec 21 08:23:53 2010 -0800 @@ -34,6 +34,8 @@ #include "cpu/base.hh" #include "cpu/thread_context.hh" #include "sim/system.hh" +#include "trace/Quiesce.hh" +#include "trace/Timer.hh" using namespace SparcISA; using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/sparc/vtophys.cc --- a/src/arch/sparc/vtophys.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/sparc/vtophys.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "base/trace.hh" #include "cpu/thread_context.hh" #include "mem/vport.hh" +#include "trace/VtoPhys.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/faults.cc --- a/src/arch/x86/faults.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/faults.cc Tue Dec 21 08:23:53 2010 -0800 @@ -45,12 +45,14 @@ #include "base/trace.hh" #include "config/full_system.hh" #include "cpu/thread_context.hh" + #if !FULL_SYSTEM #include "arch/x86/isa_traits.hh" #include "mem/page_table.hh" #include "sim/process.hh" #else #include "arch/x86/tlb.hh" +#include "trace/Faults.hh" #endif namespace X86ISA diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/insts/microregop.cc --- a/src/arch/x86/insts/microregop.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/insts/microregop.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "arch/x86/insts/microregop.hh" #include "arch/x86/regs/misc.hh" #include "base/condcodes.hh" +#include "trace/X86.hh" namespace X86ISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/insts/static_inst.hh --- a/src/arch/x86/insts/static_inst.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/insts/static_inst.hh Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "base/trace.hh" #include "cpu/static_inst.hh" +#include "trace/X86.hh" namespace X86ISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/interrupts.cc --- a/src/arch/x86/interrupts.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/interrupts.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "dev/x86/south_bridge.hh" #include "mem/packet_access.hh" #include "sim/system.hh" +#include "trace/LocalApic.hh" int divideFromConf(uint32_t conf) diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/isa/includes.isa --- a/src/arch/x86/isa/includes.isa Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/isa/includes.isa Tue Dec 21 08:23:53 2010 -0800 @@ -121,6 +121,7 @@ #include "mem/packet_access.hh" #include "mem/request.hh" #include "sim/pseudo_inst.hh" +#include "trace/X86.hh" using namespace X86ISA; using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/nativetrace.cc --- a/src/arch/x86/nativetrace.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/nativetrace.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "cpu/thread_context.hh" #include "params/X86NativeTrace.hh" #include "sim/byteswap.hh" +#include "trace/ExecRegDelta.hh" namespace Trace { diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/pagetable_walker.cc --- a/src/arch/x86/pagetable_walker.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/pagetable_walker.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "mem/packet_access.hh" #include "mem/request.hh" #include "sim/system.hh" +#include "trace/PageTableWalker.hh" namespace X86ISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/predecoder.hh --- a/src/arch/x86/predecoder.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/predecoder.hh Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "base/types.hh" +#include "trace/Predecoder.hh" class ThreadContext; diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/predecoder.cc --- a/src/arch/x86/predecoder.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/predecoder.cc Tue Dec 21 08:23:53 2010 -0800 @@ -43,6 +43,7 @@ #include "base/trace.hh" #include "base/types.hh" #include "cpu/thread_context.hh" +#include "trace/Predecoder.hh" namespace X86ISA { diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/process.cc --- a/src/arch/x86/process.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/process.cc Tue Dec 21 08:23:53 2010 -0800 @@ -56,6 +56,7 @@ #include "sim/process_impl.hh" #include "sim/syscall_emul.hh" #include "sim/system.hh" +#include "trace/Stack.hh" using namespace std; using namespace X86ISA; diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/stacktrace.hh --- a/src/arch/x86/stacktrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/stacktrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "base/trace.hh" #include "cpu/static_inst.hh" +#include "trace/Stack.hh" class ThreadContext; namespace X86ISA diff -r e197009ddb96 -r 0aa205436740 src/arch/x86/tlb.cc --- a/src/arch/x86/tlb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/arch/x86/tlb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -54,6 +54,7 @@ #include "cpu/base.hh" #include "mem/packet_access.hh" #include "mem/request.hh" +#include "trace/TLB.hh" #if FULL_SYSTEM #include "arch/x86/pagetable_walker.hh" diff -r e197009ddb96 -r 0aa205436740 src/base/debug.hh --- a/src/base/debug.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/debug.hh Tue Dec 21 08:23:53 2010 -0800 @@ -1,5 +1,6 @@ /* * Copyright (c) 2003-2005 The Regents of The University of Michigan + * Copyright (c) 2010 The Hewlett-Packard Development Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +32,84 @@ #ifndef __BASE_DEBUG_HH__ #define __BASE_DEBUG_HH__ +#include +#include + namespace Debug { void breakpoint(); +class Flag +{ + protected: + const char *_name; + const char *_desc; + + public: + Flag(const char *name, const char *desc = ""); + virtual ~Flag(); + + std::string name() const { return _name; } + std::string desc() const { return _desc; } + + virtual void enable() = 0; + virtual void disable() = 0; +}; + +class SimpleFlag : public Flag +{ + protected: + bool _status; + + public: + SimpleFlag(const char *name, const char *desc = "") + : Flag(name, desc) + { } + + bool status() const { return _status; } + operator bool() const { return _status; } + bool operator!() const { return !_status; } + + void enable() { _status = true; } + void disable() { _status = false; } +}; + +class CompoundFlag : public Flag +{ + protected: + std::vector flags; + + public: + CompoundFlag(const char *name, const char *desc, + Flag &f00 = *(Flag *)0, Flag &f01 = *(Flag *)0, + Flag &f02 = *(Flag *)0, Flag &f03 = *(Flag *)0, + Flag &f04 = *(Flag *)0, Flag &f05 = *(Flag *)0, + Flag &f06 = *(Flag *)0, Flag &f07 = *(Flag *)0, + Flag &f08 = *(Flag *)0, Flag &f09 = *(Flag *)0, + Flag &f10 = *(Flag *)0, Flag &f11 = *(Flag *)0, + Flag &f12 = *(Flag *)0, Flag &f13 = *(Flag *)0, + Flag &f14 = *(Flag *)0, Flag &f15 = *(Flag *)0, + Flag &f16 = *(Flag *)0, Flag &f17 = *(Flag *)0, + Flag &f18 = *(Flag *)0, Flag &f19 = *(Flag *)0) + : Flag(name, desc) + { + addFlag(f00); addFlag(f01); addFlag(f02); addFlag(f03); addFlag(f04); + addFlag(f05); addFlag(f06); addFlag(f07); addFlag(f08); addFlag(f09); + addFlag(f10); addFlag(f11); addFlag(f12); addFlag(f13); addFlag(f14); + addFlag(f15); addFlag(f16); addFlag(f17); addFlag(f18); addFlag(f19); + } + + void + addFlag(Flag &f) + { + if (&f != NULL) + flags.push_back(&f); + } + + void enable(); + void disable(); +}; + /* namespace Debug */ } #endif // __BASE_DEBUG_HH__ diff -r e197009ddb96 -r 0aa205436740 src/base/debug.cc --- a/src/base/debug.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/debug.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,10 +32,23 @@ #include #include +#include +#include +#include + #include "base/cprintf.hh" +#include "base/debug.hh" +#include "base/misc.hh" + +using namespace std; namespace Debug { +// +// This function will cause the process to signal itself with a +// SIGTRAP which is ignored if not in gdb, but will cause the debugger +// to break if in gdb. +// void breakpoint() { @@ -46,4 +59,125 @@ #endif } +// +// Flags for debugging purposes. Primarily for trace.hh +// +typedef std::map FlagsMap; +int allFlagsVersion = 0; +FlagsMap & +allFlags() +{ + static FlagsMap flags; + return flags; +} + +Flag * +findFlag(const std::string &name) +{ + FlagsMap::iterator i = allFlags().find(name); + if (i == allFlags().end()) + return NULL; + return i->second; +} + +Flag::Flag(const char *name, const char *desc) + : _name(name), _desc(desc) +{ + pair result = + allFlags().insert(make_pair(name, this)); + + if (!result.second) + panic("Flag %s already defined!", name); + + ++allFlagsVersion; +} + +Flag::~Flag() +{ + // should find and remove flag. +} + +void +CompoundFlag::enable() +{ + for_each(flags.begin(), flags.end(), mem_fun(&Flag::enable)); +} + +void +CompoundFlag::disable() +{ + for_each(flags.begin(), flags.end(), mem_fun(&Flag::disable)); +} + +struct AllFlags : public Flag +{ + AllFlags() + : Flag("All", "All Flags") + {} + + void + enable() + { + FlagsMap::iterator i = allFlags().begin(); + FlagsMap::iterator end = allFlags().end(); + for (; i != end; ++i) + if (i->second != this) + i->second->enable(); + } + + void + disable() + { + FlagsMap::iterator i = allFlags().begin(); + FlagsMap::iterator end = allFlags().end(); + for (; i != end; ++i) + if (i->second != this) + i->second->enable(); + } +}; + +AllFlags theAllFlags; +Flag *const All = &theAllFlags; + +bool +changeFlag(const char *s, bool value) +{ + Flag *f = findFlag(s); + if (!f) + return false; + + if (value) + f->enable(); + else + f->disable(); + + return true; +} + /* namespace Debug */ } + +// add a set of functions that can easily be invoked from gdb +void +setDebugFlag(const char *string) +{ + Debug::changeFlag(string, true); +} + +void +clearDebugFlag(const char *string) +{ + Debug::changeFlag(string, false); +} + +void +dumpDebugFlags() +{ + using namespace Debug; + FlagsMap::iterator i = allFlags().begin(); + FlagsMap::iterator end = allFlags().end(); + for (; i != end; ++i) { + SimpleFlag *f = dynamic_cast(i->second); + if (f && f->status()) + cprintf("%s\n", f->name()); + } +} diff -r e197009ddb96 -r 0aa205436740 src/base/loader/aout_object.cc --- a/src/base/loader/aout_object.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/loader/aout_object.cc Tue Dec 21 08:23:53 2010 -0800 @@ -34,6 +34,7 @@ #include "base/loader/symtab.hh" #include "base/trace.hh" #include "base/loader/exec_aout.h" +#include "trace/Loader.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/base/loader/ecoff_object.cc --- a/src/base/loader/ecoff_object.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/loader/ecoff_object.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "base/types.hh" +#include "trace/Loader.hh" // Only alpha will be able to load ecoff files for now. // base/types.hh and ecoff_machdep.h must be before the other .h files diff -r e197009ddb96 -r 0aa205436740 src/base/loader/elf_object.cc --- a/src/base/loader/elf_object.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/loader/elf_object.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "sim/byteswap.hh" +#include "trace/Loader.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/base/loader/raw_object.cc --- a/src/base/loader/raw_object.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/loader/raw_object.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include "base/loader/raw_object.hh" #include "base/loader/symtab.hh" #include "base/trace.hh" +#include "trace/Loader.hh" ObjectFile * RawObject::tryFile(const std::string &fname, int fd, size_t len, uint8_t *data) diff -r e197009ddb96 -r 0aa205436740 src/base/mysql.cc --- a/src/base/mysql.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/mysql.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "base/mysql.hh" #include "base/trace.hh" +#include "trace/SQL.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/base/remote_gdb.cc --- a/src/base/remote_gdb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/remote_gdb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -139,6 +139,12 @@ #include "mem/port.hh" #include "mem/translating_port.hh" #include "sim/system.hh" +#include "trace/GDBExtra.hh" +#include "trace/GDBMisc.hh" +#include "trace/GDBRead.hh" +#include "trace/GDBRecv.hh" +#include "trace/GDBSend.hh" +#include "trace/GDBWrite.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/base/trace.hh --- a/src/base/trace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/trace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,23 +33,22 @@ #define __BASE_TRACE_HH__ #include -#include #include "base/cprintf.hh" +#include "base/debug.hh" #include "base/match.hh" -#include "base/traceflags.hh" #include "base/types.hh" #include "sim/core.hh" namespace Trace { +using Debug::SimpleFlag; +using Debug::CompoundFlag; + std::ostream &output(); void setOutput(const std::string &filename); extern bool enabled; -typedef std::vector FlagVec; -extern FlagVec flags; -inline bool IsOn(int t) { return flags[t]; } bool changeFlag(const char *str, bool value); void dumpStatus(); @@ -85,38 +84,44 @@ #if TRACING_ON -#define DTRACE(x) (Trace::IsOn(Trace::x) && Trace::enabled) +#define DTRACE(x) (Trace::x && Trace::enabled) #define DDUMP(x, data, count) do { \ + using namespace Trace; \ if (DTRACE(x)) \ Trace::dump(curTick, name(), data, count); \ } while (0) #define DPRINTF(x, ...) do { \ + using namespace Trace; \ if (DTRACE(x)) \ Trace::dprintf(curTick, name(), __VA_ARGS__); \ } while (0) -#define DPRINTFS(x,s, ...) do { \ +#define DPRINTFS(x, s, ...) do { \ + using namespace Trace; \ if (DTRACE(x)) \ - Trace::dprintf(curTick, s->name(), __VA_ARGS__); \ + Trace::dprintf(curTick, s->name(), __VA_ARGS__); \ } while (0) - #define DPRINTFR(x, ...) do { \ + using namespace Trace; \ if (DTRACE(x)) \ Trace::dprintf((Tick)-1, std::string(), __VA_ARGS__); \ } while (0) #define DDUMPN(data, count) do { \ + using namespace Trace; \ Trace::dump(curTick, name(), data, count); \ } while (0) #define DPRINTFN(...) do { \ + using namespace Trace; \ Trace::dprintf(curTick, name(), __VA_ARGS__); \ } while (0) #define DPRINTFNR(...) do { \ + using namespace Trace; \ Trace::dprintf((Tick)-1, string(), __VA_ARGS__); \ } while (0) diff -r e197009ddb96 -r 0aa205436740 src/base/trace.cc --- a/src/base/trace.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/base/trace.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,9 +32,7 @@ #include #include #include -#include #include -#include #include "base/misc.hh" #include "base/output.hh" @@ -45,8 +43,8 @@ using namespace std; namespace Trace { + const string DefaultName("global"); -FlagVec flags(NumFlags, false); bool enabled = false; // @@ -149,63 +147,4 @@ } } -bool -changeFlag(const char *s, bool value) -{ - using namespace Trace; - std::string str(s); - - for (int i = 0; i < numFlagStrings; ++i) { - if (str != flagStrings[i]) - continue; - - if (i < NumFlags) { - flags[i] = value; - } else { - i -= NumFlags; - - const Flags *flagVec = compoundFlags[i]; - for (int j = 0; flagVec[j] != -1; ++j) { - if (flagVec[j] < NumFlags) - flags[flagVec[j]] = value; - } - } - - return true; - } - - // the flag was not found. - return false; -} - -void -dumpStatus() -{ - using namespace Trace; - for (int i = 0; i < numFlagStrings; ++i) { - if (flags[i]) - cprintf("%s\n", flagStrings[i]); - } -} - /* namespace Trace */ } - - -// add a set of functions that can easily be invoked from gdb -void -setTraceFlag(const char *string) -{ - Trace::changeFlag(string, true); -} - -void -clearTraceFlag(const char *string) -{ - Trace::changeFlag(string, false); -} - -void -dumpTraceStatus() -{ - Trace::dumpStatus(); -} diff -r e197009ddb96 -r 0aa205436740 src/cpu/activity.cc --- a/src/cpu/activity.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/activity.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "base/timebuf.hh" #include "cpu/activity.hh" +#include "trace/Activity.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/base.cc --- a/src/cpu/base.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/base.cc Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,7 @@ #include "sim/process.hh" #include "sim/sim_events.hh" #include "sim/system.hh" +#include "trace/SyscallVerbose.hh" // Hack #include "sim/stat_control.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/base_dyn_inst_impl.hh --- a/src/cpu/base_dyn_inst_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/base_dyn_inst_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,8 @@ #include "cpu/exetrace.hh" #include "mem/request.hh" #include "sim/faults.hh" +#include "trace/DynInst.hh" +#include "trace/IQ.hh" #define NOHASH #ifndef NOHASH diff -r e197009ddb96 -r 0aa205436740 src/cpu/exetrace.hh --- a/src/cpu/exetrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/exetrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,8 @@ #include "cpu/thread_context.hh" #include "params/ExeTracer.hh" #include "sim/insttracer.hh" +#include "trace/ExecEnable.hh" +#include "trace/ExecSpeculative.hh" class ThreadContext; @@ -72,13 +74,13 @@ const StaticInstPtr staticInst, TheISA::PCState pc, const StaticInstPtr macroStaticInst = NULL) { - if (!IsOn(ExecEnable)) + if (!Trace::ExecEnable) return NULL; if (!Trace::enabled) return NULL; - if (!IsOn(ExecSpeculative) && tc->misspeculating()) + if (!Trace::ExecSpeculative && tc->misspeculating()) return NULL; return new ExeTracerRecord(when, tc, diff -r e197009ddb96 -r 0aa205436740 src/cpu/exetrace.cc --- a/src/cpu/exetrace.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/exetrace.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,17 @@ #include "cpu/thread_context.hh" #include "config/the_isa.hh" #include "enums/OpClass.hh" +#include "trace/ExecCPSeq.hh" +#include "trace/ExecEffAddr.hh" +#include "trace/ExecFetchSeq.hh" +#include "trace/ExecMacro.hh" +#include "trace/ExecMicro.hh" +#include "trace/ExecOpClass.hh" +#include "trace/ExecResult.hh" +#include "trace/ExecSpeculative.hh" +#include "trace/ExecSymbol.hh" +#include "trace/ExecThread.hh" +#include "trace/ExecTicks.hh" using namespace std; using namespace TheISA; @@ -59,22 +70,21 @@ { ostream &outs = Trace::output(); - if (IsOn(ExecTicks)) + if (Trace::ExecTicks) dumpTicks(outs); outs << thread->getCpuPtr()->name() << " "; - if (IsOn(ExecSpeculative)) + if (Trace::ExecSpeculative) outs << (misspeculating ? "-" : "+") << " "; - if (IsOn(ExecThread)) + if (Trace::ExecThread) outs << "T" << thread->threadId() << " : "; std::string sym_str; Addr sym_addr; Addr cur_pc = pc.instAddr(); - if (debugSymbolTable - && IsOn(ExecSymbol) + if (debugSymbolTable && Trace::ExecSymbol #if FULL_SYSTEM && !inUserMode(thread) #endif @@ -104,25 +114,25 @@ if (ran) { outs << " : "; - if (IsOn(ExecOpClass)) { + if (Trace::ExecOpClass) { outs << Enums::OpClassStrings[inst->opClass()] << " : "; } - if (IsOn(ExecResult) && predicate == false) { + if (Trace::ExecResult && predicate == false) { outs << "Predicated False"; } - if (IsOn(ExecResult) && data_status != DataInvalid) { + if (Trace::ExecResult && data_status != DataInvalid) { ccprintf(outs, " D=%#018x", data.as_int); } - if (IsOn(ExecEffAddr) && addr_valid) + if (Trace::ExecEffAddr && addr_valid) outs << " A=0x" << hex << addr; - if (IsOn(ExecFetchSeq) && fetch_seq_valid) + if (Trace::ExecFetchSeq && fetch_seq_valid) outs << " FetchSeq=" << dec << fetch_seq; - if (IsOn(ExecCPSeq) && cp_seq_valid) + if (Trace::ExecCPSeq && cp_seq_valid) outs << " CPSeq=" << dec << cp_seq; } @@ -143,14 +153,14 @@ * finishes. Macroops then behave like regular instructions and don't * complete/print when they fault. */ - if (IsOn(ExecMacro) && staticInst->isMicroop() && - ((IsOn(ExecMicro) && - macroStaticInst && staticInst->isFirstMicroop()) || - (!IsOn(ExecMicro) && + if (Trace::ExecMacro && staticInst->isMicroop() && + ((Trace::ExecMicro && + macroStaticInst && staticInst->isFirstMicroop()) || + (!Trace::ExecMicro && macroStaticInst && staticInst->isLastMicroop()))) { traceInst(macroStaticInst, false); } - if (IsOn(ExecMicro) || !staticInst->isMicroop()) { + if (Trace::ExecMicro || !staticInst->isMicroop()) { traceInst(staticInst, true); } } diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/cpu.cc --- a/src/cpu/inorder/cpu.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/cpu.cc Tue Dec 21 08:23:53 2010 -0800 @@ -51,6 +51,9 @@ #include "params/InOrderCPU.hh" #include "sim/process.hh" #include "sim/stat_control.hh" +#include "trace/Activity.hh" +#include "trace/InOrderCPU.hh" +#include "trace/RefCount.hh" #if FULL_SYSTEM #include "cpu/quiesce_event.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/first_stage.cc --- a/src/cpu/inorder/first_stage.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/first_stage.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "cpu/inorder/resource_pool.hh" #include "cpu/inorder/cpu.hh" #include "params/InOrderTrace.hh" +#include "trace/InOrderStage.hh" using namespace std; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/inorder_dyn_inst.cc --- a/src/cpu/inorder/inorder_dyn_inst.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/inorder_dyn_inst.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "cpu/inorder/cpu.hh" #include "cpu/inorder/inorder_dyn_inst.hh" #include "mem/request.hh" +#include "trace/InOrderDynInst.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/inorder_trace.cc --- a/src/cpu/inorder/inorder_trace.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/inorder_trace.cc Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,7 @@ #include "cpu/inorder/pipeline_traits.hh" #include "cpu/thread_context.hh" #include "params/InOrderTrace.hh" +#include "trace/ExecEnable.hh" using namespace std; using namespace TheISA; @@ -64,7 +65,7 @@ InOrderTrace::getInstRecord(unsigned num_stages, bool stage_tracing, ThreadContext *tc) { - if (!IsOn(ExecEnable)) + if (!Trace::ExecEnable) return NULL; if (!Trace::enabled) diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/pipeline_stage.cc --- a/src/cpu/inorder/pipeline_stage.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/pipeline_stage.cc Tue Dec 21 08:23:53 2010 -0800 @@ -34,6 +34,11 @@ #include "cpu/inorder/pipeline_stage.hh" #include "cpu/inorder/resource_pool.hh" #include "cpu/inorder/cpu.hh" +#include "trace/Activity.hh" +#include "trace/InOrderStage.hh" +#include "trace/InOrderStall.hh" +#include "trace/Resource.hh" +#include "trace/ThreadModel.hh" using namespace std; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/reg_dep_map.cc --- a/src/cpu/inorder/reg_dep_map.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/reg_dep_map.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "cpu/inorder/reg_dep_map.hh" #include "cpu/inorder/inorder_dyn_inst.hh" #include "cpu/inorder/cpu.hh" +#include "trace/RegDepMap.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resource.cc --- a/src/cpu/inorder/resource.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resource.cc Tue Dec 21 08:23:53 2010 -0800 @@ -29,10 +29,15 @@ * */ +#include #include -#include + #include "cpu/inorder/resource.hh" #include "cpu/inorder/cpu.hh" +#include "trace/RefCount.hh" +#include "trace/Resource.hh" +#include "trace/ResReqCount.hh" + using namespace std; Resource::Resource(string res_name, int res_id, int res_width, diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resource_pool.cc --- a/src/cpu/inorder/resource_pool.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resource_pool.cc Tue Dec 21 08:23:53 2010 -0800 @@ -29,11 +29,12 @@ * */ +#include +#include + #include "cpu/inorder/resource_pool.hh" #include "cpu/inorder/resources/resource_list.hh" - -#include -#include +#include "trace/Resource.hh" using namespace std; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/agen_unit.cc --- a/src/cpu/inorder/resources/agen_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/agen_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -30,6 +30,7 @@ */ #include "cpu/inorder/resources/agen_unit.hh" +#include "trace/InOrderAGEN.hh" AGENUnit::AGENUnit(std::string res_name, int res_id, int res_width, int res_latency, InOrderCPU *_cpu, diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/bpred_unit.cc --- a/src/cpu/inorder/resources/bpred_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/bpred_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -33,9 +33,10 @@ #include "arch/utility.hh" #include "base/trace.hh" -#include "base/traceflags.hh" #include "config/the_isa.hh" #include "cpu/inorder/resources/bpred_unit.hh" +#include "trace/InOrderBPred.hh" +#include "trace/Resource.hh" using namespace std; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/branch_predictor.cc --- a/src/cpu/inorder/resources/branch_predictor.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/branch_predictor.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,8 @@ #include "config/the_isa.hh" #include "cpu/inorder/resources/branch_predictor.hh" +#include "trace/InOrderBPred.hh" +#include "trace/InOrderStage.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/cache_unit.cc --- a/src/cpu/inorder/resources/cache_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/cache_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -29,8 +29,8 @@ * */ +#include #include -#include #include "arch/isa_traits.hh" #include "arch/locked_mem.hh" @@ -42,6 +42,14 @@ #include "cpu/inorder/cpu.hh" #include "cpu/inorder/resource_pool.hh" #include "mem/request.hh" +#include "trace/Activity.hh" +#include "trace/AddrDep.hh" +#include "trace/InOrderCachePort.hh" +#include "trace/InOrderStall.hh" +#include "trace/InOrderTLB.hh" +#include "trace/LLSC.hh" +#include "trace/RefCount.hh" +#include "trace/ThreadModel.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/decode_unit.cc --- a/src/cpu/inorder/resources/decode_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/decode_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,9 @@ #include "config/the_isa.hh" #include "cpu/inorder/resources/decode_unit.hh" +#include "trace/InOrderDecode.hh" +#include "trace/InOrderStall.hh" +#include "trace/Resource.hh" using namespace TheISA; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/execution_unit.cc --- a/src/cpu/inorder/resources/execution_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/execution_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -29,11 +29,14 @@ * */ +#include #include -#include + #include "cpu/inorder/resources/execution_unit.hh" #include "cpu/inorder/resource_pool.hh" #include "cpu/inorder/cpu.hh" +#include "trace/InOrderExecute.hh" +#include "trace/InOrderStall.hh" using namespace std; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/fetch_seq_unit.cc --- a/src/cpu/inorder/resources/fetch_seq_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/fetch_seq_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,8 @@ #include "config/the_isa.hh" #include "cpu/inorder/resources/fetch_seq_unit.hh" #include "cpu/inorder/resource_pool.hh" +#include "trace/InOrderFetchSeq.hh" +#include "trace/InOrderStall.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/graduation_unit.cc --- a/src/cpu/inorder/resources/graduation_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/graduation_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -30,6 +30,7 @@ */ #include "cpu/inorder/resources/graduation_unit.hh" +#include "trace/InOrderGraduation.hh" using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/inst_buffer.cc --- a/src/cpu/inorder/resources/inst_buffer.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/inst_buffer.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,8 @@ #include "cpu/inorder/pipeline_traits.hh" #include "cpu/inorder/resources/inst_buffer.hh" #include "cpu/inorder/cpu.hh" +#include "trace/InOrderInstBuffer.hh" +#include "trace/Resource.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/mult_div_unit.cc --- a/src/cpu/inorder/resources/mult_div_unit.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/mult_div_unit.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,10 +31,13 @@ #include #include + #include "cpu/inorder/resources/mult_div_unit.hh" #include "cpu/inorder/resource_pool.hh" #include "cpu/inorder/cpu.hh" #include "cpu/op_class.hh" +#include "trace/InOrderMDU.hh" +#include "trace/Resource.hh" using namespace std; using namespace ThePipeline; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/resources/use_def.cc --- a/src/cpu/inorder/resources/use_def.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/resources/use_def.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,8 @@ #include "cpu/inorder/pipeline_traits.hh" #include "cpu/inorder/resources/use_def.hh" #include "cpu/inorder/cpu.hh" +#include "trace/InOrderStall.hh" +#include "trace/InOrderUseDef.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inorder/thread_context.cc --- a/src/cpu/inorder/thread_context.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inorder/thread_context.cc Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "config/the_isa.hh" #include "cpu/exetrace.hh" #include "cpu/inorder/thread_context.hh" +#include "trace/InOrderCPU.hh" using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/inteltrace.hh --- a/src/cpu/inteltrace.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/inteltrace.hh Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,8 @@ #include "cpu/static_inst.hh" #include "params/IntelTrace.hh" #include "sim/insttracer.hh" +#include "trace/ExecEnable.hh" +#include "trace/ExecSpeculative.hh" class ThreadContext; @@ -68,13 +70,13 @@ const StaticInstPtr staticInst, TheISA::PCState pc, const StaticInstPtr macroStaticInst = NULL) { - if (!IsOn(ExecEnable)) + if (!Trace::ExecEnable) return NULL; if (!Trace::enabled) return NULL; - if (!IsOn(ExecSpeculative) && tc->misspeculating()) + if (!Trace::ExecSpeculative && tc->misspeculating()) return NULL; return new IntelTraceRecord(when, tc, diff -r e197009ddb96 -r 0aa205436740 src/cpu/intr_control.cc --- a/src/cpu/intr_control.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/intr_control.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "cpu/thread_context.hh" #include "cpu/intr_control.hh" #include "sim/sim_object.hh" +#include "trace/IntrControl.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/nativetrace.cc --- a/src/cpu/nativetrace.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/nativetrace.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "cpu/nativetrace.hh" #include "cpu/static_inst.hh" #include "params/NativeTrace.hh" +#include "trace/GDBMisc.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/bpred_unit_impl.hh --- a/src/cpu/o3/bpred_unit_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/bpred_unit_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -34,10 +34,10 @@ #include "arch/utility.hh" #include "arch/isa_traits.hh" #include "base/trace.hh" -#include "base/traceflags.hh" #include "config/the_isa.hh" #include "cpu/o3/bpred_unit.hh" #include "params/DerivO3CPU.hh" +#include "trace/Fetch.hh" template BPredUnit::BPredUnit(DerivO3CPUParams *params) diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/commit_impl.hh --- a/src/cpu/o3/commit_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/commit_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -55,6 +55,10 @@ #include "cpu/o3/commit.hh" #include "cpu/o3/thread_state.hh" #include "params/DerivO3CPU.hh" +#include "trace/Activity.hh" +#include "trace/Commit.hh" +#include "trace/CommitRate.hh" +#include "trace/ExecFaulting.hh" #if USE_CHECKER #include "cpu/checker/cpu.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/cpu.cc --- a/src/cpu/o3/cpu.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/cpu.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,9 @@ #include "enums/MemoryMode.hh" #include "sim/core.hh" #include "sim/stat_control.hh" +#include "trace/Activity.hh" +#include "trace/O3CPU.hh" +#include "trace/Quiesce.hh" #if FULL_SYSTEM #include "cpu/quiesce_event.hh" @@ -55,6 +58,7 @@ #if THE_ISA == ALPHA_ISA #include "arch/alpha/osfpal.hh" +#include "trace/Activity.hh" #endif class BaseCPUParams; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/decode_impl.hh --- a/src/cpu/o3/decode_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/decode_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,8 @@ #include "config/the_isa.hh" #include "cpu/o3/decode.hh" #include "params/DerivO3CPU.hh" +#include "trace/Activity.hh" +#include "trace/Decode.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/fetch_impl.hh --- a/src/cpu/o3/fetch_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/fetch_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,8 @@ #include "params/DerivO3CPU.hh" #include "sim/byteswap.hh" #include "sim/core.hh" +#include "trace/Activity.hh" +#include "trace/Fetch.hh" #if FULL_SYSTEM #include "arch/tlb.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/free_list.hh --- a/src/cpu/o3/free_list.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/free_list.hh Tue Dec 21 08:23:53 2010 -0800 @@ -37,9 +37,9 @@ #include "arch/registers.hh" #include "base/misc.hh" #include "base/trace.hh" -#include "base/traceflags.hh" #include "config/the_isa.hh" #include "cpu/o3/comm.hh" +#include "trace/FreeList.hh" /** * FreeList class that simply holds the list of free integer and floating diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/free_list.cc --- a/src/cpu/o3/free_list.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/free_list.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include "base/trace.hh" #include "cpu/o3/free_list.hh" +#include "trace/FreeList.hh" SimpleFreeList::SimpleFreeList(ThreadID activeThreads, unsigned _numLogicalIntRegs, diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/iew.hh --- a/src/cpu/o3/iew.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/iew.hh Tue Dec 21 08:23:53 2010 -0800 @@ -51,6 +51,7 @@ #include "cpu/o3/comm.hh" #include "cpu/o3/scoreboard.hh" #include "cpu/o3/lsq.hh" +#include "trace/IEW.hh" class DerivO3CPUParams; class FUPool; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/iew_impl.hh --- a/src/cpu/o3/iew_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/iew_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -51,6 +51,9 @@ #include "cpu/o3/fu_pool.hh" #include "cpu/o3/iew.hh" #include "params/DerivO3CPU.hh" +#include "trace/Activity.hh" +#include "trace/Decode.hh" +#include "trace/IEW.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/inst_queue_impl.hh --- a/src/cpu/o3/inst_queue_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/inst_queue_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "enums/OpClass.hh" #include "params/DerivO3CPU.hh" #include "sim/core.hh" +#include "trace/IQ.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/lsq_impl.hh --- a/src/cpu/o3/lsq_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/lsq_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -34,6 +34,9 @@ #include "cpu/o3/lsq.hh" #include "params/DerivO3CPU.hh" +#include "trace/Fetch.hh" +#include "trace/LSQ.hh" +#include "trace/Writeback.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/lsq_unit.hh --- a/src/cpu/o3/lsq_unit.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/lsq_unit.hh Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,7 @@ #include "cpu/inst_seq.hh" #include "mem/packet.hh" #include "mem/port.hh" +#include "trace/LSQUnit.hh" class DerivO3CPUParams; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/lsq_unit_impl.hh --- a/src/cpu/o3/lsq_unit_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/lsq_unit_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -49,6 +49,9 @@ #include "base/str.hh" #include "mem/packet.hh" #include "mem/request.hh" +#include "trace/Activity.hh" +#include "trace/IEW.hh" +#include "trace/LSQUnit.hh" #if USE_CHECKER #include "cpu/checker/cpu.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/mem_dep_unit.hh --- a/src/cpu/o3/mem_dep_unit.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/mem_dep_unit.hh Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,7 @@ #include "base/refcnt.hh" #include "base/statistics.hh" #include "cpu/inst_seq.hh" +#include "trace/MemDepUnit.hh" struct SNHash { size_t operator() (const InstSeqNum &seq_num) const { diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/mem_dep_unit_impl.hh --- a/src/cpu/o3/mem_dep_unit_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/mem_dep_unit_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "cpu/o3/inst_queue.hh" #include "cpu/o3/mem_dep_unit.hh" #include "params/DerivO3CPU.hh" +#include "trace/MemDepUnit.hh" template MemDepUnit::MemDepUnit() diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/regfile.hh --- a/src/cpu/o3/regfile.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/regfile.hh Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "config/full_system.hh" #include "config/the_isa.hh" #include "cpu/o3/comm.hh" +#include "trace/IEW.hh" #if FULL_SYSTEM #include "arch/kernel_stats.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/rename_impl.hh --- a/src/cpu/o3/rename_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/rename_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,8 @@ #include "config/the_isa.hh" #include "cpu/o3/rename.hh" #include "params/DerivO3CPU.hh" +#include "trace/Activity.hh" +#include "trace/Rename.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/rename_map.cc --- a/src/cpu/o3/rename_map.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/rename_map.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include #include "cpu/o3/rename_map.hh" +#include "trace/Rename.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/rob_impl.hh --- a/src/cpu/o3/rob_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/rob_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,8 @@ #include "config/full_system.hh" #include "cpu/o3/rob.hh" +#include "trace/Fetch.hh" +#include "trace/ROB.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/scoreboard.hh --- a/src/cpu/o3/scoreboard.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/scoreboard.hh Tue Dec 21 08:23:53 2010 -0800 @@ -35,8 +35,8 @@ #include #include #include + #include "base/trace.hh" -#include "base/traceflags.hh" #include "cpu/o3/comm.hh" /** diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/scoreboard.cc --- a/src/cpu/o3/scoreboard.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/scoreboard.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include "config/the_isa.hh" #include "cpu/o3/scoreboard.hh" +#include "trace/Scoreboard.hh" Scoreboard::Scoreboard(unsigned activeThreads, unsigned _numLogicalIntRegs, diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/store_set.cc --- a/src/cpu/o3/store_set.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/store_set.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "cpu/o3/store_set.hh" +#include "trace/StoreSet.hh" StoreSet::StoreSet(int _SSIT_size, int _LFST_size) : SSITSize(_SSIT_size), LFSTSize(_LFST_size) diff -r e197009ddb96 -r 0aa205436740 src/cpu/o3/thread_context_impl.hh --- a/src/cpu/o3/thread_context_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/o3/thread_context_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,7 @@ #include "config/the_isa.hh" #include "cpu/o3/thread_context.hh" #include "cpu/quiesce_event.hh" +#include "trace/O3CPU.hh" #if FULL_SYSTEM template diff -r e197009ddb96 -r 0aa205436740 src/cpu/pc_event.cc --- a/src/cpu/pc_event.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/pc_event.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "cpu/pc_event.hh" #include "sim/core.hh" #include "sim/system.hh" +#include "trace/PCEvent.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/pred/2bit_local.cc --- a/src/cpu/pred/2bit_local.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/pred/2bit_local.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "cpu/pred/2bit_local.hh" +#include "trace/Fetch.hh" LocalBP::LocalBP(unsigned _localPredictorSize, unsigned _localCtrBits, diff -r e197009ddb96 -r 0aa205436740 src/cpu/pred/btb.cc --- a/src/cpu/pred/btb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/pred/btb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include "base/intmath.hh" #include "base/trace.hh" #include "cpu/pred/btb.hh" +#include "trace/Fetch.hh" DefaultBTB::DefaultBTB(unsigned _numEntries, unsigned _tagBits, diff -r e197009ddb96 -r 0aa205436740 src/cpu/quiesce_event.cc --- a/src/cpu/quiesce_event.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/quiesce_event.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include "cpu/base.hh" #include "cpu/thread_context.hh" #include "cpu/quiesce_event.hh" +#include "trace/Quiesce.hh" EndQuiesceEvent::EndQuiesceEvent(ThreadContext *_tc) : tc(_tc) diff -r e197009ddb96 -r 0aa205436740 src/cpu/simple/atomic.cc --- a/src/cpu/simple/atomic.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/simple/atomic.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,8 @@ #include "params/AtomicSimpleCPU.hh" #include "sim/faults.hh" #include "sim/system.hh" +#include "trace/ExecFaulting.hh" +#include "trace/SimpleCPU.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/simple/base.cc --- a/src/cpu/simple/base.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/simple/base.cc Tue Dec 21 08:23:53 2010 -0800 @@ -69,6 +69,9 @@ #include "sim/sim_object.hh" #include "sim/stats.hh" #include "sim/system.hh" +#include "trace/Decode.hh" +#include "trace/Fetch.hh" +#include "trace/Quiesce.hh" #if FULL_SYSTEM #include "arch/kernel_stats.hh" diff -r e197009ddb96 -r 0aa205436740 src/cpu/simple/timing.cc --- a/src/cpu/simple/timing.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/simple/timing.cc Tue Dec 21 08:23:53 2010 -0800 @@ -52,6 +52,9 @@ #include "params/TimingSimpleCPU.hh" #include "sim/faults.hh" #include "sim/system.hh" +#include "trace/Config.hh" +#include "trace/ExecFaulting.hh" +#include "trace/SimpleCPU.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/cpu/simple_thread.hh --- a/src/cpu/simple_thread.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/simple_thread.hh Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,8 @@ #include "sim/byteswap.hh" #include "sim/eventq.hh" #include "sim/serialize.hh" +#include "trace/FloatRegs.hh" +#include "trace/IntRegs.hh" class BaseCPU; diff -r e197009ddb96 -r 0aa205436740 src/cpu/testers/memtest/memtest.cc --- a/src/cpu/testers/memtest/memtest.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/testers/memtest/memtest.cc Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,7 @@ #include "mem/request.hh" #include "sim/sim_events.hh" #include "sim/stats.hh" +#include "trace/MemTest.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/cpu/thread_context.cc --- a/src/cpu/thread_context.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/cpu/thread_context.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "base/trace.hh" #include "config/the_isa.hh" #include "cpu/thread_context.hh" +#include "trace/Context.hh" void ThreadContext::compare(ThreadContext *one, ThreadContext *two) diff -r e197009ddb96 -r 0aa205436740 src/dev/alpha/backdoor.cc --- a/src/dev/alpha/backdoor.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/alpha/backdoor.cc Tue Dec 21 08:23:53 2010 -0800 @@ -53,6 +53,7 @@ #include "mem/physical.hh" #include "params/AlphaBackdoor.hh" #include "sim/sim_object.hh" +#include "trace/AlphaBackdoor.hh" using namespace std; using namespace AlphaISA; diff -r e197009ddb96 -r 0aa205436740 src/dev/alpha/tsunami_cchip.cc --- a/src/dev/alpha/tsunami_cchip.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/alpha/tsunami_cchip.cc Tue Dec 21 08:23:53 2010 -0800 @@ -50,6 +50,8 @@ #include "mem/port.hh" #include "params/TsunamiCChip.hh" #include "sim/system.hh" +#include "trace/IPI.hh" +#include "trace/Tsunami.hh" using namespace std; //Should this be AlphaISA? diff -r e197009ddb96 -r 0aa205436740 src/dev/alpha/tsunami_io.cc --- a/src/dev/alpha/tsunami_io.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/alpha/tsunami_io.cc Tue Dec 21 08:23:53 2010 -0800 @@ -52,6 +52,7 @@ #include "mem/packet_access.hh" #include "mem/port.hh" #include "sim/system.hh" +#include "trace/Tsunami.hh" using namespace std; //Should this be AlphaISA? diff -r e197009ddb96 -r 0aa205436740 src/dev/alpha/tsunami_pchip.cc --- a/src/dev/alpha/tsunami_pchip.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/alpha/tsunami_pchip.cc Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,7 @@ #include "mem/packet.hh" #include "mem/packet_access.hh" #include "sim/system.hh" +#include "trace/Tsunami.hh" using namespace std; //Should this be AlphaISA? diff -r e197009ddb96 -r 0aa205436740 src/dev/copy_engine.cc --- a/src/dev/copy_engine.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/copy_engine.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "params/CopyEngine.hh" #include "sim/stats.hh" #include "sim/system.hh" +#include "trace/DMACopyEngine.hh" using namespace CopyEngineReg; using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/disk_image.cc --- a/src/dev/disk_image.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/disk_image.cc Tue Dec 21 08:23:53 2010 -0800 @@ -47,6 +47,8 @@ #include "dev/disk_image.hh" #include "sim/sim_exit.hh" #include "sim/byteswap.hh" +#include "trace/DiskImageRead.hh" +#include "trace/DiskImageWrite.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/etherbus.cc --- a/src/dev/etherbus.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/etherbus.cc Tue Dec 21 08:23:53 2010 -0800 @@ -44,6 +44,8 @@ #include "dev/etherpkt.hh" #include "params/EtherBus.hh" #include "sim/core.hh" +#include "trace/Ethernet.hh" +#include "trace/EthernetData.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/etherlink.cc --- a/src/dev/etherlink.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/etherlink.cc Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,8 @@ #include "sim/serialize.hh" #include "sim/system.hh" #include "sim/core.hh" +#include "trace/Ethernet.hh" +#include "trace/EthernetData.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/ethertap.cc --- a/src/dev/ethertap.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/ethertap.cc Tue Dec 21 08:23:53 2010 -0800 @@ -50,6 +50,8 @@ #include "dev/etherint.hh" #include "dev/etherpkt.hh" #include "dev/ethertap.hh" +#include "trace/Ethernet.hh" +#include "trace/EthernetData.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/i8254xGBe.hh --- a/src/dev/i8254xGBe.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/i8254xGBe.hh Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,8 @@ #include "dev/pktfifo.hh" #include "params/IGbE.hh" #include "sim/eventq.hh" +#include "trace/EthernetDesc.hh" +#include "trace/EthernetIntr.hh" class IGbEInt; diff -r e197009ddb96 -r 0aa205436740 src/dev/i8254xGBe.cc --- a/src/dev/i8254xGBe.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/i8254xGBe.cc Tue Dec 21 08:23:53 2010 -0800 @@ -50,6 +50,11 @@ #include "params/IGbE.hh" #include "sim/stats.hh" #include "sim/system.hh" +#include "trace/Ethernet.hh" +#include "trace/EthernetDesc.hh" +#include "trace/EthernetEEPROM.hh" +#include "trace/EthernetIntr.hh" +#include "trace/EthernetSM.hh" using namespace iGbReg; using namespace Net; diff -r e197009ddb96 -r 0aa205436740 src/dev/ide_ctrl.cc --- a/src/dev/ide_ctrl.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/ide_ctrl.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "mem/packet_access.hh" #include "params/IdeController.hh" #include "sim/byteswap.hh" +#include "trace/IdeCtrl.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/ide_disk.cc --- a/src/dev/ide_disk.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/ide_disk.cc Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,7 @@ #include "dev/ide_disk.hh" #include "sim/core.hh" #include "sim/sim_object.hh" +#include "trace/IdeDisk.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/dev/intel_8254_timer.hh --- a/src/dev/intel_8254_timer.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/intel_8254_timer.hh Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "base/types.hh" #include "sim/eventq.hh" #include "sim/serialize.hh" +#include "trace/Intel8254Timer.hh" /** Programmable Interval Timer (Intel 8254) */ class Intel8254Timer : public EventManager diff -r e197009ddb96 -r 0aa205436740 src/dev/intel_8254_timer.cc --- a/src/dev/intel_8254_timer.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/intel_8254_timer.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "base/misc.hh" #include "dev/intel_8254_timer.hh" +#include "trace/Intel8254Timer.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/io_device.cc --- a/src/dev/io_device.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/io_device.cc Tue Dec 21 08:23:53 2010 -0800 @@ -33,7 +33,8 @@ #include "base/trace.hh" #include "dev/io_device.hh" #include "sim/system.hh" - +#include "trace/BusAddrRanges.hh" +#include "trace/DMA.hh" PioPort::PioPort(PioDevice *dev, System *s, std::string pname) : SimpleTimingPort(dev->name() + pname, dev), device(dev) diff -r e197009ddb96 -r 0aa205436740 src/dev/isa_fake.cc --- a/src/dev/isa_fake.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/isa_fake.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "mem/packet.hh" #include "mem/packet_access.hh" #include "sim/system.hh" +#include "trace/IsaFake.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/mc146818.cc --- a/src/dev/mc146818.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/mc146818.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "base/trace.hh" #include "dev/mc146818.hh" #include "dev/rtcreg.h" +#include "trace/MC146818.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/ns_gige.cc --- a/src/dev/ns_gige.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/ns_gige.cc Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,14 @@ #include "mem/packet_access.hh" #include "params/NSGigE.hh" #include "sim/system.hh" +#include "trace/Ethernet.hh" +#include "trace/EthernetCksum.hh" +#include "trace/EthernetData.hh" +#include "trace/EthernetDesc.hh" +#include "trace/EthernetDMA.hh" +#include "trace/EthernetIntr.hh" +#include "trace/EthernetPIO.hh" +#include "trace/EthernetSM.hh" const char *NsRxStateStrings[] = { diff -r e197009ddb96 -r 0aa205436740 src/dev/pciconfigall.cc --- a/src/dev/pciconfigall.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/pciconfigall.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,7 @@ #include "mem/packet_access.hh" #include "params/PciConfigAll.hh" #include "sim/system.hh" +#include "trace/PciConfigAll.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/pcidev.cc --- a/src/dev/pcidev.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/pcidev.cc Tue Dec 21 08:23:53 2010 -0800 @@ -50,6 +50,7 @@ #include "mem/packet_access.hh" #include "sim/byteswap.hh" #include "sim/core.hh" +#include "trace/PCIDEV.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/simple_disk.cc --- a/src/dev/simple_disk.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/simple_disk.cc Tue Dec 21 08:23:53 2010 -0800 @@ -46,6 +46,8 @@ #include "dev/simple_disk.hh" #include "mem/port.hh" #include "sim/system.hh" +#include "trace/SimpleDisk.hh" +#include "trace/SimpleDiskData.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/sinic.cc --- a/src/dev/sinic.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/sinic.cc Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,13 @@ #include "mem/packet_access.hh" #include "sim/eventq.hh" #include "sim/stats.hh" +#include "trace/Ethernet.hh" +#include "trace/EthernetCksum.hh" +#include "trace/EthernetData.hh" +#include "trace/EthernetDMA.hh" +#include "trace/EthernetIntr.hh" +#include "trace/EthernetPIO.hh" +#include "trace/EthernetSM.hh" using namespace std; using namespace Net; diff -r e197009ddb96 -r 0aa205436740 src/dev/sparc/iob.cc --- a/src/dev/sparc/iob.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/sparc/iob.cc Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,7 @@ #include "mem/packet_access.hh" #include "sim/faults.hh" #include "sim/system.hh" +#include "trace/Iob.hh" Iob::Iob(const Params *p) : PioDevice(p), ic(p->platform->intrctrl) diff -r e197009ddb96 -r 0aa205436740 src/dev/sparc/mm_disk.cc --- a/src/dev/sparc/mm_disk.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/sparc/mm_disk.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "mem/packet_access.hh" #include "sim/byteswap.hh" #include "sim/system.hh" +#include "trace/IdeDisk.hh" MmDisk::MmDisk(const Params *p) : BasicPioDevice(p), image(p->image), curSector((off_t)-1), dirty(false) diff -r e197009ddb96 -r 0aa205436740 src/dev/terminal.cc --- a/src/dev/terminal.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/terminal.cc Tue Dec 21 08:23:53 2010 -0800 @@ -53,6 +53,8 @@ #include "dev/platform.hh" #include "dev/terminal.hh" #include "dev/uart.hh" +#include "trace/Terminal.hh" +#include "trace/TerminalVerbose.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/dev/uart8250.cc --- a/src/dev/uart8250.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/uart8250.cc Tue Dec 21 08:23:53 2010 -0800 @@ -44,6 +44,7 @@ #include "dev/uart8250.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" +#include "trace/Uart.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/dev/x86/cmos.cc --- a/src/dev/x86/cmos.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/x86/cmos.cc Tue Dec 21 08:23:53 2010 -0800 @@ -31,6 +31,7 @@ #include "dev/x86/cmos.hh" #include "dev/x86/intdev.hh" #include "mem/packet_access.hh" +#include "trace/CMOS.hh" void X86ISA::Cmos::X86RTC::handleEvent() diff -r e197009ddb96 -r 0aa205436740 src/dev/x86/i8042.cc --- a/src/dev/x86/i8042.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/x86/i8042.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "dev/x86/i8042.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" +#include "trace/I8042.hh" // The 8042 has a whopping 32 bytes of internal RAM. const uint8_t RamSize = 32; diff -r e197009ddb96 -r 0aa205436740 src/dev/x86/i82094aa.cc --- a/src/dev/x86/i82094aa.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/x86/i82094aa.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "mem/packet.hh" #include "mem/packet_access.hh" #include "sim/system.hh" +#include "trace/I82094AA.hh" X86ISA::I82094AA::I82094AA(Params *p) : PioDevice(p), IntDev(this, p->int_latency), diff -r e197009ddb96 -r 0aa205436740 src/dev/x86/i8254.cc --- a/src/dev/x86/i8254.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/x86/i8254.cc Tue Dec 21 08:23:53 2010 -0800 @@ -32,6 +32,7 @@ #include "dev/x86/intdev.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" +#include "trace/I8254.hh" void X86ISA::I8254::counterInterrupt(unsigned int num) diff -r e197009ddb96 -r 0aa205436740 src/dev/x86/i8259.cc --- a/src/dev/x86/i8259.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/x86/i8259.cc Tue Dec 21 08:23:53 2010 -0800 @@ -33,6 +33,7 @@ #include "dev/x86/i8259.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" +#include "trace/I8259.hh" X86ISA::I8259::I8259(Params * p) : BasicPioDevice(p), IntDev(this), latency(p->pio_latency), output(p->output), diff -r e197009ddb96 -r 0aa205436740 src/dev/x86/speaker.cc --- a/src/dev/x86/speaker.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/dev/x86/speaker.cc Tue Dec 21 08:23:53 2010 -0800 @@ -34,6 +34,7 @@ #include "dev/x86/speaker.hh" #include "mem/packet.hh" #include "mem/packet_access.hh" +#include "trace/PcSpeaker.hh" Tick X86ISA::Speaker::read(PacketPtr pkt) diff -r e197009ddb96 -r 0aa205436740 src/kern/linux/events.cc --- a/src/kern/linux/events.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/kern/linux/events.cc Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,7 @@ #include "kern/system_events.hh" #include "sim/arguments.hh" #include "sim/system.hh" +#include "trace/DebugPrintf.hh" namespace Linux { diff -r e197009ddb96 -r 0aa205436740 src/kern/linux/linux.cc --- a/src/kern/linux/linux.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/kern/linux/linux.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "kern/linux/linux.hh" #include "sim/process.hh" #include "sim/system.hh" +#include "trace/SyscallVerbose.hh" int Linux::openSpecialFile(std::string path, LiveProcess *process, ThreadContext *tc) diff -r e197009ddb96 -r 0aa205436740 src/kern/system_events.cc --- a/src/kern/system_events.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/kern/system_events.cc Tue Dec 21 08:23:53 2010 -0800 @@ -35,6 +35,7 @@ #include "config/the_isa.hh" #include "cpu/thread_context.hh" #include "kern/system_events.hh" +#include "trace/PCEvent.hh" using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/kern/tru64/tru64.hh --- a/src/kern/tru64/tru64.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/kern/tru64/tru64.hh Tue Dec 21 08:23:53 2010 -0800 @@ -62,6 +62,7 @@ #include "cpu/base.hh" #include "sim/core.hh" #include "sim/syscall_emul.hh" +#include "trace/SyscallVerbose.hh" typedef struct stat global_stat; typedef struct statfs global_statfs; diff -r e197009ddb96 -r 0aa205436740 src/kern/tru64/tru64_events.cc --- a/src/kern/tru64/tru64_events.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/kern/tru64/tru64_events.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,9 @@ #include "kern/tru64/printf.hh" #include "sim/arguments.hh" #include "sim/system.hh" +#include "trace/BADADDR.hh" +#include "trace/DebugPrintf.hh" +#include "trace/Printf.hh" using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/mem/bridge.cc --- a/src/mem/bridge.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/bridge.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,7 @@ #include "base/trace.hh" #include "mem/bridge.hh" #include "params/Bridge.hh" +#include "trace/BusBridge.hh" Bridge::BridgePort::BridgePort(const std::string &_name, Bridge *_bridge, BridgePort *_otherPort, diff -r e197009ddb96 -r 0aa205436740 src/mem/bus.cc --- a/src/mem/bus.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/bus.cc Tue Dec 21 08:23:53 2010 -0800 @@ -39,6 +39,9 @@ #include "base/misc.hh" #include "base/trace.hh" #include "mem/bus.hh" +#include "trace/Bus.hh" +#include "trace/BusAddrRanges.hh" +#include "trace/MMU.hh" Bus::Bus(const BusParams *p) : MemObject(p), busId(p->bus_id), clock(p->clock), diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/base.hh --- a/src/mem/cache/base.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/base.hh Tue Dec 21 08:23:53 2010 -0800 @@ -56,6 +56,8 @@ #include "params/BaseCache.hh" #include "sim/eventq.hh" #include "sim/sim_exit.hh" +#include "trace/Cache.hh" +#include "trace/CachePort.hh" class MSHR; /** diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/base.cc --- a/src/mem/cache/base.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/base.cc Tue Dec 21 08:23:53 2010 -0800 @@ -37,6 +37,7 @@ #include "cpu/smt.hh" #include "mem/cache/base.hh" #include "mem/cache/mshr.hh" +#include "trace/Cache.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/cache_impl.hh --- a/src/mem/cache/cache_impl.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/cache_impl.hh Tue Dec 21 08:23:53 2010 -0800 @@ -59,6 +59,8 @@ #include "mem/cache/mshr.hh" #include "mem/cache/prefetch/base.hh" #include "sim/sim_exit.hh" +#include "trace/Cache.hh" +#include "trace/CachePort.hh" template Cache::Cache(const Params *p, TagStore *tags, BasePrefetcher *pf) diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/mshr.cc --- a/src/mem/cache/mshr.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/mshr.cc Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,7 @@ #include "mem/cache/cache.hh" #include "mem/cache/mshr.hh" #include "sim/core.hh" +#include "trace/Cache.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/prefetch/base.cc --- a/src/mem/cache/prefetch/base.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/prefetch/base.cc Tue Dec 21 08:23:53 2010 -0800 @@ -41,6 +41,7 @@ #include "mem/cache/base.hh" #include "mem/cache/prefetch/base.hh" #include "mem/request.hh" +#include "trace/HWPrefetch.hh" BasePrefetcher::BasePrefetcher(const BaseCacheParams *p) : size(p->prefetcher_size), pageStop(!p->prefetch_past_page), diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/prefetch/ghb.cc --- a/src/mem/cache/prefetch/ghb.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/prefetch/ghb.cc Tue Dec 21 08:23:53 2010 -0800 @@ -36,6 +36,7 @@ #include "base/trace.hh" #include "mem/cache/prefetch/ghb.hh" +#include "trace/HWPrefetch.hh" void GHBPrefetcher::calculatePrefetch(PacketPtr &pkt, std::list &addresses, diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/prefetch/stride.cc --- a/src/mem/cache/prefetch/stride.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/prefetch/stride.cc Tue Dec 21 08:23:53 2010 -0800 @@ -36,6 +36,7 @@ #include "base/trace.hh" #include "mem/cache/prefetch/stride.hh" +#include "trace/HWPrefetch.hh" void StridePrefetcher::calculatePrefetch(PacketPtr &pkt, std::list &addresses, diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/tags/iic.cc --- a/src/mem/cache/tags/iic.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/tags/iic.cc Tue Dec 21 08:23:53 2010 -0800 @@ -43,6 +43,9 @@ #include "mem/cache/base.hh" #include "mem/cache/tags/iic.hh" #include "sim/core.hh" +#include "trace/Cache.hh" +#include "trace/IIC.hh" +#include "trace/IICMore.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/mem/cache/tags/lru.cc --- a/src/mem/cache/tags/lru.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/cache/tags/lru.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "mem/cache/tags/cacheset.hh" #include "mem/cache/tags/lru.hh" #include "sim/core.hh" +#include "trace/CacheRepl.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/mem/page_table.cc --- a/src/mem/page_table.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/page_table.cc Tue Dec 21 08:23:53 2010 -0800 @@ -47,6 +47,7 @@ #include "sim/process.hh" #include "sim/sim_object.hh" #include "sim/system.hh" +#include "trace/MMU.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/mem/physical.cc --- a/src/mem/physical.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/physical.cc Tue Dec 21 08:23:53 2010 -0800 @@ -63,6 +63,8 @@ #include "mem/packet_access.hh" #include "mem/physical.hh" #include "sim/eventq.hh" +#include "trace/LLSC.hh" +#include "trace/MemoryAccess.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/mem/port.cc --- a/src/mem/port.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/port.cc Tue Dec 21 08:23:53 2010 -0800 @@ -38,6 +38,7 @@ #include "base/trace.hh" #include "mem/mem_object.hh" #include "mem/port.hh" +#include "trace/Config.hh" class DefaultPeerPort : public Port { diff -r e197009ddb96 -r 0aa205436740 src/mem/ruby/common/Debug.hh --- a/src/mem/ruby/common/Debug.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/ruby/common/Debug.hh Tue Dec 21 08:23:53 2010 -0800 @@ -68,12 +68,12 @@ enum PriorityLevel {HighPrio, MedPrio, LowPrio}; enum VerbosityLevel {No_Verb, Low_Verb, Med_Verb, High_Verb}; -class Debug : public SimObject +class RubyDebug : public SimObject { public: typedef RubyDebugParams Params; - Debug(const Params *p); - ~Debug(); + RubyDebug(const Params *p); + ~RubyDebug(); static bool getProtocolTrace() { return m_protocol_trace; } bool validDebug(int module, PriorityLevel priority); @@ -100,8 +100,8 @@ private: // Private copy constructor and assignment operator - Debug(const Debug& obj); - Debug& operator=(const Debug& obj); + RubyDebug(const RubyDebug& obj); + RubyDebug& operator=(const RubyDebug& obj); static bool m_protocol_trace; VerbosityLevel m_verbosityLevel; @@ -112,7 +112,7 @@ }; inline std::ostream& -operator<<(std::ostream& out, const Debug& obj) +operator<<(std::ostream& out, const RubyDebug& obj) { obj.print(out); out << std::flush; diff -r e197009ddb96 -r 0aa205436740 src/mem/ruby/common/Debug.cc --- a/src/mem/ruby/common/Debug.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/ruby/common/Debug.cc Tue Dec 21 08:23:53 2010 -0800 @@ -36,11 +36,11 @@ using namespace std; -class Debug; -extern Debug* g_debug_ptr; +class RubyDebug; +extern RubyDebug* g_debug_ptr; ostream *debug_cout_ptr; -bool Debug::m_protocol_trace = false; +bool RubyDebug::m_protocol_trace = false; struct DebugComponentData { const char *desc; @@ -83,7 +83,7 @@ g_debug_ptr->setFilter(filter); } -Debug::Debug(const Params *p) +RubyDebug::RubyDebug(const Params *p) : SimObject(p) { clearFilter(); @@ -97,12 +97,12 @@ g_debug_ptr = this; } -Debug::~Debug() +RubyDebug::~RubyDebug() { } void -Debug::printVerbosity(ostream& out) const +RubyDebug::printVerbosity(ostream& out) const { switch (getVerbosity()) { case No_Verb: @@ -123,7 +123,7 @@ } bool -Debug::validDebug(int module, PriorityLevel priority) +RubyDebug::validDebug(int module, PriorityLevel priority) { int local_module = (1 << module); if (m_filter & local_module) { @@ -145,25 +145,25 @@ } void -Debug::setDebugTime(Time t) +RubyDebug::setDebugTime(Time t) { m_starting_cycle = t; } void -Debug::setVerbosity(VerbosityLevel vb) +RubyDebug::setVerbosity(VerbosityLevel vb) { m_verbosityLevel = vb; } void -Debug::setFilter(int filter) +RubyDebug::setFilter(int filter) { m_filter = filter; } bool -Debug::setVerbosityString(const char *verb_str) +RubyDebug::setVerbosityString(const char *verb_str) { string verb = verb_str ? verb_str : ""; if (verb == "none") { @@ -183,7 +183,7 @@ } bool -Debug::checkFilter(char ch) +RubyDebug::checkFilter(char ch) { for (int i = 0; i < NUMBER_OF_COMPS; i++) { // Look at all components to find a character match @@ -196,7 +196,7 @@ } bool -Debug::checkFilterString(const char *filter_str) +RubyDebug::checkFilterString(const char *filter_str) { if (filter_str == NULL) { cerr << "Error: unrecognized component filter: NULL" << endl; @@ -223,7 +223,7 @@ } bool -Debug::setFilterString(const char *filter_str) +RubyDebug::setFilterString(const char *filter_str) { if (checkFilterString(filter_str)) { return true; // error @@ -246,7 +246,7 @@ } bool -Debug::addFilter(char ch) +RubyDebug::addFilter(char ch) { for (int i = 0; i < NUMBER_OF_COMPS; i++) { // Look at all components to find a character match @@ -266,18 +266,18 @@ } void -Debug::clearFilter() +RubyDebug::clearFilter() { m_filter = 0; } -void Debug::allFilter() +void RubyDebug::allFilter() { m_filter = ~0; } void -Debug::usageInstructions(void) +RubyDebug::usageInstructions(void) { cerr << "Debug components: " << endl; for (int i = 0; i < NUMBER_OF_COMPS; i++) { @@ -287,13 +287,13 @@ } void -Debug::print(ostream& out) const +RubyDebug::print(ostream& out) const { out << "[Debug]" << endl; } void -Debug::setDebugOutputFile (const char *filename) +RubyDebug::setDebugOutputFile (const char *filename) { if (filename == NULL || !strcmp(filename, "none")) { debug_cout_ptr = &cout; @@ -312,7 +312,7 @@ } void -Debug::closeDebugOutputFile () +RubyDebug::closeDebugOutputFile () { if (m_fout.is_open()) { m_fout.close (); @@ -321,7 +321,7 @@ } void -Debug::debugMsg( const char *fmt, ...) +RubyDebug::debugMsg( const char *fmt, ...) { va_list args; @@ -331,8 +331,8 @@ va_end(args); } -Debug * +RubyDebug * RubyDebugParams::create() { - return new Debug(this); + return new RubyDebug(this); } diff -r e197009ddb96 -r 0aa205436740 src/mem/ruby/common/Debug.py --- a/src/mem/ruby/common/Debug.py Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/ruby/common/Debug.py Tue Dec 21 08:23:53 2010 -0800 @@ -32,7 +32,6 @@ class RubyDebug(SimObject): type = 'RubyDebug' - cxx_class = 'Debug' filter_string = Param.String('none', "a string for filtering debugging output (see Debug.h)") diff -r e197009ddb96 -r 0aa205436740 src/mem/ruby/common/Global.hh --- a/src/mem/ruby/common/Global.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/ruby/common/Global.hh Tue Dec 21 08:23:53 2010 -0800 @@ -47,8 +47,8 @@ class RubySystem; extern RubySystem* g_system_ptr; -class Debug; -extern Debug* g_debug_ptr; +class RubyDebug; +extern RubyDebug* g_debug_ptr; // FIXME: this is required by the contructor of Directory_Entry.hh. // It can't go into slicc_util.hh because it opens a can of ugly worms diff -r e197009ddb96 -r 0aa205436740 src/mem/ruby/common/Global.cc --- a/src/mem/ruby/common/Global.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/ruby/common/Global.cc Tue Dec 21 08:23:53 2010 -0800 @@ -30,5 +30,5 @@ RubyEventQueue* g_eventQueue_ptr = NULL; RubySystem* g_system_ptr = NULL; -Debug* g_debug_ptr = NULL; +RubyDebug* g_debug_ptr = NULL; diff -r e197009ddb96 -r 0aa205436740 src/mem/ruby/system/Sequencer.cc --- a/src/mem/ruby/system/Sequencer.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/ruby/system/Sequencer.cc Tue Dec 21 08:23:53 2010 -0800 @@ -488,7 +488,7 @@ g_eventQueue_ptr->getTime()); } - if (Debug::getProtocolTrace()) { + if (RubyDebug::getProtocolTrace()) { if (success) { g_system_ptr->getProfiler()-> profileTransition("Seq", m_version, @@ -661,7 +661,7 @@ Address(request.pc), amtype, request.len, PrefetchBit_No, request.proc_id); - if (Debug::getProtocolTrace()) { + if (RubyDebug::getProtocolTrace()) { g_system_ptr->getProfiler()-> profileTransition("Seq", m_version, Address(request.paddr), "", "Begin", "", diff -r e197009ddb96 -r 0aa205436740 src/mem/slicc/symbols/StateMachine.py --- a/src/mem/slicc/symbols/StateMachine.py Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/slicc/symbols/StateMachine.py Tue Dec 21 08:23:53 2010 -0800 @@ -862,7 +862,7 @@ DPRINTF(RubyGenerated, "next_state: %s\\n", ${ident}_State_to_string(next_state)); m_profiler.countTransition(state, event); - if (Debug::getProtocolTrace()) { + if (RubyDebug::getProtocolTrace()) { g_system_ptr->getProfiler()->profileTransition("${ident}", m_version, addr, ${ident}_State_to_string(state), @@ -874,7 +874,7 @@ ${ident}_setState(addr, next_state); } else if (result == TransitionResult_ResourceStall) { - if (Debug::getProtocolTrace()) { + if (RubyDebug::getProtocolTrace()) { g_system_ptr->getProfiler()->profileTransition("${ident}", m_version, addr, ${ident}_State_to_string(state), @@ -884,7 +884,7 @@ } } else if (result == TransitionResult_ProtocolStall) { DPRINTF(RubyGenerated, "stalling\\n"); - if (Debug::getProtocolTrace()) { + if (RubyDebug::getProtocolTrace()) { g_system_ptr->getProfiler()->profileTransition("${ident}", m_version, addr, ${ident}_State_to_string(state), diff -r e197009ddb96 -r 0aa205436740 src/mem/tport.cc --- a/src/mem/tport.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/mem/tport.cc Tue Dec 21 08:23:53 2010 -0800 @@ -29,6 +29,7 @@ */ #include "mem/tport.hh" +#include "trace/Bus.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/python/m5/debug.py --- a/src/python/m5/debug.py Tue Dec 21 08:23:35 2010 -0800 +++ b/src/python/m5/debug.py Tue Dec 21 08:23:53 2010 -0800 @@ -29,3 +29,52 @@ import internal from internal.debug import schedBreakCycle, setRemoteGDBPort + +class AllFlags(object): + def __init__(self): + self._version = -1 + self._dict = {} + + def _update(self): + current_version = internal.debug.getAllFlagsVersion() + if self._version == current_version: + return + + self._dict.clear() + for flag in internal.debug.getAllFlags(): + self._dict[flag.name()] = flag + self._version = current_version + + def __contains__(self, item): + self._update() + return item in self._dict + + def __getitem__(self, item): + self._update() + return self._dict[item] + + def keys(self): + self._update() + return self._dict.keys() + + def values(self): + self._update() + return self._dict.values() + + def items(self): + self._update() + return self._dict.items() + + def iterkeys(self): + self._update() + return self._dict.iterkeys() + + def itervalues(self): + self._update() + return self._dict.itervalues() + + def iteritems(self): + self._update() + return self._dict.iteritems() + +flags = AllFlags() diff -r e197009ddb96 -r 0aa205436740 src/python/m5/main.py --- a/src/python/m5/main.py Tue Dec 21 08:23:35 2010 -0800 +++ b/src/python/m5/main.py Tue Dec 21 08:23:53 2010 -0800 @@ -295,20 +295,15 @@ if flag.startswith('-'): flag = flag[1:] off = True - if flag not in trace.flags.all and flag != "All": + + if flag not in debug.flags: print >>sys.stderr, "invalid trace flag '%s'" % flag sys.exit(1) if off: - off_flags.append(flag) + debug.flags[flag].disable() else: - on_flags.append(flag) - - for flag in on_flags: - trace.set(flag) - - for flag in off_flags: - trace.clear(flag) + debug.flags[flag].enable() if options.trace_start: check_tracing() diff -r e197009ddb96 -r 0aa205436740 src/python/m5/trace.py --- a/src/python/m5/trace.py Tue Dec 21 08:23:35 2010 -0800 +++ b/src/python/m5/trace.py Tue Dec 21 08:23:53 2010 -0800 @@ -27,10 +27,9 @@ # Authors: Nathan Binkert import internal -import traceflags as flags import util -from internal.trace import clear, output, set, ignore +from internal.trace import output, ignore def disable(): internal.trace.cvar.enabled = False diff -r e197009ddb96 -r 0aa205436740 src/python/swig/debug.i --- a/src/python/swig/debug.i Tue Dec 21 08:23:35 2010 -0800 +++ b/src/python/swig/debug.i Tue Dec 21 08:23:53 2010 -0800 @@ -1,5 +1,6 @@ /* * Copyright (c) 2006 The Regents of The University of Michigan + * Copyright (c) 2010 The Hewlett-Packard Development Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +32,61 @@ %module(package="m5.internal") debug %{ +#include +#include +#include +#include + +#include "base/debug.hh" #include "base/types.hh" #include "sim/debug.hh" + +using namespace std; + +typedef map FlagsMap; +typedef vector FlagsVec; + +namespace Debug { +extern int allFlagsVersion; +FlagsMap &allFlags(); +} + +inline int +getAllFlagsVersion() +{ + return Debug::allFlagsVersion; +} + +inline FlagsVec +getAllFlags() +{ + FlagsMap &flagsMap = Debug::allFlags(); + + FlagsVec flags(flagsMap.size()); + + int index = 0; + FlagsMap::iterator i = flagsMap.begin(); + FlagsMap::iterator end = flagsMap.end(); + for (; i != end; ++i) { + assert(index < flags.size()); + flags[index++] = i->second; + } + + return flags; +} + %} +%ignore Debug::SimpleFlag::operator!; + %include "stdint.i" +%include "std_string.i" +%include "std_vector.i" +%include "base/debug.hh" %include "base/types.hh" %include "sim/debug.hh" + +%template(AllFlags) std::vector; + +int getAllFlagsVersion(); +std::vector getAllFlags(); diff -r e197009ddb96 -r 0aa205436740 src/python/swig/trace.i --- a/src/python/swig/trace.i Tue Dec 21 08:23:35 2010 -0800 +++ b/src/python/swig/trace.i Tue Dec 21 08:23:53 2010 -0800 @@ -41,18 +41,6 @@ } inline void -set(const char *flag) -{ - Trace::changeFlag(flag, true); -} - -inline void -clear(const char *flag) -{ - Trace::changeFlag(flag, false); -} - -inline void ignore(const char *expr) { Trace::ignore.setExpression(expr); @@ -61,10 +49,6 @@ using Trace::enabled; %} -%inline %{ extern void output(const char *string); -extern void set(const char *string); -extern void clear(const char *string); extern void ignore(const char *expr); extern bool enabled; -%} diff -r e197009ddb96 -r 0aa205436740 src/sim/eventq.hh --- a/src/sim/eventq.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/eventq.hh Tue Dec 21 08:23:53 2010 -0800 @@ -48,6 +48,7 @@ #include "base/trace.hh" #include "base/types.hh" #include "sim/serialize.hh" +#include "trace/Event.hh" class EventQueue; // forward declaration diff -r e197009ddb96 -r 0aa205436740 src/sim/eventq.cc --- a/src/sim/eventq.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/eventq.cc Tue Dec 21 08:23:53 2010 -0800 @@ -42,6 +42,7 @@ #include "cpu/smt.hh" #include "sim/core.hh" #include "sim/eventq.hh" +#include "trace/Config.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/sim/faults.cc --- a/src/sim/faults.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/faults.cc Tue Dec 21 08:23:53 2010 -0800 @@ -36,6 +36,7 @@ #include "sim/faults.hh" #include "sim/process.hh" #include "mem/page_table.hh" +#include "trace/Fault.hh" #if !FULL_SYSTEM void FaultBase::invoke(ThreadContext * tc, StaticInstPtr inst) diff -r e197009ddb96 -r 0aa205436740 src/sim/pseudo_inst.cc --- a/src/sim/pseudo_inst.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/pseudo_inst.cc Tue Dec 21 08:23:53 2010 -0800 @@ -50,6 +50,8 @@ #include "sim/stat_control.hh" #include "sim/stats.hh" #include "sim/system.hh" +#include "trace/Loader.hh" +#include "trace/Quiesce.hh" #if FULL_SYSTEM #include "arch/kernel_stats.hh" diff -r e197009ddb96 -r 0aa205436740 src/sim/sim_object.cc --- a/src/sim/sim_object.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/sim_object.cc Tue Dec 21 08:23:53 2010 -0800 @@ -40,6 +40,7 @@ #include "base/types.hh" #include "sim/sim_object.hh" #include "sim/stats.hh" +#include "trace/Config.hh" using namespace std; diff -r e197009ddb96 -r 0aa205436740 src/sim/syscall_emul.hh --- a/src/sim/syscall_emul.hh Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/syscall_emul.hh Tue Dec 21 08:23:53 2010 -0800 @@ -65,6 +65,7 @@ #include "sim/byteswap.hh" #include "sim/system.hh" #include "sim/process.hh" +#include "trace/SyscallVerbose.hh" /// /// System call descriptor. diff -r e197009ddb96 -r 0aa205436740 src/sim/syscall_emul.cc --- a/src/sim/syscall_emul.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/syscall_emul.cc Tue Dec 21 08:23:53 2010 -0800 @@ -47,6 +47,7 @@ #include "sim/process.hh" #include "sim/system.hh" #include "sim/sim_exit.hh" +#include "trace/SyscallVerbose.hh" using namespace std; using namespace TheISA; diff -r e197009ddb96 -r 0aa205436740 src/sim/system.cc --- a/src/sim/system.cc Tue Dec 21 08:23:35 2010 -0800 +++ b/src/sim/system.cc Tue Dec 21 08:23:53 2010 -0800 @@ -45,6 +45,7 @@ #include "sim/byteswap.hh" #include "sim/system.hh" #include "sim/debug.hh" +#include "trace/Loader.hh" #if FULL_SYSTEM #include "arch/vtophys.hh"