Community
cancel
Showing results for 
Search instead for 
Did you mean: 
anderson__erik
Beginner
105 Views

VTune 9 no longer system profiles .NET 3.5

Hi,

I have 2 floating licenses for VTune 9. Its been a couple of years since I had to ran it against .NET code.

In the past I had to follow the procedure outlined on
http://software.intel.com/en-us/blogs/2008/12/05/net-profiling-support-in-vtunetm-analyzer/

And set the 2 environment variables
Cor_Enable_Profiling = 1
COR_PROFILER = {91663010-0D1E-4ABD-8F0C-0B4B84CCA809}

And it would work. VTune would hook into the JIT processing and allow system level profiling of .NET code.

This no longer works (All time is reported under mscorwks not the JIT objects/source code). Last time I tried was a little over 1.5 years ago. We have updated from .NET 2.0 to 3.5 so not sure if that is part of the problem.

I have also downloaded the trial version of Intel VTune Amplifier XE 2011 but I cannot find a CLID anywhere in the new product that I can set the COR_PROFILER too.

I need to use the system level profiling feature because it is not possible for me to start up start up our product under VTune. Our product is enterprise level and has special security features such that only one other program can start it up.

I am fine if we need to purchase 2 new floating licenses for Intel VTune Amplifier XE 2011 but I need to make sure the system level profiling of .NET works fine. I believe the System Profiling feature of XE 2011 has been renamed to "LightWeight Hotspots". In VTune 9 it was called "Quick Performance Analysis" and click "No Application to Launch".

1) I cannot launch the .NET application with VTune
2) The .NET application is launched by a parent application.
3) It is possible for me to launch the parent application with VTune (C++ application) but I need to profile the child and all its .NET JIT classes.

Not sure why it is so hard to profile the .NET side. The C++ side works well when I map the binary DLL's to their PDB files.

I need that same feature to work, either with VTune 9 or the XE 2011.

Is there an article on how to profile .NET 3.5 with the VTune XE 2011?
0 Kudos
6 Replies
Rob5
New Contributor II
105 Views

Erik,

Based on the release notes for Intel VTune Performance Analyzer 9.0, the .NET 3.5 framework was not yet supported in this version. In this case, an option may be to attempt analysis with Intel VTune Performance Analyzer 9.1 Update 8 to see if this meets your needs. Version 9.1 introduced support for .NET 3.5 and up to .NET 4. Specific information about .NET support with VTune 9.1 Update 8 can be found in its release notes.
http://software.intel.com/sites/products/documentation/hpc/vtune/windows/release_notes.htm

You can obtain earlier versions of Intel VTune you may be entitled to from the Intel Registration Center (IRC). https://registrationcenter.intel.com. You can also obtain the evaluation which should provide access to the current version as well as earlier versions.

To obtain product versions, log into the IRC. The first page displayed is the My Intel Software Development Products which lists the products for licenses registered to your current evaluations. You can click on a link under the Download Latest Update. On the download page, you can download the product or obtain an earlier version. To obtain an earlier version, select a different Release and Update from the drop down selectors in the area titled Select other packages from the dropdown menu: Only releases and updates you are entitled to will be listed in the releases and updates dropdowns.

Intel VTune Amplifier XE 2011 has support for .NET including .NET 4.0 with some caveats. In this case we may need to know more about the application you are attempting to analyze. Is the application you are attempting to analyze a Windows service, web application, console app, or other type of .NET application?

Rob

anderson__erik
Beginner
105 Views

I have the latest version of VTune 9.1. The system level profiling, enabled via my first post, no longer works.

Whether that was the upgrade to .NET 3.5 or the upgrade of VTune to 9.1, regardless it does not work.

It is a .NET application (non-GUI, not a service).

