-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Make the output of ThunkGenerator more diffable #122266
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
Conversation
45d157d to
c748587
Compare
EgorBo
left a comment
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.
Heh, I actually wanted to do the same once, thanks! 🙂
src/coreclr/tools/Common/JitInterface/ThunkGenerator/Program.cs
Outdated
Show resolved
Hide resolved
|
Should we rather change this to the canonical pre-initialized vtable pattern runtime/src/tests/nativeaot/SmokeTests/Preinitialization/Preinitialization.cs Lines 1761 to 1762 in 86dfeb9
|
Oh, that looks nicer. I'll mark this as draft while I rework this PR to look more like that. |
c748587 to
d4b11ec
Compare
|
runtime/src/coreclr/tools/Common/JitInterface/JitConfigProvider.cs Lines 168 to 171 in 74cf618
|
|
I removed the extra new lines. |
|
I applied the same pattern to |
src/coreclr/tools/Common/JitInterface/ThunkGenerator/Program.cs
Outdated
Show resolved
Hide resolved
jkotas
left a comment
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.
Thank you!
|
/ba-g DeadLetter |
Before this change, the addition of a new method on the JIT<->EE interface resulted in large diffs in
CorInfoImpl_generated.cswhen viewed on GitHub.com. For example the changes from #120411 look like this:After this change, the diffs are more readable:
s_vtbl.GetTailCallHelpers = &_getTailCallHelpers; +s_vtbl.GetContinuationType = &_getContinuationType; s_vtbl.GetAsyncResumptionStub = &_getAsyncResumptionStub; s_vtbl.NotifyInstructionSetUsage = &_notifyInstructionSetUsage; // ...Because the new pattern is pre-initializable and does not allocate native memory for each
CorInfoImpl, it should be a little faster and use less a little less memory. I doubt that makes an observable difference though sinceCorInfoImplinstances are reused.