Gabe Black has submitted this change and it was merged. ( https://gem5-review.googlesource.com/4782 )

Change subject: mem: Add a "map" of packet IDs to strings in probe traces.
......................................................................

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 <[email protected]>
Reviewed-by: Nikos Nikoleris <[email protected]>
Maintainer: Nikos Nikoleris <[email protected]>
---
M src/proto/packet.proto
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Rahul Thakur: Looks good to me, but someone else must approve
  Nikos Nikoleris: Looks good to me, approved; Looks good to me, approved



diff --git a/src/proto/packet.proto b/src/proto/packet.proto
index 53f69e5..1fb7e2f 100644
--- a/src/proto/packet.proto
+++ b/src/proto/packet.proto
@@ -47,6 +47,16 @@
   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

--
To view, visit https://gem5-review.googlesource.com/4782
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I137c8611c33d9ce6589e196d50c8638c1d88750c
Gerrit-Change-Number: 4782
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Assignee: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Rahul Thakur <[email protected]>
Gerrit-CC: Andreas Sandberg <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to