Guides and Sample Code

Developer

Instruments User Guide

On This Page

Dispatch Instrument

Overview

Instrument Description

The Dispatch instrument captures information about Grand Central Dispatch (GCD), a multicore computing technology for concurrently processing asynchronous tasks in your application. It can record information from a single process only.

Supported Platforms

OS X

Related Profiling Templates

N/A

Timeline Pane

The timeline pane displays information based on the instrument’s Style configuration.

Record Settings

Click the Record Settings button (image: ../Art/instruments_recordsettings_button_inline_2x.png) in the inspector pane to customize the following recording options.

Sampling Period

Set how often the instrument samples the target. Use the slide or enter a value to specify the desired milliseconds.

Track Display Settings

These settings control how information is displayed in the timeline pane.

Setting

Description

Options

Style

How information is presented.

  • Blocks Invoked: The total number of blocks of a specified type that are invoked during the specified time period.

  • Total Work Time: The total CPU time that a queue’s block consumed during the specified time period.

Type

How multiple parameters in one track are displayed.

  • Stacked: Each statistic has its own graph.

  • Overlay: All information is contained in one graph.

Display Settings

Click the Display Settings button (image: ../Art/instruments_displaysettings_button_inline_2x.png) in the inspector pane to customize the following display settings.

Call Tree

The following call tree display settings filter the call tree in the detail pane.

Setting

State

Separate by Queue

On by default.

Separate by Thread

Off by default.

Invert Call Tree

On by default.

Hide System Libraries

Off by default.

Flatten Recursion

Off by default.

Call Tree Constraints

The following options filter the call tree to display calls that fall within a specific threshold based on the settings below.

Setting

State

# Calls

Off by default.

Data Mining

Allows you to filter through the collected data for specific symbols and libraries.

Detail Pane Columns

Queues Detail Type

The following queues columns are available in the detail pane.

Column name

Definition

#

The sequence number.

Graph

Plot of the statistics from this queue in the track pane.

Queue Name

The name of the queue.

Pointer

The memory address of the queue.

Conc

Indicates if the queue is concurrent.

Live

Indicates if the queue is active.

# Blocks

The number of blocks currently enqueued, but not invoked.

# Sync

The number of blocks that have been dispatched synchronously.

Total Processed

The total number of blocks executed.

Latency (ms)

The average difference between the invoke time and the enqueue time in milliseconds.

Total CPU Time (ms)

The total time in milliseconds that the specified queue’s blocks have been executing on the CPU.

Call Tree Detail Type

The following call tree columns are available in the detail pane.

Column name

Definition

# Self

The number of times the symbol has been called.

% Calls

The percentage of total calls involving the symbol name.

# Calls

The number of calls involving the symbol name.

% of Parent

The percentage of bytes used by the call’s parent.

Source Path

The path to the source file that generated the call.

Category

An icon representing the category of the call.

Library

The name of the library that generated the call.

Symbol Name

The name of the symbol being called.

Blocks Detail Type

The following blocks columns are available in the detail pane.

Column name

Definition

#

The sequence number.

Graph

Plot of the statistics from this queue in the track pane.

Block Name

The name assigned to this block by the compiler.

Block Library

The framework or bundle in which the block has been declared.

Total Work Time

The total execution time for all invocations of this block in microseconds.

Average Work Time

The average execution time for this block in microseconds.

Count

Th The number of invocations of this block.