The Points of Interest Instrument is not recording any data when profiling my application on Sonoma. The same code is producing signposts when profiling on a computer running Sonoma. Here's what how the instruments screen looks:
Note that there are no Points of Interest being recorded.
I created a new project for this test and added code to emit signposts whenever the application becomes active or goes into the background. This is the code I'm using for the test (copied from forum post from a year ago).
import os.signpost
@main
class AppDelegate: NSObject, NSApplicationDelegate {
var window: NSWindow?
var blackWindow: NSWindow?
var alertWindow: NSWindow?
static var originalAppDelegate: AppDelegate!
var signposter: OSSignposter
var signpostInterval: OSSignpostIntervalState?
func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
override init() {
signposter = OSSignposter(subsystem: Bundle.main.bundleIdentifier ?? "unknown", category: .pointsOfInterest)
super.init()
assert(signposter.isEnabled)
signposter.emitEvent(#function)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func applicationWillResignActive(_ notifiction: Notification) {
guard let interval = signpostInterval else {
assertionFailure("no interval")
return
}
print("backgrounding, ending active state")
signposter.endInterval("active", interval)
}
func applicationDidBecomeActive(_ notification: Notification) {
print("begin active state")
signpostInterval = signposter.beginInterval("active")
}
}
Is anyone else having this problem? I tested this on my development machine (Retina 5K, 27-inch, 2019) running Sonoma 14.2.1. The problem occurs even with a clean install of Sonoma onto an external boot disk. The same code produces this screenshot when running in Ventura 13.6.1.