Instruments, signposts, points of interest


James Walker
 

I'm trying to use signposts to help profile C++ code with Instruments (with Xcode 14 beta 5), and it's not working. A section of code in question, which is definitely getting reached, starts like this

static os_log_t sSignpost_log = nullptr;
if (__builtin_available( macOS 10.14, * ))
{
if (sSignpost_log == nullptr)
{
sSignpost_log = os_log_create( "com.frameforge.gscn", "PointsOfInterest" );
}
os_signpost_interval_begin( sSignpost_log, 99, "com.frameforge.gscn" );
}

and ends like this

if (__builtin_available( macOS 10.14, * ))
{
os_signpost_interval_end( sSignpost_log, 99, "com.frameforge.gscn" );
}

In Instruments, I have a Points of Interest instrument, and in the recording options for that instrument, I added 99 and com.frameforge.gscn as a row under "signpost code names". But after recording a run, the Points of Interest instrument always shows "No Data". I tried adding an os_signpost instrument, and it shows some data, but none of mine. What am I missing?