1) We have a native C++ application that starts the .NET. It passes some ClassID, Named Pipe identifiers as arguments to the commandline to a virtual process/bootstrap.
2) The new Virtual process starts the .NET application passing arguments above.
3) The bootstrap process terminates leaving the .NET application running. This makes the .NET application a root application. It is NOT a child of the parent C++ application any longer.
4) .NET Application starts up, reads the command line arguments, establishes communications to the parent process.
5) .NET applciation's sole purpose in life is to load assemblies in a new AppDomain, read data from the Named Pipe, pass this data to the loaded .NET assembly, return the calculation to the host process. After the calculations are done the AppDomain is uloaded (and thus the .NET assembly is unloaded).
6) The .NET application does not terminate until it sees the C++ process terminate via the named pipe.

In short, the only way for me to profile the .NET Application is via the procedure documented under
http://software.intel.com/en-us/blogs/2008/12/05/net-profiling-support-in-vtunetm-analyzer/

I dont need a callgraph, I need the "Quick Performance Analysis->No Application to Launch"

CLR + VTune need to have the JIT files for all of this to work. Use to save the jit files under a "JITFiles" subdirectory of the VTune project.

Procedure was
1) Set system environment variable Cor_Enable_Profiling = 1
2) Set system environment variable COR_PROFILER = {91663010-0D1E-4ABD-8F0C-0B4B84CCA809}
3) Reboot PC to ensure all JIT caches were removed
4) Startup vtune
5) Start up parent process.
6) Walla. Worked like a charm.

This process no longer works.
Rob5
New Contributor II
105 Views

Erik,

The documentation related to earlier versions of VTune does not apply to Intel VTune Amplifier XE 2011. In Intel VTune Amplifier XE 2011 there are no special command switches or environment variables to set. The documentation for the JIT Profiling API was added to the Intel VTune Amplifier XE 2011 help files.

Information about the JIT Profiling API can be found these help files in the product or on-line at:

http://software.intel.com/sites/products/documentation/hpc/amplifierxe/en-us/win/ug_docs/index.htm

Open Help and click the Search option button. Enter JIT in the search field, then click the larger Search button. Several topics should appear. Select the JIT Profiling API topic.

Additionally, there is a JIT profiling sample (jitprofiling_vtune_amp_xe.zip) that comes with Intel VTune Amplifier XE 2011. This should be located under the Amplifier install directory example (C:\Program Files (x86)\Intel\VTune Amplifier XE 2011\samples\en). Make sure to compile and link against the headers and Libraries in VTune Amplifier XE 2011. The JIT profiling sample Microsoft* Visual Studio solution project properties shows the configurations needed to successfully compile / link.

Rob

Stephen_C_1
Beginner
105 Views

Has anyone found a solution to this problem.  I have tried the latest 2013 edition and am unable to profile the Managed portion of a .NET 3.5 application.  The Release Notes for 2011 and 2013 (all updates) indicate that .NET < 4.0 are all supported.  This does not appear to be the case. 

Any solutions would be well appreciated.

David_A_Intel1
Employee
105 Views

Hi Stephen:

Yes, it does work.  I've done it.  Question is, what exactly are you attempting?  Did you build with Debug info enabled?  What type of ".NET app" are you trying to profile?  Are you configuring VTune Amplifier XE to launch the app?

If you prefer not to publicly share your details, you may submit an issue at Intel® Premier Support for free, secure assistance.

Stephen_C_1
Beginner
105 Views

Found the problem.  Apparently the only way to profile the managed code portion of a .NET 3.5 application and drill down into the problem methods is to launch the application directly from vTune Amplifier XE.  Attempting to attach to a running .NET 3.5 application will not permit analyzing the managed code portion of the application in detail.  Everything will show up as "Unknown" from the managed code.

This creates a problem when trying to profile .NET service applications as they are normally designed to be launched by the Service Control Manager under Windows.  The .NET service application has to be designed to be startable outside of the Service Control Manager in order for it to launch properly under vTune Amplifer XE.

 

Reply