Skip to content

Conversation

@AndyAyersMS
Copy link
Member

Otherwise the spanning tree we generate may be biased by the profile data and not match the spanning tree we generated in Tier0.

Fixes #85799.

Otherwise the spanning tree we generate may be biased by the profile data
and not match the spanning tree we generated in Tier0.

Fixes dotnet#85799.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 5, 2023
@ghost ghost assigned AndyAyersMS May 5, 2023
@ghost
Copy link

ghost commented May 5, 2023

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

Issue Details

Otherwise the spanning tree we generate may be biased by the profile data and not match the spanning tree we generated in Tier0.

Fixes #85799.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS AndyAyersMS requested a review from EgorBo May 5, 2023 02:06
@AndyAyersMS
Copy link
Member Author

@EgorBo PTAL
cc @dotnet/jit-contrib

Some diffs mainly in instrumentation patterns in Tier1 instr code. Also likely diffs in optimized methods where schemas should now match, but SPMI will probably fail to replay those.

@AndyAyersMS
Copy link
Member Author

We should assert that we never have a schema mismatch with Dynamic PGO. Will try that subsequently.

@AndyAyersMS AndyAyersMS merged commit 32414ec into dotnet:main May 5, 2023
AndyAyersMS added a commit to AndyAyersMS/runtime that referenced this pull request May 8, 2023
When the profile data comes from dynamic PGO, the spanning tree encoded in the
schema produced by an earlier tier should exactly match the spanning tree for
the current jit attempt, since the JIT and method IL are identical.

(This is not the case for static PGO; that schema may have come from a different
JIT and/or different version of IL).

Note in release modes we won't assert; instead, we will silently throw the PGO
data away.

Follow-on change to dotnet#85805 to catch more issues like dotnet#85799.
AndyAyersMS added a commit that referenced this pull request May 8, 2023
When the profile data comes from dynamic PGO, the spanning tree encoded in the
schema produced by an earlier tier should exactly match the spanning tree for
the current jit attempt, since the JIT and method IL are identical.

(This is not the case for static PGO; that schema may have come from a different
JIT and/or different version of IL).

Note in release modes we won't assert; instead, we will silently throw the PGO
data away.

Follow-on change to #85805 to catch more issues like #85799.
@ghost ghost locked as resolved and limited conversation to collaborators Jun 4, 2023
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.

Unexpected PGO schema divergence in a method that's both instrumented and optimized

2 participants