Guides and Sample Code


Instruments User Guide

Map Data to Source Code

Instruments requires accurate information about your project to provide the best results. You get the most complete information if the system can see all symbols associated with your project. When addresses, rather than symbols, are displayed in trace documents generated by the Instruments analysis tool, you can manually provide the missing information. The mapping of addresses to their symbols is contained in a dSYM file. Typically, Instruments finds dSYM files automatically, based on the locations that Spotlight indexes and the paths you specify in Instruments preferences. However, you can point Instruments in the right direction when it can’t automatically find a dSYM. Once you do, Instruments can map addresses to their associated symbols and line number information.

To locate the dSYM path for an executable or framework
  1. Choose File > Symbols.

    image: ../Art/instruments_file_menu_symbols_menuitem_2x.png

    This command appears only after you run a trace or load a previously saved trace.

  2. Select the executable (binary) or framework that is missing symbols.

    image: ../Art/instruments_symbols_dialog_binaries_2x.png
  3. Click the Locate button.

    image: ../Art/instruments_symbols_dialog_locatedysmpath_button_2x.png
  4. In the dialog that appears, select your symbol file or the folder that contains it.

  5. Click Open.

To correctly display symbols in trace documents, Instruments needs access to the specific symbol files that were generated when the executable you are testing was built. Therefore, you may need to manually locate a dSYM file when you build on one computer and test performance on another.

The filter bar in the Symbols dialog lets you filter by executable and incomplete binaries and frameworks. You can also search for a specific binary or framework by entering text in the search field.