diff options
author | Sean Gillespie <segilles@microsoft.com> | 2017-08-22 10:20:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 10:20:36 -0700 |
commit | 8acf6c9f7e33b1bfe77205cd2e61f2c60e8c00ce (patch) | |
tree | 5f7e55f04b5182a6ef1bd537ef76accd5a494782 /src/gc/env/gcenv.h | |
parent | 2766385624a9c5b73d32bed85519c044447701ff (diff) | |
download | coreclr-8acf6c9f7e33b1bfe77205cd2e61f2c60e8c00ce.tar.gz coreclr-8acf6c9f7e33b1bfe77205cd2e61f2c60e8c00ce.tar.bz2 coreclr-8acf6c9f7e33b1bfe77205cd2e61f2c60e8c00ce.zip |
[Local GC] Enable building the GC as a shared library (#13137)
* [Local GC] Build the GC using system headers
* Disable features to get the GC to build
* Get rid of the separate 'GC PAL' build
* Remove unused stuff
* Don't build gcenv.os.cpp when linking in a standalone gc
* Stub out CPUGroupInfo and NumaNodeInfo
* Stub out IsGCThread and friends
* Build the GC as a shared library :tada:
* Build, link, and run! :tada:
* Fix standalone GC build break
* Fixes where the GC's MethodTable and VM's MethodTable classes disagree
* Integrate a standalone GC into the CoreCLR build system (so it gets copied to the output folder). Re-enable some ifdef-ed out includes that are required for a non-standalone build of the GC.
* Bring changes to Unix and fix the Unix build. Implement some compiler intrinsic wrappers and alignment functions expected by the GC.
* Fix the Windows build
* 1. Code review feedback: use standard types for BitScanForward and
BitScanForward64
2. Delete FEATURE_COM stuff from the build system, not needed for this
PR
3. Fix the Unix build
* Fix the Windows x86 build - the _BitScanForward64 intrinsic is not available when targeting 32-bit platforms
* Remove a number of things from gcenv.base.h that are not used
* Remove a linker workaround now that we are not linking a standalone GC into the runtime
* Remove dead code, make the lack of GC_PROFILING for standalone gc not break profiling on the non-standalone build
* Code review feedback - use add_library_clr and other cmake-related fixes
* Fix include indentation
* Remove some extraneous parameters to cmake functions (cmake is remarkably lenient...)
Diffstat (limited to 'src/gc/env/gcenv.h')
-rw-r--r-- | src/gc/env/gcenv.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/gc/env/gcenv.h b/src/gc/env/gcenv.h new file mode 100644 index 0000000000..c69f5f92fd --- /dev/null +++ b/src/gc/env/gcenv.h @@ -0,0 +1,72 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#if defined(_DEBUG) +#ifndef _DEBUG_IMPL +#define _DEBUG_IMPL 1 +#endif +#define ASSERT(_expr) assert(_expr) +#else +#define ASSERT(_expr) +#endif + +#ifndef _ASSERTE +#define _ASSERTE(_expr) ASSERT(_expr) +#endif + +#include "gcenv.structs.h" +#include "gcenv.base.h" +#include "gcenv.os.h" +#include "gcenv.interlocked.h" +#include "gcenv.interlocked.inl" +#include "gcenv.object.h" +#include "gcenv.sync.h" +#include "gcinterface.h" +#include "gcenv.ee.h" + +#define MAX_LONGPATH 1024 + +#ifdef _MSC_VER +#define SUPPRESS_WARNING_4127 \ + __pragma(warning(push)) \ + __pragma(warning(disable:4127)) /* conditional expression is constant*/ +#define POP_WARNING_STATE \ + __pragma(warning(pop)) +#else // _MSC_VER +#define SUPPRESS_WARNING_4127 +#define POP_WARNING_STATE +#endif // _MSC_VER + +#define WHILE_0 \ + SUPPRESS_WARNING_4127 \ + while(0) \ + POP_WARNING_STATE \ + +#define LL_INFO10 4 + +#define STRESS_LOG_VA(msg) do { } WHILE_0 +#define STRESS_LOG0(facility, level, msg) do { } WHILE_0 +#define STRESS_LOG1(facility, level, msg, data1) do { } WHILE_0 +#define STRESS_LOG2(facility, level, msg, data1, data2) do { } WHILE_0 +#define STRESS_LOG3(facility, level, msg, data1, data2, data3) do { } WHILE_0 +#define STRESS_LOG4(facility, level, msg, data1, data2, data3, data4) do { } WHILE_0 +#define STRESS_LOG5(facility, level, msg, data1, data2, data3, data4, data5) do { } WHILE_0 +#define STRESS_LOG6(facility, level, msg, data1, data2, data3, data4, data5, data6) do { } WHILE_0 +#define STRESS_LOG7(facility, level, msg, data1, data2, data3, data4, data5, data6, data7) do { } WHILE_0 +#define STRESS_LOG_PLUG_MOVE(plug_start, plug_end, plug_delta) do { } WHILE_0 +#define STRESS_LOG_ROOT_PROMOTE(root_addr, objPtr, methodTable) do { } WHILE_0 +#define STRESS_LOG_ROOT_RELOCATE(root_addr, old_value, new_value, methodTable) do { } WHILE_0 +#define STRESS_LOG_GC_START(gcCount, Gen, collectClasses) do { } WHILE_0 +#define STRESS_LOG_GC_END(gcCount, Gen, collectClasses) do { } WHILE_0 +#define STRESS_LOG_OOM_STACK(size) do { } while(0) +#define STRESS_LOG_RESERVE_MEM(numChunks) do {} while (0) +#define STRESS_LOG_GC_STACK + +#define LOG(x) + +#define SVAL_IMPL_INIT(type, cls, var, init) \ + type cls::var = init + +#include "etmdummy.h" +#define ETW_EVENT_ENABLED(e,f) false |