The Intel® Parallel Studio software contains Intel® Parallel Amplifier. This tool runs as an add-in to Microsoft* Visual Studio*. However, sometimes we need to automate our measurement work (e.g., via a script), and not run the IDE to avoid (reduce) impact on the system.
Intel® Parallel Amplifier Update 1 has realized this feature.
After installing the product, open a Command Prompt window and run the following command:
> C:\Program Files\Intel\Parallel Studio\Amplifier\ampl-vars.bat
Now, the environment for command line has been configured and you can use the ampl-cl command.
You can run
ampl-cl -help to get familiar with the syntax of command.
ampl-cl <-action-option [-modifier-option]
Action-option contains：collect, collect-list, report, report-list, finalize, help, version
Modifier-option contains： cumulative-threshold-percent, resume-after, result-dir, search-dir, start-pause, user-data-dir, verbose
- List all data collectors
> ampl-cl -collect-list
- run target application, collect hot functions, save results in default sub-directory
> ampl-cl -collect hotspots matrix.exe
- run target application, collect hot functions, save result in specified sub-directory
> ampl-cl -collect concurrency -result-dir r009cc matrix.exe
- run target application, delay 3000 million seconds (e.g., 3 sec) to collect times for all locks and waits, save results in default sub-directory
> ampl-cl -collect lockswaits -start-paused -resume-after=3000 matrix.exe
- List all report types
> ampl-cl -report-list
- Report a result for recent running
> ampl-cl -report perf
- Report a result based on data from specified sub-directory, use comma as a delimiter
> ampl-cl -report perf-detail -csv-delimiter="," -result-dir r012hs
- Report enumerates modules that consumes 80% of total CPU time
> ampl-cl -report perf -result-dir r012cc -cumulative-threshold-percent=80
- Compare results for two sessions
> ampl-cl -report summary -result-dir r012cc -result-dir r009cc