Before using the VTune(TM) Performance Analyzer API, make sure to prepare your system as follows:
Include VtuneApi.h file in your application using C/C++ language #include directive. To make sure that the compiler finds this file, add the following directory into the list of compiler include directories:
For
the VTune analyzer on IA-32 or Itanium(R)-based systems:
<install-dir>/analyzer/include
For
the VTune analyzer on Intel(R) EM64T systems running 64-bit operating
systems:
<install-dir>/rdc/analyzer/include
Link your program with libVtuneApi.so library by adding the -lVtuneApi option to the compiler/linker command line. To make sure that the compiler/linker finds this library, add the following directory into the list of compiler/linker library directories:
For
the VTune analyzer on IA-32 or Itanium-based systems:
<install-dir>/analyzer/bin
For the VTune analyzer on Intel EM64T systems
running 64-bit operating systems:
<install-dir>/rdc/analyzer/bin
Command-line examples:
For IA-32 or Itanium-based systems:
icc –I opt/intel/vtune/analyzer/include –L opt/intel/vtune/analyzer/bin –lVtuneApi my_program.c
For Intel EM64T system running 64-bit systems:
icc –I opt/intel/vtune/analyzer/rdc/include –L opt/intel/vtune/rdc/analyzer/bin –lVtuneApi my_program.c
Adjust the environment with the following command:
For IA-32 or Itanium-based
systems:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install-dir>/analyzer/bin
For Intel EM64T systems running 64-bit operating
systems:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install-dir>/rdc/analyzer/bin
Adjust the environment with the following command:
For IA-32 systems:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install-dir>/gcc-3.2/lib32:<install-dir>/analyzer/bin:<install-dir>/shared/bin
For Itanium-based systems:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install-dir>/gcc-3.4/lib64:<install-dir>/analyzer/bin:<install-dir>/shared/bin
For Intel EM64T systems running 64-bit operating
systems:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install-dir>/gcc-3.2/libem64t:<install-dir>/rdc/analyzer/bin:<install-dir>/rdc/shared/bin