diff options
author | Victor Garcia <victor.garcia@arm.com> | 2016-04-07 11:32:38 -0500 |
---|---|---|
committer | Victor Garcia <victor.garcia@arm.com> | 2016-04-07 11:32:38 -0500 |
commit | df5a81183303fa941d71e866ff8d258e4d6a510e (patch) | |
tree | 9a3b6d1cec6ac0a672480ad477090d743af54e0d /src/mem/probes/mem_trace.cc | |
parent | a3bf4aa6ec9caa68a558f7347d55991f7a254fa5 (diff) | |
download | gem5-df5a81183303fa941d71e866ff8d258e4d6a510e.tar.xz |
mem: Add Program Counter to MemTraceProbe
Diffstat (limited to 'src/mem/probes/mem_trace.cc')
-rw-r--r-- | src/mem/probes/mem_trace.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/probes/mem_trace.cc b/src/mem/probes/mem_trace.cc index 121c6de48..97b97daae 100644 --- a/src/mem/probes/mem_trace.cc +++ b/src/mem/probes/mem_trace.cc @@ -47,7 +47,8 @@ MemTraceProbe::MemTraceProbe(MemTraceProbeParams *p) : BaseMemProbe(p), - traceStream(nullptr) + traceStream(nullptr), + withPC(p->with_pc) { std::string filename; if (p->trace_file != "") { @@ -102,6 +103,8 @@ MemTraceProbe::handleRequest(const ProbePoints::PacketInfo &pkt_info) pkt_msg.set_flags(pkt_info.flags); pkt_msg.set_addr(pkt_info.addr); pkt_msg.set_size(pkt_info.size); + if (withPC && pkt_info.pc != 0) + pkt_msg.set_pc(pkt_info.pc); traceStream->write(pkt_msg); } |