-
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
8344913: Improve -Xlog:cds+map+oop logging for Java mirrors #22345
8344913: Improve -Xlog:cds+map+oop logging for Java mirrors #22345
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
@iklam 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
static void print_oop_with_requested_addr_cr(outputStream* st, oop source_oop, bool print_addr = true) { | ||
static void print_oop_with_requested_addr_cr(outputStream* st, oop source_oop, bool print_addr = true, bool print_aot_init = false) { |
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.
Pre-existing but it seems very odd to me to have a function called print_oop_with_requested_addr
and then have a parameter to control whether we print the addr.
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 changed the function name to print_oop_info_cr()
and added comments about whether address(es) are printed, and in what format.
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.
Seems reasonable, albeit a bit complicated to follow what exactly is being printed where and why.
if (print_aot_init) { | ||
Klass* src_klass = java_lang_Class::as_Klass(scratch_mirror); | ||
if (src_klass != nullptr && src_klass->is_instance_klass()) { | ||
InstanceKlass* buffered_klass = | ||
ArchiveBuilder::current()->get_buffered_addr(InstanceKlass::cast(src_klass)); | ||
if (buffered_klass->has_aot_initialized_mirror()) { | ||
st->print(" (aot-inited)"); | ||
} | ||
} | ||
} | ||
} |
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.
Is there a reason we wouldn't always print whether or not it is aot-inited? It seems useful information.
@@ -1294,7 +1294,7 @@ class ArchiveBuilder::CDSMapLogger : AllStatic { | |||
|
|||
if (source_oop != nullptr) { | |||
// This is a regular oop that got archived. | |||
print_oop_with_requested_addr_cr(&st, source_oop, false); | |||
print_oop_with_requested_addr_cr(&st, source_oop, false, true); |
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.
Now that the function takes two boolean args. I think it is good to add comments on those boolean args.
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 added the comment about what the first false
parameter means. I also removed the second parameter as suggested by David.
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.
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 for the update - looks good.
Thanks @dholmes-ora @calvinccheung for the review |
Going to push as commit f51363e. |
The following information is added to the
-Xlog:cds+map+oop
output for examining thejava/lang/Class
oop instances inside the AOT cache:Below is the new and modified output vs the previous version:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22345/head:pull/22345
$ git checkout pull/22345
Update a local copy of the PR:
$ git checkout pull/22345
$ git pull https://git.openjdk.org/jdk.git pull/22345/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22345
View PR using the GUI difftool:
$ git pr show -t 22345
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22345.diff
Using Webrev
Link to Webrev Comment