I tried converting our Android ATrace scopes to use os_signpost, but this seems to add 20ms of cpu time to every frame. ATrace_isEnabled is only called with AGI (Android GPU Inspector) takes a capture, but there don't seem to be flags that indicate when an Instruments capture is being taken.
AGI gives us a nice tracks in Perfetto of cpu and gpu timings with pseudo-coloring and text in each track that help interpret the frame, and without a 20ms hit.
Instruments gives microscopically tiny tracks that are all blue with no text in the os_signpost widget. I have to hover over every track which is about 2 pixels high to see the timings, and the timings for each frame is 400ms instead of the actual 50ms that is the actual time.
Is there a better method to see scoped cpu timings for macOS/iOS considering dtrace isn't available, or somehow improve the performance hit there?