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

Remove support for non-indirect code headers #100351

Conversation

davidwrighton
Copy link
Member

@davidwrighton davidwrighton commented Mar 27, 2024

  • We use indirect code headers on all platforms (except for Windows X86, which has no particular reason to not use them)
    • Indirect code headers are required to support funclet style codegen, but work just fine in all cases.
  • This removes one of the ways in which Windows X86 is different from all other platforms

- We use indirect code headers on all platforms (except for Linux X86, which doesn't get any testing at all by anyone I can find)
Copy link
Contributor

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

@jkotas
Copy link
Member

jkotas commented Mar 27, 2024

We use indirect code headers on all platforms (except for Linux X86

I do not think that this is correct.

https://github.com/dotnet/runtime/pull/100351/files#diff-acf2591196fce1cb929f939ad102f0859941d0b60b3070734d59f39af07920c7L54-L56 says that we do not use indirect code headers on Windows x86.

Having said this, I do not see a problem with switching Windows x86 to indirect headers if everything is green.

@AaronRobinsonMSFT
Copy link
Member

AaronRobinsonMSFT commented Mar 27, 2024

Can someone give the "for Dummies" description for indirect and non-indirect code headers. What is the problem and how is it solved?

@jkotas
Copy link
Member

jkotas commented Mar 27, 2024

Every JITed method has a code header that contains things like pointer to the method unwind/GC info, MethodDesc*, etc.

In indirect code header scheme, there is a pointer right before the start of the method code that points to the actual code header.

In "direct" code header scheme, the whole code header is right before the method code.

The indirect code header is better for code density and it allows the actual code header to be a variable sized struct that we take advantage of to store funclet bounds.

@davidwrighton
Copy link
Member Author

@jkotas Thank you for correcting me on what platform didn't use these things. Having to have such arcane knowledge is why I want to get rid of this sort of weird variation that is OS/architecture specific. Also, allowed me to write a better PR comment :)

@jkotas
Copy link
Member

jkotas commented Mar 27, 2024

Build breaks on Windows x86...

D:\a_work\1\s\src\coreclr\vm\codeman.cpp(2868): error C2039: 'unwindInfos': is not a member of '_hpRealCodeHdr'

@davidwrighton davidwrighton merged commit d7c4f02 into dotnet:main Mar 28, 2024
92 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2024
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.

3 participants