Information Technology Reference
In-Depth Information
Each instrument records data of one type—object allocations, processor load, user events, and so on—on a sep-
arate lane, or data track. When you start a test run, Instruments initializes each lane and begins to fill it with
statistics collected from the target. Instruments remembers the results of each test run, and you can review each
recording while Instruments is paused.
Many instruments include filters, and you can use them to include or exclude certain event sub-types. For ex-
ample, when monitoring object and memory allocations, you can exclude all low-level malloc events to sim-
plify the display and make it easier to monitor object-level events of interest.
In addition to the time line view, most instruments display various statistics as they're collected. Statistics may
appear as tables, charts, lists, or other summaries.
NOTE
Instruments is huge and complex, almost as complex as Xcode. A detailed breakdown of every element would fill
this topic. Most features can be understood with educated guesswork and experimentation. This chapter doesn't
list every feature, but it does outline how you can get started with Instruments so you can begin to explore it for
yourself and start working with the tools that you're most likely to find useful.
Exploring the Instruments UI
Figure 16.2 shows a more typical working view of the Instruments UI, this time showing the Allocations instru-
ments, which monitors objects in memory. The design follows the standard OS X guidelines, with a selection
area at the top left, an active area in the middle, and a view at the right that can display supporting information.
The active area is split into a time line view at the top and a detail pane the bottom. A toolbar at the top of the
window controls the main application features.
The selection area is called the instruments pane and includes a list of all instruments used in a trace. Each in-
strument has a reveal triangle that shows the results of previous runs and an information icon that reveals extra
options for fine-tuning a recording.
The time line view is called the track pane. You can use a slider at the bottom of the instruments pane to ex-
pand the scale of the track pane.
The detail pane fills the bottom of the display. It includes a selection area at the left that can fine-tune and filter
the information that's displayed and a display pane in the bottom middle that displays the information that has
been selected.
The extended detail pane at the right shows optional further detail that supports the information in the detail
pane. In the figure, the extended detail pane shows a stack trace.
FIGURE 16.2
Looking in more detail at the Allocations instrument
Search WWH ::




Custom Search