Something about .NET profiler
The following link explains about how .NET profiler works.
http://blogs.msdn.com/b/davbr/archive/2007/03/22/enter-leave-tailcall-hooks-part-1-basics.aspx
Using the Profiling API Enter/Leave Function Hooks
http://blogs.msdn.com/b/jkeljo/archive/2005/08/11/450506.aspx