comm_monitor.cc (10994:51ff41f6a4a5) | comm_monitor.cc (10995:a114e2712642) |
---|---|
1/* 2 * Copyright (c) 2012-2013, 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 --- 41 unchanged lines hidden (view full) --- 50 : MemObject(params), 51 masterPort(name() + "-master", *this), 52 slavePort(name() + "-slave", *this), 53 samplePeriodicEvent(this), 54 samplePeriodTicks(params->sample_period), 55 samplePeriod(params->sample_period / SimClock::Float::s), 56 readAddrMask(params->read_addr_mask), 57 writeAddrMask(params->write_addr_mask), | 1/* 2 * Copyright (c) 2012-2013, 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 --- 41 unchanged lines hidden (view full) --- 50 : MemObject(params), 51 masterPort(name() + "-master", *this), 52 slavePort(name() + "-slave", *this), 53 samplePeriodicEvent(this), 54 samplePeriodTicks(params->sample_period), 55 samplePeriod(params->sample_period / SimClock::Float::s), 56 readAddrMask(params->read_addr_mask), 57 writeAddrMask(params->write_addr_mask), |
58 stackDistCalc(params->stack_dist_calc), | |
59 system(params->system), 60 traceStream(nullptr), 61 stats(params) 62{ 63 // If we are using a trace file, then open the file 64 if (params->trace_enable) { 65 std::string filename; 66 if (params->trace_file != "") { --- 111 unchanged lines hidden (view full) --- 178 slavePort.sendFunctionalSnoop(pkt); 179} 180 181Tick 182CommMonitor::recvAtomic(PacketPtr pkt) 183{ 184 ppPktReq->notify(pkt); 185 | 58 system(params->system), 59 traceStream(nullptr), 60 stats(params) 61{ 62 // If we are using a trace file, then open the file 63 if (params->trace_enable) { 64 std::string filename; 65 if (params->trace_file != "") { --- 111 unchanged lines hidden (view full) --- 177 slavePort.sendFunctionalSnoop(pkt); 178} 179 180Tick 181CommMonitor::recvAtomic(PacketPtr pkt) 182{ 183 ppPktReq->notify(pkt); 184 |
186 // do stack distance calculations if enabled 187 if (stackDistCalc) 188 stackDistCalc->update(pkt->cmd, pkt->getAddr()); 189 | |
190 // if tracing enabled, store the packet information 191 // to the trace stream 192 if (traceStream != NULL) { 193 ProtoMessage::Packet pkt_msg; 194 pkt_msg.set_tick(curTick()); 195 pkt_msg.set_cmd(pkt->cmdToIndex()); 196 pkt_msg.set_flags(pkt->req->getFlags()); 197 pkt_msg.set_addr(pkt->getAddr()); --- 55 unchanged lines hidden (view full) --- 253 // means we need to fake the original packet by temporarily 254 // restoring the command. 255 const MemCmd response_cmd(pkt->cmd); 256 pkt->cmd = cmd; 257 ppPktReq->notify(pkt); 258 pkt->cmd = response_cmd; 259 } 260 | 185 // if tracing enabled, store the packet information 186 // to the trace stream 187 if (traceStream != NULL) { 188 ProtoMessage::Packet pkt_msg; 189 pkt_msg.set_tick(curTick()); 190 pkt_msg.set_cmd(pkt->cmdToIndex()); 191 pkt_msg.set_flags(pkt->req->getFlags()); 192 pkt_msg.set_addr(pkt->getAddr()); --- 55 unchanged lines hidden (view full) --- 248 // means we need to fake the original packet by temporarily 249 // restoring the command. 250 const MemCmd response_cmd(pkt->cmd); 251 pkt->cmd = cmd; 252 ppPktReq->notify(pkt); 253 pkt->cmd = response_cmd; 254 } 255 |
261 // If successful and we are calculating stack distances, update 262 // the calculator 263 if (successful && stackDistCalc) 264 stackDistCalc->update(cmd, addr); 265 | |
266 if (successful && traceStream != NULL) { 267 // Create a protobuf message representing the 268 // packet. Currently we do not preserve the flags in the 269 // trace. 270 ProtoMessage::Packet pkt_msg; 271 pkt_msg.set_tick(curTick()); 272 pkt_msg.set_cmd(cmd_idx); 273 pkt_msg.set_flags(req_flags); --- 384 unchanged lines hidden --- | 256 if (successful && traceStream != NULL) { 257 // Create a protobuf message representing the 258 // packet. Currently we do not preserve the flags in the 259 // trace. 260 ProtoMessage::Packet pkt_msg; 261 pkt_msg.set_tick(curTick()); 262 pkt_msg.set_cmd(cmd_idx); 263 pkt_msg.set_flags(req_flags); --- 384 unchanged lines hidden --- |