summaryrefslogtreecommitdiff
path: root/src/gc/gcscan.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-03-21[Local GC] Forbid inclusion of gcscan.h from VM and DAC directories (#10332)Sean Gillespie1-16/+1
* Forbid inclusion of gcscan.h from VM and DAC directories * Address code review feedback - hoist IsGCHeapInitialized check to an assert, since the heap should definitely be initialized if we are validating objects that ostensibly came from it
2016-11-22This is to separate the diagnostics code out from gc.cpp (exceptMaoni01-9/+8
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-09-15Update the GC from CoreRT (#7207)Sean Gillespie1-1/+1
2016-09-08Introduce an interface separating the GC and the VM,Sean Gillespie1-3/+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-12Fix exceptions in GC wave 2 (#6220)Jan Vorlicek1-54/+11
I've removed blocks with PAL_TRY that were under CATCH_GC. I also had to fix contract problem in GCToEEInterface::GcStartWork that was marked as THROWS due to StubHelpers::ProcessByrefValidationList being marked as THROWS, but the StubHelpers::ProcessByrefValidationList in fact doesn't throw since it has body wrapped in EX_TRY / EX_CATCH. This also fixes a problem that started to appear after my previous exceptions fix change.
2016-01-27Update license headersdotnet-bot1-4/+3
2015-12-24GC OS interface refactoringJan Vorlicek1-2/+2
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
2015-12-16Rename CNameSpace to GCScanJan Kotas1-20/+20
2015-12-08Update GC from CoreRTJan Kotas1-61/+10
https://github.com/dotnet/corert/tree/master/src/Native/gc 7be6983a6510ef00de78f4c1c8bf884a89e7c82a
2015-11-20Fix build breaks in legacy buildJan Kotas1-1/+1
[tfs-changeset: 1550765]
2015-11-19Update GC from CoreRTJan Kotas1-1/+1
https://github.com/dotnet/corert/tree/master/src/Native/gc c03d823a11f54e734e340813e6cd1e543ca448ef
2015-11-19Replaced remaining typesJan Vorlicek1-7/+7
LPARAM, SSIZE_T
2015-11-19Add casts to APIs that require LONG / DWORD parametersJan Vorlicek1-2/+2
2015-11-19Changed LONG and ULONGJan Vorlicek1-6/+6
2015-11-18Replace most windows style types by c++ typesJan Vorlicek1-8/+8
This change replaces DWORD, LONGLONG, ULONGLONG, SIZE_T, BYTE, LONG32 and few more by standard c++ types. The DWORD still remains present in signatures of Windows APIs used by the GC. There are few issues with those that need to get fixed.
2015-10-15Cleanup GC-EE InterfaceJan Kotas1-6/+7
- Add proper abstractions for threading methods to GCToEEInterface - Split sample gcenv into multiple files to avoid redundant content - Add handle table methods needed by .NET Native WinRT implementation Part of #1550
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+376
[tfs-changeset: 1407945]