summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2015-12-16 18:17:32 -0800
committerJan Kotas <jkotas@microsoft.com>2015-12-16 18:17:32 -0800
commit041fba4307e75b9e9eef824f86cb3f244dd381ef (patch)
treeeaa3866a5965d0ed2be5d4dc6177545f9f29434b /src
parent0b7dcdbcee83ff7c08ce38cc9faa18ee587a5986 (diff)
parentb65f0e718268ae400fda7556bf93f48472f9875d (diff)
downloadcoreclr-041fba4307e75b9e9eef824f86cb3f244dd381ef.tar.gz
coreclr-041fba4307e75b9e9eef824f86cb3f244dd381ef.tar.bz2
coreclr-041fba4307e75b9e9eef824f86cb3f244dd381ef.zip
Merge pull request #2368 from jkotas/rename-gcscan
Rename CNameSpace to GCScan
Diffstat (limited to 'src')
-rw-r--r--src/debug/daccess/dacdbiimpl.cpp2
-rw-r--r--src/debug/daccess/enummem.cpp4
-rw-r--r--src/debug/daccess/request.cpp2
-rw-r--r--src/gc/gc.cpp74
-rw-r--r--src/gc/gc.h2
-rw-r--r--src/gc/gcee.cpp8
-rw-r--r--src/gc/gcscan.cpp40
-rw-r--r--src/gc/gcscan.h9
-rw-r--r--src/inc/dacvars.h2
-rw-r--r--src/vm/object.cpp2
-rw-r--r--src/vm/stubhelpers.cpp2
-rw-r--r--src/vm/syncblk.cpp2
12 files changed, 71 insertions, 78 deletions
diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp
index 20d76f67cb..c7172d7aae 100644
--- a/src/debug/daccess/dacdbiimpl.cpp
+++ b/src/debug/daccess/dacdbiimpl.cpp
@@ -7161,7 +7161,7 @@ void DacDbiInterfaceImpl::GetGCHeapInformation(COR_HEAPINFO * pHeapInfo)
DD_ENTER_MAY_THROW;
size_t heapCount = 0;
- pHeapInfo->areGCStructuresValid = CNameSpace::GetGcRuntimeStructuresValid();
+ pHeapInfo->areGCStructuresValid = GCScan::GetGcRuntimeStructuresValid();
#ifdef FEATURE_SVR_GC
if (GCHeap::IsServerHeap())
diff --git a/src/debug/daccess/enummem.cpp b/src/debug/daccess/enummem.cpp
index b65d086b55..8a6453ee4d 100644
--- a/src/debug/daccess/enummem.cpp
+++ b/src/debug/daccess/enummem.cpp
@@ -403,7 +403,7 @@ HRESULT ClrDataAccess::DumpManagedObject(CLRDataEnumMemoryFlags flags, OBJECTREF
return status;
}
- if (!CNameSpace::GetGcRuntimeStructuresValid ())
+ if (!GCScan::GetGcRuntimeStructuresValid ())
{
// GC is in progress, don't dump this object
return S_OK;
@@ -461,7 +461,7 @@ HRESULT ClrDataAccess::DumpManagedExcepObject(CLRDataEnumMemoryFlags flags, OBJE
return S_OK;
}
- if (!CNameSpace::GetGcRuntimeStructuresValid ())
+ if (!GCScan::GetGcRuntimeStructuresValid ())
{
// GC is in progress, don't dump this object
return S_OK;
diff --git a/src/debug/daccess/request.cpp b/src/debug/daccess/request.cpp
index 1925465c92..f86576de66 100644
--- a/src/debug/daccess/request.cpp
+++ b/src/debug/daccess/request.cpp
@@ -2985,7 +2985,7 @@ ClrDataAccess::GetGCHeapData(struct DacpGcHeapData *gcheapData)
// Now we can get other important information about the heap
gcheapData->g_max_generation = GCHeap::GetMaxGeneration();
gcheapData->bServerMode = GCHeap::IsServerHeap();
- gcheapData->bGcStructuresValid = CNameSpace::GetGcRuntimeStructuresValid();
+ gcheapData->bGcStructuresValid = GCScan::GetGcRuntimeStructuresValid();
if (GCHeap::IsServerHeap())
{
#if !defined (FEATURE_SVR_GC)
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index fde9b7b361..694d24b07b 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -4225,7 +4225,7 @@ void* virtual_alloc (size_t size)
if ((gc_heap::reserved_memory_limit - gc_heap::reserved_memory) < requested_size)
{
gc_heap::reserved_memory_limit =
- CNameSpace::AskForMoreReservedMemory (gc_heap::reserved_memory_limit, requested_size);
+ GCScan::AskForMoreReservedMemory (gc_heap::reserved_memory_limit, requested_size);
if ((gc_heap::reserved_memory_limit - gc_heap::reserved_memory) < requested_size)
{
return 0;
@@ -15134,9 +15134,9 @@ void gc_heap::gc1()
{
mark_phase (n, FALSE);
- CNameSpace::GcRuntimeStructuresValid (FALSE);
+ GCScan::GcRuntimeStructuresValid (FALSE);
plan_phase (n);
- CNameSpace::GcRuntimeStructuresValid (TRUE);
+ GCScan::GcRuntimeStructuresValid (TRUE);
}
}
@@ -19102,7 +19102,7 @@ void gc_heap::scan_dependent_handles (int condemned_gen_number, ScanContext *sc,
// determine the local value and collect the results into the s_fUnpromotedHandles variable in what is
// effectively an OR operation. As per s_fUnscannedPromotions we can't read the final result until
// we're safely joined.
- if (CNameSpace::GcDhUnpromotedHandlesExist(sc))
+ if (GCScan::GcDhUnpromotedHandlesExist(sc))
s_fUnpromotedHandles = TRUE;
// Synchronize all the threads so we can read our state variables safely. The shared variable
@@ -19178,8 +19178,8 @@ void gc_heap::scan_dependent_handles (int condemned_gen_number, ScanContext *sc,
// If the portion of the dependent handle table managed by this worker has handles that could still be
// promoted perform a rescan. If the rescan resulted in at least one promotion note this fact since it
// could require a rescan of handles on this or other workers.
- if (CNameSpace::GcDhUnpromotedHandlesExist(sc))
- if (CNameSpace::GcDhReScan(sc))
+ if (GCScan::GcDhUnpromotedHandlesExist(sc))
+ if (GCScan::GcDhReScan(sc))
s_fUnscannedPromotions = TRUE;
}
}
@@ -19197,7 +19197,7 @@ void gc_heap::scan_dependent_handles (int condemned_gen_number, ScanContext *sc,
// Loop until there are either no more dependent handles that can have their secondary promoted or we've
// managed to perform a scan without promoting anything new.
- while (CNameSpace::GcDhUnpromotedHandlesExist(sc) && fUnscannedPromotions)
+ while (GCScan::GcDhUnpromotedHandlesExist(sc) && fUnscannedPromotions)
{
// On each iteration of the loop start with the assumption that no further objects have been promoted.
fUnscannedPromotions = false;
@@ -19209,7 +19209,7 @@ void gc_heap::scan_dependent_handles (int condemned_gen_number, ScanContext *sc,
fUnscannedPromotions = true;
// Perform the scan and set the flag if any promotions resulted.
- if (CNameSpace::GcDhReScan(sc))
+ if (GCScan::GcDhReScan(sc))
fUnscannedPromotions = true;
}
@@ -19357,7 +19357,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
if ((condemned_gen_number == max_generation) && (num_sizedrefs > 0))
{
- CNameSpace::GcScanSizedRefs(GCHeap::Promote, condemned_gen_number, max_generation, &sc);
+ GCScan::GcScanSizedRefs(GCHeap::Promote, condemned_gen_number, max_generation, &sc);
fire_mark_event (heap_number, ETW::GC_ROOT_SIZEDREF, (promoted_bytes (heap_number) - last_promoted_bytes));
last_promoted_bytes = promoted_bytes (heap_number);
@@ -19373,7 +19373,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
dprintf(3,("Marking Roots"));
- CNameSpace::GcScanRoots(GCHeap::Promote,
+ GCScan::GcScanRoots(GCHeap::Promote,
condemned_gen_number, max_generation,
&sc);
@@ -19399,7 +19399,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
{
dprintf(3,("Marking handle table"));
- CNameSpace::GcScanHandles(GCHeap::Promote,
+ GCScan::GcScanHandles(GCHeap::Promote,
condemned_gen_number, max_generation,
&sc);
fire_mark_event (heap_number, ETW::GC_ROOT_HANDLES, (promoted_bytes (heap_number) - last_promoted_bytes));
@@ -19466,7 +19466,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
// to optimize away further scans. The call to scan_dependent_handles is what will cycle through more
// iterations if required and will also perform processing of any mark stack overflow once the dependent
// handle table has been fully promoted.
- CNameSpace::GcDhInitialScan(GCHeap::Promote, condemned_gen_number, max_generation, &sc);
+ GCScan::GcDhInitialScan(GCHeap::Promote, condemned_gen_number, max_generation, &sc);
scan_dependent_handles(condemned_gen_number, &sc, true);
#ifdef MULTIPLE_HEAPS
@@ -19496,7 +19496,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
}
// null out the target of short weakref that were not promoted.
- CNameSpace::GcShortWeakPtrScan(GCHeap::Promote, condemned_gen_number, max_generation,&sc);
+ GCScan::GcShortWeakPtrScan(GCHeap::Promote, condemned_gen_number, max_generation,&sc);
// MTHTS: keep by single thread
#ifdef MULTIPLE_HEAPS
@@ -19544,7 +19544,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
#endif //MULTIPLE_HEAPS
// null out the target of long weakref that were not promoted.
- CNameSpace::GcWeakPtrScan (GCHeap::Promote, condemned_gen_number, max_generation, &sc);
+ GCScan::GcWeakPtrScan (GCHeap::Promote, condemned_gen_number, max_generation, &sc);
// MTHTS: keep by single thread
#ifdef MULTIPLE_HEAPS
@@ -19562,7 +19562,7 @@ void gc_heap::mark_phase (int condemned_gen_number, BOOL mark_only_p)
#endif //MULTIPLE_HEAPS
{
// scan for deleted entries in the syncblk cache
- CNameSpace::GcWeakPtrScanBySingleThread (condemned_gen_number, max_generation, &sc);
+ GCScan::GcWeakPtrScanBySingleThread (condemned_gen_number, max_generation, &sc);
#ifdef FEATURE_APPDOMAIN_RESOURCE_MONITORING
if (g_fEnableARM)
@@ -22463,14 +22463,14 @@ void gc_heap::plan_phase (int condemned_gen_number)
{
dprintf (2, ("Promoting EE roots for gen %d",
condemned_gen_number));
- CNameSpace::GcPromotionsGranted(condemned_gen_number,
+ GCScan::GcPromotionsGranted(condemned_gen_number,
max_generation, &sc);
}
else if (settings.demotion)
{
dprintf (2, ("Demoting EE roots for gen %d",
condemned_gen_number));
- CNameSpace::GcDemote (condemned_gen_number, max_generation, &sc);
+ GCScan::GcDemote (condemned_gen_number, max_generation, &sc);
}
}
@@ -22625,7 +22625,7 @@ void gc_heap::plan_phase (int condemned_gen_number)
if (gc_t_join.joined())
#endif //MULTIPLE_HEAPS
{
- CNameSpace::GcPromotionsGranted(condemned_gen_number,
+ GCScan::GcPromotionsGranted(condemned_gen_number,
max_generation, &sc);
if (condemned_gen_number >= (max_generation -1))
{
@@ -24093,7 +24093,7 @@ void gc_heap::relocate_phase (int condemned_gen_number,
}
dprintf(3,("Relocating roots"));
- CNameSpace::GcScanRoots(GCHeap::Relocate,
+ GCScan::GcScanRoots(GCHeap::Relocate,
condemned_gen_number, max_generation, &sc);
verify_pins_with_post_plug_info("after reloc stack");
@@ -24146,7 +24146,7 @@ void gc_heap::relocate_phase (int condemned_gen_number,
// MTHTS
{
dprintf(3,("Relocating handle table"));
- CNameSpace::GcScanHandles(GCHeap::Relocate,
+ GCScan::GcScanHandles(GCHeap::Relocate,
condemned_gen_number, max_generation, &sc);
}
@@ -24870,7 +24870,7 @@ void gc_heap::background_scan_dependent_handles (ScanContext *sc)
// determine the local value and collect the results into the s_fUnpromotedHandles variable in what is
// effectively an OR operation. As per s_fUnscannedPromotions we can't read the final result until
// we're safely joined.
- if (CNameSpace::GcDhUnpromotedHandlesExist(sc))
+ if (GCScan::GcDhUnpromotedHandlesExist(sc))
s_fUnpromotedHandles = TRUE;
// Synchronize all the threads so we can read our state variables safely. The following shared
@@ -24940,8 +24940,8 @@ void gc_heap::background_scan_dependent_handles (ScanContext *sc)
// If the portion of the dependent handle table managed by this worker has handles that could still be
// promoted perform a rescan. If the rescan resulted in at least one promotion note this fact since it
// could require a rescan of handles on this or other workers.
- if (CNameSpace::GcDhUnpromotedHandlesExist(sc))
- if (CNameSpace::GcDhReScan(sc))
+ if (GCScan::GcDhUnpromotedHandlesExist(sc))
+ if (GCScan::GcDhReScan(sc))
s_fUnscannedPromotions = TRUE;
}
}
@@ -24955,7 +24955,7 @@ void gc_heap::background_scan_dependent_handles (ScanContext *sc)
// Scan dependent handles repeatedly until there are no further promotions that can be made or we made a
// scan without performing any new promotions.
- while (CNameSpace::GcDhUnpromotedHandlesExist(sc) && fUnscannedPromotions)
+ while (GCScan::GcDhUnpromotedHandlesExist(sc) && fUnscannedPromotions)
{
// On each iteration of the loop start with the assumption that no further objects have been promoted.
fUnscannedPromotions = false;
@@ -24967,7 +24967,7 @@ void gc_heap::background_scan_dependent_handles (ScanContext *sc)
fUnscannedPromotions = true;
// Perform the scan and set the flag if any promotions resulted.
- if (CNameSpace::GcDhReScan (sc))
+ if (GCScan::GcDhReScan (sc))
fUnscannedPromotions = true;
}
@@ -25480,7 +25480,7 @@ void gc_heap::background_mark_phase ()
dprintf(3,("BGC: stack marking"));
sc.concurrent = TRUE;
- CNameSpace::GcScanRoots(background_promote_callback,
+ GCScan::GcScanRoots(background_promote_callback,
max_generation, max_generation,
&sc);
}
@@ -25597,7 +25597,7 @@ void gc_heap::background_mark_phase ()
if (num_sizedrefs > 0)
{
- CNameSpace::GcScanSizedRefs(background_promote, max_generation, max_generation, &sc);
+ GCScan::GcScanSizedRefs(background_promote, max_generation, max_generation, &sc);
enable_preemptive (current_thread);
@@ -25614,7 +25614,7 @@ void gc_heap::background_mark_phase ()
}
dprintf (3,("BGC: handle table marking"));
- CNameSpace::GcScanHandles(background_promote,
+ GCScan::GcScanHandles(background_promote,
max_generation, max_generation,
&sc);
//concurrent_print_time_delta ("concurrent marking handle table");
@@ -25746,7 +25746,7 @@ void gc_heap::background_mark_phase ()
dprintf (GTC_LOG, ("FM: h%d: loh: %Id, soh: %Id", heap_number, total_loh_size, total_soh_size));
dprintf (2, ("nonconcurrent marking stack roots"));
- CNameSpace::GcScanRoots(background_promote,
+ GCScan::GcScanRoots(background_promote,
max_generation, max_generation,
&sc);
//concurrent_print_time_delta ("nonconcurrent marking stack roots");
@@ -25757,7 +25757,7 @@ void gc_heap::background_mark_phase ()
// finalize_queue->LeaveFinalizeLock();
dprintf (2, ("nonconcurrent marking handle table"));
- CNameSpace::GcScanHandles(background_promote,
+ GCScan::GcScanHandles(background_promote,
max_generation, max_generation,
&sc);
//concurrent_print_time_delta ("nonconcurrent marking handle table");
@@ -25779,7 +25779,7 @@ void gc_heap::background_mark_phase ()
// required and will also perform processing of any mark stack overflow once the dependent handle
// table has been fully promoted.
dprintf (2, ("1st dependent handle scan and process mark overflow"));
- CNameSpace::GcDhInitialScan(background_promote, max_generation, max_generation, &sc);
+ GCScan::GcDhInitialScan(background_promote, max_generation, max_generation, &sc);
background_scan_dependent_handles (&sc);
//concurrent_print_time_delta ("1st nonconcurrent dependent handle scan and process mark overflow");
concurrent_print_time_delta ("NR 1st Hov");
@@ -25801,7 +25801,7 @@ void gc_heap::background_mark_phase ()
}
// null out the target of short weakref that were not promoted.
- CNameSpace::GcShortWeakPtrScan(background_promote, max_generation, max_generation,&sc);
+ GCScan::GcShortWeakPtrScan(background_promote, max_generation, max_generation,&sc);
//concurrent_print_time_delta ("bgc GcShortWeakPtrScan");
concurrent_print_time_delta ("NR GcShortWeakPtrScan");
@@ -25850,7 +25850,7 @@ void gc_heap::background_mark_phase ()
#endif //MULTIPLE_HEAPS
// null out the target of long weakref that were not promoted.
- CNameSpace::GcWeakPtrScan (background_promote, max_generation, max_generation, &sc);
+ GCScan::GcWeakPtrScan (background_promote, max_generation, max_generation, &sc);
concurrent_print_time_delta ("NR GcWeakPtrScan");
#ifdef MULTIPLE_HEAPS
@@ -25860,7 +25860,7 @@ void gc_heap::background_mark_phase ()
{
dprintf (2, ("calling GcWeakPtrScanBySingleThread"));
// scan for deleted entries in the syncblk cache
- CNameSpace::GcWeakPtrScanBySingleThread (max_generation, max_generation, &sc);
+ GCScan::GcWeakPtrScanBySingleThread (max_generation, max_generation, &sc);
concurrent_print_time_delta ("NR GcWeakPtrScanBySingleThread");
#ifdef MULTIPLE_HEAPS
dprintf(2, ("Starting BGC threads for end of background mark phase"));
@@ -33279,7 +33279,7 @@ gc_heap::verify_heap (BOOL begin_gc_p)
// limit its scope to handle table verification.
ScanContext sc;
sc.thread_number = heap_number;
- CNameSpace::VerifyHandleTable(max_generation, max_generation, &sc);
+ GCScan::VerifyHandleTable(max_generation, max_generation, &sc);
}
#ifdef MULTIPLE_HEAPS
@@ -33349,7 +33349,7 @@ HRESULT GCHeap::Shutdown ()
{
deleteGCShadow();
- CNameSpace::GcRuntimeStructuresValid (FALSE);
+ GCScan::GcRuntimeStructuresValid (FALSE);
// Cannot assert this, since we use SuspendEE as the mechanism to quiesce all
// threads except the one performing the shutdown.
@@ -33580,7 +33580,7 @@ HRESULT GCHeap::Initialize ()
if (hr == S_OK)
{
- CNameSpace::GcRuntimeStructuresValid (TRUE);
+ GCScan::GcRuntimeStructuresValid (TRUE);
#ifdef GC_PROFILING
if (CORProfilerTrackGC())
diff --git a/src/gc/gc.h b/src/gc/gc.h
index 838f3bac7e..2bfb4aa56b 100644
--- a/src/gc/gc.h
+++ b/src/gc/gc.h
@@ -254,7 +254,7 @@ struct ProfilingScanContext : ScanContext
fProfilerPinned = fProfilerPinnedParam;
pvEtwContext = NULL;
#ifdef FEATURE_CONSERVATIVE_GC
- // To not confuse CNameSpace::GcScanRoots
+ // To not confuse GCScan::GcScanRoots
promotion = g_pConfig->GetGCConservative();
#endif
}
diff --git a/src/gc/gcee.cpp b/src/gc/gcee.cpp
index ad20009f0c..7a9bb1891f 100644
--- a/src/gc/gcee.cpp
+++ b/src/gc/gcee.cpp
@@ -439,7 +439,7 @@ void GCProfileWalkHeapWorker(BOOL fProfilerPinned, BOOL fShouldWalkHeapRootsForE
// heap.
gc_heap* hp = gc_heap::g_heaps [hn];
SC.thread_number = hn;
- CNameSpace::GcScanRoots(&ProfScanRootsHelper, max_generation, max_generation, &SC);
+ GCScan::GcScanRoots(&ProfScanRootsHelper, max_generation, max_generation, &SC);
// The finalizer queue is also a source of roots
SC.dwEtwRootKind = kEtwGCRootKindFinalizer;
@@ -447,7 +447,7 @@ void GCProfileWalkHeapWorker(BOOL fProfilerPinned, BOOL fShouldWalkHeapRootsForE
}
#else
// Ask the vm to go over all of the roots
- CNameSpace::GcScanRoots(&ProfScanRootsHelper, max_generation, max_generation, &SC);
+ GCScan::GcScanRoots(&ProfScanRootsHelper, max_generation, max_generation, &SC);
// The finalizer queue is also a source of roots
SC.dwEtwRootKind = kEtwGCRootKindFinalizer;
@@ -456,7 +456,7 @@ void GCProfileWalkHeapWorker(BOOL fProfilerPinned, BOOL fShouldWalkHeapRootsForE
#endif // MULTIPLE_HEAPS
// Handles are kept independent of wks/svr/concurrent builds
SC.dwEtwRootKind = kEtwGCRootKindHandle;
- CNameSpace::GcScanHandlesForProfilerAndETW(max_generation, &SC);
+ GCScan::GcScanHandlesForProfilerAndETW(max_generation, &SC);
// indicate that regular handle scanning is over, so we can flush the buffered roots
// to the profiler. (This is for profapi only. ETW will flush after the
@@ -476,7 +476,7 @@ void GCProfileWalkHeapWorker(BOOL fProfilerPinned, BOOL fShouldWalkHeapRootsForE
// GcScanDependentHandlesForProfiler double-checks
// CORProfilerTrackConditionalWeakTableElements() before calling into the profiler
- CNameSpace::GcScanDependentHandlesForProfilerAndETW(max_generation, &SC);
+ GCScan::GcScanDependentHandlesForProfilerAndETW(max_generation, &SC);
// indicate that dependent handle scanning is over, so we can flush the buffered roots
// to the profiler. (This is for profapi only. ETW will flush after the
diff --git a/src/gc/gcscan.cpp b/src/gc/gcscan.cpp
index dd7b4c1be6..621ffad7f3 100644
--- a/src/gc/gcscan.cpp
+++ b/src/gc/gcscan.cpp
@@ -22,12 +22,12 @@
//#define CATCH_GC //catches exception during GC
#ifdef DACCESS_COMPILE
-SVAL_IMPL_INIT(int32_t, CNameSpace, m_GcStructuresInvalidCnt, 1);
+SVAL_IMPL_INIT(int32_t, GCScan, m_GcStructuresInvalidCnt, 1);
#else //DACCESS_COMPILE
-VOLATILE(int32_t) CNameSpace::m_GcStructuresInvalidCnt = 1;
+VOLATILE(int32_t) GCScan::m_GcStructuresInvalidCnt = 1;
#endif //DACCESS_COMPILE
-bool CNameSpace::GetGcRuntimeStructuresValid ()
+bool GCScan::GetGcRuntimeStructuresValid ()
{
LIMITED_METHOD_CONTRACT;
SUPPORTS_DAC;
@@ -39,7 +39,7 @@ bool CNameSpace::GetGcRuntimeStructuresValid ()
#ifndef FEATURE_REDHAWK
void
-CNameSpace::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
+GCScan::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
{
UNREFERENCED_PARAMETER(flags);
m_GcStructuresInvalidCnt.EnumMem();
@@ -62,7 +62,7 @@ CNameSpace::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
// will still be correct and this scan allows us to spot a common optimization where no dependent handles are
// due for retirement in this particular GC. This is an important optimization to take advantage of since
// synchronizing the GC to calculate complete results is a costly operation.
-void CNameSpace::GcDhInitialScan(promote_func* fn, int condemned, int max_gen, ScanContext* sc)
+void GCScan::GcDhInitialScan(promote_func* fn, int condemned, int max_gen, ScanContext* sc)
{
// We allocate space for dependent handle scanning context during Ref_Initialize. Under server GC there
// are actually as many contexts as heaps (and CPUs). Ref_GetDependentHandleContext() retrieves the
@@ -87,7 +87,7 @@ void CNameSpace::GcDhInitialScan(promote_func* fn, int condemned, int max_gen, S
// This method is called after GcDhInitialScan and before each subsequent scan (GcDhReScan below). It
// determines whether any handles are left that have unpromoted secondaries.
-bool CNameSpace::GcDhUnpromotedHandlesExist(ScanContext* sc)
+bool GCScan::GcDhUnpromotedHandlesExist(ScanContext* sc)
{
WRAPPER_NO_CONTRACT;
// Locate our dependent handle context based on the GC context.
@@ -103,7 +103,7 @@ bool CNameSpace::GcDhUnpromotedHandlesExist(ScanContext* sc)
// this method in a loop. The scan records state that let's us know when to terminate (no further handles to
// be promoted or no promotions in the last scan). Returns true if at least one object was promoted as a
// result of the scan.
-bool CNameSpace::GcDhReScan(ScanContext* sc)
+bool GCScan::GcDhReScan(ScanContext* sc)
{
// Locate our dependent handle context based on the GC context.
DhContext *pDhContext = Ref_GetDependentHandleContext(sc);
@@ -115,7 +115,7 @@ bool CNameSpace::GcDhReScan(ScanContext* sc)
* Scan for dead weak pointers
*/
-void CNameSpace::GcWeakPtrScan( promote_func* fn, int condemned, int max_gen, ScanContext* sc )
+void GCScan::GcWeakPtrScan( promote_func* fn, int condemned, int max_gen, ScanContext* sc )
{
// Clear out weak pointers that are no longer live.
Ref_CheckReachable(condemned, max_gen, (uintptr_t)sc);
@@ -143,19 +143,19 @@ static void CALLBACK CheckPromoted(_UNCHECKED_OBJECTREF *pObjRef, uintptr_t * /*
}
}
-void CNameSpace::GcWeakPtrScanBySingleThread( int condemned, int max_gen, ScanContext* sc )
+void GCScan::GcWeakPtrScanBySingleThread( int condemned, int max_gen, ScanContext* sc )
{
UNREFERENCED_PARAMETER(condemned);
UNREFERENCED_PARAMETER(max_gen);
GCToEEInterface::SyncBlockCacheWeakPtrScan(&CheckPromoted, (uintptr_t)sc, 0);
}
-void CNameSpace::GcScanSizedRefs(promote_func* fn, int condemned, int max_gen, ScanContext* sc)
+void GCScan::GcScanSizedRefs(promote_func* fn, int condemned, int max_gen, ScanContext* sc)
{
Ref_ScanSizedRefHandles(condemned, max_gen, sc, fn);
}
-void CNameSpace::GcShortWeakPtrScan(promote_func* fn, int condemned, int max_gen,
+void GCScan::GcShortWeakPtrScan(promote_func* fn, int condemned, int max_gen,
ScanContext* sc)
{
UNREFERENCED_PARAMETER(fn);
@@ -166,7 +166,7 @@ void CNameSpace::GcShortWeakPtrScan(promote_func* fn, int condemned, int max_ge
* Scan all stack roots in this 'namespace'
*/
-void CNameSpace::GcScanRoots(promote_func* fn, int condemned, int max_gen,
+void GCScan::GcScanRoots(promote_func* fn, int condemned, int max_gen,
ScanContext* sc)
{
#if defined ( _DEBUG) && defined (CATCH_GC)
@@ -190,7 +190,7 @@ void CNameSpace::GcScanRoots(promote_func* fn, int condemned, int max_gen,
*/
-void CNameSpace::GcScanHandles (promote_func* fn, int condemned, int max_gen,
+void GCScan::GcScanHandles (promote_func* fn, int condemned, int max_gen,
ScanContext* sc)
{
@@ -229,7 +229,7 @@ void CNameSpace::GcScanHandles (promote_func* fn, int condemned, int max_gen,
* Scan all handle roots in this 'namespace' for profiling
*/
-void CNameSpace::GcScanHandlesForProfilerAndETW (int max_gen, ScanContext* sc)
+void GCScan::GcScanHandlesForProfilerAndETW (int max_gen, ScanContext* sc)
{
LIMITED_METHOD_CONTRACT;
@@ -254,7 +254,7 @@ void CNameSpace::GcScanHandlesForProfilerAndETW (int max_gen, ScanContext* sc)
/*
* Scan dependent handles in this 'namespace' for profiling
*/
-void CNameSpace::GcScanDependentHandlesForProfilerAndETW (int max_gen, ProfilingScanContext* sc)
+void GCScan::GcScanDependentHandlesForProfilerAndETW (int max_gen, ProfilingScanContext* sc)
{
LIMITED_METHOD_CONTRACT;
@@ -264,7 +264,7 @@ void CNameSpace::GcScanDependentHandlesForProfilerAndETW (int max_gen, Profiling
#endif // defined(GC_PROFILING) || defined(FEATURE_EVENT_TRACE)
-void CNameSpace::GcRuntimeStructuresValid (BOOL bValid)
+void GCScan::GcRuntimeStructuresValid (BOOL bValid)
{
WRAPPER_NO_CONTRACT;
if (!bValid)
@@ -281,14 +281,14 @@ void CNameSpace::GcRuntimeStructuresValid (BOOL bValid)
}
}
-void CNameSpace::GcDemote (int condemned, int max_gen, ScanContext* sc)
+void GCScan::GcDemote (int condemned, int max_gen, ScanContext* sc)
{
Ref_RejuvenateHandles (condemned, max_gen, (uintptr_t)sc);
if (!GCHeap::IsServerHeap() || sc->thread_number == 0)
GCToEEInterface::SyncBlockCacheDemote(max_gen);
}
-void CNameSpace::GcPromotionsGranted (int condemned, int max_gen, ScanContext* sc)
+void GCScan::GcPromotionsGranted (int condemned, int max_gen, ScanContext* sc)
{
Ref_AgeHandles(condemned, max_gen, (uintptr_t)sc);
if (!GCHeap::IsServerHeap() || sc->thread_number == 0)
@@ -296,7 +296,7 @@ void CNameSpace::GcPromotionsGranted (int condemned, int max_gen, ScanContext* s
}
-size_t CNameSpace::AskForMoreReservedMemory (size_t old_size, size_t need_size)
+size_t GCScan::AskForMoreReservedMemory (size_t old_size, size_t need_size)
{
LIMITED_METHOD_CONTRACT;
@@ -317,7 +317,7 @@ size_t CNameSpace::AskForMoreReservedMemory (size_t old_size, size_t need_size)
return old_size + need_size;
}
-void CNameSpace::VerifyHandleTable(int condemned, int max_gen, ScanContext* sc)
+void GCScan::VerifyHandleTable(int condemned, int max_gen, ScanContext* sc)
{
LIMITED_METHOD_CONTRACT;
Ref_VerifyHandleTable(condemned, max_gen, sc);
diff --git a/src/gc/gcscan.h b/src/gc/gcscan.h
index 0fddf3540e..502a04c3b4 100644
--- a/src/gc/gcscan.h
+++ b/src/gc/gcscan.h
@@ -32,14 +32,7 @@ struct DhContext
ScanContext *m_pScanContext; // The GC's scan context for this phase
};
-
-// <TODO>
-// @TODO (JSW): For compatibility with the existing GC code we use CNamespace
-// as the name of this class. I'm planning on changing it to
-// something like GCDomain....
-// </TODO>
-
-class CNameSpace
+class GCScan
{
friend struct ::_DacGlobals;
diff --git a/src/inc/dacvars.h b/src/inc/dacvars.h
index d4c8287818..c45a65f491 100644
--- a/src/inc/dacvars.h
+++ b/src/inc/dacvars.h
@@ -151,7 +151,7 @@ DEFINE_DACVAR(ULONG, PTR_SharedDomain, SharedDomain__m_pSharedDomain, SharedDoma
DEFINE_DACVAR(ULONG, DWORD, CExecutionEngine__TlsIndex, CExecutionEngine::TlsIndex)
-DEFINE_DACVAR(ULONG, LONG, CNameSpace__m_GcStructuresInvalidCnt, CNameSpace::m_GcStructuresInvalidCnt)
+DEFINE_DACVAR(ULONG, LONG, GCScan__m_GcStructuresInvalidCnt, GCScan::m_GcStructuresInvalidCnt)
#if defined(FEATURE_INCLUDE_ALL_INTERFACES) || defined(FEATURE_WINDOWSPHONE)
DEFINE_DACVAR(ULONG, int, CCLRErrorReportingManager__g_ECustomDumpFlavor, CCLRErrorReportingManager::g_ECustomDumpFlavor)
diff --git a/src/vm/object.cpp b/src/vm/object.cpp
index 25a7109905..1a548dbd9c 100644
--- a/src/vm/object.cpp
+++ b/src/vm/object.cpp
@@ -1789,7 +1789,7 @@ VOID Object::ValidateInner(BOOL bDeep, BOOL bVerifyNextHeader, BOOL bVerifySyncB
// try to validate next object's header
if (bDeep
&& bVerifyNextHeader
- && CNameSpace::GetGcRuntimeStructuresValid ()
+ && GCScan::GetGcRuntimeStructuresValid ()
//NextObj could be very slow if concurrent GC is going on
&& !(GCHeap::IsGCHeapInitialized() && GCHeap::GetGCHeap ()->IsConcurrentGCInProgress ()))
{
diff --git a/src/vm/stubhelpers.cpp b/src/vm/stubhelpers.cpp
index f558b00f78..025a202702 100644
--- a/src/vm/stubhelpers.cpp
+++ b/src/vm/stubhelpers.cpp
@@ -62,7 +62,7 @@ void StubHelpers::ValidateObjectInternal(Object *pObjUNSAFE, BOOL fValidateNextO
}
CONTRACTL_END;
- _ASSERTE(CNameSpace::GetGcRuntimeStructuresValid());
+ _ASSERTE(GCScan::GetGcRuntimeStructuresValid());
// validate the object - there's no need to validate next object's
// header since we validate the next object explicitly below
diff --git a/src/vm/syncblk.cpp b/src/vm/syncblk.cpp
index 83e4f4eb27..7163658ef3 100644
--- a/src/vm/syncblk.cpp
+++ b/src/vm/syncblk.cpp
@@ -2525,7 +2525,7 @@ BOOL ObjHeader::Validate (BOOL bVerifySyncBlkIndex)
//rest of the DWORD is SyncBlk Index
if (!(bits & BIT_SBLK_IS_HASHCODE))
{
- if (bVerifySyncBlkIndex && CNameSpace::GetGcRuntimeStructuresValid ())
+ if (bVerifySyncBlkIndex && GCScan::GetGcRuntimeStructuresValid ())
{
DWORD sbIndex = bits & MASK_SYNCBLOCKINDEX;
ASSERT_AND_CHECK(SyncTableEntry::GetSyncTableEntry()[sbIndex].m_Object == obj);