Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/coreclr/gc/datadescriptor/datadescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
#include "gchandletableimpl.h"
#include "handletablepriv.h"
#include "gceventstatus.h"
#ifdef GC_HEAP_CARD_TABLE_IN_VM
#include "gcheaputilities.h"
#endif // GC_HEAP_CARD_TABLE_IN_VM

#ifdef SERVER_GC
#define GC_NAMESPACE SVR
Expand Down Expand Up @@ -60,7 +63,11 @@ struct cdac_data<GC_NAMESPACE::gc_heap>
#endif // BACKGROUND_GC
GC_HEAP_FIELD(AllocAllocated, alloc_allocated)
GC_HEAP_FIELD(EphemeralHeapSegment, ephemeral_heap_segment)
#ifdef GC_HEAP_CARD_TABLE_IN_VM
static constexpr decltype(&g_card_table) CardTable = &g_card_table;
#else // !GC_HEAP_CARD_TABLE_IN_VM
GC_HEAP_FIELD(CardTable, card_table)
#endif // !GC_HEAP_CARD_TABLE_IN_VM
GC_HEAP_FIELD(FinalizeQueue, finalize_queue)
GC_HEAP_FIELD(GenerationTable, generation_table)
#if !defined(USE_REGIONS) && defined(BACKGROUND_GC)
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/vm/datadescriptor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_library(gc_wks_descriptor_interface INTERFACE)
target_include_directories(gc_wks_descriptor_interface INTERFACE
${GC_DESCRIPTOR_DIR}
${CLR_DIR}/gc)
target_compile_definitions(gc_wks_descriptor_interface INTERFACE -DGC_HEAP_CARD_TABLE_IN_VM)
add_dependencies(gc_wks_descriptor_interface cee_wks_core)
generate_data_descriptors(
LIBRARY_NAME gc_wks_descriptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void WorkstationGC_CanGetHeapData(TestConfiguration config)
GCHeapData heapData = gcContract.GetHeapData();
Assert.NotNull(heapData.GenerationTable);
Assert.True(heapData.GenerationTable.Count > 0, "Expected at least one generation");
Assert.NotEqual(TargetPointer.Null, heapData.CardTable);
}

[ConditionalTheory]
Expand Down
Loading