Skip to content

Commit bda2542

Browse files
CopilotjtschusterCopilot
authored
Reduce parallelism for composite crossgen2 for jit64_3 test (#128269)
win-x86 legs were OOM-ing because methods from HugeArray, HugeField, etc, were being compiled in parallel and using excessive amounts of native memory. Reducing parallelism to 1 for composite mode fixes the issue without making build times excessive everywhere. We could consider limiting the scope further to only 32-bit platforms as well. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c6a8e4c commit bda2542

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/tests/Common/CLRTest.CrossGen.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ WARNING: When setting properties based on their current state (for example:
3232
Tests can opt out of ahead-of-time (AOT) compilation from crossgen / crossgen2 by setting this property in their project:
3333
3434
<CrossGenTest>false</CrossGenTest>
35+
36+
Tests can pass extra crossgen2 arguments only in composite mode by setting this property in their project:
37+
38+
<CompositeCrossGen2TestExtraArguments>...</CompositeCrossGen2TestExtraArguments>
3539
-->
3640
<Target Name="GetCrossgenBashScript">
3741

@@ -67,6 +71,7 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then
6771
cp "$CORE_ROOT"/lib*.so "$CORE_ROOT"/lib*.dylib $(scriptPath)
6872
6973
ExtraCrossGen2Args+=" --composite"
74+
ExtraCrossGen2Args+=" $(CompositeCrossGen2TestExtraArguments)"
7075
fi
7176
7277
ExtraCrossGen2Args+=" $(CrossGen2TestExtraArguments)"
@@ -261,6 +266,7 @@ if defined RunCrossGen2 (
261266
262267
if defined CompositeBuildMode (
263268
set ExtraCrossGen2Args=!ExtraCrossGen2Args! --composite
269+
set ExtraCrossGen2Args=!ExtraCrossGen2Args! $(CompositeCrossGen2TestExtraArguments)
264270
if "$(CrossGen2OutputFormat)"=="wasm" (
265271
set __OutputFile=!scriptPath!\composite-r2r.wasm
266272
) else (

src/tests/JIT/jit64/jit64_3.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<!-- Huge methods need large native JIT allocations, so limit concurrent Crossgen2 compilations. -->
4+
<CompositeCrossGen2TestExtraArguments>$(CompositeCrossGen2TestExtraArguments) --parallelism:1</CompositeCrossGen2TestExtraArguments>
5+
</PropertyGroup>
6+
27
<ItemGroup>
38
<MergedWrapperProjectReference Include="opt/**/*.??proj" />
49
</ItemGroup>

0 commit comments

Comments
 (0)