Skip to content

Commit

Permalink
Merge branch 'release/9.0' into darc-release/9.0-9727522e-87a7-483e-b…
Browse files Browse the repository at this point in the history
…808-62b71b33a47a
  • Loading branch information
lewing authored Sep 15, 2024
2 parents 5c30475 + 46cfb74 commit 80aeaaf
Show file tree
Hide file tree
Showing 169 changed files with 3,603 additions and 1,060 deletions.
88 changes: 44 additions & 44 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,94 +81,94 @@
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="9.0.0-alpha.1.24452.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="9.0.0-alpha.1.24459.2">
<Uri>https://github.com/dotnet/source-build-externals</Uri>
<Sha>eab3dc5eabdf8bcd9bbdf917741aab335c74373d</Sha>
<Sha>71b0a48963717f08dc2d3d26527a2587316170fc</Sha>
<SourceBuild RepoName="source-build-externals" ManagedOnly="true" />
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenAPI" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.GenAPI" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.GenFacades" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.GenFacades" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitAssert" Version="2.9.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.XUnitAssert" Version="2.9.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.9.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.9.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Archives" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Templating" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="System.ComponentModel.TypeConverter.TestData" Version="9.0.0-beta.24419.1">
<Uri>https://github.com/dotnet/runtime-assets</Uri>
Expand Down Expand Up @@ -328,9 +328,9 @@
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>9794254fa909ff5adc46326e9b54009793f61dcd</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="9.0.0-beta.24453.1">
<Dependency Name="Microsoft.DotNet.PackageTesting" Version="9.0.0-beta.24459.6">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>dd332f2d4e21daa8b79f84251ab156af9a0b11b2</Sha>
<Sha>65260b148c869ada772a5843863c54737cd2361e</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.24409.2">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
Expand Down
34 changes: 17 additions & 17 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<MinorVersion>0</MinorVersion>
<PatchVersion>0</PatchVersion>
<SdkBandVersion>9.0.100</SdkBandVersion>
<PackageVersionNet8>8.0.9</PackageVersionNet8>
<PackageVersionNet8>8.0.10</PackageVersionNet8>
<PackageVersionNet7>7.0.20</PackageVersionNet7>
<PackageVersionNet6>6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet8)').Build),25))</PackageVersionNet6>
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
Expand Down Expand Up @@ -83,22 +83,22 @@
<!-- SDK dependencies (also used in wasm build tests -->
<MicrosoftDotNetApiCompatTaskVersion>9.0.100-rc.1.24409.1</MicrosoftDotNetApiCompatTaskVersion>
<!-- Arcade dependencies -->
<MicrosoftDotNetBuildTasksFeedVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>9.0.0-beta.24453.1</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>9.0.0-beta.24453.1</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>9.0.0-beta.24453.1</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitAssertVersion>2.9.0-beta.24453.1</MicrosoftDotNetXUnitAssertVersion>
<MicrosoftDotNetXUnitExtensionsVersion>9.0.0-beta.24453.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.9.0-beta.24453.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTargetFrameworkVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksTargetFrameworkVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>9.0.0-beta.24453.1</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.24453.1</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>9.0.0-beta.24453.1</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>9.0.0-beta.24453.1</MicrosoftDotNetPackageTestingVersion>
<MicrosoftDotNetBuildTasksFeedVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>9.0.0-beta.24459.6</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>9.0.0-beta.24459.6</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>9.0.0-beta.24459.6</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitAssertVersion>2.9.0-beta.24459.6</MicrosoftDotNetXUnitAssertVersion>
<MicrosoftDotNetXUnitExtensionsVersion>9.0.0-beta.24459.6</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.9.0-beta.24459.6</MicrosoftDotNetXUnitConsoleRunnerVersion>
<MicrosoftDotNetBuildTasksArchivesVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksArchivesVersion>
<MicrosoftDotNetBuildTasksInstallersVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksInstallersVersion>
<MicrosoftDotNetBuildTasksPackagingVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksPackagingVersion>
<MicrosoftDotNetBuildTasksTargetFrameworkVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksTargetFrameworkVersion>
<MicrosoftDotNetBuildTasksTemplatingVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksTemplatingVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>9.0.0-beta.24459.6</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetRemoteExecutorVersion>9.0.0-beta.24459.6</MicrosoftDotNetRemoteExecutorVersion>
<MicrosoftDotNetVersionToolsTasksVersion>9.0.0-beta.24459.6</MicrosoftDotNetVersionToolsTasksVersion>
<MicrosoftDotNetPackageTestingVersion>9.0.0-beta.24459.6</MicrosoftDotNetPackageTestingVersion>
<!-- TODO: Remove pinned xunit.analyzers version: https://github.com/dotnet/runtime/issues/97088 -->
<XUnitAnalyzersVersion>1.4.0</XUnitAnalyzersVersion>
<!-- NuGet dependencies -->
Expand Down
16 changes: 16 additions & 0 deletions eng/pipelines/libraries/fuzzing/deploy-to-onefuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ extends:
# displayName: Send to OneFuzz

# ONEFUZZ_TASK_WORKAROUND_START
- task: onefuzz-task@0
inputs:
onefuzzOSes: 'Windows'
env:
onefuzzDropDirectory: $(fuzzerProject)/deployment/AssemblyNameInfoFuzzer
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Send AssemblyNameInfoFuzzer to OneFuzz

- task: onefuzz-task@0
inputs:
onefuzzOSes: 'Windows'
Expand Down Expand Up @@ -113,6 +121,14 @@ extends:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Send TextEncodingFuzzer to OneFuzz

- task: onefuzz-task@0
inputs:
onefuzzOSes: 'Windows'
env:
onefuzzDropDirectory: $(fuzzerProject)/deployment/TypeNameFuzzer
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
displayName: Send TypeNameFuzzer to OneFuzz

- task: onefuzz-task@0
inputs:
onefuzzOSes: 'Windows'
Expand Down
6 changes: 3 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"dotnet": "9.0.100-preview.7.24407.12"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24453.1",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24453.1",
"Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.24453.1",
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24459.6",
"Microsoft.DotNet.Helix.Sdk": "9.0.0-beta.24459.6",
"Microsoft.DotNet.SharedFramework.Sdk": "9.0.0-beta.24459.6",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.Build.Traversal": "3.4.0",
"Microsoft.NET.Sdk.IL": "9.0.0-rc.1.24410.5"
Expand Down
64 changes: 5 additions & 59 deletions src/coreclr/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9666,7 +9666,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start,
dprintf (GC_TABLE_LOG, ("card table: %zx(translated: %zx), seg map: %zx, mark array: %zx",
(size_t)ct, (size_t)translated_ct, (size_t)new_seg_mapping_table, (size_t)card_table_mark_array (ct)));

if (is_bgc_in_progress())
if (hp->is_bgc_in_progress())
{
dprintf (GC_TABLE_LOG, ("new low: %p, new high: %p, latest mark array is %p(translate: %p)",
saved_g_lowest_address, saved_g_highest_address,
Expand Down Expand Up @@ -9793,7 +9793,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start,
else
{
#ifdef BACKGROUND_GC
if (is_bgc_in_progress())
if (hp->is_bgc_in_progress())
{
dprintf (GC_TABLE_LOG, ("in range new seg %p, mark_array is %p", new_seg, hp->mark_array));
if (!commit_mark_array_new_seg (hp, new_seg))
Expand Down Expand Up @@ -13093,21 +13093,6 @@ void region_free_list::age_free_regions (region_free_list free_lists[count_free_
}
}

size_t region_free_list::get_size_free_regions(int max_age)
{
size_t result = 0;

for (heap_segment* region = head_free_region; region != nullptr; region = heap_segment_next (region))
{
if (heap_segment_age_in_free (region) <= max_age)
{
result += get_region_size(region);
}
}

return result;
}

void region_free_list::print (int hn, const char* msg, int* ages)
{
dprintf (3, ("h%2d PRINTING-------------------------------", hn));
Expand Down Expand Up @@ -13229,13 +13214,7 @@ void region_free_list::sort_by_committed_and_age()

void gc_heap::age_free_regions (const char* msg)
{
// If we are doing an ephemeral GC as a precursor to a BGC, then we will age all of the region
// kinds during the ephemeral GC and skip the call to age_free_regions during the BGC itself.
bool age_all_region_kinds = (settings.condemned_generation == max_generation) || is_bgc_in_progress();
if (age_all_region_kinds)
{
global_free_huge_regions.age_free_regions();
}
bool age_all_region_kinds = (settings.condemned_generation == max_generation);

#ifdef MULTIPLE_HEAPS
for (int i = 0; i < n_heaps; i++)
Expand Down Expand Up @@ -13436,7 +13415,6 @@ void gc_heap::distribute_free_regions()
global_free_huge_regions.transfer_regions (&global_regions_to_decommit[huge_free_region]);

size_t free_space_in_huge_regions = global_free_huge_regions.get_size_free_regions();
size_t free_space_in_young_huge_regions = global_free_huge_regions.get_size_free_regions(MIN_AGE_TO_DECOMMIT_HUGE - 1);

ptrdiff_t num_regions_to_decommit[kind_count];
int region_factor[kind_count] = { 1, LARGE_REGION_FACTOR };
Expand All @@ -13450,7 +13428,6 @@ void gc_heap::distribute_free_regions()
#endif //!MULTIPLE_HEAPS

size_t num_huge_region_units_to_consider[kind_count] = { 0, free_space_in_huge_regions / region_size[large_free_region] };
size_t num_young_huge_region_units_to_consider[kind_count] = { 0, free_space_in_young_huge_regions / region_size[large_free_region] };

for (int kind = basic_free_region; kind < kind_count; kind++)
{
Expand All @@ -13469,22 +13446,9 @@ void gc_heap::distribute_free_regions()

ptrdiff_t balance = total_num_free_regions[kind] + num_huge_region_units_to_consider[kind] - total_budget_in_region_units[kind];

// Ignore young huge regions if they are contributing to a surplus.
if (balance > 0)
{
if (balance > static_cast<ptrdiff_t>(num_young_huge_region_units_to_consider[kind]))
{
balance -= num_young_huge_region_units_to_consider[kind];
}
else
{
balance = 0;
}
}

if (
#ifdef BACKGROUND_GC
(background_running_p() && (settings.condemned_generation != max_generation)) ||
background_running_p() ||
#endif
(balance < 0))
{
Expand Down Expand Up @@ -37777,15 +37741,7 @@ void gc_heap::allow_fgc()

BOOL gc_heap::is_bgc_in_progress()
{
#ifdef MULTIPLE_HEAPS
// All heaps are changed to/from the bgc_initialized state during the VM suspension at the start of BGC,
// so checking any heap will work.
gc_heap* hp = g_heaps[0];
#else
gc_heap* hp = pGenGCHeap;
#endif //MULTIPLE_HEAPS

return (background_running_p() || (hp->current_bgc_state == bgc_initialized));
return (background_running_p() || (current_bgc_state == bgc_initialized));
}

void gc_heap::clear_commit_flag()
Expand Down Expand Up @@ -38300,16 +38256,6 @@ void gc_heap::background_mark_phase ()
if (bgc_t_join.joined())
#endif //MULTIPLE_HEAPS
{
#ifdef USE_REGIONS
// There's no need to distribute a second time if we just did an ephemeral GC, and we don't want to
// age the free regions twice.
if (!do_ephemeral_gc_p)
{
distribute_free_regions ();
age_free_regions ("BGC");
}
#endif //USE_REGIONS

#ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
// Resetting write watch for software write watch is pretty fast, much faster than for hardware write watch. Reset
// can be done while the runtime is suspended or after the runtime is restarted, the preference was to reset while
Expand Down
Loading

0 comments on commit 80aeaaf

Please sign in to comment.