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

Make FailFast a QCall #98908

Merged
merged 4 commits into from
Mar 3, 2024
Merged

Make FailFast a QCall #98908

merged 4 commits into from
Mar 3, 2024

Conversation

AustinWise
Copy link
Contributor

@AustinWise AustinWise commented Feb 26, 2024

I confirmed that the instruction pointer found by stack walking matched the IP found by the FCALL version (pointing to the return address of the function that called FailFast). I do not know if that is sufficient to preserve the "Watson bucketization" that the many comments around this code mention.

TODO:

  • confirm that the retAdress is the same after this change for direct calls to FailFast. It is the return address in the calling function.
  • confirm that the stack walking works correctly when someone uses reflection to call fail fast. It is in CallDescrWorkerInternal at CallDescrWorkerInternalReturnAddress. Maybe that is not the best address for bucketization, but it's the same address as before.
  • Check if the GCPROTECT in the QCALLS is really needed. GenericFailFast does a GCPROTECT and the QCALLS don't do anything that triggers a GC before calling GenericFailFast, so are they needed?
  • Update comments about "Watson bucketization".
  • Consolidate to a single QCall.

Contributes to #95695

@teo-tsirpanis teo-tsirpanis added the community-contribution Indicates that the PR has been added by a community member label Feb 26, 2024
@jkotas
Copy link
Member

jkotas commented Feb 27, 2024

Watson bucketization

@dotnet/dotnet-diag Could you please comment on impact of this change on Watson?

@AustinWise AustinWise changed the title WIP: Make FailFast a QCall Make FailFast a QCall Feb 28, 2024
@AustinWise AustinWise marked this pull request as ready for review February 28, 2024 04:04
@AustinWise
Copy link
Contributor Author

I checked the reflection case and confirmed that the calculated return address is in the same location as before this change.

@noahfalk
Copy link
Member

@dotnet/dotnet-diag Could you please comment on impact of this change on Watson?

@leculver @mikem8361 - I think you guys are in the best position to evaluate.

@mikem8361
Copy link
Member

It look like it should have any impact on Watson to me.

@AustinWise AustinWise marked this pull request as ready for review March 2, 2024 04:12
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas jkotas merged commit 37445d4 into dotnet:main Mar 3, 2024
111 checks passed
@AustinWise AustinWise deleted the austin/FailFastQCall branch March 4, 2024 17:04
AustinWise added a commit to AustinWise/runtime that referenced this pull request Mar 16, 2024
This has a similar structure to FailFast as converted in dotnet#98908.

Contributes to dotnet#95695
jkotas added a commit that referenced this pull request Mar 17, 2024
* Convert GetCurrentMethod to QCALL

This has a similar structure to FailFast as converted in #98908.

Contributes to #95695

* Simplify code for QCALL

Co-authored-by: Jan Kotas <[email protected]>

---------

Co-authored-by: Jan Kotas <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants