retis-org / retis

Tracing packets in the Linux networking stack & friends
https://retis.readthedocs.io/en/stable/
100 stars 14 forks source link

Python: allow custom event type representation #443

Open amorenoz opened 2 weeks ago

amorenoz commented 2 weeks ago

Currently all event types are represented (i.e: repr) using their debug format. This is auto-generated by the event_type proc macro.

It would be nice to allow some event types to customize the way they are represented in python. Maybe passing a flag to the proc macro, e.g: #[event_section(py_no_repr)] to indicate repr should not be auto-generated and leaving it to the event type to implement it.