Intel® VTune™ Profiler

User Guide

ID 766319
Date 12/20/2024
Public
Document Table of Contents

hotspots Command Line Analysis

Hotspots analysis helps understand application flow and identify sections of code that get a lot of execution time (hotspots). A large number of samples collected at a specific process, thread, or module can imply high processor utilization and potential performance bottlenecks. Some hotspots can be removed, while other hotspots are fundamental to the application functionality and cannot be removed.

Intel® VTune™ Profiler creates a list of functions in your application ordered by the amount of time spent in each function. It also can be configured to capture the call stacks for each of these functions so you can see how the hot functions are called.

Use the -knob option to specify a collection mode for the Hotspots analysis:

  • sampling-mode=sw - User-Mode Sampling (default) used for profiling:

    • Targets running longer than a few seconds
    • A single process or a process-tree
    • Python and Intel runtimes
  • sampling-mode=hw - Hardware Event-Based Sampling used for profiling:

    • Targets running less than a few seconds
    • All processes on a system, including the kernel

Syntax

vtune -collect hotspots -knob <knobName=knobValue> [--] <target>

Knobs: sampling-mode, enable-stack-collection, sampling-interval, enable-characterization-insights

NOTE:

For the most current information on available knobs (configuration options) for the Hotspots analysis, enter:

vtune -help collect hotspots

Example

This example shows how to run the Hotspots analysis in the user-mode sampling mode for a Linux* myApplication:

vtune -collect hotspots -knob sampling-mode=sw -- /home/test/myApplication

This example shows how to run the Hotspots analysis in the hardware event-based sampling mode for a Windows* myApplication:

vtune -collect hotspots -knob sampling-mode=hw -knob sampling-interval=1 -- C:\test\myApplication.exe

NOTE:

The hardware event-based sampling mode replaced the advanced-hotspots analysis starting with VTune Amplifier 2019.

What's Next

When the data collection is complete, do one of the following to view the result: