Instruments 10 Signpost Support - Still brittle?

I'm running our app on device and using signposts to monitor performance. I can see most of the time, everything is working. But I get weird "N/A" tracks that never end, which is especially weird because I've given both my begin and end signposts a string to display (normally I see "Started" and "Finished" which are the strings I've supplied.) Eventually my whole vertical view of the log type fills up with these orphaned tracks.


I don't think I'm the source of these tracks, so before I spend a bunch of time debugging, is this known behavior? This is a signal processing system so it's hard for me to determine if the errant tracks are related to any one event. But I checked my code and I don't see any stray begins, or places where the begin and end could be unpaired. I'm using the signposts instrument, haven't tried writing my own yet.

Accepted Reply

So I'm not sure what happened, but I came back this morning and everything is working great. The only big change was that Instruments was closed and re-opened since yesterday.

Replies

The other option I've thought of is that my app is highly multithreaded. I've started to move signpost stuff onto the main thread (ugh) just in case this is the issue, but it doesn't seem to be making things better, so I'm assuming that might not be it.

Take a look in the "List: Intervals" detail. If the long "n/a" intervals are coming from subsystems with the "com.apple" prefix, then they're coming from the system libraries, and you can safely ignore them.

Thanks! Unfortunetly they're tracing back to me. In list view I can tell that my start message is there, so they aren't coming from nowhere. But it seems like the end is not being captured. I'm setting up a signpost id per worker object/thead, and one of the functions being affected is a simple enough function that only has one exit point. Using the C API in case that matters.

So I'm not sure what happened, but I came back this morning and everything is working great. The only big change was that Instruments was closed and re-opened since yesterday.

In the betas, signposts in Instruments are spotty after the device has been rebooted. It takes about 9h of up time for an iOS device (depends on the clock resolution) and about 18m and 20sec on Mac before they clear up. There was a bug where garbage was being left in the high order bits of the timestamp and it took about that long before those timestamps were big enough to clear the garbage. Anyway, it can lead to "it works the next morning morning", if that was indeed the case.

Okay, reproduced and found the problem. The os_signpost instrument was not properly pairing using the name, it was just using the ID. So if you had different signposts names but using the same ID, then it could get confused. 41557858