exetrace.hh (7680:f4eda002333b) exetrace.hh (7720:65d338a8dba4)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42class ThreadContext;
43
44namespace Trace {
45
46class ExeTracerRecord : public InstRecord
47{
48 public:
49 ExeTracerRecord(Tick _when, ThreadContext *_thread,
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 33 unchanged lines hidden (view full) ---

42class ThreadContext;
43
44namespace Trace {
45
46class ExeTracerRecord : public InstRecord
47{
48 public:
49 ExeTracerRecord(Tick _when, ThreadContext *_thread,
50 const StaticInstPtr _staticInst, Addr _pc, bool spec,
51 const StaticInstPtr _macroStaticInst = NULL, MicroPC _upc = 0)
50 const StaticInstPtr _staticInst, TheISA::PCState _pc,
51 bool spec, const StaticInstPtr _macroStaticInst = NULL)
52 : InstRecord(_when, _thread, _staticInst, _pc, spec,
52 : InstRecord(_when, _thread, _staticInst, _pc, spec,
53 _macroStaticInst, _upc)
53 _macroStaticInst)
54 {
55 }
56
57 void traceInst(StaticInstPtr inst, bool ran);
58
59 void dump();
60 virtual void dumpTicks(std::ostream &outs);
61};
62
63class ExeTracer : public InstTracer
64{
65 public:
66 typedef ExeTracerParams Params;
67 ExeTracer(const Params *params) : InstTracer(params)
68 {}
69
70 InstRecord *
71 getInstRecord(Tick when, ThreadContext *tc,
54 {
55 }
56
57 void traceInst(StaticInstPtr inst, bool ran);
58
59 void dump();
60 virtual void dumpTicks(std::ostream &outs);
61};
62
63class ExeTracer : public InstTracer
64{
65 public:
66 typedef ExeTracerParams Params;
67 ExeTracer(const Params *params) : InstTracer(params)
68 {}
69
70 InstRecord *
71 getInstRecord(Tick when, ThreadContext *tc,
72 const StaticInstPtr staticInst, Addr pc,
73 const StaticInstPtr macroStaticInst = NULL, MicroPC upc = 0)
72 const StaticInstPtr staticInst, TheISA::PCState pc,
73 const StaticInstPtr macroStaticInst = NULL)
74 {
75 if (!IsOn(ExecEnable))
76 return NULL;
77
78 if (!Trace::enabled)
79 return NULL;
80
81 if (!IsOn(ExecSpeculative) && tc->misspeculating())
82 return NULL;
83
84 return new ExeTracerRecord(when, tc,
74 {
75 if (!IsOn(ExecEnable))
76 return NULL;
77
78 if (!Trace::enabled)
79 return NULL;
80
81 if (!IsOn(ExecSpeculative) && tc->misspeculating())
82 return NULL;
83
84 return new ExeTracerRecord(when, tc,
85 staticInst, pc, tc->misspeculating(), macroStaticInst, upc);
85 staticInst, pc, tc->misspeculating(), macroStaticInst);
86 }
87};
88
89/* namespace Trace */ }
90
91#endif // __CPU_EXETRACE_HH__
86 }
87};
88
89/* namespace Trace */ }
90
91#endif // __CPU_EXETRACE_HH__