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?

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

Add a Comment

Accepted Reply

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.

  • Can confirm that for Xcode/Instruments Version 15.3 (15E204a)

Add a Comment

Replies

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.

  • Thank you! Did it work with an earlier version of Xcode/macOS for you or is this the first time you tried profiling the Catalyst variant?

  • I do not actually remember, but I would assume yes it worked - profiling the Catalyst variant, but I may not remember correctly. The screenshots above should indicate that my setup in code actually does work when used on iOS device.

    But my other tests confirm, that simply profiling a simple XCTestCase that uses os_signpost on macOS does not work either...

    So I believe it's not about catalyst, it's a general problem of profiling os_signpost from Xcode on the same Mac.

Add a Comment

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.

  • Deferred recording mode does not work either. Filed a bug FB13683303.

  • Yes, deferred recording mode would also be impacted by this bug, but "Last x seconds" should work. Thanks for filing the bug!

Add a Comment

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.

  • Can confirm that for Xcode/Instruments Version 15.3 (15E204a)

Add a Comment