This is to separate the diagnostics code out from gc.cpp (except
GC's own logging), gcee.cpp and objecthandle.cpp.
The rule is GC will call the diagnostics functions at various points to communicate
info and these diagnostics functions might call back into the GC if they require
initimate knowledge of the GC in order to get certain info. This way gc.cpp does
not need to know about details of the diagnostics components, eg, the profiling context;
and the diagnostics components do not need to know details about the GC. So got rid of
ProfilingScanContext in gcinterface.h and passed scanning functions to GC and handle table.
Got rid of where it goes through things per heap as this is not something that diagnostics
should care about, including going through stack roots per heap (which is only done in
GC for scalability purposes but profiling is doing this on a single thread). This also makes it faster.
Got rid of the checks for gc_low/high in ProfScanRootsHelper as this is knowledge
profiling shouldn't have. And it was also incorrectly not including all interior
pointer stack roots.
19 files changed: