Questions tagged [instruments]

Instruments usually refers to the performance analysis developer tool provided by Apple for Mac and iOS development.

While the term may have other applications (such as in musical instruments), it is usually used on this site to refer to the Instruments performance analysis tool provided by Apple alongside their Xcode IDE. It contains a suite of performance tests, as well as some debugging-related functionality, wrapped in a GUI environment geared toward data analysis.

Instruments is a performance-analysis and testing tool for dynamically tracing and profiling OS X and iOS code. It is a flexible and powerful tool that lets you track a process, collect data, and examine the collected data. In this way, Instruments helps you understand the behavior of both user apps and the operating system.

Links

1820 questions
98
votes
9 answers

Can't launch my app in Instruments: At least one target failed to launch

I have all my code signing entitlements set correctly. Running the app on my phone is fine, but launching it in instruments gives me an error message: Error Starting Recording At least one target failed to launch; aborting run And then: Target…
Andrew
  • 15,935
  • 28
  • 121
  • 203
86
votes
2 answers

Instruments ObjectAlloc: Explanation of Live Bytes & Overall Bytes

I'm using Instument's ObjectAlloc tool in an attempt to understand what the memory my application (iPhone) is doing and when and where it is doing it. I would really like a basic explanation of these statistics: Live…
Ross
  • 14,266
  • 12
  • 60
  • 91
74
votes
11 answers

Missing symbol names when profiling IPhone application with Instruments

I am compiling an iPhone application via command line (so no Xcode options involved) however I am unable to get my symbol names to show when profiling with Instruments. I have tried several flags such as -gdawrf-2 and -g without any success. I have…
Mac Twist
  • 1,161
  • 1
  • 8
  • 7
62
votes
2 answers

Time profiler in instruments is not working

I recently update my Xcode to version 9.3, so is instruments. After that, time profiler won't work anymore, it usually works fine before. I tried to run it via Xcode, and I tried to run it manually. Doesn't work. The life cycle row stuck in…
Carusd Ray
  • 993
  • 7
  • 11
62
votes
1 answer

Instruments Allocations track alloc and dealloc of objects of user defined classes

Is it possible to track the allocation and deallocation of my Objective-C objects? For instance if I have a class Book, I want to track all the allocations and deallocations of the objects of Book type. I can track all the default SKD classes, such…
Cosmin
  • 2,840
  • 5
  • 32
  • 50
61
votes
3 answers

Instruments automation trace only allows one target connection?

I've created a simple javascript for my iOS app that I'd like to run simultaneously on multiple iOSDevices connected via USB to one host Mac machine. Launching instruments connected to an iPhone from the command line works fine but if I attempt to…
ksig
  • 610
  • 5
  • 6
58
votes
1 answer

How to profile React Native source code using Xcode/Instruments/Time Profiler

We're using React Native 0.59.10 and React-Redux 5.0.7, and are experiencing a CPU-bound performance issue, in which our Redux actions are taking ~0.25s to complete. We've profiled using the Time Profiler configuration in Instruments, but none of…
Craig Otis
  • 31,257
  • 32
  • 136
  • 234
57
votes
4 answers

use instruments - leaks with a device

I'm starting to use Instruments-Leaks with an iPhone 3G. When I try to run the app with Instruments on the iPhone I obtain Target failed to run: Remote exception encountered: 'Failed to get task for pid 280' Ideas? The only time I succeed in…
Sefran2
  • 3,578
  • 13
  • 71
  • 106
54
votes
9 answers

Can the UI Automation instrument be run from the command line?

Is there a way to open the UIAutomation instrument through the terminal? Will it be possible to write an AppleScript to open Apple's UIAutomation tool and load the application to be tested? Can you please tell me is there any way through scripting…
Vijay
  • 878
  • 1
  • 7
  • 21
53
votes
1 answer

What does yellow tinting represent when using "color misaligned images" on iPhone/iOS

so--i switched on "color misaligned images" to improve drawing performance in our app. The documentation states: Puts a magenta overlay over images whose source pixels aren't aligned to destination pixels I don't know what the yellow means…
nielsbot
  • 15,922
  • 4
  • 48
  • 73
53
votes
1 answer

Record values of Performance Monitor Counters (PM events) on OS X without Instruments

In Xcode's Instruments, there is a tool called Counters that exposes low-level counter information provided by the CPU, such as the number of instructions executed or number of cache misses: This is similar to the Linux syscall perf_event_open…
Sophie Alpert
  • 139,698
  • 36
  • 220
  • 238
52
votes
3 answers

How to profile memory usage & performance with Instruments?

Of all the Instruments Trace Templates, I love using: Zombies to detect where an object is getting over-released, great for debugging EXEC_BAD_ACCESS errors. Leaks to detect memory leaks. Core Animation w Color Blended Layers to detect frame rate &…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
51
votes
1 answer

Instruments 4.1 unresponsive to projects launched from Xcode 4.1 until pressing Cmd-Tab

If I open Instruments and select a standard application (e.g. Mail or MS Word) it has no issue. If I am in Xcode and I go to Product > Profile (or press Cmd + I), it launches Instruments, allows me to select a template, and loads the standard…
James Paul Mason
  • 1,051
  • 1
  • 13
  • 27
49
votes
5 answers

Problem running iPhone application on iPhone from Xcode (and in Instruments)

I have a problem running one application on the iPhone from Xcode (or Instruments). When I try to run the app I get the error message Failed to upload XXX.app in the bottom left corner of Xcode. The strange thing is it actually uploaded the app to…
Ben
  • 1,922
  • 3
  • 23
  • 37
46
votes
8 answers

How to log all methods used in iOS app

I'm taking over the development of an iPad app for a client. There's a substantial amount of work that's already been done and I'm trying to piece together how the whole thing is designed to run. One of the things I'd like to do is log which methods…
Phil John
  • 1,225
  • 1
  • 15
  • 24
1
2 3
99 100