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

Change subject: cpu: Make the protobuf inst tracer accept variable sized instructions.
......................................................................

cpu: Make the protobuf inst tracer accept variable sized instructions.

This change adds an inst_bytes field which is of type bytes, and puts
it in a oneof with the previously required inst field. If an
instruction's encoding happens to be 4 bytes long, the original inst
field will be used. Otherwise, the new variably sized inst_bytes field
will be used.

Because this tracer doesn't have visibility into how the data in
inst_bytes is structured, it can't do any endian conversion itself.
To maintain compatibility between producers and consumers who may have
different endiannesses, all data should be manually converted to
little endian before being stored in this field.

inst will be converted into little endian by protobuf, and so
compatibility doesn't have to be handled manually.

Change-Id: I290713f70e7124d8aa9550c022c71334939d84a6
Reviewed-on: https://gem5-review.googlesource.com/7561
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/proto/inst.proto
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved
  Gabe Black: Looks good to me, approved



diff --git a/src/proto/inst.proto b/src/proto/inst.proto
index 5ef2664..d561661 100644
--- a/src/proto/inst.proto
+++ b/src/proto/inst.proto
@@ -52,7 +52,10 @@

 message Inst {
   required uint64 pc = 1;
-  required fixed32 inst = 2;
+  oneof inst_oneof {
+    fixed32 inst = 2;
+    bytes inst_bytes = 9;
+  }
   optional uint32 nodeid = 3;
   optional uint32 cpuid = 4;
   optional fixed64 tick = 5;

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

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I290713f70e7124d8aa9550c022c71334939d84a6
Gerrit-Change-Number: 7561
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to