[Local GC] Move workstation GC DAC globals to a struct shared between GC and DAC...
authorSean Gillespie <sean@swgillespie.me>
Fri, 24 Feb 2017 18:12:26 +0000 (10:12 -0800)
committerGitHub <noreply@github.com>
Fri, 24 Feb 2017 18:12:26 +0000 (10:12 -0800)
commit6a3d7ac54281ff6105ebf4741f05ddc3673ede46
treea46ae29bf0471e2ec2961a8b08fcc6f6d0dcf378
parentbbe70b4f5941063594b9c34545df6fd89db1aeba
[Local GC] Move workstation GC DAC globals to a struct shared between GC and DAC (dotnet/coreclr#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 dotnet/coreclr@573f61a16b4fa8c2fc4c568c0b968a921230f31c.

* Revert "Repair the Windows x86 build"

This reverts commit dotnet/coreclr@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

Commit migrated from https://github.com/dotnet/coreclr/commit/6f6fda958dac38896abe9487def2242add822809
25 files changed:
src/coreclr/src/ToolBox/SOS/Strike/strike.cpp
src/coreclr/src/debug/daccess/CMakeLists.txt
src/coreclr/src/debug/daccess/daccess.cpp
src/coreclr/src/debug/daccess/dacdbiimpl.cpp
src/coreclr/src/debug/daccess/dacfn.cpp
src/coreclr/src/debug/daccess/enummem.cpp
src/coreclr/src/debug/daccess/gcinterface.dac.h [new file with mode: 0644]
src/coreclr/src/debug/daccess/request.cpp
src/coreclr/src/debug/daccess/request_common.h [new file with mode: 0644]
src/coreclr/src/debug/daccess/request_svr.cpp
src/coreclr/src/gc/env/gcenv.structs.h
src/coreclr/src/gc/gc.cpp
src/coreclr/src/gc/gc.h
src/coreclr/src/gc/gccommon.cpp
src/coreclr/src/gc/gcinterface.dac.h [new file with mode: 0644]
src/coreclr/src/gc/gcinterface.dacvars.def [new file with mode: 0644]
src/coreclr/src/gc/gcinterface.h
src/coreclr/src/gc/gcpriv.h
src/coreclr/src/gc/gcscan.h
src/coreclr/src/gc/sample/GCSample.cpp
src/coreclr/src/inc/dacprivate.h
src/coreclr/src/inc/dacvars.h
src/coreclr/src/vm/ceemain.cpp
src/coreclr/src/vm/gcheaputilities.cpp
src/coreclr/src/vm/gcheaputilities.h