Make the output of ThunkGenerator more diffable#122266
Conversation
45d157d to
c748587
Compare
EgorBo
left a comment
There was a problem hiding this comment.
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
|
/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.