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: add ability to pad profile counters and adjust scalable count th… #91081

Merged

Conversation

AndyAyersMS
Copy link
Member

…reshold

  • DOTNET_JitCounterPadding: adds the ability to pad profile counters by some number of counter-sized slots, to mitigate the effects of false sharing. For example with 64 bit counters, setting DOTNET_JitCounterPadding=8 means each counter is now on its own cache line (for xarch).

  • DOTNET_TieredPGO_ScalableCountThreshold: adds the ability to alter the scalable profile counter's threshold for switching to approximate counting. Defaults to 13 which means profile counts are exact up to 2^13 = 8192 and approximate above that. Lower values will reduce the volume of counter updates (also mitigating false sharing impact) but make the counts more approximate.

…reshold

* `DOTNET_JitCounterPadding`: adds the ability to pad profile counters by some
number of counter-sized slots, to mitigate the effects of false sharing. For
example with 64 bit counters, setting `DOTNET_JitCounterPadding=8` means each
counter is now on its own cache line (for xarch).

* `DOTNET_TieredPGO_ScalableCountThreshold`: adds the ability to alter the scalable
profile counter's threshold for switching to approximate counting. Defaults to 13
which means profile counts are exact up to 2^13 = 8192 and approximate above that.
Lower values will reduce the volume of counter updates (also mitigating false sharing
impact) but make the counts more approximate.
@ghost ghost assigned AndyAyersMS Aug 24, 2023
@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 24, 2023
@ghost
Copy link

ghost commented Aug 24, 2023

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

Issue Details

…reshold

  • DOTNET_JitCounterPadding: adds the ability to pad profile counters by some number of counter-sized slots, to mitigate the effects of false sharing. For example with 64 bit counters, setting DOTNET_JitCounterPadding=8 means each counter is now on its own cache line (for xarch).

  • DOTNET_TieredPGO_ScalableCountThreshold: adds the ability to alter the scalable profile counter's threshold for switching to approximate counting. Defaults to 13 which means profile counts are exact up to 2^13 = 8192 and approximate above that. Lower values will reduce the volume of counter updates (also mitigating false sharing impact) but make the counts more approximate.

Author: AndyAyersMS
Assignees: AndyAyersMS
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

These may prove useful someday.

@EgorBo PTAL
cc @dotnet/jit-contrib

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

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

👍

Co-authored-by: Jakob Botsch Nielsen <[email protected]>
@AndyAyersMS AndyAyersMS merged commit f5881e5 into dotnet:main Aug 27, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 26, 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.

3 participants