perfetto is a popular Android/AOSP performance tool.
The format for perfetto files is a serialized protobuf.
The root container of the protobuf-based traces is the Trace message which itself is simply a repeated field of TracePacket messages.
Inside those packets, well, you'll find all sorts of things.
There are some instructions on how to muck around with this in the Writing TrackEvent Protos Synthetically page.
When working with perfetto files, some fluency with protocol buffers is useful.