OpenGL Driver Instrument

December 12th, 2011

Filed under: Instruments, OpenGL | Be the first to comment!

Researching Instruments for Xcode Tools Sensei allowed me to become familiar with most of the built-in instruments. Due to the high number of instruments, there was no way for me to cover them all in the book. I focused on the most commonly used instruments in the book. I can use this blog to explain […]

Instruments: Finding Where You Allocate Memory

December 7th, 2011

Filed under: Instruments | Be the first to comment!

I have seen several questions recently on Stack Overflow from people using the Allocations instrument in Instruments. When looking through the information the Allocations instrument provides, they have difficulty finding the areas of their code responsible for the memory allocations. Answering questions on this topic several times on Stack Overflow tells me it’s time to […]

Event Profiler and Counters Instruments

October 18th, 2011

Filed under: Instruments | Be the first to comment!

Xcode 4.2 adds two instruments for Mac applications that users of the Shark performance tool will appreciate. The Event Profiler instrument records a sample when a low-level event occurs. The Counters instrument samples your application and collects PMC (Performance Monitor Counter) events. PMC events are low-level CPU events, such as incorrectly predicted branches and cache […]

Supplying a Method Name to an Objective-C Custom Instrument

August 9th, 2011

Filed under: Instruments | Be the first to comment!

One of Instruments’ most powerful features is the ability to create your own instruments. Apple supplies an Objective-C provider to DTrace, which Instruments is built on. In the Objective-C provider, you can tell a probe to fire when you enter or exit an Objective-C method. Supplying the method name can be tricky, especially if the […]

Using NSZombie with Instruments

September 21st, 2010

Filed under: Cocoa, Instruments, Mac Development, Xcode | Be the first to comment!

Cocoa’s NSZombie class helps you discover where you are accessing a deallocated object in your code. For those of you running Snow Leopard, Instruments has support for NSZombie so you can use NSZombie without having to make any changes to your Xcode project. Checking for zombies is pretty simple. Open your project in Xcode. Choose […]

Instruments Source View

May 5th, 2010

Filed under: Instruments | 2 comments

Instruments 2, which ships with Xcode 3.2, added a source view that lets you examine your source code inside Instruments. When you combine the source view with the extended detail view, finding the problem areas in your code becomes easier. Switching to the Source View At the bottom of the trace document window is a […]