Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

Wrong hotspots results on Alderlake

cwasser
Beginner
1,901 Views

Description

Since running the Hotpots Hardware Event-Based Sampling analysis on Alderlake works now for VTune >= 2022.3 without freezing and blue screening my entire system, I wanted to profile some applications using this analysis method on my Alderlake i7-12700k and Windows 11 (OS Build 22621.755).

Analysing the matrix example seems to work fine and does yield some reasonable results.

When profiling CMake however, I get really strange analysis results, when compared to the same analysis done on a Coffee Lake i7-9850H.


Hotspots Summary on Alderlake i7-12700k:

(notice the Elapsed Time of 22.749s and the CPU Time of 0.145s)

cwasser_0-1667656951050.png

Hotspots Summary on Coffee Lake i7-9850H:

(Here the CPU Time gets correctly reported)

 

cwasser_2-1667659882680.png

Reproduction

Open a "x64 Native Tools Command Prompt for VS 2022" as Administrator and execute the following commands:

# Ensure you have CMake and Ninja installed
# the easiest way is by running:
pip install cmake ninja
# Clone the CMake repository:
git clone https://gitlab.kitware.com/cmake/cmake.git
# Enter the cmake directory:
cd cmake
# Build CMake which we want to profile with VTune:
cmake -G Ninja -B build-msvc-release -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build-msvc-release
# Profile the CMake configuration step:
"C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64\vtune" -collect hotspots -knob sampling-mode=hw -knob enable-stack-collection=true -- build-msvc-release\bin\cmake.exe -B build-perf -DCMAKE_BUILD_TYPE=Debug

 

Labels (1)
0 Kudos
12 Replies
VaradJ_Intel
Moderator
1,842 Views

Hi,


Good day to you.                                      


Thanks for posting in Intel Communities.


We are sorry that the Intel VTune Profiler is causing issues with your workflow.


We are working to reproduce your issue. We would soon get back to you with an update.


Thank You.


0 Kudos
VaradJ_Intel
Moderator
1,807 Views

Hi,


Good day to you.


We are trying to reproduce the issue which you are facing.


Please can you send the results of both the processors without installing ninja.


You just have to run the reproducer which you shared without installing ninja and send us the screenshots.


Thank You!


0 Kudos
cwasser
Beginner
1,787 Views

Hello Varad,

 

to be completely honest, I don't really know what you're asking here (sorry).

Is it that you don't want to install Ninja?

If so, you can just use MSBuild as your CMake Generator like this:

# Clone the CMake repository:
git clone https://gitlab.kitware.com/cmake/cmake.git
# Enter the cmake directory:
cd cmake
# Build CMake which we want to profile with VTune:
cmake -B build-msvc-release -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build-msvc-release
# Profile the CMake configuration step:
"C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64\vtune" -collect hotspots -knob sampling-mode=hw -knob enable-stack-collection=true -- build-msvc-release\bin\cmake.exe -B build-perf -DCMAKE_BUILD_TYPE=Debug

(Just don't specify a Generator with -G, the default is MSBuild)
The VTune Hotspots analysis results are obviously identical regardless of whether you use Ninja or MSBuild for building the software, that gets benchmarked, the screenshots are therefore also the same.

0 Kudos
cwasser
Beginner
1,690 Views

Hi @VaradJ_Intel,
is there something I can do to help you reproduce and fix this issue?

I profiled some other applications in the meantime and I see the same issue when profiling CPythons regression tests.
Reproduction is even easier, than the CMake one:

# Make sure to run this in an Administrator cmd window and verify that the VTune path is correct
git clone https://github.com/python/cpython.git
cd .\cpython\PCbuild
.\build.bat
"C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64\vtune" -collect hotspots -knob sampling-mode=hw -knob enable-stack-collection=true --app-working-dir=%cd% -- cmd.exe /C .\rt.bat -q

Which yields the same strange CPU Time that doesn't correlate with the Elapsed Time at all and is clearly wrong:

cwasser_0-1670530528690.png

0 Kudos
VaradJ_Intel
Moderator
1,495 Views

Hi,

Good day to you.

Thank You for providing us with alternate reproducer.

 

We tried reproducing your issue on a Cometlake machine.

I am attaching a screen shot of the result below

 

VaradJ_Intel_0-1671520895421.png

 

 

We are still trying to reproduce your issue on Alderlake machine.

 

We will get back to you with an update soon.

 

Thank You!

 

0 Kudos
VaradJ_Intel
Moderator
1,339 Views

Hi,

 

Good day to you.

 

Sorry for the delay.

 

Thanks for reporting this issue. We have informed the development team about it.

 

Thank You!

 

Regards,

Varad

 

cwasser
Beginner
1,126 Views

Hi @VaradJ_Intel,

 

are there any updates on this from the development team?

 

Thank you very much in advance

0 Kudos
VaradJ_Intel
Moderator
1,065 Views

Hi,


Good day to you.


Our internal team is working on the issue, currently there are no updates yet.


Meanwhile, please can you let us know if you are facing the same issue on the latest version of Vtune?


Thank You!


Regards,

Varad


0 Kudos
VaradJ_Intel
Moderator
1,033 Views

Hi @cwasser ,

 

Good day to you.

 

Please can you give us an update? Did you tried running the application using latest version of VTune?

 

Thank You!

 

Regards,

Varad

 

0 Kudos
cwasser
Beginner
973 Views

Hi @VaradJ_Intel ,

 

I've retested with VTune 2023.2. For profiling the CPython Interpreter, I observe the same wrong behavior on my Alderlake i7 12700k:

cwasser_0-1695240886316.png

When profiling CMake using VTune 2023.2 it freezes my entire PC...

0 Kudos
Hyun-Hwahn
Employee
262 Views

[CPython]

HyunHwahn_0-1710285379727.png

 

[CMake]

HyunHwahn_1-1710285395879.png

 

I still could not reproduce the issue from both CPython and CMake.

I guess CPython/CMake was probably aborted by such an error at the beginning in your run.

Please provide full log from vtune.exe run in the cmd terminal.

0 Kudos
VaradJ_Intel
Moderator
920 Views

Hi


Good day to you!


Thank you for sending us your observations with the latest version of VTune. We have informed the development team about it.


Thank You!


Regards

Varad


0 Kudos
Reply