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

JIT: Set default value for JitExtDefaultPolicyProfTrust 0 #55229

Merged
merged 4 commits into from
Jul 8, 2021

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Jul 6, 2021

The built-in profile works great for TE benchmarks, but regresses many micro-benchmarks if we decrease the benefit multiplier for cold blocks (with profile). Obviously, the micro benchmarks try to cover everything including blocks stated as cold by the built-in profile.
Example:

dotnet run -c Release -f net5.0 -- --coreRun %CORE_RUN% --filter "*CreateInstanceGeneric*"

Results:

|                Method |     Mean |
|---------------------- |---------:|
| CreateInstanceGeneric | 13.17 ns |
| CreateInstanceGeneric | 12.07 ns |  with JitExtDefaultPolicyProfTrust=0

In theory we can trust any profile that is not the built-in one (it's too generic) but I'm not sure we can determinate its source in JIT today.

Size regression for R2R'd corelib with --Ot: +0.2%

/cc @AndyAyersMS

@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 Jul 6, 2021
@AndyAyersMS
Copy link
Member

You can use fgPgoSource to distinguish static PGO from dynamic PGO, if that helps guide things more effectively. We might be able to extend this enum to distinguish our default static PGO from some user-collected static PGO.

@EgorBo
Copy link
Member Author

EgorBo commented Jul 7, 2021

We might be able to extend this enum to distinguish our default static PGO from some user-collected static PGO.

@AndyAyersMS Yeah it would be nice to have, I guess the user-collected one would be the most truthful one.
But as for now I'd like to merge it as is (I've had a round of TE benchmarks - no regressions) - does it look good?

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

LGTM

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