This is to separate the diagnostics code out from gc.cpp (except
authorMaoni0 <maonis@microsoft.com>
Fri, 18 Nov 2016 08:45:29 +0000 (00:45 -0800)
committerMaoni0 <maonis@microsoft.com>
Wed, 23 Nov 2016 04:10:16 +0000 (20:10 -0800)
commit1af571470c91528c31c0caf7a1726428c21a2be0
treebfb5f05ab36a5acdab3a7c5c2b755e49765e419c
parent204f6e8859e3676114c85f49b8d2c311458ac715
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:
src/gc/env/gcenv.ee.h
src/gc/gc.cpp
src/gc/gcee.cpp
src/gc/gcenv.ee.standalone.inl
src/gc/gcimpl.h
src/gc/gcinterface.ee.h
src/gc/gcinterface.h
src/gc/gcpriv.h
src/gc/gcrecord.h
src/gc/gcscan.cpp
src/gc/gcscan.h
src/gc/objecthandle.cpp
src/gc/objecthandle.h
src/gc/sample/gcenv.ee.cpp
src/inc/eventtrace.h
src/vm/eventtrace.cpp
src/vm/gcenv.ee.cpp
src/vm/gcenv.ee.h
src/vm/proftoeeinterfaceimpl.cpp