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 <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
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;