-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8333047: Remove arena-size-workaround in jvmtiUtils.cpp #19425
8333047: Remove arena-size-workaround in jvmtiUtils.cpp #19425
Conversation
👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into |
@tstuefe This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 44 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
x86 problem unrelated |
@jdksjolen could you take a look? You know the Arena coding behind it, and this PR is, in a very circumvent way, one of the prerequisites for NMT simplifications I plan. |
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.
Today, the ChunkPools are allocated before main through static initialization. That means that the ChunkPools exists when main starts executing, so this is safe.
Thanks @jdksjolen and @sspitsyn ! /integrate |
Going to push as commit ba323b5.
Your commit was automatically rebased without conflicts. |
In
JvmtiUtil::single_threaded_resource_area()
, we create a resource area that is supposed to work even if the current thread is not attached yet and there is no associated Thread or the Thread has no valid ResourceArea.It contains a workaround:
It specifies a non-standard chunk size to circumvent the chunk-pool-based allocation in the RA constructor, ensuring that only malloc is used. This is because in the old days the ChunkPools had been allocated from C-Heap and there was a time window when no chunk pools were live yet.
This is quirky and a bit ugly. It is also unnecessary since JDK-8272112 (since JDK 18). We now create chunk pools as global objects, so they are live as soon as the libjvm C++ initialization ran. We can remove this workaround and the comment.
Tests: GHAs.
I also manually called this function, and allocated from the resulting ResourceArea, at the very beginning of CreateJavaVM. I made sure that both allocations and follow-up-chunk-allocation worked even this early in VM life.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19425/head:pull/19425
$ git checkout pull/19425
Update a local copy of the PR:
$ git checkout pull/19425
$ git pull https://git.openjdk.org/jdk.git pull/19425/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19425
View PR using the GUI difftool:
$ git pr show -t 19425
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19425.diff
Webrev
Link to Webrev Comment