mem: Edit proto Packet and enhance the python script
Review Request #2165 - Created Feb. 21, 2014 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10097:b626fd659b6a --------------------------- mem: Edit proto Packet and enhance the python script This patch changes the decode script to output the optional fields of the proto message Packet, namely id and flags. The flags field is set by the communication monitor. The id field is useful for CPU trace experiments, e.g. linking the fetch side to decode side. It had to be renamed because it clashes with a built in python function id() for getting the "identity" of an object. This patch also takes a few common function definitions out from the multiple scripts and adds them to a protolib python module.
All regressions pass. Note that we have _not_ updated the version number (given that this field was optional, and most likely not widely used).
Posted (Feb. 25, 2014, 9:11 a.m.)
-
util/protolib.py (Diff revision 1) -
Andreas, can you explain the need for Google's copyright notice?
Posted (Feb. 25, 2014, 9:18 a.m.)
-
util/protolib.py (Diff revision 1) -
The encode and decode are google's implementations straight from the protobuf source.
Ship It!
Posted (Feb. 25, 2014, 10:45 a.m.)
-
util/protolib.py (Diff revision 1) -
Where possible, it's nice to keep the copyrights separate. If you've directly lifted google code, can you put that code in a separate file? If not, no big deal, it's just nice to be able to drop a license when the original code is no longer used.
Review request changed
Updated (Feb. 26, 2014, 2:36 a.m.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+154 -140) |
