Skip to content

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.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 11, 2024
@dotnet-policy-service
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
Contributor

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

}

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

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
Contributor

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