-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Optimize JIT_ClassProfile32 #82014
Optimize JIT_ClassProfile32 #82014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! BTW, when I looked at it the FORCEINLINE
was not required for MSVC to inline CheckSample
, but still seems fine to me to have it given that we know it's very hot.
Would also like to know what the intention of the volatile increment was since that is being removed (cc @AndyAyersMS)
We might also look at implementing something closer to the true reservoir sampling via
Doesn't look like it is needed. I don't remember why I had it that way. |
@EgorBo did you collect any data for this one? |
I did, the improvement was quite small, I assume, mostly because the main issue is in |
/azp list |
This comment was marked as resolved.
This comment was marked as resolved.
/azp run runtime-coreclr pgo, runtime-coreclr libraries-pgo |
Azure Pipelines successfully started running 2 pipeline(s). |
Failure is #82275 |
I'm still seeing
JIT_ClassProfile32
being top5 hottest functions in the TE traces + was surprised to see it for Paint.NET's traces (forced to stay in tier0-instrumented).New codegen:
This PR does:
classProfile->Count++
operation.volatile
seems unnecessary hereCheckSample
intoJIT_ClassProfile32
pMT->GetLoaderAllocator()->IsCollectible()
withpMT->Collectible()
(mostly written by @jakobbotsch)
Open questions
DOTNET_TieredPGO=1
to produce a better NPGO coverage.