I'd like to know how to profile the performance of the garbage collector and monitor the three generations. I wonder if it is possible to know at any point in time what are the current objects living in gen0,gen1,gen2
.
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- C# GC not freeing memory [duplicate]
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
The CLR profiler could do this, but I don't think it is actively updated i.e for 3.5, 4.0, for 2.0 targeted apps, you can do this with the linked version.
You can get useful information on GC performance from PerfMon - not as granular as you want though.
If you have one of the premium versions of Visual Studio that includes Performance/Profiling Tools, you can get more info on individual object allocations and lifetimes. Specifically, this might be in the area you wished:
If you are feeling really adventurous, you can do custom profiling using the Profiling Tools API.
Check out JetBrains DotTrace.