38#ifndef __CPU_INST_PB_TRACE_HH__
39#define __CPU_INST_PB_TRACE_HH__
45#include "params/InstPBTrace.hh"
97 std::unique_ptr<uint8_t []>
buf;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
A ProtoOutputStream wraps a coded stream, potentially with compression, based on looking at the file ...
ThreadContext is the external interface to all thread state for anything outside of the CPU.
InstPBTraceRecord(InstPBTrace &_tracer, Tick when, ThreadContext *tc, const StaticInstPtr si, const PCStateBase &pc, const StaticInstPtr mi=NULL)
void dump() override
called by the cpu when the instruction commits.
InstPBTraceRecord * getInstRecord(Tick when, ThreadContext *tc, const StaticInstPtr si, const PCStateBase &pc, const StaticInstPtr mi=NULL) override
std::unique_ptr< uint8_t[]> buf
void closeStreams()
If there is a pending message still write it out and then close the file.
void createTraceFile(std::string filename)
Create the output file and write the header into it.
friend class InstPBTraceRecord
ProtoMessage::Inst * curMsg
This is the message were working on writing.
void traceMem(StaticInstPtr si, Addr a, Addr s, unsigned f)
Write a memory request to the trace file as part of the cur instruction.
InstPBTrace(const InstPBTraceParams &p)
void traceInst(ThreadContext *tc, StaticInstPtr si, const PCStateBase &pc)
Write an instruction to the trace file.
static ProtoOutputStream * traceStream
One output stream for the entire simulation.
InstRecord(Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, const PCStateBase &_pc, const StaticInstPtr _macroStaticInst=nullptr)
std::unique_ptr< PCStateBase > pc
InstTracer(const Params &p)
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
RefCountingPtr< StaticInst > StaticInstPtr
Declaration of a wrapper for protobuf output streams and input streams.