summaryrefslogtreecommitdiff
path: root/src/gc/env/gcenv.ee.h
AgeCommit message (Collapse)AuthorFilesLines
2019-05-15Remove concept of AppDomains from the GC (#24536)David Wrighton1-6/+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-03-07Fix how we check whether events are enabled via LTTng (#22707)Sung Yoon Whang1-0/+1
* Fix how we check whether events are enabled via LTTng * Add GCToEEInterface::UpdateGCEventStatus * Fix build errors * Finished hooking it up to post_gc * Some comments about the event keyword/level detection logic * Fix windows build * Fix Prv provider keyword logic * forgot to add one more ifdef * Fix OSX build * one more ifdef to fix * Addressing PR feedback * Update GCEventStatus at gc_heap::initialize_gc too
2018-12-26desktop port (#21523)Maoni Stephens1-0/+2
+alloc lock split into SOH and LOH +provisional mode to fix too many gen2 GCs triggered in low mem situation when the heap has heavy pinning fragmentation +better free list usage +premature OOM fixes +3 new configs: GCHeapAffinitizeMask, GCHighMemPercent, GCLOHThreshold (will be documented) YieldProcessor scaling factor is different on core due to the different implementation on core.
2018-11-08Remove need for full GC for unloadable stuff (#20384)Jan Vorlicek1-1/+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/+3
GCToEEInterface (#19774)
2018-08-27re-enable com for local gc (#19681)David Mason1-1/+1
* re-enable com for local gc * Use RefCountedHandleCallbacks instead of new api
2018-08-25Remove NumaNodeInfo, CPUGroupInfo, AppDomain, SystemDomain, and EEConfig ↵David Mason1-1/+8
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/+3
2018-03-13[local gc] refactor apis for threading and suspension to avoid redundant ↵David Mason1-6/+4
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-31[local gc] Enable eventing (#16120)David Mason1-0/+1
* move GC etw enums to gcinterface.ee.h * add GetActiveSyncBlockCount * refactor reference to ETW::GCLog::ShouldTrackMovementForEtw() * mov g_dwHandles to gc side * enable FEATURE_EVENT_TRACE for gc
2018-01-24[Local GC] FEATURE_EVENT_TRACE 2/n: Scaffolding for emitting known events ↵Sean Gillespie1-0/+1
(#15957) * [Local GC] FEATURE_EVENT_TRACE 2/n: Scaffolding for porting known events to callbacks on GCToEEInterface * Code review feedback: remove `descriptor` system for known events and instead use the gcevents xmacro to generate calls to `GCEventStatus::IsEnabled` with known constants * Remove more event descriptor code
2017-12-13Revert " Revert "[Local GC] Move knowledge of overlapped I/O objects to the ↵Jan Kotas1-0/+2
EE through four callbacks (#14982)""
2017-12-12Revert "[Local GC] Move knowledge of overlapped I/O objects to the EE ↵Sean Gillespie1-2/+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/+2
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-4/+2
* 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-26[Local GC] Move IsGCThread and IsGCSpecialThread to GCToEEInterface (#14685)Sean Gillespie1-0/+2
* [Local GC] Move IsGCThread and IsGCSpecialThread to GCToEEInterface * Fix the windows and sample builds
2017-06-08[Local GC] Add GetThread to the GC/EE interface (#12036)Sean Gillespie1-0/+1
2017-06-05[Local GC] Add TrapReturningThreads to the GC/EE interface (#12067)Sean Gillespie1-0/+1
2017-06-01[Local GC] Obtaining configuration information (#11379)Sean Gillespie1-0/+4
* [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-04-09[Local GC] Move knowledge of the free object method table outside of the GC ↵Sean Gillespie1-0/+1
(#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-05[Local GC] Fix a bad merge (#10748)Sean Gillespie1-1/+0
2017-04-05[Local GC] Pull some logic using SystemDomain::System out of the GC (#10670)Sean Gillespie1-0/+2
* [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/+1
* [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/+1
* 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-23[Local GC] Redirect fatal errors to the EE (#10436)Sean Gillespie1-0/+2
* [Local GC] Redirect fatal errors to the EE * Address code review feedback: don't fetch the IP when reporting a fatal error
2017-01-23[Local GC] Add three finalization-related operations to GCToEEInterface (#9029)Sean Gillespie1-0/+2
* 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
2016-12-10Local GC: Decouple write barrier operations between the GC and EE (#8568)Sean Gillespie1-0/+1
* 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/+9
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-10-06Restore some changes lost in a merge conflict (#7512)Sean Gillespie1-26/+1
2016-09-28Add option to measure time spent inside calls to the CLR. (#7357)Peter Kukol1-1/+26
* Add option to measure time spent inside calls to the CLR (off by default).
2016-09-26Introduce "IGCToCLR" and use it within the GC to interface with the EE (#7295)Sean Gillespie1-26/+1
* Introduce a feature define FEATURE_STANDALONE_GC that allows the GC to communicate with the EE through a virtual interface. * Split GCToEEInterface definition out of gc.h into its own header * Address code review feedback * Address code review feedback
2016-09-08Introduce an interface separating the GC and the VM,Sean Gillespie1-2/+3
modifying the VM to utilize this interface. Introduce an interface separating the GC and the rest of the VM Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM. Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC. Split each interface function into categories, document them, use consistent formatting across the interface Undo some accidental find/replace collateral damage Remove all ifdefs from the GC interface Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build Paper cut: false -> nullptr Repair the ARM and x86 builds Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback Rebase against master Rename gcholder.h/cpp -> gcheaputilities.h/cpp Fix an uninitialized field on alloc_context causing test failures on clang Rename the include guard for gcheaputilities.h Un-breaks SOS by making the following changes: 1) Instructs the DAC to look for IGCHeap::gcHeapType by name, instead of assuming that it exists near g_pGCHeap, 2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot dispatch on an object in another process, 3) Because of 2, expose the number of generations past the GC interface using a static variable on IGCHeap that the DAC can read directly. repair the Windows build
2016-07-21Refactor GC background thread creation (#6384)Jan Vorlicek1-2/+1
This change modifies the GCToEEInterface::CreateBackgroundThread so that it returns a fully initialized and running thread.
2016-06-20Fix GC background thread start in OOM (#5840)Jan Vorlicek1-1/+3
This change fixes a problem that happened when the `gc_heap::create_bgc_thread` calls SetupUnstartedThread and it fails to allocate a Thread object and throws. The GC doesn't expect that and so when the stack is unwound, the `gc_heap::gc_started` stays set. Now we try to allocate memory for the Throwable for the exception, so we go to GC heap and since there is not enough space, we end up calling `gc_heap::try_allocate_more_space`, which calls `gc_heap::wait_for_gc_done`. And that’s the end of it, since the `gc_started` is still set and we wait forever. The fix is to catch exception from the SetupUnstartedThread. I have also fixed couple of places where this method was being called and the exception was not expected. As an additional cleanup, I have moved the thread creation in GC to the GCToEEInterface.
2016-01-27Update license headersdotnet-bot1-4/+3
2015-12-24GC OS interface refactoringJan Vorlicek1-0/+85
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 gcenv.windows.cpp and gcenv.unix.cpp to the sample folder