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

Intel VTune and managed code on Windows Server 2019

stevenh1
Novice
2,411 Views

Folks,

I've used Intel VTune to profile a running process by attaching to its PID.  This works great for C++ code and processes, really great.  I would like to be able to do the same for C# and managed code, but when I try to attach to the process, it says it can only profile the native portion, not the managed portion of the process.  It just says there was an internal error and suggests I contact support.  Can anyone from Intel comment?  Or anyone who's gotten this to work?

The most recent version I tried was 2023.1.

Steve

 

 

Labels (1)
0 Kudos
11 Replies
DiyaN_Intel
Moderator
2,379 Views

Hi, 


Thank you for posting in Intel Communities.

Could you please share the following details- 


1. Sample reproducer code.


2. Exact steps and the commands used.


3. OS details.


4. Processor details.


Thanks and Regards,

Diya



0 Kudos
stevenh1
Novice
2,368 Views

Diya,

Not sure I can come up with a small application that shows the same behavior -- I'm not actually a C# programmer, I'm just trying to get some information on a performance problem we're having.  I may try to make a simple C# program and see if I Can profile it, but that's a longer-term prospect.  If Intel is interested, maybe someone can contact me about adding switches for vtune or whatnot to get more debug information from your application that would tell us what's going on.  I've poked around the user appdata directories, but nothing stands out in your logs -- it seems minimal logging is done.

I've tried with intel vtune in oneapi 2023.0 and 2023.1, started via the app / start button (lower left).  Same behavior.  Basically I'm trying to attach to an existing C# program via attach to process and its process ID, which is started up via HPC.  I'm trying a threading analysis, with either Auto or Managed as the type.  It's not a simple program, it does some microsoft COM things as well as starting other C++ processes, and represents a large body of code, which I can't share.

The OS is Window Server 2019, 10.0.17763.  It's in a VM, but the reported intel CPU type is 

Xeon Platinum 8259CL @ 2.50 GHz, 4 cores. (and there are 4 of these on the box).

It's via Vmware, Phoenix LTD 6.00 bios, 11/12/2020, baseboard indel 440BX desktop reference.

 

 

0 Kudos
DiyaN_Intel
Moderator
2,282 Views

Hi,


Thank you for proving the details.

We are working on this issue internally and will get back to you with an update soon.


Thanks and regards,

Diya


0 Kudos
DiyaN_Intel
Moderator
2,239 Views

Hi,


Can you please share which version of .NET you are using which will help us to debug further in the case?


Thanks and regards,

Diya


0 Kudos
stevenh1
Novice
2,221 Views

.Net 4.8 is what the code is apparently being compiled for.  I don't know a lot more than that, 

If you want me to report the value of various tests on the system / versions of installed libraries, etc., 

let me know what you want me to test / query / type / etc.

 

Steve

 

0 Kudos
DiyaN_Intel
Moderator
2,195 Views

Hi,

 

Thanks for the information.

Can you please cross-check once and share the .NET version again by following the below steps:

 

1) Run the command "regedit" from the console to open Registry Editor

2) Look for HKEY_LOCAL_MACHINE\Microsoft\NET Framework Setup\NDP

3) All installed .NET Framework versions are listed under NDP drop-down list

 

Example:

Screenshot from my workstation (I have .Net v3.5 SP1 installed):

DiyaN_Intel_0-1681975882818.jpeg

 

For more information please check this document: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed 

 

Thanks and Regards,

Diya

 

 

 

0 Kudos
stevenh1
Novice
2,169 Views

Using the method described here:

 

Determine which .NET Framework versions are installed - .NET Framework | Microsoft Learn

 

The Release version number under the v4/Full entry is 528049, which corresponds to .Net release 4.8 .

 

Steve

 

0 Kudos
DiyaN_Intel
Moderator
2,166 Views

Hi,


Thanks for the information. We are working on this internally and will get back to you with an update soon.


Regards,

Diya


0 Kudos
DiyaN_Intel
Moderator
1,946 Views

Hi, 

 

Sorry for the late reply.

We were able to reproduce the issue from our end.

 

Could you please try to give the below command and try it from your end if it works for you or not?

 

1. Please go to the Vtune installation directory and give the following command :

 

{vtune_installation_directory}\bin64\regsvr32 amplxe_samplingmrte_clrprof_1.0.dll

 

 for eg : 

 

C:\Program Files (x86)\Intel\oneAPI\vtune\latest\bin64\regsvr32 amplxe_samplingmrte_clrprof_1.0.dll

 

It will show that the .dll file succeeded

DiyaN_Intel_0-1685509990888.png

2. Then re-run the analysis.

 

If you face any issues please connect back to us.

If this resolves your issue, make sure to accept this as a solution. 

This would help others with similar issues. Thank you!

 

Thanks and Regards, 

Diya

 

0 Kudos
DiyaN_Intel
Moderator
1,922 Views

Hi, 


Good day to you.

We have not heard back from you.

Is your issue resolved with the above solution?

If this resolves your issue, make sure to accept this as a solution. 

This would help others with similar issues. Thank you!


Thanks and Regards, 

Diya



0 Kudos
DiyaN_Intel
Moderator
1,866 Views

Hi, 


Good day to you.

We have not heard back from you.

We assume that your issue is resolved with the solution provided. 

This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Regards, 

Diya


0 Kudos
Reply