Quite often .NET applications include mixed code, that is, certain parts of the application executable are in MSIL code (managed code) and other parts are native code (unmanaged code). AQTime can analyze both managed and unmanaged code. It does not require any special preparations for profiling of mixed code except cases when modules, which include unmanaged sections, must be compiled with debug information. For example, if the application itself includes both managed and unmanaged code, you have to compile it with debug information in order to profile its unmanaged sections. See How AQTime Profilers Use Metadata and Debug Information.
One of the typical examples of using mixed code is a .NET application that uses a COM object, which is implemented in a native-code module. In this instance, you have to compile the native-code module with debug information to profile its functions. The way in which you include debug information into the executable depends upon the compiler. See How AQTime Profilers Use Metadata and Debug Information.
We would like to note once again that AQTime can profile both managed and unmanaged code. For example, with AQTime you can profile both managed and unmanaged modules at line level, you can define triggers and actions using both managed and unmanaged functions, etc. The only exception from this rule is the Entire .NET Code setting in the Setup panel. It works for managed code only.
AQTime includes sample applications that illustrate the profiling of mixed code.
.NET applications
Microsoft Visual Studio 2005 projects:
<AQTime Samples>\Managed\VS2005\MixedProfiling\Managed\CS - Microsoft Visual C# .NET
<AQTime Samples>\Managed\VS2005\MixedProfiling\Managed\VB - Microsoft Visual Basic .NET
<AQTime Samples>\Managed\VS2005\MixedProfiling\Managed\VC - Microsoft Visual C++ .NET
<AQTime Samples>\Managed\VS2005\MixedProfiling\Managed\JS - Microsoft Visual J# .NET
Microsoft Visual Studio 2013 projects:
<AQTime Samples>\Managed\VS2013\MixedProfiling\Managed\CS - Microsoft Visual C# .NET
<AQTime Samples>\Managed\VS2013\MixedProfiling\Managed\VB - Microsoft Visual Basic .NET
<AQTime Samples>\Managed\VS2013\MixedProfiling\Managed\VC - Microsoft Visual C++ .NET
Native-code DLLs
<AQTime Samples>\Managed\VS2013\MixedProfiling\Unmanaged\VC2013 - Microsoft Visual C++ (Visual Studio 2013 project)
<AQTime Samples>\Managed\VS2005\MixedProfiling\Unmanaged\VC - Microsoft Visual C++ (Visual Studio 7.x project)
<AQTime Samples>\Managed\VS2005\MixedProfiling\Unmanaged\VC2005 - Microsoft Visual C++ (Visual Studio 2005)
<AQTime Samples>\Managed\VS2005\MixedProfiling\Unmanaged\Delphi - Borland Delphi
Note: | You can also open Visual Studio samples in later versions of Visual Studio. |
On Windows Vista and later, AQTime samples are located in the <Users>\Public\Documents\AQTime 8 Samples folder. On other operating systems, the samples reside in the <Documents and Settings>\All Users\Documents\AQTime 8 Samples folder. |
For more information on how to profile these samples, see Profiling Mixed Code Tutorial.
See Also
Compiler Settings for .NET Applications
Profiling .NET Applications - Overview
Profiling Mixed Code Tutorial
Performance Profiler
Controlling What to Profile