インテル® VTune™ Amplifier 2018 ヘルプ
Comparing two results from the command line is a quick way to check for your application regressions. Use the following syntax to create the difference report for the specified analysis results:
$ amplxe-cl -report <report_name>-r <result1_path> -r <result2_path>
where
This example compares r001hs and r002hs Hotspots analysis results and displays CPU time difference for each function of the analyzed application. In the result for the optimized application (r002hs), a new main function is running for 0.010 seconds, while the Hotspot function algorithm_2 is optimized by 1.678 seconds.
$ amplxe-cl -report hotspots -r r001hs -r r002hs
Function Module Result 1:CPU Time Result 2:CPU Time Difference:CPU Time
algorithm_1 matrix.exe 1.225 1.222 0.003
algorithm_2 matrix.exe 3.280 1.602 1.678
main matrix.exe 0 0.010 -0.010
Function Module Result 1:CPU Time Result 2:CPU Time Difference:CPU Time
algorithm_1 matrix 1.225 1.222 0.003
algorithm_2 matrix 3.280 1.602 1.678
main matrix 0 0.010 -0.010
Use the amplxe-cl command to test your code for regressions on a daily basis:
Create a baseline.
Run the amplxe-cl tool to analyze your target using a particular analysis type. For example:
On Linux*
$ amplxe-cl -collect hotspots -- sample
On Windows*:
$ amplxe-cl -collect hotspots -- sample.exe
The command runs a Basic Hotspots analysis on the sample or sample.exe target and writes the result to the current working directory. A Summary report is written to stdout.
Generate a report to use as a baseline for further analysis. For example:
$ amplxe-cl -report hotspots -result-dir r001hs
This creates a Hotspots report that shows the CPU time for each function of the sample or sample.exe target.
Update your source code to optimize the target application.
Create and run the script that:
On Linux: Sets the path to the amplxe-cl installation folder
On Windows: Invokes sep-vars.cmd in the Intel® VTune™ Amplifier installation folder to set up the environment.
The default installation path for the VTune Amplifier is [Program Files]\IntelSWTools\VTune Amplifier <version> on Windows* and /opt/intel/vtune_amplifier_version on Linux*. For the Intel System Studio, the default <install_dir> of the VTune Amplifier is [Program Files]\IntelSWTools\system_studio_<version>\VTune Amplifier on Windows* and one of the following on Linux:
Starts the amplxe-cl command to collect performance data.
Runs the amplxe-cl command to compare the current result with the initial baseline result and displays the difference. For example:
$ amplxe-cl -R hotspots -r r001hs -r r002hs
This example compares CPU time for each function in results r001hs and r002hs and displays both results side-by-side with the calculated difference. The positive difference between the performance values indicates an improvement for result 2. The negative difference indicates a regression.
You can compare the results of the same analysis type or performance metrics only.
The test is passed if no regressions found.
Repeat steps 2-4 on a regular basis.