111807Snikos.nikoleris@arm.com// Copyright (c) 2012-2013,2017 ARM Limited 29398Sandreas.hansson@arm.com// All rights reserved 39398Sandreas.hansson@arm.com// 49398Sandreas.hansson@arm.com// The license below extends only to copyright in the software and shall 59398Sandreas.hansson@arm.com// not be construed as granting a license to any other intellectual 69398Sandreas.hansson@arm.com// property including but not limited to intellectual property relating 79398Sandreas.hansson@arm.com// to a hardware implementation of the functionality of the software 89398Sandreas.hansson@arm.com// licensed hereunder. You may use the software subject to the license 99398Sandreas.hansson@arm.com// terms below provided that you ensure that this notice is replicated 109398Sandreas.hansson@arm.com// unmodified and in its entirety in all distributions of the software, 119398Sandreas.hansson@arm.com// modified or unmodified, in source code or in binary form. 129398Sandreas.hansson@arm.com// 139398Sandreas.hansson@arm.com// Redistribution and use in source and binary forms, with or without 149398Sandreas.hansson@arm.com// modification, are permitted provided that the following conditions are 159398Sandreas.hansson@arm.com// met: redistributions of source code must retain the above copyright 169398Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer; 179398Sandreas.hansson@arm.com// redistributions in binary form must reproduce the above copyright 189398Sandreas.hansson@arm.com// notice, this list of conditions and the following disclaimer in the 199398Sandreas.hansson@arm.com// documentation and/or other materials provided with the distribution; 209398Sandreas.hansson@arm.com// neither the name of the copyright holders nor the names of its 219398Sandreas.hansson@arm.com// contributors may be used to endorse or promote products derived from 229398Sandreas.hansson@arm.com// this software without specific prior written permission. 239398Sandreas.hansson@arm.com// 249398Sandreas.hansson@arm.com// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 259398Sandreas.hansson@arm.com// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 269398Sandreas.hansson@arm.com// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 279398Sandreas.hansson@arm.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 289398Sandreas.hansson@arm.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 299398Sandreas.hansson@arm.com// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 309398Sandreas.hansson@arm.com// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 319398Sandreas.hansson@arm.com// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 329398Sandreas.hansson@arm.com// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 339398Sandreas.hansson@arm.com// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 349398Sandreas.hansson@arm.com// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 359398Sandreas.hansson@arm.com// 369398Sandreas.hansson@arm.com// Authors: Andreas Hansson 379398Sandreas.hansson@arm.com 3811807Snikos.nikoleris@arm.comsyntax = "proto2"; 3911807Snikos.nikoleris@arm.com 409398Sandreas.hansson@arm.com// Put all the generated messages in a namespace 4110309Snilay@cs.wisc.edupackage ProtoMessage; 429398Sandreas.hansson@arm.com 439398Sandreas.hansson@arm.com// Packet header with the identifier describing what object captured 449398Sandreas.hansson@arm.com// the trace, the version of this file format, and the tick frequency 459398Sandreas.hansson@arm.com// for all the packet time stamps. 469398Sandreas.hansson@arm.commessage PacketHeader { 479398Sandreas.hansson@arm.com required string obj_id = 1; 489398Sandreas.hansson@arm.com optional uint32 ver = 2 [default = 0]; 499398Sandreas.hansson@arm.com required uint64 tick_freq = 3; 5012190Sgabeblack@google.com 5112190Sgabeblack@google.com // This is supposed to be wire equivalent to the "map" construct supported 5212190Sgabeblack@google.com // by the proto3 version of the protobuf description syntax. When that 5312190Sgabeblack@google.com // becomes widely available, this should be converted over to use it. 5412190Sgabeblack@google.com message IdStringEntry { 5512190Sgabeblack@google.com optional uint32 key = 1; 5612190Sgabeblack@google.com optional string value = 2; 5712190Sgabeblack@google.com } 5812190Sgabeblack@google.com 5912190Sgabeblack@google.com repeated IdStringEntry id_strings = 4; 609398Sandreas.hansson@arm.com} 619398Sandreas.hansson@arm.com 629398Sandreas.hansson@arm.com// Each packet in the trace contains a tick (which can be translated 639398Sandreas.hansson@arm.com// to absolute time using the frequency in the header), the command, 649609Sandreas.hansson@arm.com// the address, and the size in bytes. The optional flags are used to 659609Sandreas.hansson@arm.com// capture the request flags that convey information about 669609Sandreas.hansson@arm.com// cacheability, if the packet is an instruction fetch or prefetch or 679610Sandreas.hansson@arm.com// not, etc. An optional id field is added for generic use to identify 689610Sandreas.hansson@arm.com// the packet or the "owner" of the packet. An example of the latter 699610Sandreas.hansson@arm.com// is the sequential id of an instruction, or the master id etc. 7011247Sradhika.jagtap@ARM.com// An optional field for PC of the instruction for which this request is made 7111247Sradhika.jagtap@ARM.com// is provided. 729398Sandreas.hansson@arm.commessage Packet { 739398Sandreas.hansson@arm.com required uint64 tick = 1; 749398Sandreas.hansson@arm.com required uint32 cmd = 2; 759398Sandreas.hansson@arm.com required uint64 addr = 3; 769398Sandreas.hansson@arm.com required uint32 size = 4; 779609Sandreas.hansson@arm.com optional uint32 flags = 5; 7810107Sradhika.jagtap@ARM.com optional uint64 pkt_id = 6; 7911247Sradhika.jagtap@ARM.com optional uint64 pc = 7; 809398Sandreas.hansson@arm.com} 81