Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

.Net profiler - Time taken for each function in Call graph

$
0
0

Hi,

I have developed profiler for .Net applications in C++. I inject helper function calls to the IL of the .Net functions that come to the JitCompilationStarted function and change the existing IL for the functions. So from that helper functions i call my C++ function and record the call graph. 

I just inject two function calls for a .net function.

1. At entry

2.At exit

I will take the time difference of those two function calls and display the time for execution.

The logic what is not striking for me now is, 

I am getting the time for execution for the functions as below

                             ASP._Page_Views_Shared__Layout_cshtml:Execute 49
                                System.Web.Mvc.Html.ChildActionExtensions:RenderAction 27
                                  System.Web.Mvc.Html.ChildActionExtensions:RenderAction 27
                                    System.Web.HttpServerUtility:Execute 27
                                      System.Web.HttpServerUtility:ExecuteInternal 27
                                        System.Web.Mvc.SecurityUtil:ProcessInApplicationTrust 27
                                          System.Web.Mvc.Async.AsyncResultWrapper:End 27
                                            System.Web.Mvc.Async.AsyncResultWrapper:End 27 

The time taken for each function it is displaying has the time taken for it's calling function also.. How can i calculate the time taken for each and every function(without the time of it's sub functions).

I can subtract from it's child function , but not in many cases the function calls are synchronous. Some time the calls are asynchronous but the thread is is same..!!! 

Is there any possibility to profile the time taken of the function execution alone..? 



Viewing all articles
Browse latest Browse all 1710

Trending Articles