summaryrefslogtreecommitdiff
path: root/src/vm/proftoeeinterfaceimpl.cpp
diff options
context:
space:
mode:
authorMaoni0 <maonis@microsoft.com>2016-11-18 00:45:29 -0800
committerMaoni0 <maonis@microsoft.com>2016-11-22 20:10:16 -0800
commit1af571470c91528c31c0caf7a1726428c21a2be0 (patch)
treebfb5f05ab36a5acdab3a7c5c2b755e49765e419c /src/vm/proftoeeinterfaceimpl.cpp
parent204f6e8859e3676114c85f49b8d2c311458ac715 (diff)
downloadcoreclr-1af571470c91528c31c0caf7a1726428c21a2be0.tar.gz
coreclr-1af571470c91528c31c0caf7a1726428c21a2be0.tar.bz2
coreclr-1af571470c91528c31c0caf7a1726428c21a2be0.zip
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.
Diffstat (limited to 'src/vm/proftoeeinterfaceimpl.cpp')
-rw-r--r--src/vm/proftoeeinterfaceimpl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vm/proftoeeinterfaceimpl.cpp b/src/vm/proftoeeinterfaceimpl.cpp
index dbfe2e0fba..1aee26dde3 100644
--- a/src/vm/proftoeeinterfaceimpl.cpp
+++ b/src/vm/proftoeeinterfaceimpl.cpp
@@ -758,7 +758,7 @@ struct GenerationTable
//---------------------------------------------------------------------------------------
//
-// This is a callback used by the GC when we call GCHeapUtilities::DescrGenerationsToProfiler
+// This is a callback used by the GC when we call GCHeapUtilities::DiagDescrGenerations
// (from UpdateGenerationBounds() below). The GC gives us generation information through
// this callback, which we use to update the GenerationDesc in the corresponding
// GenerationTable
@@ -879,7 +879,7 @@ void __stdcall UpdateGenerationBounds()
// fill in the values by calling back into the gc, which will report
// the ranges by calling GenWalkFunc for each one
IGCHeap *hp = GCHeapUtilities::GetGCHeap();
- hp->DescrGenerationsToProfiler(GenWalkFunc, newGenerationTable);
+ hp->DiagDescrGenerations(GenWalkFunc, newGenerationTable);
// remember the old table and plug in the new one
GenerationTable *oldGenerationTable = s_currentGenerationTable;
@@ -1022,7 +1022,7 @@ ClassID SafeGetClassIDFromObject(Object * pObj)
//---------------------------------------------------------------------------------------
//
-// Callback of type walk_fn used by GCHeapUtilities::WalkObject. Keeps a count of each
+// Callback of type walk_fn used by GCHeapUtilities::DiagWalkObject. Keeps a count of each
// object reference found.
//
// Arguments:
@@ -1044,7 +1044,7 @@ BOOL CountContainedObjectRef(Object * pBO, void * context)
//---------------------------------------------------------------------------------------
//
-// Callback of type walk_fn used by GCHeapUtilities::WalkObject. Stores each object reference
+// Callback of type walk_fn used by GCHeapUtilities::DiagWalkObject. Stores each object reference
// encountered into an array.
//
// Arguments:
@@ -1117,7 +1117,7 @@ BOOL HeapWalkHelper(Object * pBO, void * pvContext)
if (pMT->ContainsPointersOrCollectible())
{
// First round through calculates the number of object refs for this class
- GCHeapUtilities::GetGCHeap()->WalkObject(pBO, &CountContainedObjectRef, (void *)&cNumRefs);
+ GCHeapUtilities::GetGCHeap()->DiagWalkObject(pBO, &CountContainedObjectRef, (void *)&cNumRefs);
if (cNumRefs > 0)
{
@@ -1142,7 +1142,7 @@ BOOL HeapWalkHelper(Object * pBO, void * pvContext)
// Second round saves off all of the ref values
OBJECTREF * pCurObjRef = arrObjRef;
- GCHeapUtilities::GetGCHeap()->WalkObject(pBO, &SaveContainedObjectRef, (void *)&pCurObjRef);
+ GCHeapUtilities::GetGCHeap()->DiagWalkObject(pBO, &SaveContainedObjectRef, (void *)&pCurObjRef);
}
}