From: Andreas Hansson Date: Tue, 26 Mar 2013 18:46:44 +0000 (-0400) Subject: mem: Add optional request flags to the packet trace X-Git-Tag: stable_2013_06_16~34 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a57b1bce07030cd81069fc6978530eb7e83b45d;p=gem5.git mem: Add optional request flags to the packet trace This patch adds an optional flags field to the packet trace to encode the request flags that contain information about whether the request is (un)cacheable, instruction fetch, preftech etc. --- diff --git a/src/mem/comm_monitor.cc b/src/mem/comm_monitor.cc index a6c08e3b2..d21741b20 100644 --- a/src/mem/comm_monitor.cc +++ b/src/mem/comm_monitor.cc @@ -163,6 +163,7 @@ CommMonitor::recvTimingReq(PacketPtr pkt) bool isRead = pkt->isRead(); bool isWrite = pkt->isWrite(); int cmd = pkt->cmdToIndex(); + Request::FlagsType req_flags = pkt->req->getFlags(); unsigned size = pkt->getSize(); Addr addr = pkt->getAddr(); bool needsResponse = pkt->needsResponse(); @@ -192,6 +193,7 @@ CommMonitor::recvTimingReq(PacketPtr pkt) Message::Packet pkt_msg; pkt_msg.set_tick(curTick()); pkt_msg.set_cmd(cmd); + pkt_msg.set_flags(req_flags); pkt_msg.set_addr(addr); pkt_msg.set_size(size); diff --git a/src/proto/packet.proto b/src/proto/packet.proto index bfeee6a44..28c21ec40 100644 --- a/src/proto/packet.proto +++ b/src/proto/packet.proto @@ -1,4 +1,4 @@ -// Copyright (c) 2012 ARM Limited +// Copyright (c) 2012-2013 ARM Limited // All rights reserved // // The license below extends only to copyright in the software and shall @@ -49,10 +49,14 @@ message PacketHeader { // Each packet in the trace contains a tick (which can be translated // to absolute time using the frequency in the header), the command, -// the address, and the size in bytes +// the address, and the size in bytes. The optional flags are used to +// capture the request flags that convey information about +// cacheability, if the packet is an instruction fetch or prefetch or +// not, etc. message Packet { required uint64 tick = 1; required uint32 cmd = 2; required uint64 addr = 3; required uint32 size = 4; + optional uint32 flags = 5; }