The .NET Framework JIT (just-in-time) compiler can inline some methods when their code is short enough, that is, it can replace method calls with a copy of the method implementation. If this happens, AQTime cannot collect profiling information for these methods, as there are no method entry and exit points to track.
To profile methods in your .NET applications that are JIT-compiled as inline, you need to disable inlining. There are two ways to do this:
-
Select the Disable inlining option in the profiler settings. Note that this option is only provided by the Performance and Coverage profilers.
-
Modify the application code and add the
MethodImplOptions.NoInlining
attribute to the desired methods to indicate that they cannot be inlined. For more information and code examples, see Profiling Inline Functions.
Note that disabling method inlining may affect the application performance (and thus performance measurements), since inlining normally speeds up caller methods and also avoids certain JIT events for inlined (called) methods.
See Also
Compiler Settings for .NET Applications
Profiling Inline Functions