Skip to content

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Feb 12, 2021

Some changes to add the BEGIN_QCALL/END_QCALL macros.

  • Convert BindToMethodName to QCall

Uses same helper as Debugger.Log, so convert too.

@hoyosjs hoyosjs requested a review from jkotas February 12, 2021 06:29
@ghost
Copy link

ghost commented Feb 12, 2021

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

Issue Details

Some changes to add the BEGIN_QCALL/END_QCALL macros.

  • Convert BindToMethodName to QCall

Uses same helper as Debugger.Log

Author: hoyosjs
Assignees: -
Labels:

area-Diagnostics-coreclr

Milestone: -

@hoyosjs
Copy link
Member Author

hoyosjs commented Feb 12, 2021

I haven't ported the other call (ValidateObject), but wanted to get a feel if this is what we need to do. Will open the 3.1 PR after this. I am currently testing this locally.

@jkotas
Copy link
Member

jkotas commented Feb 12, 2021

Convert BindToMethodName to QCall

It may be useful to make this change in master first, and then port it to servicing.

@hoyosjs hoyosjs force-pushed the juhoyosa/qcall-change5 branch from 239d98a to feab66b Compare February 12, 2021 11:41
Copy link
Member

Choose a reason for hiding this comment

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

You still have to protect the GC references like before. Number of the calls below triggers GC - it is not ok to have unprotected GC reference in a local while calling GC triggering method.

The easiest way to do this is to keep the gc struct and use GCPROTECT_BEGIN/END macro to protect it.

It may be possible to avoid GCPROTECT_BEGIN/END and instead re-fetch the value each time from ObjectHandleOnStack. It would be more involved change.

Copy link
Member

Choose a reason for hiding this comment

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

I think this shows that we should do the change in dotnet/runtime first so that subtle GC holes (if there are any) will show up as intermittent crashes in CI. The servicing CI runs much less often and so these bugs would take a lot longer to surface.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will do this on master first, I just can't turn this into draft, so I continued working here first.

@hoyosjs hoyosjs force-pushed the juhoyosa/qcall-change5 branch from feab66b to f647808 Compare February 18, 2021 04:11
@jkotas
Copy link
Member

jkotas commented Feb 18, 2021

I think we should go with your fix #45906 for servicing, instead of this change. #45906 turned out simple enough to make it low-risk.

@hoyosjs
Copy link
Member Author

hoyosjs commented Feb 18, 2021

@jkotas yeah. I am closing this one.

@hoyosjs hoyosjs closed this Feb 18, 2021
@hoyosjs hoyosjs deleted the juhoyosa/qcall-change5 branch February 18, 2021 05:20
@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants