1

Same program, same environment, When I use User-Mode Sampling, I got this result with callstack info enter image description here But when I use H/W Event-Based Sampling, I got the result like this enter image description here

Vtune Binary/Symbol Search setting is same in both mode

Is defualt H/W Event-Based Sampling do not collect callstack? Is there some config I can set to enable callstack collection?

My analysis configuration:

enter image description here

vtune-self-checker.bat check reuslt report is ok:

enter image description here

1 Answers1

0

By default only user-mode sampling collects stacks. If you are trying out in H/W event based sampling, you have to explicitly check that option. Please confirm that you have enabled the collect stack option.

For Linux* targets, make sure your kernel is configured to support event-based stack sampling collection. https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-analysis-target/linux-targets/build-install-sampling-drivers-for-linux-targets.html

Configure the event-based sampling collector to analyze call stacks for your functions and identify performance, parallelism and power consumption issues.

To Configure Stack Collection

  1. Click the Configure Analysis button on the VTune Profiler toolbar. The Configure Analysis window opens.
  2. Specify your analysis system in the WHERE pane and your analysis target in the WHAT pane.
  3. In the HOW pane, choose the required event-based sampling analysis type. Typically, you are recommended to start with the Hotspots analysis in the hardware event-based sampling mode.
  4. Configure collection options, if required. For call stack analysis, consider enabling the Collect stacks option.
  5. Click the Start button at the bottom to run the selected analysis type. VTune Profiler collects hardware event-based sampling data along with the information on execution paths. You may see the collected results in the Hardware Events viewpoint providing performance, parallelism and power consumption data on detected call paths.

please refer the below link to get an idea on Hardware Event-based Sampling Collection with Stacks. https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/analyze-performance/hw-event-based-sampling-collection/hw-event-based-sampling-collection-with-stacks.html

Also, You can try to run vtune self checker script which is available in vtune installed directory, to validate whether the appropriate drivers are installed and system is set up properly to collect performance data. It is available as vtune-self-checker.sh script in /bin64.

Rahila T - Intel
  • 832
  • 4
  • 11
  • Thank you for your answer, I have enable Call Stack option, but I still gpt result without CallStack. And I have added the HOW panel, vtune-self-checker screenshot in the qusestion description. – charlesJKing Jan 30 '23 at 08:55
  • And here's the strangest thing, When I change my program buliding mode from retail to release in VS2022, I get reslut wtih full call stack. – charlesJKing Jan 30 '23 at 09:07