-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix Windows coreclr.dll size regression #40282
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
A recent change has replaced usage of SELECTANY by constexpr to significantly reduce size of coreclr binaries on Unix. But it has resulted in about 180kB regression in coreclr.dll size on Windows. This change gets rid of the constexpr at places that can be reasonably moved to having declaration in header and definition in a .cpp file. I've also found a couple of things that are not used anymore, so I have deleted them. The only thing where I've moved back to using SELECTANY on Windows is the DbgIPCEventTypeNames in dbgipcevents.h. That table and the related GetEventType / GetEventName methods are used in both mscordbi and coreclr and sharing a .cpp source with the data between those two libraries was ugly and problematic.
|
cc: @dotnet/jit-contrib for the jit changes. |
| // 32-bit magic numbers, (because the algorithm for using 33-bit magic numbers is slightly slower). | ||
| // | ||
|
|
||
| PrimeInfo primeInfo[] = |
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.
Nit: const ?
| }; | ||
|
|
||
| constexpr IPCEventTypeNameMapping DbgIPCEventTypeNames[] = | ||
| #ifdef TARGET_WINDOWS |
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.
Nit: #if defined(_MSC_VER) may be more appropriate
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.
LGTM otherwise. Thanks!
CarolEidt
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.
LGTM
defined(_MSC_VER)
* Fix Windows coreclr.dll size regression A recent change has replaced usage of SELECTANY by constexpr to significantly reduce size of coreclr binaries on Unix. But it has resulted in about 180kB regression in coreclr.dll size on Windows. This change gets rid of the constexpr at places that can be reasonably moved to having declaration in header and definition in a .cpp file. I've also found a couple of things that are not used anymore, so I have deleted them. The only thing where I've moved back to using SELECTANY on Windows is the DbgIPCEventTypeNames in dbgipcevents.h. That table and the related GetEventType / GetEventName methods are used in both mscordbi and coreclr and sharing a .cpp source with the data between those two libraries was ugly and problematic. * Fix x86 build * Fix clang format * Reflect PR feedback defined(_MSC_VER)
A recent change has replaced usage of SELECTANY by constexpr to
significantly reduce size of coreclr binaries on Unix. But it has
resulted in about 180kB regression in coreclr.dll size on Windows.
This change gets rid of the constexpr at places that can be reasonably
moved to having declaration in header and definition in a .cpp file.
I've also found a couple of things that are not used anymore, so I have
deleted them.
The only thing where I've moved back to using SELECTANY on Windows is
the DbgIPCEventTypeNames in dbgipcevents.h. That table and the related
GetEventType / GetEventName methods are used in both mscordbi and
coreclr and sharing a .cpp source with the data between those two
libraries was ugly and problematic.
Close #39599