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

Fixes for text-based PGO #56986

Merged
merged 2 commits into from
Aug 7, 2021
Merged

Fixes for text-based PGO #56986

merged 2 commits into from
Aug 7, 2021

Conversation

AndyAyersMS
Copy link
Member

Fix missing indirection when reading in text-based PGO data.

Prioiritize reading text-based PGO over dynamic or static PGO data, so that we
can use text to provide a fixed set of PGO data when trying to isolate bugs.

In the jit, give text-based PGO data the same trust level we give to dynamic
PGO data.

Fix missing indirection when reading in text-based PGO data.

Prioiritize reading text-based PGO over dynamic or static PGO data, so that we
can use text to provide a fixed set of PGO data when trying to isolate bugs.

In the jit, give text-based PGO data the same trust level we give to dynamic
PGO data.
@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 Aug 6, 2021
@AndyAyersMS
Copy link
Member Author

@davidwrighton PTAL
cc @dotnet/jit-contrib

I used this to pin down the bad method over in #56689. I had an intermittent repro that failed with dynamic PGO; trying to bisect via JitEnablePGORange using live dynamic PGO data was not effective. So I captured failing pgo data in a text file and then was able to get a stable repro and bisect with no problems.

@@ -1684,7 +1685,8 @@ double ExtendedDefaultPolicy::DetermineMultiplier()
const double profileTrustCoef = (double)JitConfig.JitExtDefaultPolicyProfTrust() / 10.0;
const double profileScale = (double)JitConfig.JitExtDefaultPolicyProfScale() / 10.0;

if (m_RootCompiler->fgPgoSource == ICorJitInfo::PgoSource::Dynamic)
if ((m_RootCompiler->fgPgoSource == ICorJitInfo::PgoSource::Dynamic) ||
(m_RootCompiler->fgPgoSource == ICorJitInfo::PgoSource::Text))
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a IsPgoSourceTrustworthy (or similar) function for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, seems like a good idea.

@AndyAyersMS AndyAyersMS merged commit 4803ce2 into dotnet:main Aug 7, 2021
@AndyAyersMS AndyAyersMS deleted the PgoStuff branch August 7, 2021 00:52
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2021
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.

3 participants