Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

CoreCLR JIT Profiling with Intel® VTune™ Amplifier on Windows*

$
0
0

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:

CoreCLR VTune Amplifier "Unknown" Module

To enable CoreCLR JIT profiling with VTune Amplifier on Windows, do the following:

  1. 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.
  2. Type amplxe_samplingmrte_clrprof_1.0.dll and click the Find Next button:
    CoreCLR VTune Amplifier Registry Editor
    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:
    CoreCLR VTune Amplifier Registry Editor Example
  3. Copy the GUID (in the red circle). For the example above, the GUID is {AA5E4821-E3B1-479c-B7FF-5AD047D22CED}.
  4. 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.
  5. Set the CoreCLR system variables as follows:
    CORECLR_ENABLE_PROFILING=1
    CORECLR_PROFILER={AA5E4821-E3B1-479c-B7FF-5AD047D22CED}

    CoreCLR VTune Amplifier Set Registry Variable
  6. 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:
    CoreCLR VTune Amplifier JIT Profiling Enabled

For more details on .NET code analysis with the VTune Amplifier for Windows, see the product online help.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>