I'm currently exploring Instruments for profiling and tracing on macOS 15.6.1. I know there is the "network connections" instrument which records TCP/UDP information, however it seems to not include the "lo0" (loopback) interface.
Is there a way to configure it so that localhost traffic is included in the recording? as the application I'm tracing uses that and I want that information to be included in traces.
The documentation for network-interface-detection schema makes no mention of how it detects interfaces.
Thanks in advance.
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
According to the documentation for Processor Trace, it should be available on the iPhone 16 or later.
Going off of the Optimize CPU performance with Instruments WWDC session, the toggle for it should be under Developer > Performance, but I don’t see this option anywhere on my iPhone 17. I can’t run a Processor Trace in Instruments without this feature turned on, because it claims my iPhone’s CPU is unsupported.
Has anyone else managed to enable Processor Trace on the A19 chips?
I'm working on a custom instrument that displays intervals from os_signpost data. I'd like to color the intervals in the graph based on data from an accompanying aggregate. For example, color the interval red if its duration is greater than 3 standard deviations from the mean. Is this possible?
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
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
This is a screenshot from the Swift Task track in Xcode.
I made these tasks with
public actor ResourceManager {
func foo() {
for observer in observers {
Task(name: "ResourceManager notify observers") {
await notification(observer)
}
}
}
}
I am confused why each of the task is showing as a separate task in the task lifetime summary. Is there a way to queue the trace in Instruments into the fact that these are indeed the same task?
Instruments is crashing when the swiftui instrument is stopped (the session is finished) and the transfer begins from device to device:
Crashed Thread: 11 Dispatch queue: com.apple.swiftuitracingsupport.reading
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process: exc handler [1633]
I've tried removing derived data, reinstalling xcode, updating xcode (I originally thought this might be the issue -- I needed to update to 26.2 from the 26 RC -- the update didn't fix crash or change the crash report), and restarting both devices.
I'm running Instruments/Xcode 26.2 on a MacBook Pro 15" (2018) running Mac OS 15.7.2 (24G325) with an iPhone 16 Pro Max running 26.2.
Hoping someone else might have seen this or could help me troubleshoot. I find the swiftui instrument be helpful and like to use it :) I can post a complete crash report as well.
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
I have been working on battery consumption analysis for my application, and as part of this effort, I wanted to understand how competitor apps behave under similar usage conditions.
To do this, I downloaded competitor apps from the App Store and attached them to Instruments via Xcode. I then executed a defined set of manual test scenarios to simulate real user behavior. During these tests, the iPhone was connected to a Mac and charging continuously, which meant that System Power Usage logs were not generated in Instruments.
However, I was able to capture detailed metrics such as:
Network usage
CPU load
GPU activity
Display and brightness impact
Other runtime performance characteristics
Since direct battery drain data was unavailable, I used derived analysis (with AI assistance) to estimate approximate power consumption based on the above metrics, assuming real-device (battery-powered) conditions.
According to Apple documentation, System Power Usage in Instruments is not directly tied to the device’s battery percentage. Instead, it appears to be computed using contributing factors such as CPU, network, display, and other subsystem activity. This raises a few important questions about data reliability and methodology.
Key questions:
How reliable are Instruments-based metrics (CPU, network, display, GPU) for estimating real-world battery consumption when the device is charging?
Can these metrics be safely used as a comparative baseline between competitor applications, even if absolute battery drain values are unavailable?
Is the System Power Usage instrument essentially a derived model based on subsystem activity, and if so, does it remain accurate when the device is not discharging?
From Apple’s perspective, is this a valid approach for relative power comparison, provided that:
The same device is used
OS version is identical
Test scenarios are consistent and repeatable
Based on these findings, would it be reasonable to proceed with instrumenting our own application, run the same scenarios, and draw conclusions using relative comparisons rather than absolute battery percentages?
The intent is not to claim exact battery drain numbers, but to establish a directionally correct and repeatable comparison that can guide performance optimizations in our own application.
I would like to understand whether this methodology aligns with Apple’s recommended practices, or if there are limitations or inaccuracies I should be aware of before relying on these results for decision-making.
Topic:
Developer Tools & Services
SubTopic:
Instruments
When creating an icon using icon composer, I cant upload a build to testflight/App Store connect.
Running on device from Xcode works fine, but as soon as I archive and upload to App Store Connect, I get an error saying the icon contains an alpha channel
I am trying to perform swiftUI instrumentation on my ios app. whenever i hit the rocord button, the app launches on target device and closes with the error:
Failed to start the recording: Failed starting ktrace session.
How do i resolve this please?