.NET* Targets
Explore performance analysis specifics for pure .NET* applications or native applications with .NET calls.
Intel® VTune™
automatically identifies the type of the code based on the debugger type specified in the Visual Studio project property pages:
Profiler

VTune
inherits this setting to set the profiling mode for the analysis target. The following types are possible:
Profiler
- Nativemode collects data on native code only, does not attribute data to managed source.
- Managedmode collects everything, resolves samples attributed to native code, attributes data to managed source only. The call stack in the analysis result displays data for managed code only.
- Mixedcollects everything and attributes data to managed source where appropriate. Consider using this option when analyzing a native executable that makes calls to the managed code.
- Automode automatically detects the type of target executable, managed or native, and switches to the corresponding mode.
Profiling Pure .NET Applications
If you analyze a pure .NET application, the
VTune
resolves the
Profiler
Auto
mode to
Mixed
.
Before profiling a pure .NET application, make sure to generate debug information for a native image of .NET managed assembly, which is required for successful
module resolution and source analysis:
- Use the Native Image Generator tool (Ngen.exe) from the .NET Framework to generate a native.pdbfile.
- Click theConfigure Analysisbutton on the toolbar.
- In theConfigure Analysiswindow, click theSearch Binariesbutton at the bottom.
- In theBinary/Symbol Searchdialog box, add a path to the generated native.pdbfile.
Profiling Native Applications with .NET Calls
If you analyze a native application that calls managed code, the
VTune
resolves the
Profiler
Auto
mode to
Native
and does not profile managed code. In this case, if you want to enable the
VTune
to profile the managed code called from the native application, set the profiling mode to
Profiler
Mixed
as follows:
- Click theConfigure Analysisbutton on the toolbar.TheConfigure Analysiswindow opens.
- De-select theInherit settings from Visual Studio* projectcheck box.TheManaged code profiling modeoption is enabled.
- In theWHATpane, from theAdvanced > Managed code profiling modemenu, select the required profiling mode.
- System-wide profiling is not supported for managed code.
- Starting with the VTune Amplifier 2018 Update 2, you can use the Hotspots analysis in thehardware event-based samplingmode (former Advanced Hotspots) to profile .Net Core applications running on Linux* or Windows* systems in theLaunch Applicationmode. For the product versions prior to 2018 Update 2, make sure to manually configure CoreCRL environment variables to enable the Advanced Hotspots analysis.