Intel® VTune™ Performance Analyzer for Linux* - Viewing Compiler Optimization Report with VTune™ Performance Analyzer

Contents:


Overview

The VTune™ Performance Analyzer's Optimization Report (Opt Report) feature enables viewing the Intel® Compiler optimization report and performance bottlenecks in the graphical interface of the VTune analyzer. Use the VTune analyzer to shrink large compiler optimization reports to just the particular code section related to your hotspots.


Intel® Compiler Optimization Options

To generate the optimization report for the VTune analyzer, use the -opt-report option of the Intel® C++ or Intel® Fortran Compiler 9.1 (or higher).

When generating the optimization report for the VTune analyzer, specify a minimum of two compiler options: -opt-report-file, which specifies the name of optimization report file, and -opt-report-phase, which specifies the optimizer phase. If you don't specify the optimizer phase, the optimization report will contain information for all optimizers and might be too large to be useful.

You can add additional compiler options to make your report more specific. For example, you may enter a compiler command line similar to the following:

icc -g -O2 -opt-report-phase pgo -opt-report-file vtunedemo.rpt -opt-report-level max vtunedemo.c

This command-line example compiles vtunedemo.c source file on the Linux* operating system running on an Itanium®-based system where:

  • -g - generates debug information;
  • -O2 - specifies the code optimization level;
  • -opt-report-phase pgo - specifies the compilation phase name for which reports are generated, profile-guided optimization in this example;
  • -opt-report-file vtunedemo.rpt - specifies the filename for the optimization report;
  • -opt-report-level max - specifies the verbosity level of the output;

For complete details on options required to generate optimization reports, search for "optimizer report" in the Intel Compiler documentation.


Enabling the Opt Report Feature in the VTune™ Performance Analyzer

By default, the Opt Report feature in the VTune analyzer 8.0 is disabled. To enable it, set the VT_ENABLE_OPTIMIZATION_REPORT environment variable (for example, using the bash shell):

export VT_ENABLE_OPTIMIZATION_REPORT=ON


Viewing Compiler Optimization Report in the VTune™ Performance Analyzer

The VTune analyzer enables you to profile your application and identify performance issues by successively filtering the data from one view to another and exploring the next level of detail. When you identify critical functions in your application and open the source view, do the following:

  1. In the source view, identify and select the source line(s) that caused the performance issue.
  2. Click Optimization Report in the source view toolbar to view the optimization report.
    The File Open dialog box opens.
  3. In the File Open dialog box, locate the optimization report file created by the compiler.
    The Opt Report view opens.

The Opt Report view displays the compiler optimization report parsed according to the source code file name and selected line number(s).

Notes:
  • By default, the Opt Report window opens at the bottom of the VTune analyzer window. You can dock the Opt Report window to any part of the Eclipse* workbench or just leave the window undocked.
  • To view the optimization report for different source lines, select the lines in the source view and click Optimization Report again. The Opt Report view will be updated.
  • The optimization report file is an associated file to which all source lines are referenced. To change this association, click Open Opt Report File in the Opt Report window toolbar and select another file.

Troubleshooting

The following table describes known problems and questions you may encounter when viewing the optimization report, and suggests solutions.

Symptom Cause and Possible Solution
The Opt Report window is empty. Cause: The selected source code lines are not referenced in the current optimization report file.
The Opt Report window is empty and the toolbar is missing. Cause: You didn't close the Opt Report window in the previous VTune analyzer session.
Solution:
Close the Opt Report window and then click Optimization Report Optimization Report in the source view toolbar to re-open the report.
The Opt Report window is overloaded with unnecessary information. Cause: The optimization report contains information relevant to a whole source file without any reference to line numbers.
Solution:
Consider optimizing the compilation stage. For example, don't use the -opt-report-phase all option during compilation but choose the phase of interest.

Known Limitations

There are some limitations of using the Opt Report feature in the VTune analyzer 8.0:

  • The full-scale graphical user interface of the VTune analyzer 8.0 is enabled on IA-32 platforms only. To view the graphical optimization report generated for the Itanium®-based systems, either use the remote data collection or import the collected data to the IA-32 system.
  • The Opt Report feature is not supported by the VTune analyzer standalone graphical viewers.

Operating System:

Linux*
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.