Is it possible to set a breakpoint immediately before GC collects gen2, using windbg?
The following breaks after GC, how can I change it to work for my needs:
bp clr!ThreadSuspend::RestartEE ".if (dwo(clr!SVR::GCHeap::GcCondemnedGeneration)==2) {kb} .else {g}"
From what I understood, GcCondemnedGeneration is set only after GC finishes.
The reason I need it is to be able to !dumpgen 2 -stats
and compare with a previous dump that was made immediately after the previous gen2 GC cycle.
This comparison indicates how many instances of each type have reached gen2 during a specific scenario in my application, which is my main thing I try to achieve. Any other idea to achieve this comparison is welcome.
Thanks