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: revise how synthesis treats handler regions #100899

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

AndyAyersMS
Copy link
Member

@AndyAyersMS AndyAyersMS commented Apr 11, 2024

Instead of giving hander regions a fraction of the entry weight, give them a small fixed weight. This is intended to combat the lack of profile propagation out of handler regions, where there are currently sometimes weight discontinuities large enough to cause profile check asserts.

Contributes to #93020.

A small number of Diffs.

Instead of giving hander regions a fraction of the entry weight, give them a small
fixed weight. This is intended to combat the lack of profile propagation out of
handler regions, where there are currently sometimes weight discontinuities large
enough to cause profile check asserts.

Contributes to dotnet#93020.
@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 Apr 11, 2024
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member Author

@amanasifkhalid PTAL
cc @dotnet/jit-contrib

This will be needed to land #100869

Copy link
Member

@amanasifkhalid amanasifkhalid left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -45,7 +45,7 @@ class ProfileSynthesis
{
}

static constexpr weight_t exceptionScale = 0.001;
static constexpr weight_t exceptionWeight = 0.00001;
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit surprised to see this fixed weight is smaller than the scale factor it's replacing. Did you get this number through trial and error, or?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing magic here. Just wanted a value that is small enough to ignore in an absolute sense.

Copy link
Member

Choose a reason for hiding this comment

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

I see -- so close to zero, but it won't mark the block with BBF_RUN_RARELY.

@AndyAyersMS AndyAyersMS merged commit 60ef7ec into dotnet:main Apr 11, 2024
110 checks passed
matouskozak pushed a commit to matouskozak/runtime that referenced this pull request Apr 30, 2024
Instead of giving hander regions a fraction of the entry weight, give them a small
fixed weight. This is intended to combat the lack of profile propagation out of
handler regions, where there are currently sometimes weight discontinuities large
enough to cause profile check asserts.

Contributes to dotnet#93020.
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2024
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