Your source files contain data that Intel® VTune™ Amplifier uses when performing collections, finalizing results, generating reports, and similar actions. For proper module resolution, use the search-dir action-option to specify directories that should be searched for binary and symbol files and source-search-dir option for searching source files.
If the amplxe-cl tool is not provided with the information it needs to find all the necessary files, the results may be skewed or the finalization process may fail altogether.
When you run a collect action, amplxe-cl performs an analysis and collects data. Unless finalization is suppressed, finalization also occurs.
The finalization process writes collected data to a database, resolves symbolic information, and pre-computes data to make further analysis more efficient and responsive. Finalization can only succeed if it knows which directories to search.
During finalization, the result directory is set as the default search directory to make it easier to display the result in the GUI or generate a report from the result. When a report is generated, the report action requires the same modules that were used during data collection.
When generating a report from results that were imported from another system, use the search-dir and source-search-dir action-options to specify the search directories for system modules. When the VTune Amplifier searches for symbol/source data, the specified directories have a higher priority than absolute local paths.
To specify the search directory for symbol/binary files used by your target, run the amplxe-cl command using the
search-dir option as follows:
$ amplxe-cl -report <report_type> -search-dir <search_dir> -result-dir <result_dir>
To enable the source code view in the command line report, specify the search directory for source files using the
source-search-dir option as follows:
$ amplxe-cl -report <report_type> -source-search-dir <search_dir> -result-dir <result_dir>
<search_dir>is the search directory to add
<result_dir>is the result directory
<report_type>is the type of report to display
This command generates a callstacks report on the r001hs hotspots result, searching for symbol files in the
C:\Import\system_modules high-priority search directory, and sends the report to stdout.
-R is the short form of the -report action, and
-r is the short form of the result-dir action-option.
$ amplxe-cl -R callstacks -search-dir C:\Import\system_modules -r C:\Import\r001hs
When your source files are in multiple directories, use the search-dir option multiple times so that all the necessary directories are searched.
$ amplxe-cl -collect advanced-hotspots -search-dir
This command opens the source view for the
foo function annotated with the Hotspots analysis metrics data collected for the
r001hs result. It uses the
G:\my_sources directory to search for source files.
$ amplxe-cl -R hotspots -source-object function=foo -r C:\my_project\r001hs -source-search-dir