Skip to content

[mono] Force AOT+interpreter for iOSSimulator arm64 library test local build - #76551

Merged
mdh1418 merged 6 commits into
dotnet:mainfrom
mdh1418:tweak_build_iossimulator_arm64
Nov 15, 2022
Merged

[mono] Force AOT+interpreter for iOSSimulator arm64 library test local build#76551
mdh1418 merged 6 commits into
dotnet:mainfrom
mdh1418:tweak_build_iossimulator_arm64

Conversation

@mdh1418

@mdh1418mdh1418 commented Oct 3, 2022

Copy link
Copy Markdown
Member

When building library tests on iOSSimulator arm64, Thread 6: EXC_BAD_ACCESS (code=1, address=0x0) was being hit at

arm_subx_imm (code, ARMREG_SP, ARMREG_SP, 256);

./build.sh -s mono+libs -os iOSSImulator -arch arm64 -c Debug
./dotnet.sh build /t:Test /p:TargetOS=iOSSimulator /p:TargetArchitecture=arm64 /p:Configuration=Debug src/libraries/System.Buffers/tests

iOSSimulator arm64 doesn't support JIT, so we need to force AOT+interpreter.

This PR does the following to improve local development experience:
Sets RunAOTCompilation to true (if unset) automatically for iOS/tvOS device/sims arm64
Sets MonoForceInterpreter to true (if unset) automatically for iOS/tvOS simulators arm64
Sets MonoAotOption"Interp" if MonoForceInterpreter is set.

Now, contributors can run library tests for iOSlike arm64 platforms without manually specifying RunAOTCompilation=TrueMonoForceInterpreter=True, making the library testing experience more uniform.

@ghost

ghost commented Oct 3, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

When building library tests on iOSSimulator arm64, Thread 6: EXC_BAD_ACCESS (code=1, address=0x0) was being hit at

arm_subx_imm (code, ARMREG_SP, ARMREG_SP, 256);
.
./build.sh -s mono+libs -os iOSSImulator -arch arm64 -c Debug
./dotnet.sh build /t:Test /p:TargetOS=iOSSimulator /p:TargetArchitecture=arm64 /p:Configuration=Debug src/libraries/System.Buffers/tests

iOSSimulator arm64 doesn't support JIT, so we need to force AOT+interpreter.

This PR sets those two properties by default for library test builds.
It also sets the MonoAotOption"Interp" if MonoForceInterpreter is set.

Author:mdh1418
Assignees:-
Labels:

area-Infrastructure-mono

Milestone:-

@mdh1418
mdh1418 marked this pull request as draft October 3, 2022 17:56

@akoeplingerakoeplinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you plan to update the samples and functional tests too?

@mdh1418
mdh1418force-pushed the tweak_build_iossimulator_arm64 branch from 3092e86 to 2cb3e28CompareOctober 4, 2022 19:02
@build-analysisbuild-analysisBot mentioned this pull request Oct 6, 2022
2 tasks
@mdh1418
mdh1418force-pushed the tweak_build_iossimulator_arm64 branch 3 times, most recently from 9ca3960 to f27b1aeCompareOctober 12, 2022 18:42
@mdh1418
mdh1418 marked this pull request as ready for review October 12, 2022 18:47
@mdh1418

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@dotnetdotnet deleted a comment from azure-pipelinesBotOct 13, 2022
@steveisok

Copy link
Copy Markdown
Member

@mdh1418 can you bring this up to date and if it's all good, merge?

@mdh1418
mdh1418force-pushed the tweak_build_iossimulator_arm64 branch from e6c6c04 to c3926edCompareNovember 14, 2022 17:48
@mdh1418

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-ioslike,runtime-ioslikesimulator

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@mdh1418

Copy link
Copy Markdown
MemberAuthor

I believe from offline discussion, the functional tests usage of RunAOTCompilation and MonoForceInterpreter were specific in testing certain scenarios. It might be better to keep them in.

For the samples, I briefly tried to make some of the samples run on arm64 sim for iOS but it seems to need more for them to work.

As such, I think keeping the scope of this PR to affect running library tests on iOS Arm64 device/sim locally is better for now to get it in.

@mdh1418

Copy link
Copy Markdown
MemberAuthor

The failing test on iOSlike is filed at #78380

@mdh1418
mdh1418 merged commit 49ac27f into dotnet:mainNov 15, 2022
@mdh1418
mdh1418 deleted the tweak_build_iossimulator_arm64 branch November 15, 2022 14:18
@ghostghost locked as resolved and limited conversation to collaborators Dec 15, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mdh1418@steveisok@akoeplinger