Profile-Guided Optimization Report (Preview)
Intel® VTune™
provides an option to generate a Profile-Guided Optimization (PGO) report for Intel® Compiler (Linux* only), Clang* compiler, and GCC* compiler. Using this information the compilers can provide a better performance optimization when compiling your code.
Profiler
This is a
PREVIEW FEATURE
. A preview feature may or may not appear in a future production release. It is available for your use in the hopes that you will provide feedback on its usefulness and help determine its future. Data collected with a preview feature is not guaranteed to be backward compatible with future releases.
To generate a PGO report, use the
-pgo-report.sh utility located, by default, in the
vtune
<install-dir>/bin64
.
Generate a PGO Report
Use the following
-pgo-report syntax to generate a report:
vtune
vtune
options
] -- app arg1 arg2...where
[
are the following:
options
]Option
| Description
|
---|---|
-r | --result < name > | Specify a result directory and PGO report name template. Default template is r@@@pgo .
|
-c | --compiler < compiler > | Specify a compiler for PGO output format. Supported values are the following:
Default value is
icc .
|
-h | --help | Show help.
|
Example:
vtune-pgo-report.sh -r r@@@pgo -c icc -- /home/sample/myapp
This command line generates a PGO report based on the hardware event-based sampling analysis for the Intel C++ compiler (
icc
). When the report is generated, the VTune
provides a message specifying the output file name and location on your system, for example:
Profiler
PGO report file was created: /home/foo/r000pgo_icc.pgo
.
Use the PGO Report with Your Compiler
Use the
*.pgo
file generated by the VTune
for the profile-guided optimization with your compiler by adding the following options during compilation:
Profiler
- -prof-use-sampling=<for thepgo-file>icccompiler
- -fprofile-sample-use=<for thepgo-file>clangcompiler
- -fauto-profile=<for thepgo-file>gcccompiler
For more details on the PGO support from the compiler side, explore the compiler documentation:
- https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Optimize-Options.html#Optimize-Options
- https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
Limitations
- Generating a PGO report for remote Linux applications is not supported.
- Generating a PGO report is supported for the Launch Application mode.Profile SystemandAttach to Processmodes are not supported.