-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8319548: Unexpected internal name for Filler array klass causes error in VisualVM #17155
8319548: Unexpected internal name for Filler array klass causes error in VisualVM #17155
Conversation
👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into |
/author add tomas.hurka@oracle.com |
@tschatzl Syntax:
User names can only be used for users in the census associated with this repository. For other authors you need to supply the full name and email address. |
/label add hotspot-gc |
/contributor add Tomáš Hůrka tomas.hurka@oracle.com |
@tschatzl |
@tschatzl |
@tschatzl 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 41 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 |
I'm still struggling with what we are doing with this filler array stuff. IIUC the underlying type is actually |
The reason for having dedicated filler array klasses is detecting internally in the GC that we are currently looking at a dead object. That the VM can distinguish dead objects from live objects is required for some functionality (like heap dumping only live classes, but also verification) without undue performance (basically need to redo marking every time this is needed) or memory usage hit (1.5% of maximum Java heap size) when invoking some APIs. E.g. any reference from a live object to a dead object will immediately assert. There is also improved debugability due to that - i.e. if you see a reference to any such klass in a hs_err file, it is 99% an error with a reference where the barrier has been forgotten. The reason for having a custom array type and not having a klass referencing
We do not expose these arrays to regular APIs (e.g. we filter them out when iterating available klasses), and they are never referenced by other live objects by definition. So it is impossible for a Java application to get a reference to such objects or these klasses. The only way they are exposed is in a heap dump also containing dead objects (and related functionality like the Previously one would get the same dead objects in that output just intermingled with other |
Fwiw, the original issue introducing details the advantages too https://bugs.openjdk.org/browse/JDK-8284435; it does not particularly point out how much memory this saves, but it mentions that it removes the need for keeping around an extra mark bitmap covering the whole Java heap (that 1.5%). |
Thanks for clarifying @tschatzl that these pretend arrays are only exposed in this one case. |
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.
Looks good. Thanks
Thanks @albertnetymk @dholmes-ora for your reviews |
Going to push as commit 05745e3.
Your commit was automatically rebased without conflicts. |
You probably did the heap dump right after G1 managed to free lots of memory - these Previously one would have seen a huge amount of int-arrays ( Normally G1 would then incrementally reduce these From the given output of |
(because the bot does not seem to forward the answer from the mailing list within a few hours; fwiw, it has been pure luck that I stumbled across that question within github): On 30.04.24 03:38, jjscl8888 wrote:
Collectors are fairly reluctant to give back memory to the OS. For G1 in particular, there are the options
Not sure the latter condition is met here to shrink, and without logs ( So to decrease the heap more aggressively, it might work to decrease Hth, |
Mailing list message from Thomas Schatzl on hotspot-dev: On 30.04.24 03:38, jjscl8888 wrote:
Collectors are fairly reluctant to give back memory to the OS. For G1 in particular, there are the options `MinHeapFreeRatio` and * `MinHeapFreeRatio` is "The minimum percentage of heap free after GC to * `MaxHeapFreeRatio` is "The maximum percentage of heap free after GC to Not sure the latter condition is met here to shrink, and without logs So to decrease the heap more aggressively, it might work to decrease Hth, |
Thank you for your previous question. I have another inquiry regarding compiling the JDK source code. I've noticed that when I compile the JDK without selecting specific configure parameters, the resulting JDK size differs from the official version available on the website. I'm curious to know which configuration parameters were used for the official LTS (Long-Term Support) version of the JDK. |
Mailing list message from Thomas Schatzl on hotspot-gc-dev: (The mail probably did not get sent to the correct recipient, so it did Hi, On 08.05.24 04:21, jjscl8888 wrote:
The page at I will ask around if there is anything more specific than that. Otherwise the people on the build-dev openjdk mailing list may be able Further I would like to recommend you to join the appropriate mailing Hth, |
Hi all,
please review this change that changes the filler array class name (again) after user feedback.
In particular, the previous name
Ljdk/internal/vm/FillerArray;
confuses some tools (oracle/visualvm#523). I.e. it's not an array, but still variable sized.This change adds the
[
array bracket, and renames the element name to not haveArray
inside to not try to pretend that the element is some other kind of array.Testing: tier1-6
Thanks,
Thomas
Progress
Issue
Reviewers
Contributors
<tomas.hurka@oracle.com>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17155/head:pull/17155
$ git checkout pull/17155
Update a local copy of the PR:
$ git checkout pull/17155
$ git pull https://git.openjdk.org/jdk.git pull/17155/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17155
View PR using the GUI difftool:
$ git pr show -t 17155
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17155.diff
Webrev
Link to Webrev Comment