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 tag

91 Posts
Sort by:
Post not yet marked as solved
1 Replies
312 Views
I would like to retrieve operation lengths of different metal GPU informations in form of xml. I know that exporting is possible using xtrace but how could i export the information of all wire memory statistics for example that are shown in the regarding row inside instruments. It would be helpful to get the xpath something in the GUI of Instruments belongs to. Specifically i am looking at Metal GPU traces. Any help is much appreciated! —toc gives a list of all contents but no description or affiliation with data in the GUI.
Posted Last updated
.
Post marked as solved
2 Replies
513 Views
When I attempt to log network requests with the new "Network" profiling template with "Http Traffic" instrument (Instruments version 13.2.1), I get network connections data on my iphone, but no HTTP traffic data. I'm running with iOS 15.3 on iphone 11, and running macos 12.2 I get the warning that sensitive data will be recorded in the trace, but I never get any actual events posted there. I also don't get any kind of warnings or errors from Instruments telling me why it might have issues recording anything. I get these data from Charles just fine (when I properly setup Charles as a proxy). From what I read, Instruments HTTP Traffic should "just work", but for me it's not and not telling me why. Is there any way to diagnose why I'm not getting any Http traffic data in my recordings? I've disabled web protection on the phone (Microsoft Defender), which was necessary for Charles to work, but I never needed to install any certificate for instruments (or are there any instructions to do so), so I assume there is a default certificate that is used to encrypt web traffic which instruments can decrypt. I'd really like to use this tool!
Posted Last updated
.
Post not yet marked as solved
2 Replies
299 Views
I have 3 devices. One is iPhone 7 plus which system version is iOS 14.8. and the others are iOS 15.1, though one is iPhoneX , one is ipad. When I use xcode to run my app, I find out the memory keeps rasing in iOS 15.1. By using instruments, I could see there're a lot autoreleasepoll content(which is growing more and more). But it doen't happen on iOS 14.8.
Posted
by byljbdhHK.
Last updated
.
Post not yet marked as solved
3 Replies
409 Views
I'm in the process of refactoring a humongous monolithic app with multiple extensions into a setup where we have a service library which is linked to each of the targets. However, this causes a significant issue when the service library is being referenced from the notification extension, as that extension has a hard memory limit of 12MB on an iPhone 5s, which we are still supporting, and our memory usage is at about 11MB which is way too close for comfort. When the memory usage surpasses the limit, the notification extension is automatically killed by the system. Profiling with Instruments/Allocations has shown that a significant chunk of that memory is allocated (wasted, really) by the internal AVSecondScreenController.load() class initializer from the AVKit library. My approach is now to try to figure out what causes AVKit to be loaded in the first palce. I have no explicit imports for AVKit in the notification extension and attempts to figure out what triggers it from the service library failed as well. I did add a symbolic breakpoint for AVSecondScreenController.load() which is hit, but the backtrace is useless. Does anyone have any idea how I can pinpoint what causes AVKit to be loaded in the first place? Thanks!
Posted
by clawoo.
Last updated
.
Post not yet marked as solved
1 Replies
273 Views
I have a custom Xcode 13.2.1 (13C100) Instrument to which I have recently added os-signpost-point-schema. I notice that the events are marked with a hyphen/dash rather than a ⓢ. See the comparison of the signposts in my custom tool vs the standard “Points of Interest” tool: I have been digging through the documentation and while I am wagering that there is some simple attribute that can be set to dictate which symbol is included within the signpost circle, but it is not jumping out at me. How does one select the symbol used within custom event points in Instruments? FWIW, here is my Instrument: <?xml version="1.0" encoding="UTF-8" ?> <!-- Instruments Developer Help: https://help.apple.com/instruments/developer/mac/current/ --> <package> <id>com.robertmryan.CustomInterval</id> <version>0.2</version> <title>Custom Points of Interest</title> <owner> <name>Robert Ryan</name> </owner> <import-schema>os-signpost</import-schema> <!-- See https://help.apple.com/instruments/developer/mac/current/#/dev536412616 --> <os-signpost-point-schema> <id>custom-point-schema</id> <title>Points</title> <owner> <name>Robert Ryan</name> </owner> <purpose>Provide mechanism for multicolored events posted by `os_signpost`; The string generated by `os_signpost` must be in form of "Label:%d,Concept:%{public}@", where "Label" is string that will control what text appears in the event, and "Concept" is one of the strings listed in https://help.apple.com/instruments/developer/mac/current/#/dev66257045 that dictates the color of the interval. No spaces after the commas within this string.</purpose> <note>That message must use that printf-style format, not embedding the values in the format string literal.</note> <!-- you can constrain this to a particular subsystem if you'd like: <subsystem>"com.domain.MyApp"</subsystem> --> <category>"Interval"</category> <name>?name</name> <pattern> <message>"Label:" ?label ",Concept:" ?concept</message> </pattern> <column> <mnemonic>name</mnemonic> <title>Name</title> <type>string</type> <expression>?name</expression> </column> <column> <mnemonic>label</mnemonic> <title>Label</title> <type>string</type> <expression>?label</expression> </column> <column> <mnemonic>concept</mnemonic> <title>Concept</title> <type>event-concept</type> <expression>?concept</expression> </column> </os-signpost-point-schema> <os-signpost-interval-schema> <id>custom-interval-schema</id> <title>Intervals</title> <owner> <name>Robert Ryan</name> </owner> <purpose>Provide mechanism for multicolored intervals posted by `os_signpost`; The string generated by `os_signpost` must be in form of "Label:%d,Concept:%{public}@", where "Label" is string that will control what text appears in the interval, and "Concept" is one of the strings listed in https://help.apple.com/instruments/developer/mac/current/#/dev66257045 that dictates the color of the interval. No spaces after the commas within this string.</purpose> <note>That message must use that printf-style format, not embedding the values in the format string literal.</note> <!-- you can constrain this to a particular subsystem if you'd like: <subsystem>"com.domain.MyApp"</subsystem> --> <category>"Interval"</category> <name>?name</name> <start-pattern> <message>"Label:" ?label ",Concept:" ?concept</message> </start-pattern> <column> <mnemonic>name</mnemonic> <title>Name</title> <type>string</type> <expression>?name</expression> </column> <column> <mnemonic>label</mnemonic> <title>Label</title> <type>string</type> <expression>?label</expression> </column> <column> <mnemonic>concept</mnemonic> <title>Concept</title> <type>event-concept</type> <expression>?concept</expression> </column> </os-signpost-interval-schema> <instrument> <id>com.robertmryan.CustomInterval.instrument</id> <title>Custom Points of Interest</title> <category>Behavior</category> <purpose>Provide multi-colored intervals as dictated by the "event-concept" parsed from the `start-pattern` string.</purpose> <icon>Points of Interest</icon> <limitations></limitations> <create-table> <id>custom-interval-table</id> <schema-ref>custom-interval-schema</schema-ref> </create-table> <create-table> <id>custom-point-table</id> <schema-ref>custom-point-schema</schema-ref> </create-table> <graph> <title>Custom Interval Graph</title> <lane> <title>Points</title> <table-ref>custom-point-table</table-ref> <plot-template> <instance-by>name</instance-by> <label-format>%s</label-format> <value-from>name</value-from> <color-from>concept</color-from> <label-from>label</label-from> </plot-template> </lane> <lane> <title>Intervals</title> <table-ref>custom-interval-table</table-ref> <plot-template> <instance-by>name</instance-by> <label-format>%s</label-format> <value-from>name</value-from> <color-from>concept</color-from> <label-from>label</label-from> <qualified-by>layout-qualifier</qualified-by> </plot-template> </lane> </graph> <list> <title>Custom Regions of Interest</title> <table-ref>custom-interval-table</table-ref> <column>name</column> <column>label</column> <column>concept</column> <column>start</column> <column>duration</column> </list> <list> <title>Custom Points of Interest</title> <table-ref>custom-point-table</table-ref> <column>name</column> <column>label</column> <column>concept</column> </list> </instrument> </package>
Posted
by eoonline.
Last updated
.
Post marked as solved
2 Replies
2.2k Views
There used to be an optional Xcode tool for profiling OpenGL.You could download it as "Graphics Tools for Xcode."Unfortunately, the last release for that was in 2015, for XCode 7.2Have OpenGL graphic tools been deprecated, and only Metal tools are available now?
Posted
by bram.
Last updated
.
Post not yet marked as solved
2 Replies
432 Views
My team and I have watched all of the WWDC 2018 &amp; 2019 session on signposts and custom instruments, and scoured the internet for documentation and examples... but the resources out there on instruments are thin.It appears from WWDC videos that it should be easy to arrange (other than alphabetical) and add colors to signposts in instruments with either a instruments setup, or a little XML... but without needing Clips. Is this true? Any example code (or just configuration)?
Posted Last updated
.
Post not yet marked as solved
1 Replies
362 Views
Hi all, I'm facing a strange timeout problem in my application. I've opened another thread for that [Receiving "The request timed out." when using NSURLSession].(https://developer.apple.com/forums/thread/696762) Based on Xcode 13 Network Instruments, when a network request receives a timeout, all the subsequent ones receive the timeout too. Those requests are hitting the same host / domain that works with HTTP/1 (head of line blocking?). Instead, other request that do not involve this domain are working correctly. I've collected a trace but I cannot understand the meaning of "No Connection" and the red color of the box under inspection. Are you able to clarify their meaning and when this scenario could happen? Thanks, Lorenzo
Posted
by lboaro.
Last updated
.
Post not yet marked as solved
8 Replies
5.3k Views
Hey,i got an issue with Instruments 7.1 when i try to profile my app. It works great in simulator, but when profiling on the device my symbols only show up as addresse:The menu item File -&gt; Symbols only after i stopped recording, not before. This is what i get:when i try to locate and select the dSYM in DerivedData -&gt; MyApp -&gt; Build -&gt; Products -&gt; Debug-iphoneos i just get the error message: The specified path didn't locate a dSYM for any of the selected libraries.Any help would be really great 🙂
Posted
by Warly.
Last updated
.
Post not yet marked as solved
2 Replies
395 Views
In the App we saw a 4 seconds loading time while launching the App. Sometimes this time up to 8 seconds but the average time is 4 seconds. What could be the reason? In the AppDelegate there isn't server calls. The breakpoint inside the AppDelegate function didFinishLaunchingWithOptions is taking 4 seconds to get in. I have some api calls but they are launched after the breakpoint in the AppDelegate. The Api calls responses are working faster. In Instruments I have some blocked time, is it normal? Is something wrong in the log?
Posted
by bicho.
Last updated
.
Post marked as solved
2 Replies
312 Views
Hi all, I've collected a trace in order to understand deeper a problem that occurs in my application. After completing the trace I've noticed few flags above the timeline (see attachment). Are you able to tell me the meaning of those flags? What are the events they are related to? Thank you very much, Lorenzo
Posted
by lboaro.
Last updated
.
Post not yet marked as solved
1 Replies
396 Views
I have seen that I can export table data from traces containing Allocations, Leaks, and VM Tracker instruments using xctrace export on the command line in XCode 13 release notes. But I still cannot see the table data when I use xctrace export --input ***.trace --toc. How can I export given .trace using supplied query to the XML file format that can be later read and post-processed
Posted
by patlon.
Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
I'd like to confirm the battery usage of an app I am developing on iOS, specifically on Xcode 13 and iOS 15. (Note: This app previously showed no issues with battery usage on previous versions of iOS.) Previously, it seems that there were two ways to gather energy usage information: #1. On the device under Settings > Developer > Logging As per Apple's documentation described in the section titled "Log Energy Usage Directly on an iOS Device". However, on iOS15, I can't find any options for logging under Developer or anywhere under settings even when searching. #2. Profiling via Instruments using the "Energy Log" template As per the same documentation from Apple described in the section "Use the Energy Diagnostics Profiling Template". While it is still available in Xcode 12, this template is missing in Xcode 13. Naturally, it's also not possible to profile an iOS15 device with Xcode 12. Digging through the Xcode 13 release notes, I found the following: Instruments no longer includes the Energy template; use metrics reporting in the Xcode Organizer instead. (74161279) When I access the Organizer in Xcode (12 or 13), select an app and click "Energy" for all versions of the app, it shows the following: Apple's documentation for "Analyzing the Performance of Your Shipping App" says: "In some cases the pane shows “Insufficient usage data available,” because there may not be enough anonymized data reported by participating user devices. When this happens, try checking back in a few days." Well over a year into production and having sufficient install numbers, I have a feeling that waiting a few days might not do much. I would like to determine if this is a bug in my app or a bug in iOS15. How can energy usage data be gathered using Xcode 13 on iOS 15?
Posted
by drock.
Last updated
.
Post not yet marked as solved
26 Replies
15k Views
When I try to run my iOS app through the Leaks instrument in the simulator, very shortly after launch, without fail, it will stop with the error "An error occurred trying to capture Leaks data"All the disclosure says is "Error retrieving leak information." I can't find any other information. Checking the console view, it just shows a normal run up until "&lt;End of Run&gt;"I've tried doing a clean build, deleting my derived data, uninstalling the app from the simulator, restarting Xcode, rebooting. I have no idea what to do.
Posted
by greay.
Last updated
.
Post not yet marked as solved
0 Replies
225 Views
Hello, I'am trying to analyse a hang with our App and asked the customer to do a ktrace artrace ("sudo ktrace artrace") on his system. The problem is that the macOS symbols are missing when I open the trace with Instruments on my system. the customer is running macOS 11.6.1, I'am running macOS 12.0.1. I asked the customer to do a sudo ktrace symbolicate but that does not help. This is a very important workflow for me to analyse sluggishness and hangs on systems, any help is welcome! :-)
Posted
by ErichK.
Last updated
.
Post marked as solved
5 Replies
2.8k Views
I have a swift 5.4 package manager project with an executable target I want to profile in Instruments. I Cmd+I to profile which launches instruments. I pick allocations. then push the record button. im asked to authorise and doesn’t matter whether I use fingerprint or password I always get the error: (before run started) Failed to gain authorization any ideas? instruments 12.5 xcode 11.5 swift 5.4 2020 M1 MBP 13”
Posted
by adrianm.
Last updated
.
Post not yet marked as solved
2 Replies
556 Views
"xcrun xctrace record --device " commands starts recording info through instruments and store it in a file but sometimes it run properly and sometimes says following "Waiting for device to boot" I have also tried xcode 13.1 CLT Checked on multiples devices Changed cables as well
Posted Last updated
.