diff options
Diffstat (limited to 'src/gc/sample')
-rw-r--r-- | src/gc/sample/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/gc/sample/GCSample.cpp | 2 | ||||
-rw-r--r-- | src/gc/sample/gcenv.ee.cpp | 51 | ||||
-rw-r--r-- | src/gc/sample/gcenv.h | 6 |
4 files changed, 19 insertions, 41 deletions
diff --git a/src/gc/sample/CMakeLists.txt b/src/gc/sample/CMakeLists.txt index 5fe7887963..42f097a6e3 100644 --- a/src/gc/sample/CMakeLists.txt +++ b/src/gc/sample/CMakeLists.txt @@ -8,6 +8,7 @@ include_directories(../env) set(SOURCES GCSample.cpp gcenv.ee.cpp + ../gcconfig.cpp ../gccommon.cpp ../gceewks.cpp ../gchandletable.cpp diff --git a/src/gc/sample/GCSample.cpp b/src/gc/sample/GCSample.cpp index 0a771b7e91..43cb23878e 100644 --- a/src/gc/sample/GCSample.cpp +++ b/src/gc/sample/GCSample.cpp @@ -107,6 +107,8 @@ void WriteBarrier(Object ** dst, Object * ref) ErectWriteBarrier(dst, ref); } +extern "C" bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars); + int __cdecl main(int argc, char* argv[]) { // diff --git a/src/gc/sample/gcenv.ee.cpp b/src/gc/sample/gcenv.ee.cpp index fa6efbf2d6..03d960819a 100644 --- a/src/gc/sample/gcenv.ee.cpp +++ b/src/gc/sample/gcenv.ee.cpp @@ -286,64 +286,39 @@ bool GCToEEInterface::EagerFinalized(Object* obj) return false; } -MethodTable* GCToEEInterface::GetFreeObjectMethodTable() +bool GCToEEInterface::GetBooleanConfigValue(const char* key, bool* value) { - return g_pFreeObjectMethodTable; + return false; } -bool IsGCSpecialThread() +bool GCToEEInterface::GetIntConfigValue(const char* key, int64_t* value) { - // TODO: Implement for background GC return false; } -bool IsGCThread() +bool GCToEEInterface::GetStringConfigValue(const char* key, const char** value) { return false; } -void SwitchToWriteWatchBarrier() +void GCToEEInterface::FreeStringConfigValue(const char *value) { -} -void SwitchToNonWriteWatchBarrier() -{ } -void LogSpewAlways(const char * /*fmt*/, ...) +MethodTable* GCToEEInterface::GetFreeObjectMethodTable() { + return g_pFreeObjectMethodTable; } -uint32_t CLRConfig::GetConfigValue(ConfigDWORDInfo eType) +bool IsGCSpecialThread() { - switch (eType) - { - case UNSUPPORTED_BGCSpinCount: - return 140; - - case UNSUPPORTED_BGCSpin: - return 2; - - case UNSUPPORTED_GCLogEnabled: - case UNSUPPORTED_GCLogFile: - case UNSUPPORTED_GCLogFileSize: - case EXTERNAL_GCStressStart: - case INTERNAL_GCStressStartAtJit: - case INTERNAL_DbgDACSkipVerifyDlls: - return 0; - - case Config_COUNT: - default: -#ifdef _MSC_VER -#pragma warning(suppress:4127) // Constant conditional expression in ASSERT below -#endif - ASSERT(!"Unknown config value type"); - return 0; - } + // TODO: Implement for background GC + return false; } -HRESULT CLRConfig::GetConfigValue(ConfigStringInfo /*eType*/, TCHAR * * outVal) +bool IsGCThread() { - *outVal = NULL; - return 0; + return false; } + diff --git a/src/gc/sample/gcenv.h b/src/gc/sample/gcenv.h index 4505f1af30..14f60d8c6e 100644 --- a/src/gc/sample/gcenv.h +++ b/src/gc/sample/gcenv.h @@ -4,9 +4,9 @@ // The sample is to be kept simple, so building the sample // in tandem with a standalone GC is currently not supported. -#ifdef FEATURE_STANDALONE_GC -#undef FEATURE_STANDALONE_GC -#endif // FEATURE_STANDALONE_GC +#ifdef BUILD_AS_STANDALONE +#undef BUILD_AS_STANDALONE +#endif // BUILD_AS_STANDALONE #if defined(_DEBUG) #ifndef _DEBUG_IMPL |