path: root/src/gc/env/gcenv.base.h
AgeCommit message (Collapse)AuthorFilesLines
2021-06-29Add YieldProcessor implementation for armsubmit/tizen/20210629.000826accepted/tizen/unified/20210629.130321Gleb Balykov1-7/+2
2019-06-11Fix Redhawk definesSuchiman1-3/+0
2019-05-15Remove concept of AppDomains from the GC (#24536)David Wrighton1-18/+0
* Remove concept of AppDomains from the GC - Leave constructs allowing for multiple handle tables, as scenarios for that have been proposed - Remove FEATURE_APPDOMAIN_RESOURCE_MONITORING
2019-04-03Reflect PR feedbackJan Vorlicek1-0/+1
2019-04-03Remove CPU groups handling from the gc.cppJan Vorlicek1-0/+1
This change removes all explicit manipulation and handling of CPU groups from the gc.cpp and hides it behind the GCToOSInterface. This is a step to prepare for removing the CPU groups emulation on Unix. In fact, I've already updated the standalone Unix GC to be able to affinitize GC threads to any subset of CPUs and added previously missing support for the affinity setting itself. The NUMA support still remains missing there. It also adds a new way to specify GC thread affinitization that is not limited to 64 threads. Instead of affinity mask stored in 64 bit integer, we now use a bitset that can contain as many processors as GC can support. And there is a new GC config to specify the affinity in a form of a range list.
2019-02-22More GNUC Fixes (#22687)Sinan Kaya1-5/+23
* Replace __sync_swap with __atomic_exchange_n __sync_swap() is a clang specific function. * Remove multiline comment * Add paranthesis around sum src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses] UINT32 aligned = *totalBytes + 3 & ~3; * Define __int64 * Define windows types for tests * Remove undefined has_builtin defines and define alloca and inline for GNUC * Remove __clang__ where possible * Add implicit casting to help compiler find WCHAR* variant src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’ return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName()); ^ In file included from src/inc/sstring.h:1082:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/binder/../vm/util.hpp:19, from src/binder/../vm/common.h:110, from src/binder/assembly.cpp:14: src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T) inline SString::SString(void *buffer, COUNT_T size) ^ src/inc/sstring.inl:73:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T) inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count) ^ src/inc/sstring.inl:436:8: note: candidate expects 3 arguments, 1 provided src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*) inline SString::SString(tagLiteral dummytag, const WCHAR *literal) ^ src/inc/sstring.inl:418:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*) inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal) ^ src/inc/sstring.inl:401:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*) inline SString::SString(tagLiteral dummytag, const ASCII *literal) * Reorder DLLEXPORT and STDAPI GNUC wants extern "C" <attribute> format. * Abstract __FUNCSIG__ * Abstract __debugbreak() * Move common compiler options out of clang and add Wno-unused-value * Add paranthesis around || and && src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (!chosen_power2) && (i < free_space_count)); * Set Wno-delete-non-virtual-dtor for CXX files only * Don't warn on unterminated endif labels * Suppress unused functions * Use 0x syntax rather than h syntax on GNU asm files * Correct constructor call directly src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27: required from here src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly this->basic_string::basic_string(_Ptr, c_len(_Ptr)); * Suppress NULL used in arithmetic warnings
2019-02-21Remove unused perfcounter code (#22742)Sung Yoon Whang1-2/+0
* removing references to COUNTER_ONLY, ENABLE_PERF_COUNTERS in src/vm directory * removing perfcounters* files * Fix build * Remove PerfCounterSupportedBuild * Some more cleanup on the GC side
2019-01-23Remove all traces of FEATURE_STACK_PROBE. (#22149)Filip Navara1-3/+0
2018-11-06Loop-free GC rounding helpers with _BitScanReverse. (#20157)Jack Pappas1-0/+52
2018-10-31Make BitScanForward/BitScanForward64 PAL wrappers branchless. (#20412)Jack Pappas1-22/+22
The BitScanForward/BitScanForward64 wrapper functions from the PAL and gcenv have been modified so they're faster (and branchless), while also adhering more closely to the behavior of the MSVC intrinsics. Use _BitScanForward64 when targeting 64-bit Windows. The _WIN32 macro is always defined by MSVC, even when targeting 64-bit versions of Windows. Use the _WIN64 macro instead to check whether the build is targeting 64-bit Windows, and if so, use the _BitScanForward64 intrinsic for the BitScanForward64 wrapper instead of the 32-bit-based fallback.
2018-08-25Remove NumaNodeInfo, CPUGroupInfo, AppDomain, SystemDomain, and EEConfig ↵David Mason1-66/+0
stubs from local gc (#19500) * Switch NumaNodeInfo and CPUGroupInfo to the interface * Remove AppDomain/SystemDomain stubs * remove EEConfig methods * Port numa code to the coreclr side * add numa back to PAL and standalone builds * enable numa for PAL/Standalone builds, and fix BOOL warnings * remove unused defines, and fix linux build errors * building on windows * about to delete numa work from unix and want a backup * add stubs for unix numa/cpugroup * Code review feedback * Code review feedback
2018-08-11[local gc] disable feature redhawk (#17769)David Mason1-1/+0
2018-03-26[local gc] Fix for BitScanForward64, it was ignoring the high byte check ↵David Mason1-3/+9
2017-12-13Revert " Revert "[Local GC] Move knowledge of overlapped I/O objects to the ↵Jan Kotas1-0/+5
EE through four callbacks (#14982)""
2017-12-12Revert "[Local GC] Move knowledge of overlapped I/O objects to the EE ↵Sean Gillespie1-5/+0
through four callbacks (#14982)" This reverts commit c755e3b7f5d597c8d192675dbaaa337268d93f1c.
2017-11-27[Local GC] Move knowledge of overlapped I/O objects to the EE through four ↵Sean Gillespie1-0/+5
callbacks (#14982) * [Local GC] Move knowledge of overlapped I/O objects to the EE through four callbacks * Code review feedback: 1. Rename OverlappedData->AsyncPinned in interface methods 2. Remove additional FEATURE_REDHAWK defines around async pin relocation code * Eliminate two GCToEEInterface callbacks by passing the callbacks directly as arguments to a method on IGCHandleStore * Repair clang build * Split pin and async pin handle scans into two separate callbacks * Fix the clang and non-Windows builds
2017-10-27[Local GC] Implement loader protocol for a standalone GC (#14663)Sean Gillespie1-2/+10
* 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
2017-10-26[Local GC] Move IsGCThread and IsGCSpecialThread to GCToEEInterface (#14685)Sean Gillespie1-12/+0
* [Local GC] Move IsGCThread and IsGCSpecialThread to GCToEEInterface * Fix the windows and sample builds
2017-09-06Vendor the volatile.h header into src/gc/env for the standalone GC build ↵Sean Gillespie1-118/+1
(#13656) * Vendor the volatile.h header into src/gc/env for the standalone GC build * Repair the GC sample * Remove some unneeded defines (fixes the sample build)
2017-08-22Remove macro definition checks that aren't useful and cause unnecessary ↵Sean Gillespie1-8/+0
build breaks (#13523)
2017-08-22[Local GC] Enable building the GC as a shared library (#13137)Sean Gillespie1-141/+195
* [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...)
2017-06-13[Arn64/Unix] Revise Volatile.T barriers (#12156)Steve MacLean1-1/+28
* [Arm64] Revise Volatile<T> barriers * Remove VolateStore from CopyValueClassUnchecked * Replace MemoryBarrier() in CopyValueClassUnchecked
2017-06-12[Arm64/Unix] Add 64K page support (#10981)Steve MacLean1-2/+0
* [Arm64/Unix] Support 64K pages * GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
2017-04-07[Local GC] Fix some interface violations (#10817)Sean Gillespie1-0/+1
2017-04-07Move OBJECTHANDLE definition to gcinterface.hAditya Mandaleeka1-10/+0
2017-03-26Change typedef for BOOL in gcenv.base.h to int. (#10486)Aditya Mandaleeka1-1/+1
2017-01-23Port GC fixes from CoreRT (#9078)Jan Kotas1-19/+0
2016-12-23Remove all usage of vsnprintf (#8709)Jan Vorlicek1-1/+1
This change removes all usages of vsnprintf and modifies runtime to not to use vsnprintf or _vsnprintf I've also fixed two issues in PAL TRACE function string format parameters that caused crashes when I was trying to run all PAL tests with PAL tracing enabled.
2016-09-15Update the GC from CoreRT (#7207)Sean Gillespie1-1/+1
2016-08-30GC update from CoreRT (#6984)Jan Kotas1-1/+1 97dd6d2cbb50901cc3651f41a53a4ff9a1052391
2016-07-23GC update from CoreRT (#6429)Jan Kotas1-0/+23 91d7a9c8e2b393314422b6106adedec683c0ae51
2016-07-21Refactor GC background thread creation (#6384)Jan Vorlicek1-7/+0
This change modifies the GCToEEInterface::CreateBackgroundThread so that it returns a fully initialized and running thread.
2016-06-19Update GC from CoreRT (#5859)Jan Kotas1-38/+0 53276850bc2e7e531908434b2d062fcff3e1d58d
2016-06-14My last fix of checking whether the runtime was suspended was incomplete.Maoni01-1/+1
I needed to check at the 3 other places. Before the software write watch implementation, this check was in the write barrier code itself and was doing the right thing. So I am just using the same thing (ie, IsGCThread) to check whether the runtime is suspended.
2016-06-07Update GC from CoreRT (#5522)Jan Kotas1-0/+1 3bd148c2089a781458b99d787395377a25bd23d0
2016-05-16Update GC from CoreRTJan Kotas1-1/+4 854b9ea7accfbd24423a10382c1a5a2bd6753450
2016-04-22Update GC from CoreRTJan Kotas1-1/+1 102af78f9169082478165e7c676bbee6ae194940
2016-04-12Implement software write watch and make concurrent GC functional outside WindowsKoundinya Veluri1-2/+4
- Implemented software write watch using write barriers - A new set of write barriers is introduced, each corresponding to an existing one, but which also updates the write watch table. The GC switches to a write watch barrier during concurrent GC, and switches back to a non write watch barrier after the final query for dirty pages. - The write watch table is alloacted along with the card table - Since the card table is used differently, different synchonization is used for the write watch table. The runtime is suspended during resize since that is the most infrequently occuring operation, of that, ResetWriteWatch, and GetWriteWatch. - ResetWriteWatch() doesn't need a suspend, but since the software WW version is much faster than the Windows version, moved it into the suspended region to avoid some synchronization that would otherwise be required - The background calls to GetWriteWatch() don't need or do a suspend. They only need to synchronize with the resize path, not for the purpose of correct functionality, but to not miss dirty pages such that concurrent GC is effective. Miscellaneous: - Fixed to copy mscorlib.dll and delete the Windows version of
2016-02-24Update GC from CoreRTJan Kotas1-1/+0 d18f7e5d9fea784b4531aa8988fdad9f3a9cffc3
2016-01-27Update license headersdotnet-bot1-4/+3
2016-01-26Update GC from CoreRTJan Kotas1-35/+24 0dcc350dae128b6fcca6b1ed74b580ed3240460a
2016-01-12Fix few details in the GCJan Vorlicek1-1/+1
- For Unix, the definition of __forceinline was missing the inline - Allocation of GCThreadStubParams was missing a check for failure - Removed few unnecessary #ifdefs for FEATURE_PAL from the GC sample - Removed several obsolete functions from the GC sample
2016-01-08Fix building of GCSample on x86 via the standalone VS projectJan Kotas1-1/+1
2015-12-29Incorporate PR feedbackGaurav Khanna (CLR)1-1/+1
2015-12-28Arm64 build fixesGaurav Khanna (CLR)1-1/+11
2015-12-24GC OS interface refactoringJan Vorlicek1-310/+70
This change replaces all calls of OS specific functions in the GC by a call to a platform agnostic interface. Critical sections were abstracted too. The logging file access was changed to use CRT functions instead of Windows specific APIs. A "size" member was added to the card_table_info so that we can pass the right size to the VirtualRelease method when destroying the card table. I have also fixed a bug in the gc_heap::make_card_table error path where when VirtualCommit failed, it called VirtualRelease with size that was not the reserved size, but the committed size. Other related changes - All interlocked operations moved to Interlocked class as static methods - Removed unused function prototypes - Shuffled stuff in the root CMakeLists.txt to enable building the GC sample using the settings inherited from the root CMakeLists.txt and to clean up some things that have rotted over time, like the FEATURE_xxx macros not being in one alphabetically ordered block - Fixed the VOLATILE_MEMORY_BARRIER macro in the gcenv.base.h - Replaced uint32_t thread id by EEThreadId - Removed thread handles storage (g_gc_thread) from the GC. The thread handle is closed right after the thread is launched. That allowed me to get rid of the GCThreadHandle - Renamed the methods of the EEThreadId to be easier to understand - Moved the and gcenv.unix.cpp to the sample folder
2015-12-08Update GC from CoreRTJan Kotas1-6/+5 7be6983a6510ef00de78f4c1c8bf884a89e7c82a
2015-12-03Update GC from CoreRTJan Kotas1-63/+13 17232964a899c5403abbef1ab022f6d161f8b9ff
2015-11-19Update GC from CoreRTJan Kotas1-189/+148 c03d823a11f54e734e340813e6cd1e543ca448ef
2015-11-20Fix few missing castsJan Vorlicek1-2/+3
Strangely enough, the build was successful locally, but not on the CI machines.