XArch: Trim the code block to match the actual code length#61523
XArch: Trim the code block to match the actual code length#61523kunalspathak merged 6 commits intodotnet:mainfrom
Conversation
|
@jkotas @davidwrighton @dotnet/jit-contrib |
|
Also realized that this is only applicable for xarch. For arm64, we also include the size of ro data and hence checking the unused memory is not even possible. |
Mention this in the comment? |
Sure, I have included some more explanation about armarch. |
BruceForstall
left a comment
There was a problem hiding this comment.
The comment at
runtime/src/coreclr/inc/corjit.h
Lines 184 to 187 in 16b970a
for compileMethod is no longer quite true, as now the returned nativeEntry has specific semantics... for some platforms.
That's somewhat unsatisfying.
|
Failure related to #61548 @BruceForstall - Do you mind taking another look? |
BruceForstall
left a comment
There was a problem hiding this comment.
I'm still not fond of the fact this creates an implicit contract that isn't documented (in corjit.h), and not for all platforms. But ok...
|
@BruceForstall and me discussed a possible follow-up work of implementing a new JITEE interface for |
RyuJIT sometimes over-estimate the instruction sizes leading to allocating more code memory than actually utilized. This PR reads the actual code size value and trims the code block array so that the real code size bytes are embedded in the R2RImage.
Related: #57368