os_signpost not working on macOS device, works on iOS device

I have an iOS app that uses os_signpost API for instrumentation.

When I profile it from Xcode on real iOS device, it works as expected.

When I profile its macCatalyst variant (using the identical code) on the same Mac where Xcode is running, the os_signpost Instrument does not show anything, not even the Apple provided signposts that are otherwise visible on the iOS.

How do I make it work?

Answered by enodev in 783374022

Writing to confirm that live/deferred mode does not work.

Last X seconds recording mode does work.

Also, Swift concurrency template is also affected by not showing any data about Swift Tasks and Actors. Last X seconds mode is the only usable one at the moment.

Bug updated.

Hi enodev, could you please specify which version of Xcode/Instruments, macOS and iOS you were using?

It's happening on the latest everything as of today:

  • macOS Sonoma 14.4 (23E214)
  • Xcode/Instruments Version 15.3 (15E204a)

P.S. I thought it may be related to some .xcodeproj internals, but It also does not work when I try to profile one specific test case from a super simple Swift Package that includes the code using os_signpost API.

It looks like you are running into the same issue described here: https://forums.developer.apple.com/forums/thread/745016

This thread has a workaround at the end to use windowed mode for recording. Try using this to see whether it resolves your issue. If it also doesn't work in windowed mode, please file a bug report and post the feedback number here.

Accepted Answer

Writing to confirm that live/deferred mode does not work.

Last X seconds recording mode does work.

Also, Swift concurrency template is also affected by not showing any data about Swift Tasks and Actors. Last X seconds mode is the only usable one at the moment.

Bug updated.

This should be fixed in macOS Sonoma 14.5

os_signpost not working on macOS device, works on iOS device
 
 
Q