Guides and Sample Code

Developer

Instruments User Guide

On This Page

Time Profiler Instrument

Overview

Instrument Description

The Time Profiler instrument captures stack trace information at prescribed intervals. It can record information from a single process or from all processes running on the system.

Supported Platforms

iOS

OS X

Related Profiling Templates

Core Animation Profiling Template

Metal System Trace Profiling Template

Time Profiler Profiling Template

Timeline Pane

The timeline pane displays CPU and application life cycle information.

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.

Options

Includes the following:

Setting

State

High Frequency

Off by default.

Record Kernel Callstacks

Off by default.

Record Waiting Threads

Off by default.

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.

Track Display Settings

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

Setting

Description

Options

Style

How information is presented.

  • CPU Usage: The percentage of CPU capabilities being used. This is the default.

Call Tree

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

Setting

State

Separate by State

Off by default.

Separate by Thread

On by default. Enable this option to view activity on a thread-by-thread basis, allowing you to see where activity may not be evenly distributed.

Invert Call Tree

Off by default. Enable this option to see the deepest portions of the sample first.

Hide System Symbols

Off by default. Enable this option to hide system calls, allowing you to focus solely on your app’s symbols.

Flatten Recursion

Off by default. Enable this option to represent recursive functions—functions that call themselves—as single entries.

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

Profile Detail Type

The following profile columns are available in the detail pane.

Column name

Definition

Count

The number of samples collected for the symbol and its children.

Self Count

The number of samples collected for the symbol itself.

Weight

The amount of time the symbol and its children spent running, and the percentage of time spent running in relation to other symbols running at the same time.

Self Weight

The amount of time the symbol spent running.

Library

The name of the library that generated the call.

Category

An icon representing the category of the call.

Symbol Name

The name of the symbol being called.

Narratives Detail Type

The following narratives columns are available in the detail pane.

Column name

Definition

Start

The time an interesting event occurred.

Narrative

Information about an interesting event that occurred.

Samples Detail Type

The following samples columns are available in the detail pane.

Column name

Definition

Sample Time

The time that the sampling began.

Process

The process being sampled.

Thread

The thread identifier.

Stack

The last symbol called in the sample’s stack track. Use the Extended Detail pane to view the complete stack trace leading to this symbol.