User Guide

Intel® VTune™ Profiler User Guide

ID 766319
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Save and Format Command Line Reports

By default, a report is written to stdout in text format, but vtune provides several options to control the report format:

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 <report_type> -result-dir <dir> -report-output <path/filename.ext>

where:

  • <report_name> is the type of report to create.

  • <dir> is the location of the result directory.

  • <path/filename.ext> is the PATH, filename and file extension of the report file to be created.

NOTE:

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 
    
  • Generate a vtune report with UNC events. Group results by package for this purpose.

    vtune -report hw-events -group-by package -r unc

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