summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-09-21 16:54:38 -0700
committerGabe Black <gabeblack@google.com>2017-09-25 21:13:49 +0000
commit10cd85c67c0d55ae4aa82ab5b4b1ddc0b6379839 (patch)
tree014af6e3fa160ded0da1a8e48c696ba12fa5e181
parent9362ead7d27f56185cf02b8bc8979171f2cf4349 (diff)
downloadgem5-10cd85c67c0d55ae4aa82ab5b4b1ddc0b6379839.tar.xz
mem: Add a "map" of packet IDs to strings in probe traces.
This map is intended to map from request MasterIDs to master names. It could be used to map to arbitrary strings in other situations, however. The original idea to store this information was to add a new message type which would store one ID and the string associated with it. This change stores the IDs in the header instead so that they'll be easy to find and all available before the packet data. One downside of this approach is that it won't be possible to add new master ID strings as they come up during a trace. If that becomes an issue, the two approaches could be combined and messages could be added which would augment the map in the header. Also worth mentioning is that the proto2 version of the protobuf description language does not support the "map" field type, and the protoc compiler on my workstation doesn't support proto3. Because that's such an appropriate representation for this data, the map is represented in an equivalent format described in the proto3 documentation. Change-Id: I137c8611c33d9ce6589e196d50c8638c1d88750c Reviewed-on: https://gem5-review.googlesource.com/4782 Reviewed-by: Rahul Thakur <rjthakur@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
-rw-r--r--src/proto/packet.proto10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/proto/packet.proto b/src/proto/packet.proto
index 53f69e533..1fb7e2f8f 100644
--- a/src/proto/packet.proto
+++ b/src/proto/packet.proto
@@ -47,6 +47,16 @@ message PacketHeader {
required string obj_id = 1;
optional uint32 ver = 2 [default = 0];
required uint64 tick_freq = 3;
+
+ // This is supposed to be wire equivalent to the "map" construct supported
+ // by the proto3 version of the protobuf description syntax. When that
+ // becomes widely available, this should be converted over to use it.
+ message IdStringEntry {
+ optional uint32 key = 1;
+ optional string value = 2;
+ }
+
+ repeated IdStringEntry id_strings = 4;
}
// Each packet in the trace contains a tick (which can be translated