Instruments fails to record Points of Interest

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?

Hi JWWalker,

You should not have to add anything in the "signpost code name" in the "Points of Interests" recording options, those are for a different type of signpost (kdebug signposts). Signposts logged via os_signpost to the "PointsOfInterest" category should show up by default without you having to do anything. This seems like it should work. Can you try using OS_SIGNPOST_ID_EXCLUSIVE for the signpost id (where you currently have 99) and see whether this makes a difference? Both version should work, but maybe there is a difference in behavior there.

Also, please file a feedback as this should work. If possible, please include the following:

  • A .trace document you recorded from your target which includes both the "Points of Interest" and the "os_signpost" instrument
  • A small example project which logs these signposts upon running. It would be great to have this, but if it would be a lot of effort to create it, the feedback + the .trace file is already very valuable.
  • Information about which Xcode version you used to compile the code, which Instruments you used to profile the target and which OS version the target was running on.