mem_trace.cc (11139:bd894d2bdd7c) | mem_trace.cc (11437:210624864179) |
---|---|
1/* 2 * Copyright (c) 2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 33 unchanged lines hidden (view full) --- 42 43#include "base/callback.hh" 44#include "base/output.hh" 45#include "params/MemTraceProbe.hh" 46#include "proto/packet.pb.h" 47 48MemTraceProbe::MemTraceProbe(MemTraceProbeParams *p) 49 : BaseMemProbe(p), | 1/* 2 * Copyright (c) 2015 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 33 unchanged lines hidden (view full) --- 42 43#include "base/callback.hh" 44#include "base/output.hh" 45#include "params/MemTraceProbe.hh" 46#include "proto/packet.pb.h" 47 48MemTraceProbe::MemTraceProbe(MemTraceProbeParams *p) 49 : BaseMemProbe(p), |
50 traceStream(nullptr) | 50 traceStream(nullptr), 51 withPC(p->with_pc) |
51{ 52 std::string filename; 53 if (p->trace_file != "") { 54 // If the trace file is not specified as an absolute path, 55 // append the current simulation output directory 56 filename = simout.resolve(p->trace_file); 57 58 const std::string suffix = ".gz"; --- 38 unchanged lines hidden (view full) --- 97{ 98 ProtoMessage::Packet pkt_msg; 99 100 pkt_msg.set_tick(curTick()); 101 pkt_msg.set_cmd(pkt_info.cmd.toInt()); 102 pkt_msg.set_flags(pkt_info.flags); 103 pkt_msg.set_addr(pkt_info.addr); 104 pkt_msg.set_size(pkt_info.size); | 52{ 53 std::string filename; 54 if (p->trace_file != "") { 55 // If the trace file is not specified as an absolute path, 56 // append the current simulation output directory 57 filename = simout.resolve(p->trace_file); 58 59 const std::string suffix = ".gz"; --- 38 unchanged lines hidden (view full) --- 98{ 99 ProtoMessage::Packet pkt_msg; 100 101 pkt_msg.set_tick(curTick()); 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); |
106 if (withPC && pkt_info.pc != 0) 107 pkt_msg.set_pc(pkt_info.pc); |
|
105 106 traceStream->write(pkt_msg); 107} 108 109 110MemTraceProbe * 111MemTraceProbeParams::create() 112{ 113 return new MemTraceProbe(this); 114} | 108 109 traceStream->write(pkt_msg); 110} 111 112 113MemTraceProbe * 114MemTraceProbeParams::create() 115{ 116 return new MemTraceProbe(this); 117} |