History log of /gem5/util/decode_packet_trace.py
Revision Date Author Comments
# 13540:da30e62884ee 10-Jan-2019 Andrea Mondelli <andrea.mondelli@ucf.edu>

misc: updated shabang for python script

The default python on MacOS doesn’t have an alias to python2.
The official python version supported in gem5 is Python2.7.

This patch updates the shabang according to the version required in gem5.

Change-Id: I9533c0f7858b5b3cab0ef101be1ee5cd718105b0
Reviewed-on: https://gem5-review.googlesource.com/c/15375
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>


# 12213:e0083524df0c 04-Oct-2017 Gabe Black <gabeblack@google.com>

misc: Use a Makefile to ensure util/packet_pb2.py is up to date.

Rather than just ensuring that packet_pb2.py is available in general, use a
Makefile to ensure that it's also up to date in case packet.proto has
changed.

Also, remove a check that ensures that the protobuf module is available,
since python will complain if it needs it and can't find it.

Finally, remove a comment which talks about manually regenerating the
packet_pb2.py module, something that hasn't been necessary for a while, even
with the old version of this code.

Change-Id: I40c5c1f577e6d7ad1af9a209309a1eb92f073317
Reviewed-on: https://gem5-review.googlesource.com/5005
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 12212:1ae8dc8fdb97 04-Oct-2017 Gabe Black <gabeblack@google.com>

misc: When building packet_pb2.py, don't assume a particular CWD.

Allow the script to be run from anywhere, and compute the paths relative to
where the script is. The script is assumed to be in util.

Change-Id: I8500ef959f2ff8119540c956f2b27789c96de60e
Reviewed-on: https://gem5-review.googlesource.com/5004
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 12211:149c9225b7d6 04-Oct-2017 Gabe Black <gabeblack@google.com>

misc: Make decode_packet_trace.py print the new master ID fields.

Those fields are "repeated" which means they can appear zero times, which
they will in older style traces.

Change-Id: Ib6ff4aab521332cf1405549d0d6e922c51c12f32
Reviewed-on: https://gem5-review.googlesource.com/5003
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11828:36b064696175 10-Feb-2017 Jason Lowe-Power <jason@lowepower.com>

misc: Update #!env calls for python to explicit version

In some newer Linux distributions, env python default to Python 3.0. This
patch explicitly uses "python2" instead of just "python" for all scripts
that use #!

Reported-by: Sanchayan Maity <maitysanchayan@gmail.com>
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>


# 11437:210624864179 07-Apr-2016 Victor Garcia <victor.garcia@arm.com>

mem: Add Program Counter to MemTraceProbe


# 10269:82773ace39fa 10-Aug-2014 Radhika Jagtap <radhika.jagtap@ARM.com>

util: Move packet trace file read to protolib

This patch moves the code for opening an input protobuf packet trace into
a function defined in the protobuf library. This is because the code is
commonly used in decode scripts and is independent of the src protobuf
message.


# 10132:894ec19274e9 23-Mar-2014 Andreas Hansson <andreas.hansson@arm.com>

util: Add support for detection of gzipped packet traces

This patch adds support for automatically detecting a gzipped packet
trace, thus accepting either a compressed or uncompressed trace.


# 10107:524afa92d940 07-Mar-2014 Radhika Jagtap <radhika.jagtap@ARM.com>

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.


# 10065:58bf21ca88de 18-Feb-2014 Andreas Hansson <andreas.hansson@arm.com>

util: Enhance the error messages for packet encode/decode

This patch adds a more verbose error message when the Python protobuf
module cannot be loaded.


# 9706:fbb19814adbc 30-May-2013 Andreas Hansson <andreas.hansson@arm.com>

util: Auto generate the packet proto definitions

This patch simplifies the usage of the packet trace encoder/decoder by
attempting to automatically generating the packet proto definitions in
case they cannot be found.


# 9617:c503acb59e51 26-Mar-2013 Andreas Hansson <andreas.hansson@arm.com>

util: Add a utility script for decoding packet traces

This patch adds a simple Python script that reads the protobuf-encoded
packet traces (not gzipped), and prints them to an ASCII trace file.

The script can also be used as a template for other packet output
formats.