Open nordzilla opened 1 week ago
There's actually already support on mac/linux for parsing a marker-{pid}.txt
file that a process opens, however the file format is extremely simple (literally "[time] [name]"), which is not good for anything but low frequency markers and doesn't support ranges. Needs some care to do things like define markers up front and then refer to them by ID + provide binary payload in the actual marker stream.
Background
This issue is inspired by this conversation in Mozilla's Firefox Profiler Matrix channel.
It would be amazing to have a companion crate, e.g.
samply-markers
, that one could add to their project as a dependency. This crate would expose an API where the programmer could create new markers directly in their code that are compatible the the Firefox Profiler.The crate would be responsible for recording the markers and persisting them in such a way that samply can locate them and insert them into the resulting
profile.json
.@gregtatum presented an interesting thought on the idea: