User Guide

Intel® VTune™ Profiler User Guide

ID 766319
Date 11/07/2023
Public
Document Table of Contents

Manage Analysis Duration from Command Line

Manage analysis duration for best results on short-running targets, or to minimize collection overhead on longer-running targets.

Use the vtune command interface to minimize duration while optimizing the analysis process.

Use Default Duration

Intel® VTune™ Profiler provides predefined general analysis types to keep overhead to a reasonable level. The option reference topic for the collect action identifies analysis types that are recommended as starting points; and points out some more advanced analysis types that have higher overhead.

NOTE:

To view all the analysis types that are available for your processor, use the command line help:

vtune -help collect

Adjust Collection Duration to Application

The sampling interval determines how much data is collected. The default sampling interval is short, which is appropriate for targets that complete in 1 - 15 minutes.

If your target runs shorter or longer than this, use the target-duration-type action-option to set the appropriate duration type, which adjusts the sampling interval.

  • If the target takes less than 1 minute to run, specify veryshort.

  • If the target takes 15 minutes to 3 hours to run, specify medium.

  • If the target takes over 3 hours, specify long.

NOTE:

For hardware event-based analysis types, a multiplier applies to the configured Sample After value.

Example

Perform a Hotspots analysis in the user-mode sampling mode using a medium sampling interval that is appropriate for targets with a duration of 15 minutes to 3 hours.

vtune -collect hotspots -target-duration-type medium -- myApp

Manually Interrupt and Restart Analysis

To pause an analysis manually, open a new terminal and use the command action with the pause argument, being sure to specify the result directory. The target process continues to run, but data collection is paused.

vtune -command pause -result-dir results/r002hs

To resume analysis, use the command action with the resume argument.

vtune -command resume -r results/r002hs

To stop analysis altogether, use the command action with the stop argument. Once analysis is stopped, it cannot be resumed.

vtune -command stop -r results/r002hs

Configure Collection Duration

VTune Profiler offers other ways to limit the analysis process. To stop analysis at a specified time after initiating target execution, use the duration option.

vtune -collect <analysis_type> -duration=<value> -- <target>

where

  • <analysis_type> is the type of analysis to run

  • <value> is the duration in seconds

  • <target> is the target to analyze

NOTE:

To start the analysis in the paused mode or pause the collection during the analysis, refer to Pause Collection from the Command Line section.

Examples

Example 1: Ending analysis after specified time

Start a Hotspots analysis of myApplication and end analysis after 60 seconds.

vtune -collect hotspots -duration=60 -- /home/test/myApplication

Example 2: Running an unlimited duration analysis

Run an unlimited duration Hotspots analysis, which will run until you stop it.

vtune -collect hotspots -duration=unlimited -result-dir results/r002hs

See Also