RE: Accessing the CLR Heap at runtime?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi WorJurn,

Thanks for your post.

I am not aware of how the .Net Memory Profiler is implemented. However,
normally, we can use .Net Profiling API to get many internal informaiton of
CLR runtime. You can get detailed information from Matt Pietrek's article
below:
"The .NET Profiling API and the DNProfiler Tool "
http://msdn.microsoft.com/msdnmag/issues/01/12/hood/

Specifically, we can monitor "Garbage Collection and Managed Heap Objects"
category events. For example, ObjectAllocated is fired whenever a new
object is allocated from the managed heap.(I think this is what you want)

..Net CLR team also created a CLR Profiler with profiling API, provided much
powerful functions and GUI view. You can download it from:
"How To: Use CLR Profiler"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/
scalenethowto13.asp
Note: the source code for this tool is also available in the download link.

There is a MSDN TV showed us how to use CLR Profiler:
"Profiling Managed Code with the CLR Profiler"
http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20030729CLRGN/
manifest.xml

Hope this helps.
==============================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

.



Relevant Pages

  • Re: Diagnosing root cause of .NET application using nearly 500 MB memo
    ... I've had some input on another group about the dump although I will explore ... I highly recomment getting a memory profiler to help see the mamanged heap ... You can use the free CLR Profiler ...
    (microsoft.public.dotnet.framework)
  • RE: ICorProfilerInfo::SetFunctionReJIT causes deadlock
    ... The profiling API is intended for diagnostic ... make it impossible to attach a real performance or memory profiler when you ... | Thread-Topic: ICorProfilerInfo::SetFunctionReJIT causes deadlock ... | Content-Type: text/plain; ...
    (microsoft.public.dotnet.framework.clr)
  • Re: How to run aspnet with system account
    ... Wasn't the original point of this to run CLR Profiler on your ASP.NET app? ... you do need your worker process to have much higher ... or it is USUALLY too dangerous to run it as the System account. ...
    (microsoft.public.dotnet.security)
  • Re: How to run aspnet with system account
    ... Wasn't the original point of this to run CLR Profiler on your ASP.NET app? ... you do need your worker process to have much higher ... or it is USUALLY too dangerous to run it as the System account. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Hashtable Enumerator als Speicherfresser ?
    ... ein Hashtable-Enumerator nur die ganze Zeit neue Instanzen anlegt. ... Allerdings nennt mir z.B. der CLR Profiler folgenden Allocation-Stack: ... Next by Date: ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)