-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
StackFrame.GetILOffset returns -1 for ReJITted methods #8296
Comments
@noahfalk: PTAL |
@lt72 - Its a known pre-existing issue that this doesn't work properly, but it would be good to fix. Working around it isn't pleasant and we definately can't afford to have tiered jitting cause a similar impact. |
@noahfalk can you expound a bit more on why it doesn't work, and roughly what needs to be fixed? |
The issue I'm aware of (which may not be the only issue present) is a lock ordering problem. We've got both the original IL->native offset data and the rejit provided IL'->IL mapping data, but they are in data structures the code can't easily access due to lock ordering. I'm guessing a potential solution is to avoid dealing with the cached IL->native data held under the debugger lock and instead go directly to the lower level IL->native data being maintained by the codemanager. If you were worried that this might be JIT related I don't think there is any issue in that area. |
If someone is planning on working on this in the near term I'm happy to go into more detail, I just didn't expect this would get any traction right away. |
@davmason: PTAL |
@davmason: did you get a chance to dig more into this? |
There are multiple cases were we don't need just the pointer for an external variable but the value that is stored at this location. So far this was done with the PREPARE_EXTERNAL_VAR followed by an ldr x? [x?]. The PREPARE_EXTERNAL_VAR macro needs two instructions (adrp + add). As the ldr instruction supports an offset we can eliminate the add for this use case. The two new macros PREPARE_EXTERNAL_VAR_INDIRECT and PREPARE_EXTERNAL_VAR_INDIRECT_W make use of this.
Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. This process is part of our issue cleanup automation. |
This issue will now be closed since it had been marked |
Title says it all. This was tested on CoreCLR 2.0.0-preview2-006098 and desktop .Net 4.6.2
To be clear, this is
System.Diagnostics.StackFrame.GetILOffset()
I can give background offline, if required, but @noahfalk has the details.
The text was updated successfully, but these errors were encountered: