Save and Format Command Line Reports
By default, a report is written to
tool provides several options to control the report format:
stdout
in text format, but the
vtune
Save a Report to a File
When generating a report from the command line, use the
report-output option to save this report in the specified format. By default, most types of reports are saved in text format, but you may also choose CSV. Whichever file type you choose, a number of options are available so you can format your report.
Here is the basic command syntax:
vtune
report_type
> -result-dir <dir
> -report-output <path/filename.ext
>where:
- <is the type of report to create.report_name>
- <is the location of the result directory.dir>
- <is the PATH, filename and file extension of the report file to be created.path/filename.ext>
To be sure the correct result is used, use the
result-dir option to specify the result directory. If not specified when generating a report, the report uses the highest numbered compatible result in the current working directory.
Examples:
Generate a Hotspots report from the
r001hs
result on Linux*, and save it to
/home/test/MyReport.txt
in text format.
vtune -report hotspots -result-dir r001hs -report-output /home/test/MyReport.txt
Generate a hotspots report in the CSV format from the most recent result and save it in the current Linux working directory. Use the
format option with the
csv
argument and the
csv-delimiter option to specify a delimiter, such as
comma
.
vtune -R hotspots -report-output MyReport.csv -format csv -csv-delimiter comma
Module,Process,CPU Time
worker3.so,main,10.735
worker1.so,main,5.525
worker2.so,main,3.612
worker5.so,main,3.103
worker4.so,main,1.679
main,main,0.064
Limit Line Width
To limit line width for readability, use the
report-width option and specify the maximum number of characters per line before wrapping occurs.
Example:
Output a Hotspots report from the most recent result as a text file with a maximum width of 60 characters per line.
vtune -report hotspots -report-width 60 -report-output MyHotspotsReport.txt