When running instruments or when debug memory in Xcode, I am getting same error as
An unknown error occurred launching the helper task
Xcode: Xcode16.3
OS: 15.5 Beta (24F5068b)
Mac mini: Apple M2 Pro
Instruments
RSS for tagInstruments is a performance-analysis and testing tool for iOS, iPadOS, watchOS, tvOS, and macOS apps.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi :wave:
I am not sure that I use it right, I was not able to profile using these events:
I am on a M1 Pro machine using macOS 15.5.
I just wonder if these events are support on Apple Sillicon.
Topic:
Developer Tools & Services
SubTopic:
Instruments
I’m seeing inconsistent call stacks and usage percentages in the Time Profiler between two Instruments builds:
• Xcode 16.0’s Instruments Version 16.0 (16A242d)
• Xcode 16.3’s Instruments Version 16.0 (16E140)
When I open an old .trace file recorded with the 16A242d profiler in the newer 16E140 Instruments, the call trees and percentage breakdowns no longer match. It looks like the latest Instruments now exposes or collapses different frames (e.g. system libraries, inline code) by default.
I rely on these call stacks as a baseline to track performance regressions and verify optimizations over time. Unfortunately, every Xcode/Instruments update changes what I see, making it impossible to compare profiles across versions.
My questions:
Is there a way in Instruments 16.0 (16E140) to restore the exact call-tree view and percentage calculations that 16A242d produced?
Failing that, is there a recommended workflow or tool for capturing CPU profiles in a way that remains stable and comparable, regardless of Xcode or Instruments version?
Any guidance on achieving consistent, version-independent performance measurements would be greatly appreciated!
Hi,
My name is Hani Nemati, and I work at Microsoft, where we support several macOS applications such as Microsoft Edge and Teams. I’m also the primary contributor to Microsoft Performance Tools for Apple (https://github.com/microsoft/Microsoft-Performance-Tools-Apple), an open-source project aimed at improving trace analysis across platforms.
We are exploring ways to enhance our performance tracing capabilities on macOS and are particularly interested in the ability to attach PMU (Performance Monitoring Unit) counters to context switch events during trace collection. For reference, this capability is supported on Linux via LTTng using the add-context option (https://lttng.org/man/1/lttng-add-context/v2.13), and on Windows through Windows Performance Recorder (WPR), which allows PMU counters to be added at the start and end of context switches, enabling delta computation.
Would it be possible to introduce similar support in Instruments for macOS?
I’d appreciate any guidance or suggestions you might have on this request.
Thank you,
Hani Nemati
Email: hanemati@microsoft
We have 2 iPhones (16 pro - iOS 18.2, 16 regular - iOS 18.5 ) in single app mode and sometimes we need to shut them down manually. After holding Power and VolumeUp, shutdown screen appears as usual, but the slider isn't responding to touch, as well as the whole screen. After force restart using volume buttons, this issue disappears, but reappears after next phone restart.
If we disable single app mode -the issue is gone and touch screen works every time on shutdown screen. Both iPhones share the same behavior.
Is there any other way to reliably shut down the iPhone locally without using MDM or a way to fix this issue?
Hi everyone,
I’m currently integrating AlarmKit into an app and would like to offer users the same selection of built-in iOS alarm sounds that the native Clock app provides.
So far, I haven’t found any API in AlarmKit (or elsewhere in the SDK) that exposes the system’s default alarm tones. Before implementing a custom sound library, I wanted to check:
Is there any way to access or present the iOS system alarm sounds when creating alarms with AlarmKit?
Or are developers limited to custom audio files that we provide ourselves?
If anyone has experience with AlarmKit or knows whether this is technically possible (or explicitly restricted), I’d really appreciate your insights.
Thanks!
Topic:
Developer Tools & Services
SubTopic:
Instruments
Hello, I would like to obtain the average CPU usage of a trace I ran through instruments by looking at the cpu profiler. Is there any way to do this? Or should I be using another instrument.
six months have passed since I bought this iPhone 13. till 3 months it was having the battery health of 100% but now it is draining rapidly. It drained to 99% in November.at the beginning of December it was 98%. on 23 December 97% and now on new year its 96%. can anybody tell me why ?
* [Error] Failed to stop recording session: Failed stoping ktrace session.
(xcode-select version 2409)
So why can't it stop the ktrace session? And how long has that typo been around? 😄 (Look, I've kept typos in log messages for years because it differentiated that message from other messages.)
Topic:
Developer Tools & Services
SubTopic:
Instruments
I am a developer creating an app for iOS 16 and my app mysteriously started showing a blank screen during previews and the simulator. I profiled the app launch with Instruments, and the results said that dlopen was running on the main thread for the whole minutes of profiling:
I've discovered what appears to be a system-level memory leak when pressing any key in Swift UI projects. This issue occurs even in a completely empty SwiftUI project with no custom code or event handlers.
When monitoring with Instruments' Leaks tool, I observe multiple memory leaks each time any key is pressed. These leaks consist primarily of:
NSExtraData objects (240 bytes each)
NSMenuItem objects (112 bytes each)
Other AppKit and Foundation objects
Has anyone else encountered this issue? How can I fix this behavior? While the leaks are small (about 5-6KB per keypress), they could potentially accumulate in applications where keyboard input is frequent.
I want to check the disassembly code of vImage function by Instrument.
But when I double click the stack of time profiler, I can see nothing.
My Mac is intel chip and iPhone is 14 pro max
Xcode version is 16.3.
How can I fix this(maybe no .dSYM in iOS device support?)
I kept CoreLocation’s startUpdatingLocation running for a full day and used Performance trace - PowerProfiler to track the power usage during that time. The trace file was successfully generated on the iOS device, and I later transferred it to my MacBook.
However, when I tried to open the .atrc file, I received the following warning:
The document cannot be imported because of an error: File ‘/Users/jun/Downloads/PowerProfiler_25-06-16_181049_to_25-06-17_091037_001.atrc’ doesn’t contain any events.
Why is this happening? Is there a known issue with PowerProfiler in iOS 26, or am I missing something in the tracing setup?
Note: The .aar file and the extracted .atrc file are not attached here, as forum uploads do not support these formats.
Hello,
I wanted to try new Bottleneck analysis mode showcased in recent Apple's video, however when I select CPU Counters template in Instruments, there's no such option - just the same old "sample by Time/Events".
I have the latest XCode 16.4 and OS Sonoma 15.5, the system is M4 Max. While Instruments shows version 16.0 in About dialog for some reason (a bug?), it definitely comes from the Xcode 16.4 package and the build id is the same (16F6) as for XCode 16.4. I also checked just in case on another M1 system (all updated as well) and it's all the same.
Any clues why Bottleneck analysis is missing?
Regards,
Maxim
Topic:
Developer Tools & Services
SubTopic:
Instruments
Hello,
I have recently been using the new Power Profiler tool introduced in Xcode 26 to analyze the power consumption of my app. My app primarily operates in the background. During a profiling session of 5 hours and 30 minutes, I observed that the app was active in the background for 2 hours and 30 minutes, while it remained in a suspended state for the remaining 3 hours.
While the Power Profiler allows me to identify spikes in CPU, networking, and other resource usage at specific points, it is difficult to determine whether these values are objectively considered high.
For example, in my case, the total QoS Execution Time of CPU Impact recorded during the 5 hours and 30 minutes was 12.18 seconds. I am wondering whether this is considered a good metric.
Could you please advise on the following points?
1. Is there a commonly accepted or recommended ratio between app active time and CPU time that developers should aim for?
2. Are there any guidelines or reference materials on how to interpret CPU usage and other resource metrics for apps that primarily run in the background?
Any insights or advice would be greatly appreciated.
Thank you.
Is there an xctrace instrument capable of capturing the complete control flow of a process? So far the best I can find is high-frequency sampling, but what I need is a trace of all machine instructions executed. This is easily done on Linux/Intel using the perf tool, which provides access to Intel's hardware-assisted tracing module (ptrace). According to the arm specification, my mac mini M1 (armv8.4-a) and M4 (armv9.2-a) both have hardware support in the CoreSight ETM (embedded trace macrocell) for full instruction tracing (i.e., no sampling, no gaps, no statistics--capturing the complete execution path). But it's not clear how I can access these features, if they are supported by the macos XNU kernel at all. After hours of searching online, it's nothing but dead ends. Any suggestions for documentation or Xcode tools or open-source tools or built-in macos tools would be much appreciated!
Topic:
Developer Tools & Services
SubTopic:
Instruments
Updated Xcode from 16.2 to 16.4, running Time Profile in Instruments, it launches the trace, but does not install or load on connected device, breaks the functionality. I am unable to debug...
ERROR:
Connection with the remote side was unexpectedly closed : <dictionary: 0x1f3c8b6d0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1f3c8b850> { length = 22, contents = "Connection interrupted" }
}
Domain: IXRemoteErrorDomain
Code: 6
User Info: {
DVTErrorCreationDateKey = "2025-08-09 00:47:53 +0000";
}
--
Connection with the remote side was unexpectedly closed : <dictionary: 0x1f3c8b6d0> { count = 1, transaction: 0, voucher = 0x0, contents =
"XPCErrorDescription" => <string: 0x1f3c8b850> { length = 22, contents = "Connection interrupted" }
}
Domain: IXRemoteErrorDomain
Code: 6
IOS 18.5
According to the ARM documentation for the CPU models available in Apple Silicon, the CoreSight implementation includes an Embedded Trace Macrocell which can perform a complete "Instruction Trace" (https://developer.arm.com/documentation/102119/0200/What-is-trace-). Although other operating systems such as Linux make this easy, we have not been able to find any tools or even a system-level API for accessing this feature of the ETM.
In the "Instruments" window of Xcode 16+, there is a "Processor Trace" instrument, but this performs sampling and is totally unrelated to the Instruction Trace we need for debugging and analysis purposes. Because it produces a complete, contiguous sequence of branch instructions, the Instruction Trace is essential for identifying precise execution behaviors that are otherwise invisible to the developer. On other platforms, an alternative is debugger scripting, but we have found far too many bugs and reliability issues with the macOS implementation of lldb.
Any suggestions would be greatly appreciated!
Topic:
Developer Tools & Services
SubTopic:
Instruments
Hello, I am trying to investigate my apps memory usage using the instruments tool. Whenever I attach instruments my app crashes, when I have it connected to xcode as well I can see that the crash occurs in liboainject: ___lldb_unamed_symbol117 with SIGBUS.
Here's what the stack looks like.
Is this a known issue? Are there any workarounds or things I can do to figure out what is causing the crash?
Topic:
Developer Tools & Services
SubTopic:
Instruments
Hello,
I'm no macOS 26.1 I'm running through the example shown in the WWDC video "Optimizing CPU Performance with Instruments." After right-clicking a test, clicking "Profile...", and trying to run a processor trace I get the error in the subject.
I have processor trace enabled on the CPU via system settings. I confirmed this by disabling it and re-enabling it and noting the error that appears when this is disabled is different from the one I'm now getting.
This did previously work but I haven't tried since macOS 26 is released. Is there something new I need to be doing to my Xcode project settings in order for this to be working?
Topic:
Developer Tools & Services
SubTopic:
Instruments