45 #include "params/MemTraceProbe.hh"
46 #include "proto/packet.pb.h"
54 if (p->trace_file !=
"") {
59 const std::string suffix =
".gz";
62 if (p->trace_compress &&
63 filename.compare(filename.size() - suffix.size(), suffix.size(),
65 filename = filename + suffix;
70 (p->trace_compress ?
".gz" :
""));
77 ProtoMessage::PacketHeader header_msg;
78 header_msg.set_obj_id(
name());
102 pkt_msg.set_cmd(pkt_info.
cmd.
toInt());
103 pkt_msg.set_flags(pkt_info.
flags);
104 pkt_msg.set_addr(pkt_info.
addr);
105 pkt_msg.set_size(pkt_info.
size);
107 pkt_msg.set_pc(pkt_info.
pc);
114 MemTraceProbeParams::create()
A ProtoOutputStream wraps a coded stream, potentially with compression, based on looking at the file ...
void write(const google::protobuf::Message &msg)
Write a message to the stream, preprending it with the message size.
void handleRequest(const ProbePoints::PacketInfo &pkt_info) override
Callback to analyse intercepted Packets.
MemTraceProbe(MemTraceProbeParams *params)
Base class for memory system probes accepting Packet instances.
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
const bool withPC
Include the Program Counter in the memory trace.
ProtoOutputStream * traceStream
Trace output stream.
Tick curTick()
The current simulated tick.
void registerExitCallback(Callback *callback)
Register an exit callback.
std::string resolve(const std::string &name) const
Returns relative file names prepended with name of this directory.
virtual const std::string name() const
void closeStreams()
Callback to flush and close all open output streams on exit.
Helper template class to turn a simple class member function into a callback.
ProbePointArg< PacketInfo > Packet
Packet probe point.
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...