summaryrefslogtreecommitdiff
path: root/src/gc/gcinterface.dacvars.def
diff options
context:
space:
mode:
authorSean Gillespie <sean@swgillespie.me>2017-02-24 10:12:26 -0800
committerGitHub <noreply@github.com>2017-02-24 10:12:26 -0800
commit6f6fda958dac38896abe9487def2242add822809 (patch)
treee9b2eed3562a07635a868c01289f3732b609dc38 /src/gc/gcinterface.dacvars.def
parent3392356945aabd5a3ebac5317ff4a0e0361dc9ad (diff)
downloadcoreclr-6f6fda958dac38896abe9487def2242add822809.tar.gz
coreclr-6f6fda958dac38896abe9487def2242add822809.tar.bz2
coreclr-6f6fda958dac38896abe9487def2242add822809.zip
[Local GC] Move workstation GC DAC globals to a struct shared between GC and 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
Diffstat (limited to 'src/gc/gcinterface.dacvars.def')
-rw-r--r--src/gc/gcinterface.dacvars.def67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/gc/gcinterface.dacvars.def b/src/gc/gcinterface.dacvars.def
new file mode 100644
index 0000000000..f9c2078ee3
--- /dev/null
+++ b/src/gc/gcinterface.dacvars.def
@@ -0,0 +1,67 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// This file contains the defintions of all DAC variables that the G
+// exports and that the DAC uses to interface with the GC.
+//
+// This interface has a strict semantic versioning. The following changes require
+// a bump to the major version number:
+// 1. Changing the type of any of these variables,
+// 2. Changing the type layouts of any of the types in gcinterface.dac.h,
+// (dac_generation, dac_heap_segment, dac_finalize_queue)
+// 3. Changing the semantic meaning of any of these variables, such that the DAC's
+// use of them is no longer correct,
+//
+// The following change requires a bump to the minor version number:
+// 1. Adding additional DAC variables.
+//
+// Minor version mismatches are tolerated by the DAC, at the risk of a possibly
+// degraded debugging experience.
+// Major version mismatches are not tolerated by the DAC and will be rejected upon load.
+
+#ifndef GC_DAC_VAR
+ #define GC_DAC_VAR(type, name)
+#endif // GC_DAC_VAR
+
+#ifndef GC_DAC_ARRAY_VAR
+ #define GC_DAC_ARRAY_VAR(type, name) GC_DAC_VAR(type*, name)
+#endif // GC_DAC_ARRAY_VAR
+
+#ifndef GC_DAC_PTR_VAR
+ #define GC_DAC_PTR_VAR(type, name) GC_DAC_VAR(type*, name)
+#endif // GC_DAC_PTR_VAR
+
+// This sequence of macros defines the specific variables that are exposed by the
+// GC to the DAC.
+GC_DAC_VAR (uint8_t, build_variant)
+GC_DAC_VAR (bool, built_with_svr)
+GC_DAC_ARRAY_VAR (size_t, gc_global_mechanisms)
+GC_DAC_ARRAY_VAR (dac_generation, generation_table)
+GC_DAC_VAR (uint32_t, gc_heap_type)
+GC_DAC_VAR (uint32_t, max_gen)
+GC_DAC_PTR_VAR (uint32_t, mark_array)
+GC_DAC_VAR (c_gc_state, current_c_gc_state)
+GC_DAC_PTR_VAR (dac_heap_segment, ephemeral_heap_segment)
+GC_DAC_PTR_VAR (dac_heap_segment, saved_sweep_ephemeral_seg)
+GC_DAC_PTR_VAR (uint8_t, saved_sweep_ephemeral_start)
+GC_DAC_PTR_VAR (uint8_t, background_saved_lowest_address)
+GC_DAC_PTR_VAR (uint8_t, background_saved_highest_address)
+GC_DAC_PTR_VAR (uint8_t, alloc_allocated)
+GC_DAC_PTR_VAR (uint8_t, next_sweep_obj)
+GC_DAC_VAR (oom_history, oom_info)
+GC_DAC_PTR_VAR (dac_finalize_queue, finalize_queue)
+GC_DAC_PTR_VAR (uint8_t*, internal_root_array)
+GC_DAC_VAR (size_t, internal_root_array_index)
+GC_DAC_VAR (BOOL, heap_analyze_success)
+GC_DAC_VAR (int, n_heaps)
+GC_DAC_PTR_VAR (dac_gc_heap*, g_heaps)
+GC_DAC_VAR (int32_t, gc_structures_invalid_cnt)
+GC_DAC_ARRAY_VAR (size_t, interesting_data_per_heap)
+GC_DAC_ARRAY_VAR (size_t, compact_reasons_per_heap)
+GC_DAC_ARRAY_VAR (size_t, expand_mechanisms_per_heap)
+GC_DAC_ARRAY_VAR (size_t, interesting_mechanism_bits_per_heap)
+
+#undef GC_DAC_VAR
+#undef GC_DAC_ARRAY_VAR
+#undef GC_DAC_PTR_VAR