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

Add JitOptRepeat configuration options #100154

Merged
merged 2 commits into from
Mar 23, 2024

Conversation

BruceForstall
Copy link
Member

JitOptRepeat is still off by default.

  1. Add a DOTNET_JitEnableOptRepeat option. By default this is zero, meaning OptRepeat is disabled. Set it to one to enable JitOptRepeat. Enabling it will allow OptRepeat to kick in during JitStress, but will not otherwise enable it. Also setting DOTNET_JitOptRepeat to a method set will enable JitOptRepeat for that exact set of methods. The number of repetitions is specified by DOTNET_JitOptRepeatCount.
  2. Enable JitOptRepeat to kick in for stress (if DOTNET_JitEnableOptRepeat is set to non-zero). The repetition count is set randomly (based on method hash seed) between 2 and 5.
  3. Add DOTNET_JitOptRepeatRange. This limits JitOptRepeat to a method hash range, for isolating JitOptRepeat related bad codegen.

JitOptRepeat is still off by default.

1. Add a `DOTNET_JitEnableOptRepeat` option. By default this is zero,
meaning OptRepeat is disabled. Set it to one to enable JitOptRepeat.
Enabling it will allow OptRepeat to kick in during JitStress, but will
not otherwise enable it. Also setting `DOTNET_JitOptRepeat` to a method set
will enable JitOptRepeat for that exact set of methods. The number of
repetitions is specified by `DOTNET_JitOptRepeatCount`.
2. Enable JitOptRepeat to kick in for stress (if `DOTNET_JitEnableOptRepeat`
is set to non-zero). The repetition count is set randomly (based on method
hash seed) between 2 and 5.
3. Add `DOTNET_JitOptRepeatRange`. This limits JitOptRepeat to a method hash
range, for isolating JitOptRepeat related bad codegen.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 22, 2024
Copy link
Contributor

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

@BruceForstall
Copy link
Member Author

This is extracted from #94250 to make that PR smaller.

@BruceForstall
Copy link
Member Author

@AndyAyersMS PTAL
cc @dotnet/jit-contrib

@BruceForstall
Copy link
Member Author

Diffs

There are asm diffs because there are a few tests that set DOTNET_JitOptRepeat which now need to also set DOTNET_JitEnableOptRepeat=1. I added that to the tests, but the collections don't have that setting.

@BruceForstall BruceForstall merged commit 40cb4b6 into dotnet:main Mar 23, 2024
116 checks passed
@BruceForstall BruceForstall deleted the AddOptRepeatConfig branch March 23, 2024 21:23
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants