CPU Profiler and CPU Counters fail on Apple M6: configureHardwareCounters cannot set the KPC configuration on macOS 27

Hi,

I’m encountering an issue when profiling an application with xctrace and Instruments on macOS. When I try to record a trace using either the CPU Profiler or CPU Counters template, the recording fails with the following error:

Failed to start the recording:
configureHardwareCounters: Failed set kpc configuration: Operation not permitted.

The issue was also present in the previous macOS 27.0 build (26A428) and remains after updating to macOS 27.0.1 (26A434)

System:

  • Apple M6 Mac mini
  • macOS 27.0.1, build 26A434
  • Xcode 27.0, build 27A266a
Answered by Developer Tools Engineer in 907617022

Hi! This definitely sounds unexpected. Can you report this issue using Feedback Assistant, include a sysdiagnose, and reply here with the FB number? We’ll need to take a look at the logs to understand what’s going wrong.

Jed

Accepted Answer

Hi! This definitely sounds unexpected. Can you report this issue using Feedback Assistant, include a sysdiagnose, and reply here with the FB number? We’ll need to take a look at the logs to understand what’s going wrong.

Jed

Thanks. I filed the issue through Feedback Assistant and attached a sysdiagnose captured immediately after reproducing the failure, along with the failed CPU Profiler trace. The feedback number is FB25019943.

Hi, just checking in to see whether there are any updates on this issue. Please let me know if you need any additional logs. Thank you!

CPU Profiler and CPU Counters fail on Apple M6: configureHardwareCounters cannot set the KPC configuration on macOS 27
 
 
Q