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
16
votes
1 answer

Cache misses on macOS

There are some questions about this topic, but none has a real answer. The question is: how can I measure L1, L2, L3 (if any) cache misses on macOS? The problem is not that macOS does not provide, in theory, those values even without any external…
senseiwa
  • 2,369
  • 3
  • 24
  • 47
15
votes
1 answer

What does the DTMobileIS mean for?

When I used Instruments tool to monitor my memory usage, I found a process named DTMobileIS use about 40% of real memory, and then there were not enough memory for my app so it crashed. I am curious about this DTMobileIS means for. Does anyone know…
AechoLiu
  • 17,522
  • 9
  • 100
  • 118
15
votes
2 answers

What truly means by Persistent and Transient Column in Allocation Instrumentation Template in Xcode

I am trying to understand , what is meaning of transient and persistent Column in Allocation Template . From the tutorial http://www.raywenderlich.com/97886/instruments-tutorial-with-swift-getting-started I have found "The Persistent column…
Rabindra Nath Nandi
  • 1,433
  • 1
  • 15
  • 28
14
votes
4 answers

Why am I seeing "An error occurred while trying to run the script." in the UI Automation instrument?

When I try to run a UI Automation script on iOS 5 devices I am getting the following error: "An error occurred while trying to run the script." The same script is running perfectly in the simulator or on an iOS 4.3.3 device. How can I solve this…
Abhijeet
  • 503
  • 5
  • 11
14
votes
1 answer

Core Animation profile in Instruments is nowhere to be found

I want to debug my core animation code. However, the instruments profile doesn't exist, and it's not available in the library in instruments either. I'm using Xcode 4. How do I install/access it and get it working?
Erik
  • 5,791
  • 5
  • 30
  • 45
14
votes
3 answers

Xcode Instruments shows Device is offline

I have been trying to run the app to check the performance using Core Animation profiler in Xcode Instruments. Even though the device is online it shows up Device is offline. I tried getting the work done as per the various suggestions provided…
Pavan kumar C
  • 393
  • 1
  • 4
  • 15
13
votes
3 answers

Using Xcode Instruments on hackintosh

Using hackintosh (i7-4790K 4GHz, 16GB DDR3, GF980Ti) for developing on Xcode (both Swift and Objective-C) about an year, never get any errors. But now I need to use Instruments apps (such Leaks, Allocations, Energy Log, System Trace, etc.) - but I…
zzheads
  • 1,368
  • 5
  • 28
  • 57
12
votes
1 answer

UIAutomation Nested Accessibilty Elements Disappear from Hierarchy

I have a view with two subviews a button and an Image, I turn on accessibility and set the label on the subviews and I can see the hierarchy by calling UIATarget.localTarget().frontMostApp().mainWindow().logElementTree(); I get the following for…
Neil Foley
  • 1,763
  • 1
  • 13
  • 32
12
votes
2 answers

xcode instruments v5.0 ""An error occurred while trying to run the script"

I have upgraded to xcode 5.0 and Instruments 5.0. Problem: Can not make a new recording / new script. It worked before upgrade. How to recreate problem: - Make a new instance with the template "Automation" - Go to "script" - Choose "Add", then…
12
votes
3 answers

Xcode Instruments unable to take snapshots of leaks when running on device

Recently I have not been able to test for leaks with Instruments when running apps on a device. Instruments will attempt to take a snapshot but the status will freeze at "Analyzing Process". At first I thought it was just taking it's time but I have…
David
  • 123
  • 1
  • 5
11
votes
1 answer

Bottleneck in CA::Transaction::commit()

When using the Time Profiler on interactions with a UIScrollView (containing many subviews) I often see CA::Transaction::commit() in the heaviest stack trace. What is this method and how can I spend less time in it? My educated guess is that this…
tboyce12
  • 1,449
  • 14
  • 28
11
votes
1 answer

UILabel allocation persistent and taking up 8Mb of memory

I have a set of labels that are placed within a set of UIViews inside a single UIScrollView. They have not been assigned an outlet. I am using Avenir Next Ultralight font for all of them, and they have varying sizes. The main view has a single view…
user2916031
  • 111
  • 1
  • 4
10
votes
0 answers

XCode Instruments: name threads

For profiling multithreaded applications, it would be very useful to me to set a name for each thread. Initial googling turns up pthread_setname_np() (see here), but when used, it doesn't appear to show up in Instruments. Is there a way to do this…
leecbaker
  • 3,611
  • 2
  • 35
  • 51
10
votes
2 answers

App crashes while Recording in Instruments

I am trying to run Instruments on my app, as soon as I click record the app launches and crashes with following error: -[__NSCFString _stringByResolvingSymlinksInPathUsingCache:]: unrecognized selector sent to instance But when runs fine when…
iOS Monster
  • 2,099
  • 1
  • 22
  • 49
10
votes
0 answers

Profiling with Instruments : Whats the difference b/w self weight and weight

I am trying to understand how to interpret the results of the instrument profiler on a mac with xcode. Primarily I am trying to understand the difference b/w Weight and Self Weight. This is my result without the modification Result A: Weight …
Rajeshwar
  • 11,179
  • 26
  • 86
  • 158
1
2
3
27 28