Skip to content

Introduce DOTNET_AltJitOS #64979

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

Merged
merged 6 commits into from
Feb 9, 2022
Merged

Introduce DOTNET_AltJitOS #64979

merged 6 commits into from
Feb 9, 2022

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Feb 8, 2022

#58279 merged all arm64 jits into a single universal binary. This PR adds back ability to specify target OS for ARM/ARM64 in order to test ABI specifics, maybe in future we'll merge desktop alt jits too (or all of them).
Example:

DOTNET_AltJitName=clrjit_universal_arm64_x64.dll
DOTNET_AltJitOS=macOS

to validate ios-arm64 ABI on windows host

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 8, 2022
@ghost ghost assigned EgorBo Feb 8, 2022
@ghost
Copy link

ghost commented Feb 8, 2022

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

Issue Details

#58279 merged all arm64 jits into a single universal binary. This PR adds back ability to specify target OS for ARM/ARM64, maybe in future we'll merge desktop alt jits too (or all of them).

Author: EgorBo
Assignees: EgorBo
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch jakobbotsch added area-VM-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Feb 8, 2022
@am11
Copy link
Member

am11 commented Feb 8, 2022

DOTNET_AltJitOs

nit: typical convention is to use uppercase for two letters: DOTNET_AltJitOS (but we don't follow it everywhere). :)

@EgorBo
Copy link
Member Author

EgorBo commented Feb 8, 2022

DOTNET_AltJitOs

nit: typical convention is to use uppercase for two letters: DOTNET_AltJitOS (but we don't follow it everywhere). :)

it feels weird, because JIT is also an abbreviation, so it should be either JitOs or JITOS. Anyway, it's case insensitive :)

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
@am11
Copy link
Member

am11 commented Feb 8, 2022

Yes, for more than two letters, it follows PascalCase (TargetOS, Xml and so on).

@EgorBo
Copy link
Member Author

EgorBo commented Feb 8, 2022

Yes, for more than two letters, it follows PascalCase (TargetOS, Xml and so on).

Ok, changed to OS 🙂

@EgorBo EgorBo changed the title Introduce DOTNET_AltJitOs Introduce DOTNET_AltJitOS Feb 8, 2022
@EgorBo
Copy link
Member Author

EgorBo commented Feb 9, 2022

@dotnet/jit-contrib @jakobbotsch PTAL

@EgorBo EgorBo merged commit baae8fa into dotnet:main Feb 9, 2022
Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

Do we need to add support for something like this in SuperPMI?

Currently, SPMI calls setTargetOS() with the OS that was used in collection. Do we need the ability to override that? E.g., collect on linux-arm64, replay targeting macos-arm64? It might not work anyway, if that causes different JIT/EE interface calls.

@@ -302,6 +302,7 @@ RETAIL_CONFIG_STRING_INFO(EXTERNAL_JitName, W("JitName"), "Primary Jit to use")
#if defined(ALLOW_SXS_JIT)
RETAIL_CONFIG_STRING_INFO(EXTERNAL_AltJitName, W("AltJitName"), "Alternative Jit to use, will fall back to primary jit.")
RETAIL_CONFIG_STRING_INFO(EXTERNAL_AltJit, W("AltJit"), "Enables AltJit and selectively limits it to the specified methods.")
RETAIL_CONFIG_STRING_INFO(EXTERNAL_AltJitOs, W("AltJitOS"), "Sets target OS for AltJit or uses native one by default. Only applicable for ARM/AMR64 at the moment.")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would use EXTERNAL_AltJitOS so the name exactly matches (including case) the variable name.

Also: typo: AMR64 => ARM64

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, will fix in a follow up!

Regarding SuperPMI - not sure, I just wanted to test ABI differences on ARM64

@ghost ghost locked as resolved and limited conversation to collaborators Mar 16, 2022
Sign up for free to 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.

4 participants