Instruments

RSS for tag

Instruments is a performance-analysis and testing tool for iOS, iPadOS, watchOS, tvOS, and macOS apps.

Instruments Documentation

Posts under Instruments subtopic

Post

Replies

Boosts

Views

Activity

Datadog Mobile Vitals equivalent in Instruments
Hello We use Datadog Mobile Vitals in our app and I'm trying to run some tools in Instruments for comparison. I'm not sure what tool should I use for some of those metrics: Slow Renders Description: With slow renders data, you can monitor which views are taking longer than 16ms or 60Hz to render. Instruments equivalent: Hangs including microhangs (?) CPU ticks per second Description: RUM tracks CPU ticks per second for each view and the CPU utilization over the course of a session. The recommended range is <40 for good and <80 for moderate. Instruments equivalent: CPU Profiler (?) Frozen Frames - Description: Frames that take longer than 700ms to render appear as stuck and unresponsive in your application. These are classified as frozen frames. Instruments equivalent: Hangs with > 500ms (?) Memory Utilization Description: The amount of physical memory used by your application in bytes for each view, over the course of a session. The recommended range is <200MB for good and <400MB for moderate. Instruments equivalent: Allocation (?)
0
0
125
Jul ’25
Question about Metrics Analysis in Xcode 26
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.
1
0
114
Aug ’25
Complete control flow trace... possible?
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!
1
0
90
Aug ’25
Touch screen stops working on shutdown screen in single app mode
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?
2
0
65
Aug ’25
Capturing the instruction trace from the ARM ETM
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!
1
0
146
2w
Xcode 26 - Create ML don't work
I tried using Create ML of Xcode 26.0 beta 7 to generate a model using the "Word Tagging" template, and I received the error: Training progress unavailable - Unexpected error. Using Create ML of XCode 16.4 with the same documentation, I was able to build the model and use it in a test app. I'd like to understand why Create ML of Xcode 26 no longer works.
0
0
80
2w
How to export Allocations report in XML (Call Tree format) with xctrace?
Hello Apple team, I am using xctrace to record an Allocations trace on iOS. For example: xctrace record --template "Allocations" --launch com.example.myapp --time-limit 30s --output alloc.trace After recording, I can export the results in Allocations List format (flat list of allocations) using: xcrun xctrace export --input ./alloc.trace --xpath '/trace-toc/run/tracks/track[@name="Allocations"]/details/detail[@name="Allocations List"]' --output ./alloc.xml This works fine and produces an XML output. However, what I really need is to export the data in Call Tree format (as shown in Instruments GUI). I checked xctrace export --help, but it seems that the Allocations template only supports the List view for export, not the Call Tree breakdown. My question is: 👉 Is there a way to export an Allocations trace in XML with Call Tree details using xctrace? 👉 If not, is there an API or recommended workflow to automate this instead of exporting manually from Instruments GUI? Thanks in advance for your help!
0
0
130
2w