码迷,mamicode.com
首页 > 其他好文 > 详细

How Does CLR Profiler Work?

时间:2017-01-17 23:49:06      阅读:376      评论:0      收藏:0      [点我收藏+]

标签:back   special   tin   collect   profile   use   blank   nbsp   sid   

In order to use a profiler properly, you need to understand how the data was collected and the limitations of the tool. The CLR Profiler uses a special interface to the runtime that allows it to get callbacks when particular events happen within the runtime (msdn.microsoft.com/library/ms404511.aspx). Currently, this interface can be used only if the process being profiled is started with certain environment variables set that inform the runtime regarding the contact mechanism to the profiler. Thus, there are some limitations, such as the inability to attach to an existing process. CLR Profiler must start the process with the right environment variables set. For services that are typically started by the OS directly, like ASP.NET, special procedures have to be followed (see CLR Profiler.doc from the download for details). As an aside, for certain scenarios we have added API support for attach in the .NET Framework 4 (but only the API support; support for attaching the CLR Profiler tool will follow soon after).

 

https://msdn.microsoft.com/en-us/library/ms404511.aspx

How Does CLR Profiler Work?

标签:back   special   tin   collect   profile   use   blank   nbsp   sid   

原文地址:http://www.cnblogs.com/guangfengli/p/6294876.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!