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

Result unmatch between User-Mode sampling and Hardware-event based sampling

Tianchen_Jerry_Wang
624 Views

Hi

 

I am profiling an application using HotSpot profiling and realized there is a giant unmatch between User-Mode sampling and Hardware-event sampling.  I do know that there might be some amount of inaccuracy in the sampling mode, but I did not expect it to be that big...

 

Note in the figure below. For func@0x1a7d04 shown in red, its CPU time is 0.9% in the User-Mode sampling mode, but 4%(being the highest) in the Hardward-event sampling mode. 

 

A similar thing happens on std::__cxx11::basic_string<char,std::char_traits>.........  shown in green. It shows 3%(being the highest) CPU time in User-Mode sampling, but 0% in hardware-event-based sampling. 

 

Right now I don't know which one is the true data..... We enable the "allow multiple run option", setting Hardware-event sampling frequency to 0.5ms  (I also tried 10ms, the same setting with User-Mode Sampling frequency, but this unmatch still exists).

 

P.S. The microarchitecture exploration result aligns with the hardware-event sampling Hotspot experiment...UserMode_Sampling.pngHardware_Sampling.png

 

0 Kudos
3 Replies
RemyaP_Intel
Employee
574 Views

Hi, 


Thank you for posting in Intel Communities. 


We tried to replicate the issue using the sample matrix.exe. But, as it's a simple program, the CPU time consumed is very less and the difference in user mode sampling and hardware event was not significant. 


To replicate your issue, could you please share with us a sample reproducer of your input?


Regards,

Remya Premdas 



0 Kudos
RemyaP_Intel
Employee
517 Views

Hi,


We haven't received any response from your end. Could you please share with us the requested details.


Regards,

Remya Premdas


0 Kudos
RemyaP_Intel
Employee
472 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Regards,

Remya Premdas


0 Kudos
Reply