Skip to content

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

@ghost ghost 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