Go to the documentation of this file.
42 #include "params/MemTraceProbe.hh"
43 #include "proto/packet.pb.h"
53 if (
p->trace_file !=
"") {
58 const std::string suffix =
".gz";
61 if (
p->trace_compress &&
62 filename.compare(filename.size() - suffix.size(), suffix.size(),
64 filename = filename + suffix;
69 (
p->trace_compress ?
".gz" :
""));
85 ProtoMessage::PacketHeader header_msg;
86 header_msg.set_obj_id(
name());
90 auto id_string = header_msg.add_id_strings();
91 id_string->set_key(
i);
111 pkt_msg.set_cmd(pkt_info.
cmd.
toInt());
112 pkt_msg.set_flags(pkt_info.
flags);
113 pkt_msg.set_addr(pkt_info.
addr);
114 pkt_msg.set_size(pkt_info.
size);
116 pkt_msg.set_pc(pkt_info.
pc);
117 pkt_msg.set_pkt_id(pkt_info.
id);
124 MemTraceProbeParams::create()
void handleRequest(const ProbePoints::PacketInfo &pkt_info) override
Callback to analyse intercepted Packets.
void write(const google::protobuf::Message &msg)
Write a message to the stream, preprending it with the message size.
std::string resolve(const std::string &name) const
Returns relative file names prepended with name of this directory.
void closeStreams()
Callback to flush and close all open output streams on exit.
void startup() override
startup() is the final initialization call before simulation.
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
void registerExitCallback(const std::function< void()> &callback)
Register an exit callback.
const bool withPC
Include the Program Counter in the memory trace.
ProbePointArg< PacketInfo > Packet
Packet probe point.
virtual const std::string name() const
RequestorID maxRequestors()
Get the number of requestors registered in the system.
MemTraceProbe(MemTraceProbeParams *params)
std::string getRequestorName(RequestorID requestor_id)
Get the name of an object for a given request id.
A ProtoOutputStream wraps a coded stream, potentially with compression, based on looking at the file ...
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...
ProtoOutputStream * traceStream
Trace output stream.
Tick curTick()
The current simulated tick.
Base class for memory system probes accepting Packet instances.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17