summaryrefslogtreecommitdiff
path: root/src/gc/sample
AgeCommit message (Collapse)AuthorFilesLines
2019-06-20ensure process-wide fence when updating GC write barrier on ARM64 (#25130)Vladimir Sadov1-1/+1
* ensure process-wide fences when updating GC write barrier on ARM64
2019-06-06Use CMake's C# support to build DacTableGen instead of manually invoking ↵Jeremy Koritzinsky1-2/+2
csc.exe ourselves. (#24342) * Use CMake's C# support to build DacTableGen instead of manually invoking csc.exe ourselves. * Fix x86 failures. * Disable DAC generation when building with NMake Makefiles and issue an error since the CMake C# support is VS-only. We don't actually support building with NMake (only configure) so this is ok. * Clean up rest of the macro=1's PR Feedback. * Fix Visual Studio generator matching. * Explicitly specify anycpu32bitpreferred for DacTableGen so the ARM64 build doesn't accidentally make it 64-bit * Fix bad merge
2019-05-15Remove concept of AppDomains from the GC (#24536)David Wrighton1-30/+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-24Add Medium GC Profiling Mode & ICorProfilerInfo::GetObjectReferences (#24156)Mukul Sabharwal1-1/+1
2019-04-23Delete unnecessary static and update GCSample to VS2019 (#24204)Jan Kotas2-5/+3
2019-04-08Add Large pages support in GCMukul Sabharwal1-0/+12
2019-03-18Fix explicit constructor calls and Remove multi-line comments (#23162)Sinan Kaya1-0/+4
* fix implicit constructor call * extern c format patch * muti-line * Remove direct constructor call * Conversion * Need paranthesis * Return value on resize * declspec(Thread) * Ignore warnings for GCC * Formatting issues * Move cast to constant
2019-02-07Fix GCSample bit rot (#22462)Jan Kotas6-19/+35
Fixes #22459
2018-11-08Remove need for full GC for unloadable stuff (#20384)Jan Vorlicek1-5/+0
This change removes enforcing of full GC after native LoaderAllocator is destroyed. It turns out it was not needed. There is no regression in running coreclr pri 1 tests inside an unloadable AssemblyLoadContext and unloading the context after a test completes for each test.
2018-08-31[local gc] move DacNotifyGCMarkEnd and AnalyzeSurvivorsRequested to ↵David Mason1-0/+10
GCToEEInterface (#19774)
2018-08-25Remove NumaNodeInfo, CPUGroupInfo, AppDomain, SystemDomain, and EEConfig ↵David Mason2-25/+31
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-04-06Add GetLoaderAllocatorObjectForGC to IGCToCLR (#17443)David Mason1-0/+5
2018-03-13[local gc] refactor apis for threading and suspension to avoid redundant ↵David Mason2-30/+22
calls in to the runtime (#16765) * [Local GC] Refactor calls involving thread modes, suspension, and alloc contexts to always operate on current thread * BOOL -> bool for enable/disable preemptive routines, also remove an unused call to GetThread * avoid one indirection by having GCToEEInterface::EnablePreemptiveGC return a bool indicating whether the mode was changed * Callback on IGCHeap for the runtime to notify the GC when it is trapping threads * use g_fSuspensionPending instead of GCToEEInterface::CatchAtSafePoint for allow_fgc * Remove CatchAtSafePoint * Remove GetThread from WaitLongerNoInstru * code review feedback * code review feedback * change BOOL to bool
2018-01-23[Local GC] FEATURE_EVENT_TRACE 1/n: Tracking Event State (#15873)Sean Gillespie2-0/+5
* [Local GC] FEATURE_EVENT_TRACE 1/n: Add infrastructure for keeping event state within the GC and plumbing to communicate event state changes * Code review feedback: use a load without a barrier in IsEnabled and put debug-only code under TRACE_GC_EVENT_STATE * Address code review feedback: add EventPipe callback and comments * Fix the non-FEATURE_PAL build * Fix an issue where the GC fails to react to ETW callbacks to occur before the GC is initialized (e.g. on startup when an ETW session is already active) * Simplify callback locking scheme * Add a separate callback for each EventPipe provider and funnel them all through a common handler * Fix non-FEATURE_PAL build
2017-12-13Revert " Revert "[Local GC] Move knowledge of overlapped I/O objects to the ↵Jan Kotas1-0/+8
EE through four callbacks (#14982)""
2017-12-12Revert "[Local GC] Move knowledge of overlapped I/O objects to the EE ↵Sean Gillespie1-8/+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/+8
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-11-09[Local GC] Unify background GC thread and server GC thread creation (#14821)Sean Gillespie1-7/+6
* Initial cut, ignoring thread affinity * Integrate thread affinity * Affinity for standalone Windows * Add 'specialness' and the thread name as arguments to CreateThread * First crack at unified implementation * Set priority for server GC threads * Remove unused parameter * Address code review feedback and remove some dead code that broke the clang build * Use char* on the interface instead of wchar_t (doesn't play well cross-platform) * Rename IsGCSpecialThread -> CurrentThreadWasCreatedByGC * Code review feedback and fix up the build * rename CurrentThreadWasCreatedByGC -> WasCurrentThreadCreatedByGC * Fix a contract violation when converting string encodings * Thread::CreateUtilityThread returns a thread that is not suspended - restarting a non-suspended thread is incorrect * CreateUnsuspendableThread -> CreateNonSuspendableThread
2017-10-27[Local GC] Implement loader protocol for a standalone GC (#14663)Sean Gillespie2-2/+5
* 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-0/+10
* [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-0/+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-22[Local GC] Enable building the GC as a shared library (#13137)Sean Gillespie2-13/+1
* [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-12[Arm64/Unix] Add 64K page support (#10981)Steve MacLean1-0/+6
* [Arm64/Unix] Support 64K pages * GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
2017-06-08[Local GC] Add GetThread to the GC/EE interface (#12036)Sean Gillespie1-0/+5
2017-06-05[Local GC] Add TrapReturningThreads to the GC/EE interface (#12067)Sean Gillespie1-0/+5
2017-06-01[Local GC] Obtaining configuration information (#11379)Sean Gillespie2-38/+14
* [Local GC] Skeleton for GC configuration * Initial tweaks after design feedback: 1) Use string keys instead of enums. Upon receiving a string key, the EE looks at it and, if it's something that comes from startup flags, responds using the startup flag information. Otherwise, it forwards the string onto CLRConfig. 2) Add a mechanism for getting string configuration values from the EE. This includes adding a RAII wrapper around strings so that they are freed correctly. * Remove uses of g_pConfig from the GC and replace with GCConfig * Use the GCConfig system for the GC log * Fix poorly-named parameter * Add documentation and caching of bool and int configs obtained from the EE * Remove AppDomainLeaks as dead code * Remove GC trace configs as dead code * Repair unix build * Fix an issue where we started the GC in the wrong latency mode * Fix the unix build * Pipe GCRetainVM configuration to the GC * Dead code removal in the GC sample * EEConfig -> GCConfig for heap verification constants in the GC * Populate config information for bools and ints eagerly at startup * Initialize g_theGCToCLR before initializing GCConfig * Propegate HoardVM config to the GC * Fix an incorrect comment
2017-06-01[Local GC] Scaffolding for loading a standalone GC (#11242)Sean Gillespie2-3/+5
* Configure the build system to build a CoreCLR capable of loading a standalone GC * Proto-implementation of dynamic GC loading * Build the GC with the VM's CMakeLists when doing a non-standalone build of the GC * [Local GC] Introduce a new feature define, FEATURE_STANDALONE_GC_ONLY, to be used by the CI to explicitly test local GC dynamic loading code paths * Fix the FEATURE_STANDALONE_GC_ONLY build for unix linkers * Rebase against master * Code review feedback: use the existing Unix exports file
2017-04-13Rename IGCHandleTable to IGCHandleManager.Aditya Mandaleeka1-4/+4
2017-04-10Move handle destruction code to IGCHandleTable.Aditya Mandaleeka1-1/+1
Conflicts: src/vm/gchandletableutilities.h
2017-04-09[Local GC] Move knowledge of the free object method table outside of the GC ↵Sean Gillespie1-0/+5
(#10755) * [Local GC] Move knowledge of the free object method table outside of the GC * Revert "[Local GC] Move knowledge of the free object method table outside of the GC" This reverts commit 02979e5eb12dd44edb2603e16411dd7d7ffc377d. * Address code review feedback: leave ArrayBase alone, as it should be part of the binary contract between the EE and the GC * Correct a bad merge
2017-04-07Merge pull request #10757 from adityamandaleeka/handle_table_local_gc_initAditya Mandaleeka1-2/+2
[Local GC] Move handle creation to IGCHandleTable
2017-04-07Add creation of special handle types to IGCHandleTable.Aditya Mandaleeka1-2/+2
2017-04-05[Local GC] Pull some logic using SystemDomain::System out of the GC (#10670)Sean Gillespie1-0/+5
* [Local GC] Pull some logic using SystemDomain::System out of the GC * Address code review feedback: add comment about this (per the GitHub discussion) and rename API to ForceFullGCToBeBlocking
2017-04-05[Local GC] Move Weak Reference finalization out of the GC (#10676)Sean Gillespie1-0/+6
* [Local GC] Move Weak Reference finalization out of the GC * Address two issues: 1) Use GetGCSafeMethodTable instead of GetMethodTable, so that the mark bit is correctly masked off the object's method table pointer, 2) Address code review feedback by re-inserting a missed call to GetCanonicalMethodTable and rename the new API to EagerFinalized to better illustrate its broader purpose. * Repair the GC sample
2017-04-01[Local GC] Move some EE-specific finalize-on-unload logic out of the GC (#10598)Sean Gillespie1-0/+5
* Move some EE-specific logic to a callback on GCToEEInterface * Fix the sample * Consistent style for pointers * Code review feedback: Move app domain index check into EE callback and make ShouldFinalizeObjectForUnload always return true (due to CoreCLR not having app domains) * Code review feedback: Fix a comment and add a TODO for bringing these changes to desktop
2017-03-31Change how VM calls ObjectFromHandle.Aditya Mandaleeka1-5/+5
2017-03-29Create a GCHandleTable interface with Init/Shutdown.Aditya Mandaleeka2-7/+9
2017-03-28[Local GC] Use standard C++ types (bool) and consistent types (void*) on the ↵Sean Gillespie1-2/+2
interface (#10463) * [Local GC] BOOL -> bool on IGCHeap * [Local GC] size_t -> void* on IGCHeap * [Local GC] Silence warnings by being explicit about BOOl -> bool conversions * Address code review feedback: FinalizeAppDomain BOOL -> bool * Fix warnings * Address code review feedback: 1) Fix a missed default parameter (FALSE) on a parameter of type bool, 2) Fix invocations of the diagnostic callbacks to use boolean literals instead of TRUE and FALSE, 3) Fix various invocations of GC interface methods in the VM to use boolean literals instead of TRUE and FALSE * Address code review feedback: fix inconsistency
2017-03-23[Local GC] Redirect fatal errors to the EE (#10436)Sean Gillespie1-0/+5
* [Local GC] Redirect fatal errors to the EE * Address code review feedback: don't fetch the IP when reporting a fatal error
2017-03-16[Local GC] Break EE dependency on GC's generation table and alloc lock in ↵Sean Gillespie1-0/+2
single-proc scenarios (#10065) * Remove usage of the generation table from the EE by introducing an EE-owned GC alloc context used for allocations on single-proc machines. * Move the GC alloc lock to the EE side of the interface * Repair the Windows ARM build * Move the decision to use per-thread alloc contexts to the EE * Rename the lock used by StartNoGCRegion and EndNoGCRegion to be more indicative of what it is protecting * Address code review feedback 2 (enumerate the global alloc context as a part of GCToEEInterface) * Code review feedback (3) * Address code review feedback (move some GC-internal globals to gcimpl.h and gc.cpp) * g_global_alloc_lock is a dword, not a qword - fixes a deadlock * Move GlobalAllocLock to gchelpers.cpp and switch to preemptive mode when spinning * Repair the Windows x86 build
2017-02-24[Local GC] Move workstation GC DAC globals to a struct shared between GC and ↵Sean Gillespie1-2/+5
DAC (#9255) * [Local GC] Move workstation GC DAC globals to a struct shared between the GC and the DAC * (Some) code review feedback and bug fixes for issues found while debugging on OSX * Address some code review feedback: 1. Make g_gcDacGlobals a pointer and dacvar on the VM side, so that publishing the GC dac vars is done atomically (through a pointer assignment). This fixes a race that Noah noticed. 2. Remove the requirement for the GC's generation class struct to be known at compile-time, by using a dacvar as the size of the generation class at run-time (for pointer arithmetic) 3. Move all DAC-interesting fields to be at the start of GC internal classes, so that the DAC does not need to know the size or exact layout of the class past the fields it cares about. * Split the definition of the size of several arrays across the SOS/DAC and GC/DAC interfaces, and add static asserts that they are the same * Repair the Windows Release build * Implement the GC DAC scheme for Server GC and eliminate the duplicate GC dac vars * Some work * Decouple use of the GC generation table from a write barrier by having the EE store a copy of the global during initialization * Actually make it work with server GC * Checkpoint * Checkpoint where everything works * Code cleanup * Fix debugger test failures * Additional code cleanup * Address code review feedback by adding a static assert and standardizing the way that we iterate over the generation table * Repair the Windows x86 build * Revert "Decouple use of the GC generation table from a write barrier by having the EE store a copy of the global during initialization" This reverts commit 573f61a16b4fa8c2fc4c568c0b968a921230f31c. * Revert "Repair the Windows x86 build" This reverts commit 188c22d87e1d65abf00ab8fa28f46ad607a9028f. * Partial revert, move `generation_table` back the global namespace for a single-proc allocation helper * Fix a debugger test failure * Repair crash dump scenarios
2017-01-23[Local GC] Provide an implementation of GCToOSInterface for Unix-like ↵Sean Gillespie2-2/+2
platforms (#8976) * Add way to build with FEATURE_STANDALONE_GC from build.sh * Make CMake changes to build the GC 'PAL' as its own build target (to avoid -nostdinc). In addition, introduce a "GC PAL" that provides an implementation of GCToOSInterface on Unix-like platforms, for use with FEATURE_STANDALONE_GC.
2017-01-23[Local GC] Add three finalization-related operations to GCToEEInterface (#9029)Sean Gillespie1-8/+1
* Add three finalization-related operations to GCToEEInterface and utilize them from the GC * Code review feedback * Code review feedback * Fix standalone GC build break * Repair the standalone GC build
2017-01-06[Local GC] Move Software Write Watch's write barrier updates to ↵Sean Gillespie1-8/+5
GCToEEInterface::StompWriteBarrier (#8605) * Move Software Write Watch's write barrier updates to use the new GCToEEInterface::StompWriteBarrier to stomp the EE's write barrier. * Address code review feedback, move SetCardsAfterBulkCopy to EE side of the interface
2016-12-15Switch GCSample to the canonical GCToOSInterface implementation (#8653)Jan Kotas6-473/+13
2016-12-10Local GC: Decouple write barrier operations between the GC and EE (#8568)Sean Gillespie2-11/+7
* Decouple write barrier operations between the GC and EE * Address code review feedback * Address code review feedback * Repair the standalone GC build
2016-11-22This is to separate the diagnostics code out from gc.cpp (exceptMaoni01-0/+28
GC's own logging), gcee.cpp and objecthandle.cpp. The rule is GC will call the diagnostics functions at various points to communicate info and these diagnostics functions might call back into the GC if they require initimate knowledge of the GC in order to get certain info. This way gc.cpp does not need to know about details of the diagnostics components, eg, the profiling context; and the diagnostics components do not need to know details about the GC. So got rid of ProfilingScanContext in gcinterface.h and passed scanning functions to GC and handle table. Got rid of where it goes through things per heap as this is not something that diagnostics should care about, including going through stack roots per heap (which is only done in GC for scalability purposes but profiling is doing this on a single thread). This also makes it faster. Got rid of the checks for gc_low/high in ProfScanRootsHelper as this is knowledge profiling shouldn't have. And it was also incorrectly not including all interior pointer stack roots.
2016-11-16Enable GCToOSInterface to be defined on the GC side of the GC interface (#8121)Sean Gillespie1-1/+1
* Re-introduce changes lost in a merge conflict * Enable GCToOSInterface to be defined behind the GC interface when building the GC in standalone mode. Provide a skeleton Windows implementation and the framework for a Unix implementation. * Address code review feedback
2016-10-21Port GC changes from CoreRT (#7764)Jan Kotas1-2/+0
https://github.com/dotnet/corert/pull/2064: Add back limit for maximum object size https://github.com/dotnet/corert/pull/2061: Fix retail build break
2016-10-06Restore some changes lost in a merge conflict (#7512)Sean Gillespie2-2/+8