-
Notifications
You must be signed in to change notification settings - Fork 740
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
Create an adequately sized J9Heap to store the UpcallThunk #20926
Conversation
@tajila Requesting your review. |
runtime/vm/UpcallThunkMem.cpp
Outdated
@@ -27,6 +27,8 @@ | |||
|
|||
extern "C" { | |||
|
|||
#define ROUND_TO(granularity, number) (((UDATA)(number) + (granularity) - 1) & ~((UDATA)(granularity) - 1)) |
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.
we have a few of these, maybe we can just define one in j9.h and add a c++ version in VMHelpers. Can be done in a separate PR
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.
Actually, we can use OMR/Bytes.hpp::align here. Let me update the PR since PR builds haven't been launched yet.
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.
Updated to use OMR/Bytes.hpp::align
.
Currently, the J9Heap size to store the UpcallThunk is restricted to the page size. If the thunk is greater than the page size, then the existing code ends in an infinite loop creating J9Heaps of page size. The correct sized J9Heap will never be created so the code will never progress. To resolve this issue, an adequately sized J9Heap, aligned to the page size, is created to store the UpcallThunk. Signed-off-by: Babneet Singh <[email protected]>
jenkins test sanity plinux jdk24 |
jenkins test sanity alinux64 jdk24 |
The failures seen in the PR builds are unrelated to these changes. |
Currently, the
J9Heap
size to store theUpcallThunk
is restricted tothe page size. If the thunk is greater than the page size, then the
existing code ends in an infinite loop creating
J9Heap
s of page size.The correct sized
J9Heap
will never be created so the code will neverprogress.
To resolve this issue, an adequately sized
J9Heap
, aligned to the pagesize, is created to store the
UpcallThunk
.