cpu: Pass a reference of the parent tracer to the ExeTracerRecord
Change-Id: I3576df2b7bee1289db60bb6072bd9c90038ca8ce Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Arm Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
* not be construed as granting a license to any other intellectual
|
||||
* property including but not limited to intellectual property relating
|
||||
* to a hardware implementation of the functionality of the software
|
||||
* licensed hereunder. You may use the software subject to the license
|
||||
* terms below provided that you ensure that this notice is replicated
|
||||
* unmodified and in its entirety in all distributions of the software,
|
||||
* modified or unmodified, in source code or in binary form.
|
||||
*
|
||||
* Copyright (c) 2001-2005 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -49,14 +61,19 @@ class ExeTracerRecord : public InstRecord
|
||||
public:
|
||||
ExeTracerRecord(Tick _when, ThreadContext *_thread,
|
||||
const StaticInstPtr _staticInst, const PCStateBase &_pc,
|
||||
const ExeTracer &_tracer,
|
||||
const StaticInstPtr _macroStaticInst = NULL)
|
||||
: InstRecord(_when, _thread, _staticInst, _pc, _macroStaticInst)
|
||||
: InstRecord(_when, _thread, _staticInst, _pc, _macroStaticInst),
|
||||
tracer(_tracer)
|
||||
{
|
||||
}
|
||||
|
||||
void traceInst(const StaticInstPtr &inst, bool ran);
|
||||
|
||||
void dump();
|
||||
|
||||
protected:
|
||||
const ExeTracer &tracer;
|
||||
};
|
||||
|
||||
class ExeTracer : public InstTracer
|
||||
@@ -75,7 +92,7 @@ class ExeTracer : public InstTracer
|
||||
return NULL;
|
||||
|
||||
return new ExeTracerRecord(when, tc,
|
||||
staticInst, pc, macroStaticInst);
|
||||
staticInst, pc, *this, macroStaticInst);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Arm Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
* not be construed as granting a license to any other intellectual
|
||||
* property including but not limited to intellectual property relating
|
||||
* to a hardware implementation of the functionality of the software
|
||||
* licensed hereunder. You may use the software subject to the license
|
||||
* terms below provided that you ensure that this notice is replicated
|
||||
* unmodified and in its entirety in all distributions of the software,
|
||||
* modified or unmodified, in source code or in binary form.
|
||||
*
|
||||
* Copyright (c) 2006-2009 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -49,6 +61,17 @@ NativeTrace::NativeTrace(const Params &p)
|
||||
fd = native_listener->accept();
|
||||
}
|
||||
|
||||
NativeTraceRecord::NativeTraceRecord(
|
||||
NativeTrace *_parent,
|
||||
Tick _when, ThreadContext *_thread,
|
||||
const StaticInstPtr _staticInst, const PCStateBase &_pc,
|
||||
const StaticInstPtr _macroStaticInst)
|
||||
: ExeTracerRecord(_when, _thread, _staticInst, _pc,
|
||||
*_parent, _macroStaticInst),
|
||||
parent(_parent)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
NativeTraceRecord::dump()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Arm Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
* not be construed as granting a license to any other intellectual
|
||||
* property including but not limited to intellectual property relating
|
||||
* to a hardware implementation of the functionality of the software
|
||||
* licensed hereunder. You may use the software subject to the license
|
||||
* terms below provided that you ensure that this notice is replicated
|
||||
* unmodified and in its entirety in all distributions of the software,
|
||||
* modified or unmodified, in source code or in binary form.
|
||||
*
|
||||
* Copyright (c) 2006-2009 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -50,20 +62,16 @@ class NativeTrace;
|
||||
|
||||
class NativeTraceRecord : public ExeTracerRecord
|
||||
{
|
||||
protected:
|
||||
NativeTrace * parent;
|
||||
|
||||
public:
|
||||
NativeTraceRecord(NativeTrace * _parent,
|
||||
NativeTraceRecord(NativeTrace *_parent,
|
||||
Tick _when, ThreadContext *_thread,
|
||||
const StaticInstPtr _staticInst, const PCStateBase &_pc,
|
||||
const StaticInstPtr _macroStaticInst=nullptr)
|
||||
: ExeTracerRecord(_when, _thread, _staticInst, _pc, _macroStaticInst),
|
||||
parent(_parent)
|
||||
{
|
||||
}
|
||||
const StaticInstPtr _macroStaticInst=nullptr);
|
||||
|
||||
void dump();
|
||||
|
||||
private:
|
||||
NativeTrace *parent;
|
||||
};
|
||||
|
||||
class NativeTrace : public ExeTracer
|
||||
|
||||
Reference in New Issue
Block a user