-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8329655: Cleanup KlassObj and klassOop names after the PermGen removal #18618
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
|
👋 Welcome back stefank! A progress list of the required criteria for merging this PR into |
|
@stefank 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 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
@stefank The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
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.
This is a useful change, it has tripped me up a couple of times, too. Change mostly looks good, just a few minor suggestions.
|
|
||
| ldrw(scan_temp, Address(recv_klass, Klass::vtable_length_offset())); | ||
|
|
||
| // %%% Could store the aligned, prescaled offset in the klassoop. |
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.
Unrelated, but what's the point of the %%% in all those comments? Might want to remove that, while you're there.
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.
I think it is an old-style TODO. I'm considering if we shouldn't just remove these comments. What do people think about that?
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.
I'm not even sure what they want to say, really. Should be good to remove, and if anybody can make sense of it, record an issue in the bug-tracker?
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.
OK. I removed the %%%. I'll wait a little bit to see if someone else wants to keep them for some reason, if not, I'll remove them.
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.
I think leaving these comments without the %%% seems fine. Describing this idea in a CR is a lot more difficult than seeing it in context as commentary, and unless the enhancement has other motivation, it won't be picked up. Leaving the comment as a clue seems useful.
| KlassInfoTable::KlassInfoTable(bool add_all_classes) { | ||
| _size_of_instances_in_words = 0; | ||
| _ref = (HeapWord*) Universe::boolArrayKlassObj(); | ||
| _ref = (uintptr_t) Universe::boolArrayKlass(); |
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.
It seems weird (non-obvious) to cast to uintptr_t here. I see it is only used in KlassInfoTable::hash(), which is weird, too. I am not sure that this even does a useful hashing. Might be worth to get rid of the whole thing and use the fastHash stuff that @rose00 proposed for Lilliput. Perhaps in a follow-up. I'd probably either cast to void* or Klass*, or cast to uintptr_t as you did and remove the unnecessary cast in ::hash().
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.
I agree. I'll start by removing the redundant cast in ::hash().
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.
Thanks! Looks good to me, now.
Roman
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.
This is good. The Obj was confusing.
|
|
||
| ldrw(scan_temp, Address(recv_klass, Klass::vtable_length_offset())); | ||
|
|
||
| // %%% Could store the aligned, prescaled offset in the klassoop. |
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.
I think leaving these comments without the %%% seems fine. Describing this idea in a CR is a lot more difficult than seeing it in context as commentary, and unless the enhancement has other motivation, it won't be picked up. Leaving the comment as a clue seems useful.
| size_t _size_of_instances_in_words; | ||
|
|
||
| // An aligned reference address (typically the least | ||
| // address in the perm gen) used for hashing klass |
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.
Rats I missed this.
|
Thanks for the reviews! |
|
Going to push as commit 71d48bc.
Your commit was automatically rebased without conflicts. |
We have a few places that uses the terms
KlassObjandklassOopwhen referring to Klasses. This is old code from before the PermGen removal, when Klasses also were Java objects.These names tripped me up when I was reading the heap heapInspection.cpp and first though we were mixing the klass mirror objects and klass pointers in the hash code calculation:
I propose that we rename these functions (and stop casting the Klass* to a (HeapWord*)).
Tested with serviceability/dcmd/gc/ClassHistogramTest.java but will run this through our lower tiers.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18618/head:pull/18618$ git checkout pull/18618Update a local copy of the PR:
$ git checkout pull/18618$ git pull https://git.openjdk.org/jdk.git pull/18618/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18618View PR using the GUI difftool:
$ git pr show -t 18618Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18618.diff
Webrev
Link to Webrev Comment