Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure all new GCDacVars are reported only for v2 #90043

Merged
merged 1 commit into from
Aug 4, 2023
Merged
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
28 changes: 20 additions & 8 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51961,14 +51961,20 @@ void PopulateDacVars(GcDacVars *gcDacVars)
// find NativeAOT's equivalent of SOS_BREAKING_CHANGE_VERSION and increment it.
gcDacVars->major_version_number = 2;
gcDacVars->minor_version_number = 0;
gcDacVars->total_bookkeeping_elements = total_bookkeeping_elements;
gcDacVars->card_table_info_size = sizeof(card_table_info);
if (v2)
{
gcDacVars->total_bookkeeping_elements = total_bookkeeping_elements;
gcDacVars->card_table_info_size = sizeof(card_table_info);
}

#ifdef USE_REGIONS
gcDacVars->minor_version_number |= 1;
gcDacVars->count_free_region_kinds = count_free_region_kinds;
gcDacVars->global_regions_to_decommit = reinterpret_cast<dac_region_free_list**>(&gc_heap::global_regions_to_decommit);
gcDacVars->global_free_huge_regions = reinterpret_cast<dac_region_free_list**>(&gc_heap::global_free_huge_regions);
if (v2)
{
gcDacVars->count_free_region_kinds = count_free_region_kinds;
gcDacVars->global_regions_to_decommit = reinterpret_cast<dac_region_free_list**>(&gc_heap::global_regions_to_decommit);
gcDacVars->global_free_huge_regions = reinterpret_cast<dac_region_free_list**>(&gc_heap::global_free_huge_regions);
}
#endif //USE_REGIONS
#ifndef BACKGROUND_GC
gcDacVars->minor_version_number |= 2;
Expand All @@ -51987,7 +51993,10 @@ void PopulateDacVars(GcDacVars *gcDacVars)
#ifndef MULTIPLE_HEAPS
gcDacVars->ephemeral_heap_segment = reinterpret_cast<dac_heap_segment**>(&gc_heap::ephemeral_heap_segment);
#ifdef USE_REGIONS
gcDacVars->free_regions = reinterpret_cast<dac_region_free_list**>(&gc_heap::free_regions);
if (v2)
{
gcDacVars->free_regions = reinterpret_cast<dac_region_free_list**>(&gc_heap::free_regions);
}
#endif
#ifdef BACKGROUND_GC
gcDacVars->mark_array = &gc_heap::mark_array;
Expand All @@ -52010,8 +52019,11 @@ void PopulateDacVars(GcDacVars *gcDacVars)
gcDacVars->mark_array = 0;
gcDacVars->background_saved_lowest_address = 0;
gcDacVars->background_saved_highest_address = 0;
gcDacVars->freeable_soh_segment = 0;
gcDacVars->freeable_uoh_segment = 0;
if (v2)
{
gcDacVars->freeable_soh_segment = 0;
gcDacVars->freeable_uoh_segment = 0;
}
gcDacVars->next_sweep_obj = 0;
gcDacVars->saved_sweep_ephemeral_seg = 0;
gcDacVars->saved_sweep_ephemeral_start = 0;
Expand Down
Loading