CoreCLR JIT Profiling with Intel® VTune™ Amplifier on Windows*
Intel® VTune™ Amplifier supports JIT profiling on Windows for the full Common Language Runtime (CLR) environment out of the box. But to enable JIT profiling support for CoreCLR, which is a subset of CLR, you need to manually configure CoreCLR environment variables.
On February 3, 2015, Microsoft announced open source CoreCLR on GitHub. CoreCLR is a .NET* execution engine in .NET Core. However, if you install CoreCLR and run the VTune Amplifier performance profiling atop of it on Windows, you cannot see any JITted code in the collected result.
The example below shows the Advanced Hotspots analysis result collected with VTune Amplifier 2016 update 3 on CoreCLR. No JITted code is displayed. Instead, you see only the “Unkown” module:
To enable CoreCLR JIT profiling with VTune Amplifier on Windows, do the following:
- Start the registry editor (search for regedit from the Start menu), right-click Computer> HKEY_LOCAL_MACHINE , select Find... to look up the GUID# for amplxe_samplingmrte_clrprof_1.0.dll.
The Find dialog box opens. - Type amplxe_samplingmrte_clrprof_1.0.dll and click the Find Next button:
For example, for the VTune Amplifier XE 2016, this file by default is installed at C:\Program Files (x86)\IntelSWTools\VTune Amplifier XE 2016\bin64\amplxe_samplingmrte_clrprof_1.0.dll. So, the registry editor finds the file and displays the GUID# as follows: - Copy the GUID (in the red circle). For the example above, the GUID is {AA5E4821-E3B1-479c-B7FF-5AD047D22CED}.
- From Control Panel, select System and click the Advanced system settings. From the Advanced system settings, select the Advanced tab and click the Environment Variables... button.
- Set the CoreCLR system variables as follows:
CORECLR_ENABLE_PROFILING=1
CORECLR_PROFILER={AA5E4821-E3B1-479c-B7FF-5AD047D22CED} - Restart the VTune Amplifier and run the analysis (for example, Advanced Hotspots).
Outcome: JIT profiling is enabled and all JITted code is displayed in the viewpoint:
For more details on .NET code analysis with the VTune Amplifier for Windows, see the product online help.