JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy#10312
JDK-8293156: Dcmd VM.classloaders fails to print the full hierarchy#10312tstuefe wants to merge 5 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into |
|
@tstuefe 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
|
| return (loader_klass() != NULL) && (loader_klass() == target_node->loader_klass()) && | ||
| ((loader_name_oop() == NULL && target_node->loader_name_oop() == NULL) || | ||
| (::strcmp(loader_name(), target_node->loader_name()) == 0)); |
There was a problem hiding this comment.
This is hard to parse. I think using if/else statements would be cleaner.
|
Hi @plummercj , thanks for your Review. I worked most of your your feedback. .. Thomas |
dholmes-ora
left a comment
There was a problem hiding this comment.
Hi Thomas,
Generally this seems fine - but one issue below.
Thanks.
| st->print(" \"%s\",", the_loader_name); | ||
| } | ||
| st->print(" %s", loader_klass != NULL ? loader_klass->external_name() : "??"); | ||
| st->print(" %s", the_loader_class_name); |
There was a problem hiding this comment.
the_loader_class_name could be NULL here. You need to change loader_class_name() t return "??" like the original code uses.
There was a problem hiding this comment.
Good catch. We never encounter this because Klass can only be null for the bootstrap loader, which is handled in a different branch. I'll fix it.
|
|
dholmes-ora
left a comment
There was a problem hiding this comment.
Nothing further from me. Thanks!
|
@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 91 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 |
|
Thanks @plummercj and @dholmes-ora . /integrate |
|
Going to push as commit c6be2cd.
Your commit was automatically rebased without conflicts. |
Fixes a bug in the
VM.classloadersjcmd that causes class loaders to be omitted from the output if a parent class loader never loaded any class and therefore had no associated DCmd.The fix changes the command to not rely on the existence of a CLD structure for the loader; instead, all information (loader class name, loader name, etc) is pulled via the loader oop, which has to be always there unless its the bootstrap loader.
Also, the tests were expanded to test the display of empty loaders and empty parent loaders.
Thanks to @dholmes-ora for finding this bug.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10312/head:pull/10312$ git checkout pull/10312Update a local copy of the PR:
$ git checkout pull/10312$ git pull https://git.openjdk.org/jdk pull/10312/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10312View PR using the GUI difftool:
$ git pr show -t 10312Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10312.diff