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: fix STRESS_BB_PROFILE issue #101925

Merged
merged 2 commits into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/coreclr/jit/fgprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2846,22 +2846,14 @@ PhaseStatus Compiler::fgInstrumentMethod()
//
PhaseStatus Compiler::fgIncorporateProfileData()
{
// For now we only rely on profile data when optimizing.
//
if (!opts.OptimizationEnabled())
{
JITDUMP("not optimizing, so not incorporating any profile data\n");
return PhaseStatus::MODIFIED_NOTHING;
}

// Are we doing profile stress?
//
if (fgStressBBProf() > 0)
{
JITDUMP("JitStress -- incorporating random profile data\n");
fgIncorporateBlockCounts();
fgApplyProfileScale();
ProfileSynthesis::Run(this, ProfileSynthesisOption::RepairLikelihoods);
fgApplyProfileScale();
return PhaseStatus::MODIFIED_EVERYTHING;
}

Expand All @@ -2882,6 +2874,7 @@ PhaseStatus Compiler::fgIncorporateProfileData()
{
JITDUMP("Synthesizing profile data\n");
ProfileSynthesis::Run(this, ProfileSynthesisOption::AssignLikelihoods);
fgApplyProfileScale();
return PhaseStatus::MODIFIED_EVERYTHING;
}
}
Expand All @@ -2893,6 +2886,7 @@ PhaseStatus Compiler::fgIncorporateProfileData()
{
JITDUMP("Synthesizing profile data and writing it out as the actual profile data\n");
ProfileSynthesis::Run(this, ProfileSynthesisOption::AssignLikelihoods);
fgApplyProfileScale();
return PhaseStatus::MODIFIED_EVERYTHING;
}
#endif
Expand Down
Loading