Visual Studio* IDE: Choose Project and Build Application

Before you start analyzing hardware issues affecting the performance of your application, do the following:

  1. Get software tools.

  2. Choose a project.

  3. Configure the Microsoft* symbol server.

  4. Verify optimal compiler/linker options.

  5. Build the target in the release mode.

Note

  • The steps below are provided for Microsoft Visual Studio* 2010. Steps for other versions of Visual Studio IDE or for the standalone version of the Intel® VTune™ Amplifier may slightly differ.
  • Steps provided by this tutorial are generic and applicable to any application. You may choose to follow the proposed workflow using your own application.

Get Software Tools

You need the following tools to try tutorial steps yourself using the matrix sample application:

  • VTune Amplifier, including sample applications

  • zip file extraction utility

  • Supported compiler (see Release Notes for more information). Intel C++ compiler is recommended.

Acquire Intel VTune Amplifier

If you do not already have access to the VTune Amplifier, you can download an evaluation copy from http://software.intel.com/en-us/articles/intel-software-evaluation-center/.

Install and Set Up VTune Amplifier Sample Applications

Note

This document focuses on using the VTune™ Amplifier in the Intel® Parallel Studio XE. You may see minor differences if you installed a different Intel Studio. For more information on product capabilities in your installed Intel Studio, see the studio-specific supplemental documentation in <install-dir>/<Intel_studio>/documentation/.

  1. Copy the matrix_vtune_amp_xe.zip file from the <install-dir>\samples\<locale>\C++\ directory to a writable directory or share on your system. The default installation path is C:\Program Files\Intel\VTune Amplifier XE 2013\ (on certain systems, instead of Program Files, the directory name is Program Files (x86)).

  2. Extract the sample from the .zip file.

Note

  • Samples are non-deterministic. Your screens may vary from the screen captures shown throughout this tutorial.

  • Samples are designed only to illustrate the VTune Amplifier features; they do not represent best practices for creating code.

Choose a Project

Choose a project with the analysis target in the Visual Studio IDE as follows:

  1. From the Visual Studio menu, select File > Open > Project/Solution....

    The Open Project dialog box opens.

  2. In the Open Project dialog box, browse to the location where you extracted the matrix_vtune_amp_xe.zip file and select the matrix.sln file.

    The solution is added to Visual Studio and shows up in the Solution Explorer. VTune Amplifier automatically inherits Visual Studio settings and uses the currently opened project as a target project for performance analysis.

When you choose a project in Visual Studio IDE, the VTune Amplifier automatically creates the config.amplxeproj project file and sets the matrix application as an analysis target in the project properties.

Configure the Microsoft* Symbol Server

Configure the Visual Studio environment to download the debug information for system libraries so that the VTune Amplifier can properly identify system functions and classify/attribute functions.

  1. Go to Tools > Options....

    The Options dialog box opens.

  2. From the left pane, select Debugging > Symbols.

  3. In the Symbol file (.pdb) locations field, click the button and specify the following address: http://msdl.microsoft.com/download/symbols.

  4. Make sure the added address is checked.

  5. In the Cache symbols in this directory field, specify a directory where the downloaded symbol files will be stored.

  6. Click Ok.

Verify Optimal Compiler/Linker Options

Configure Visual Studio project properties to generate the debug information for your application so that the VTune Amplifier can open the source code.

  1. Select the matrix project and go to Project > Properties.

  2. From the matrix Property Pages dialog box, select Configuration Properties > General and make sure the selected Configuration (top of the dialog) is Active(Release).

  3. From the matrix Property Pages dialog box, select C/C++ > General pane and specify the Debug Information Format as Program Database (/Zi).

  4. From the matrix Property Pages dialog box, select Linker > Debugging and set the Generate Debug Info option to Yes (/DEBUG).

  5. Click OK.

Build the Target in the Release Mode

Build the target in the Release mode with full optimizations, which is recommended for performance analysis.

  1. Go to the Build > Configuration Manager... dialog box and select the Release mode for your target project.

  2. From the Visual Studio menu, select Build > Build matrix.

    The matrix.exe application is built.

Key Terms

Target

Next Step

Run General Exploration Analysis

Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804


Supplemental documentation specific to a particular Intel Studio may be available at <install-dir>\<studio>\documentation\ .

Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.