#include "ipcmanagerinterface.h"
#include "binder.h"
#include "win32threadpool.h"
-#include "gcscan.h"
#ifdef FEATURE_APPX
#include "appxutil.h"
return status;
}
- if (!GCScan::GetGcRuntimeStructuresValid ())
+ if (*g_gcDacGlobals->gc_structures_invalid_cnt != 0)
{
// GC is in progress, don't dump this object
return S_OK;
return S_OK;
}
- if (!GCScan::GetGcRuntimeStructuresValid ())
+ if (*g_gcDacGlobals->gc_structures_invalid_cnt != 0)
{
// GC is in progress, don't dump this object
return S_OK;
Dereference(g_gcDacGlobals->ephemeral_heap_segment).EnumMem();
g_gcDacGlobals->alloc_allocated.EnumMem();
+ g_gcDacGlobals->gc_structures_invalid_cnt.EnumMem();
Dereference(g_gcDacGlobals->finalize_queue).EnumMem();
// Enumerate the entire generation table, which has variable size
DacEnumMemoryRegion(g_gcDacGlobals->g_heaps.GetAddr(),
sizeof(TADDR) * *g_gcDacGlobals->n_heaps);
+ g_gcDacGlobals->gc_structures_invalid_cnt.EnumMem();
g_gcDacGlobals->g_heaps.EnumMem();
for (int i=0; i < *g_gcDacGlobals->n_heaps; i++)
#include "../../vm/gcenv.h"
#include "../../vm/ecall.h"
#include "../../vm/rcwwalker.h"
-#include "../../gc/gc.h"
-#include "../../gc/gcscan.h"
-
-#undef SERVER_GC
-namespace WKS {
-#include "../../gc/gcimpl.h"
-#include "../../gc/gcpriv.h"
-}
#ifdef DEBUGGING_SUPPORTED
#endif // FEATURE_BASICFREEZE
}
+bool GCHeap::RuntimeStructuresValid()
+{
+ return GCScan::GetGcRuntimeStructuresValid();
+}
+
#endif // !DACCESS_COMPILE
void SetGCInProgress(BOOL fInProgress);
+ bool RuntimeStructuresValid();
+
CLREvent * GetWaitForGCEvent();
HRESULT Initialize ();
// Sets whether or not a GC is in progress.
virtual void SetGCInProgress(BOOL fInProgress) = 0;
+ // Gets whether or not the GC runtime structures are in a valid state for heap traversal.
+ virtual bool RuntimeStructuresValid() = 0;
+
/*
============================================================================
Add/RemoveMemoryPressure support routines. These are on the interface
#include "gc.h"
#include "objecthandle.h"
-#ifdef DACCESS_COMPILE
-SVAL_IMPL_INIT(int32_t, GCScan, m_GcStructuresInvalidCnt, 1);
-#else //DACCESS_COMPILE
VOLATILE(int32_t) GCScan::m_GcStructuresInvalidCnt = 1;
-#endif //DACCESS_COMPILE
bool GCScan::GetGcRuntimeStructuresValid ()
{
return (int32_t)m_GcStructuresInvalidCnt == 0;
}
-#ifdef DACCESS_COMPILE
-
-#ifndef FEATURE_REDHAWK
-void
-GCScan::EnumMemoryRegions(CLRDataEnumMemoryFlags flags)
-{
- UNREFERENCED_PARAMETER(flags);
- m_GcStructuresInvalidCnt.EnumMem();
-}
-#endif
-
-#else
+#ifndef DACCESS_COMPILE
//
// Dependent handle promotion scan support
static void VerifyHandleTable(int condemned, int max_gen, ScanContext* sc);
-#ifdef DACCESS_COMPILE
- SVAL_DECL(int32_t, m_GcStructuresInvalidCnt);
-#else
static VOLATILE(int32_t) m_GcStructuresInvalidCnt;
-#endif //DACCESS_COMPILE
};
// These two functions are utilized to scan the heap if requested by ETW
DEFINE_DACVAR(ULONG, DWORD, CExecutionEngine__TlsIndex, CExecutionEngine::TlsIndex)
-DEFINE_DACVAR(ULONG, LONG, GCScan__m_GcStructuresInvalidCnt, GCScan::m_GcStructuresInvalidCnt)
-
#if defined(FEATURE_WINDOWSPHONE)
DEFINE_DACVAR(ULONG, int, CCLRErrorReportingManager__g_ECustomDumpFlavor, CCLRErrorReportingManager::g_ECustomDumpFlavor)
#endif
#include "eeconfig.h"
#include "gcheaputilities.h"
#include "field.h"
-#include "gcscan.h"
#include "argdestination.h"
lastTest = 7;
+ _ASSERTE(GCHeapUtilities::IsGCHeapInitialized());
// try to validate next object's header
if (bDeep
&& bVerifyNextHeader
- && GCScan::GetGcRuntimeStructuresValid ()
+ && GCHeapUtilities::GetGCHeap()->RuntimeStructuresValid()
//NextObj could be very slow if concurrent GC is going on
- && !(GCHeapUtilities::IsGCHeapInitialized() && GCHeapUtilities::GetGCHeap ()->IsConcurrentGCInProgress ()))
+ && !GCHeapUtilities::GetGCHeap ()->IsConcurrentGCInProgress ())
{
Object * nextObj = GCHeapUtilities::GetGCHeap ()->NextObj (this);
if ((nextObj != NULL) &&
#include "comdatetime.h"
#include "gcheaputilities.h"
#include "interoputil.h"
-#include "gcscan.h"
#ifdef FEATURE_COMINTEROP
#include <oletls.h>
}
CONTRACTL_END;
- _ASSERTE(GCScan::GetGcRuntimeStructuresValid());
+ _ASSERTE(GCHeapUtilities::GetGCHeap()->RuntimeStructuresValid());
// validate the object - there's no need to validate next object's
// header since we validate the next object explicitly below
#include "corhost.h"
#include "comdelegate.h"
#include "finalizerthread.h"
-#include "gcscan.h"
#ifdef FEATURE_COMINTEROP
#include "runtimecallablewrapper.h"
//rest of the DWORD is SyncBlk Index
if (!(bits & BIT_SBLK_IS_HASHCODE))
{
- if (bVerifySyncBlkIndex && GCScan::GetGcRuntimeStructuresValid ())
+ if (bVerifySyncBlkIndex && GCHeapUtilities::GetGCHeap()->RuntimeStructuresValid ())
{
DWORD sbIndex = bits & MASK_SYNCBLOCKINDEX;
ASSERT_AND_CHECK(SyncTableEntry::GetSyncTableEntry()[sbIndex].m_Object == obj);