Specify Search Directories from Command Line
Your binary and symbol files contain data that VTune Profiler uses when performing collections, finalizing results, generating reports, and similar actions. For proper module resolution, use the search-dir action-option to specify directories on the host that should be searched for binary and symbol files and source-search-dir option for searching source files.
If the vtune 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.
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 VTune Profiler 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 vtune command using the search-dir option as follows:
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:
<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 on a Windows* system, 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.
vtune -R callstacks -search-dir C:\Import\system_modules -r C:\Import\r001hs
This command generates a callstacks report on the r001hs hotspots result on a Linux* system, searching for symbol files in the home/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.
vtune -R callstacks -search-dir /home/system_modules -r /home/import/r001hs
When your binary/symbol files are in multiple directories, use the search-dir option multiple times so that all the necessary directories are searched.
vtune -collect hotspots -knob sampling-mode=hw -search-dir /home/my_system_modules -search-dir /home/other_system_modules -- /home/test/myApplication
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 /home/my_sources directory to search for source files.
vtune -R hotspots -source-object function=foo -r /home/my_project/r001hs -source-search-dir /home/my_sources