Questions tagged [xcode-instruments]

Instruments is a performance, analysis, and testing tool for dynamically tracing and profiling macOS, iOS, watchOS, and tvOS code.

Instruments is a performance, analysis, and testing tool for dynamically tracing and profiling macOS, iOS, tvOS, and watchOS code. It is a flexible and powerful tool that lets user track one or more processes and examine the collected data. In this way, Instruments helps user understand the behavior of both user apps and the operating system.

With Instruments, user use special tools to trace different aspects of a process’s behavior. Users can also use the tool to record a sequence of user interface actions and replay them, using one or more instruments to gather data.

Instruments includes the ability to:

  • Examine the behavior of one or more processes
  • Record a sequence of user actions and replay them, reliably reproducing those events and collecting data over multiple runs
  • Create own custom DTrace instruments to analyze aspects of system and app behavior
  • Save user interface recordings and instrument configurations as templates, accessible from Xcode

Using Instruments, user can:

  • Track down difficult-to-reproduce problems in code
  • Do performance analysis on app
  • Automate testing of app
  • Stress-test parts of app
  • Perform general system-level troubleshooting
  • Gain a deeper understanding of how app works

Instruments is available with Xcode 3.0 and later and with macOS 10.5 and later.

Source: About Instruments

406 questions
10
votes
1 answer

Energy Level data empty in Instruments

Trying to pinpoint where my app is eating up phone battery via the Instruments Energy Log. I record use of the app from an untethered iPhone (as instructed by Apple), and have tried older suggestions. However, as shown below, Energy Usage Level…
vikzilla
  • 3,998
  • 6
  • 36
  • 57
10
votes
2 answers

iOS CPU Profile: Why might this thread be sucking up 99.9% CPU?

Sometimes when I load a table view, and I'm performing no activity intentionally except letting the table view show, I'll wait a few seconds and then my CPU usage shoots up. How can I find the cause?
Rose Perrone
  • 61,572
  • 58
  • 208
  • 243
9
votes
1 answer

How to find Objective-C Blocks in Allocations or Leaks Instruments

First time question, so don't hold that against me... For standard objects as well as sub-classes that I create, it is fairly straightforward to find in the Allocations or the Leaks Instruments a particular object. i.e. if I want to see a subclass…
9
votes
1 answer

Xcode - Instruments: missing symbols

I am profiling my WatchKit extension app with time profiler but the trace is unsymbolicated: I mean that these are all extraneous symbols for me and I can't find my methods names. If I click on any of these symbols I can see assembly code. How do…
Ramy Al Zuhouri
  • 21,580
  • 26
  • 105
  • 187
9
votes
1 answer

Why am I unable to export my xcode instruments data as a CSV? The option is greyed out

Currently I'm trying to record the average, high and low framerate of my iOS application by running it through Xcode. I: Load the project in Xcode. go to Product -> Build For -> Profiling and build it to my device (iPad 2) Long-click the play…
Scott
  • 115
  • 1
  • 5
9
votes
1 answer

What does "Anonymous VM" in allocations instruments signify?

I get frequent memory warnings in my application but I don't know why. Here is the snapshot of allocation instruments. I know that we don't have any control over virtual memory assigned to us but I am trying to understand what information does…
Kunal Balani
  • 4,739
  • 4
  • 36
  • 73
9
votes
1 answer

How does Instruments collect data from iOS without DTrace being available?

I am trying to understand the inner workings of XCode's Instruments. On MacOS, it can rely on DTrace to gather all kinds of profiling data. On iOS, it is also capable of lots of things, but I have read repeatedly that DTrace has not been ported to…
random6174
  • 474
  • 4
  • 16
9
votes
2 answers

Is there any tool to generate Object Graph on iOS app runtime?

I know there are Class Model tools (OmniGraffle, Doxygen) to generate Class model diagrams from the existing Xcode projects. But i'm looking for a tool which generates Object Graph on running iOS app in Simulator or Device.
8
votes
2 answers

Time Profiler In Xcode Missing Record Settings, Display Settings

Im using Instruments 8.3.2 and the Record Settings and Display Settings tab are missing in the inspector window. How do I get those tabs back? Please see the attached screenshot. The normal inspector window looks like this (See arrow 5):
James
  • 509
  • 5
  • 14
8
votes
1 answer

Alocation instrument in Profiler not showing Application level classes

I'm running into an issue using Xcode 6.3 Beta 3 where Profiler is not showing any of my custom application classes in the list of allocations: I have multiple classes that contain the word Post but none of them show up in the allocation summary,…
Ben-G
  • 4,996
  • 27
  • 33
8
votes
2 answers

“Show Obj-C only” setting is missing in Instruments 6.1

Since my latest update to the Instruments 6.1 I can't find "Show Obj-C only" checkbox anymore. Does somebody know if it has been removed completely or where one can find it? Please, see attached images. old Instruments checkBoxes: new Instruments…
mityaika07
  • 652
  • 5
  • 14
8
votes
1 answer

Using the debugger to find all strong references to an object

I have an object a1 of class A, I want to find all the objects that hold a strong a reference to the object a1. Is there a way to do it? The reason I want to know this is because, a1 doesn't seem to be deallocated.
user1046037
  • 16,755
  • 12
  • 92
  • 138
8
votes
1 answer

App crashes on iOS5 simulator and on profiler

My app crashes on the iOS 5 iPad simulator after about 5 min of smooth running. This is the only crash reference I get from Xcode, when I try to do a profile run using zombies/memory leak, the app for some reason won't even load (splash-screen shows…
Roy K
  • 3,319
  • 2
  • 27
  • 43
8
votes
2 answers

How to debug iOS crash due to memory pressure

I'm using ARC and the app crashes saying received memory warning. I'm testing the application directly on the device (iPhone 4 with iOS 7.0.2) and compiling with XCode 5 using iOS 6 SDK. I have used the apple instruments and I am having have around…
andreapavan
  • 697
  • 1
  • 7
  • 24
7
votes
1 answer

Leak detection issue in iOS with xCode 4.3

I have a very strange issue with the xCode 4.3 memory leak instruments... Basically it does not work in the following case... Project is created without ARC support. Create a simple class which inherits UIView use a "button" to create instance of…
1 2
3
27 28