Hotspots Analysis for CPU Usage Issues
- User-mode sampling, which incurs higher overhead but does not require sampling drivers for collection. Starting with Intel® VTune™ Amplifier 2019, this mode replaced the former Basic Hotspots analysis.
- Hardware event-based sampling, which provides minimum collection overhead but needs sampling drivers or Perf* to be installed. Starting with VTune Amplifier 2019, this mode replaced the former Advanced Hotspots analysis.
How It Works: User-Mode Sampling
How It Works: Hardware Event-Based Sampling
- If you cannot run the hardware event-based sampling with stacks, disable theCollect stacksoption and run the collection. To correlate the obtained hardware event-based sampling data with stacks, run a separate Hotspots analysis in the User-Mode Sampling mode.
Configure and Run Analysis
- Click the (standalone GUI)/ (Visual Studio IDE)Configure Analysisbutton on theVTunewelcome screen.Profiler
- In theHOWpane, select theHotspotsanalysis from the Analysis Tree.
- Configure the following options:User-Mode SamplingmodeSelect to enable the user-mode sampling and tracing collection for hotspots and call stack analysis (formerly known as Basic Hotspots). This collection mode uses a fixed sampling interval of 10ms. If you need to change the interval, click theCopybutton and create a custom analysis configuration.Hardware Event-Based SamplingmodeSelect to enable hardware event-based sampling collection for hotspots analysis (formerly known as Advanced Hotspots).You can configure the following options for this collection mode:
When changing collection options, pay attention to theOverheaddiagram on the right. It dynamically changes to reflect the collection overhead incurred by the selected options.Show additional performance insightscheck boxGet additional performance insights, such as vectorization, and learn next steps. This option collects additional CPU events, which may enable the multiplexing mode.The option is enabled by default.DetailsbuttonExpand/collapse a section listing the default non-editable settings used for this analysis type. If you want to modify or enable additional settings for the analysis, you need to create a custom configuration by copying an existing predefined configuration.VTunecreates an editable copy of this analysis type configuration.Profiler
- CPU sampling interval, msto specify an interval (in milliseconds) between CPU samples. Possible values for thehardware event-based samplingmode are0.01-1000.1 msis used by default.
- Collect stacksto enable advanced collection of call stacks and thread context switches.
- Click the Start button to run the analysis.
- Modify your code to remove bottlenecks and improve the performance of your application.