magic-trace
magic-trace copied to clipboard
Support bigger traces at lower resolution
My understanding is that one of the main blockers preventing taking traces for longer time periods is that perfetto can't handle the size of traces that it produces. I would happily settle for longer traces which only showed function calls that took more than a certain amount of time -- to give a high-level view of where the time was spent. Combined with some option to filter a trace down to a given time range this should allow for exploring large traces reasonably ergonomically.
If we decrease the timing resolution in software, we can also request lower timing resolution from the hardware, for lower overhead.
Refs:
-
https://github.com/janestreet/magic-trace/blob/e9d5d2683da18ed317a28b3f9531a249c1a57443/src/perf_tool_backend.ml#L52-L61
-
http://halobates.de/blog/p/432
That seems worth supporting too. Although for my use case I'd like to take a single trace, view it in its entirety at a low resolution, and then view subsections of the trace at high resolution once I had identified which parts where interesting.
Fuchsia supports inserting binary blobs to the trace file: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format#blob-record
We could include the perf.data and associated files there (as a tarball?), I think, to allow later processing.
I want the blob (as @Xyene knows) for general debuggability so I think that's a great feature in and of itself. The idea of then being able to recursively reprocess the output to something filtered for Perfetto friendliness sounds fantastic (if hilarious.)