diff options
author | Sean Gillespie <segilles@microsoft.com> | 2017-10-27 14:37:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 14:37:54 -0700 |
commit | bd3424913138d10f9c4fdb6176fb471e8d1ba1d7 (patch) | |
tree | ca05fccdea9a8584194b4a4acf5b7cb1aab6800f /src/gc/sample | |
parent | fb4af6c2908b633b200b556986815781f2139f4e (diff) | |
download | coreclr-bd3424913138d10f9c4fdb6176fb471e8d1ba1d7.tar.gz coreclr-bd3424913138d10f9c4fdb6176fb471e8d1ba1d7.tar.bz2 coreclr-bd3424913138d10f9c4fdb6176fb471e8d1ba1d7.zip |
[Local GC] Implement loader protocol for a standalone GC (#14663)
* First cut of the load protocol
* Implement for non-standalone GC
* Initial working implementation
* First steps towards not using GetProcAddress when not using a standalone GC
* Factor out loading routines into standalone and non-standalone cases
* Remove the FEATURE_STANDALONE_GC_ONLY build
* Code cleanup and comments
* Comments for the version numbers
* Use more appropriate type for config string
* add GC_LOAD_STATUS_BEFORE_START to disambiguate failures before the start of the load and failures at the beginning of the load
* FEATURE_STANDALONE_GC on by default
* Implement YieldProcessor and MemoryBarrier for arm and arm64
* Remove missed FEATURE_STANDALONE_GC feature check
Diffstat (limited to 'src/gc/sample')
-rw-r--r-- | src/gc/sample/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/gc/sample/GCSample.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gc/sample/CMakeLists.txt b/src/gc/sample/CMakeLists.txt index 42f097a6e3..6f8aa615d7 100644 --- a/src/gc/sample/CMakeLists.txt +++ b/src/gc/sample/CMakeLists.txt @@ -5,6 +5,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories(..) include_directories(../env) +add_definitions(-DFEATURE_REDHAWK) + set(SOURCES GCSample.cpp gcenv.ee.cpp @@ -14,6 +16,7 @@ set(SOURCES ../gchandletable.cpp ../gcscan.cpp ../gcwks.cpp + ../gcload.cpp ../handletable.cpp ../handletablecache.cpp ../handletablecore.cpp diff --git a/src/gc/sample/GCSample.cpp b/src/gc/sample/GCSample.cpp index 62eec6698f..4248d92256 100644 --- a/src/gc/sample/GCSample.cpp +++ b/src/gc/sample/GCSample.cpp @@ -107,7 +107,7 @@ void WriteBarrier(Object ** dst, Object * ref) ErectWriteBarrier(dst, ref); } -extern "C" bool InitializeGarbageCollector(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars); +extern "C" HRESULT GC_Initialize(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars); int __cdecl main(int argc, char* argv[]) { @@ -133,7 +133,7 @@ int __cdecl main(int argc, char* argv[]) GcDacVars dacVars; IGCHeap *pGCHeap; IGCHandleManager *pGCHandleManager; - if (!InitializeGarbageCollector(nullptr, &pGCHeap, &pGCHandleManager, &dacVars)) + if (GC_Initialize(nullptr, &pGCHeap, &pGCHandleManager, &dacVars) != S_OK) { return -1; } |