summaryrefslogtreecommitdiff
path: root/src/vm/ceemain.cpp
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/vm/ceemain.cpp
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/vm/ceemain.cpp')
-rw-r--r--src/vm/ceemain.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/vm/ceemain.cpp b/src/vm/ceemain.cpp
index 07781261f7..5521d8a4d9 100644
--- a/src/vm/ceemain.cpp
+++ b/src/vm/ceemain.cpp
@@ -150,7 +150,7 @@
#include "frames.h"
#include "threads.h"
#include "stackwalk.h"
-#include "gc.h"
+#include "gcheaputilities.h"
#include "interoputil.h"
#include "security.h"
#include "fieldmarshaler.h"
@@ -195,6 +195,7 @@
#include "finalizerthread.h"
#include "threadsuspend.h"
#include "disassembler.h"
+#include "gcenv.ee.h"
#ifndef FEATURE_PAL
#include "dwreport.h"
@@ -305,7 +306,6 @@ extern "C" HRESULT __cdecl CorDBGetInterface(DebugInterface** rcInterface);
#if !defined(FEATURE_CORECLR) && !defined(CROSSGEN_COMPILE)
-void* __stdcall GetCLRFunction(LPCSTR FunctionName);
// Pointer to the activated CLR interface provided by the shim.
ICLRRuntimeInfo *g_pCLRRuntime = NULL;
@@ -640,7 +640,7 @@ void InitializeStartupFlags()
g_fEnableARM = TRUE;
#endif // !FEATURE_CORECLR
- GCHeap::InitializeHeapType((flags & STARTUP_SERVER_GC) != 0);
+ InitializeHeapType((flags & STARTUP_SERVER_GC) != 0);
#ifdef FEATURE_LOADER_OPTIMIZATION
g_dwGlobalSharePolicy = (flags&STARTUP_LOADER_OPTIMIZATION_MASK)>>1;
@@ -1932,15 +1932,17 @@ void STDMETHODCALLTYPE EEShutDownHelper(BOOL fIsDllUnloading)
#endif
#ifdef FEATURE_PREJIT
- // If we're doing basic block profiling, we need to write the log files to disk.
-
- static BOOL fIBCLoggingDone = FALSE;
- if (!fIBCLoggingDone)
{
- if (g_IBCLogger.InstrEnabled())
- Module::WriteAllModuleProfileData(true);
+ // If we're doing basic block profiling, we need to write the log files to disk.
+
+ static BOOL fIBCLoggingDone = FALSE;
+ if (!fIBCLoggingDone)
+ {
+ if (g_IBCLogger.InstrEnabled())
+ Module::WriteAllModuleProfileData(true);
- fIBCLoggingDone = TRUE;
+ fIBCLoggingDone = TRUE;
+ }
}
#endif // FEATURE_PREJIT
@@ -3719,7 +3721,16 @@ void InitializeGarbageCollector()
g_pFreeObjectMethodTable->SetBaseSize(ObjSizeOf (ArrayBase));
g_pFreeObjectMethodTable->SetComponentSize(1);
- GCHeap *pGCHeap = GCHeap::CreateGCHeap();
+#ifdef FEATURE_STANDALONE_GC
+ IGCToCLR* gcToClr = new (nothrow) GCToEEInterface();
+ if (!gcToClr)
+ ThrowOutOfMemory();
+#else
+ IGCToCLR* gcToClr = nullptr;
+#endif
+
+ IGCHeap *pGCHeap = InitializeGarbageCollector(gcToClr);
+ g_pGCHeap = pGCHeap;
if (!pGCHeap)
ThrowOutOfMemory();
@@ -3833,7 +3844,7 @@ BOOL STDMETHODCALLTYPE EEDllMain( // TRUE on success, FALSE on error.
{
// GetThread() may be set to NULL for Win9x during shutdown.
Thread *pThread = GetThread();
- if (GCHeap::IsGCInProgress() &&
+ if (GCHeapUtilities::IsGCInProgress() &&
( (pThread && (pThread != ThreadSuspend::GetSuspensionThread() ))
|| !g_fSuspendOnShutdown))
{
@@ -4643,7 +4654,6 @@ VOID STDMETHODCALLTYPE LogHelp_LogAssert( LPCSTR szFile, int iLine, LPCSTR expr)
}
-extern BOOL NoGuiOnAssert();
extern "C"
//__declspec(dllexport)
BOOL STDMETHODCALLTYPE LogHelp_NoGuiOnAssert()
@@ -4656,7 +4666,6 @@ BOOL STDMETHODCALLTYPE LogHelp_NoGuiOnAssert()
return fRet;
}
-extern VOID TerminateOnAssert();
extern "C"
//__declspec(dllexport)
VOID STDMETHODCALLTYPE LogHelp_TerminateOnAssert()