os_signpost use adds +20ms to 30ms renders

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?

This is still an issue. Can we have a timing system that doesn't go through the slow and unconfigurable os_log? We don't use an unreasonable number of scopes for any of the profilers, but these swamp os_signpost.

Also the microscopic single color super-thin display of the signposts in Instruments is really not that helpful. This should be displayed as a real flame chart. We'll keep using Perfetto for now.

os_signpost use adds +20ms to 30ms renders
 
 
Q