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
8276787: Improve warning messages for -XX:+RecordDynamicDumpInfo #6383
8276787: Improve warning messages for -XX:+RecordDynamicDumpInfo #6383
Conversation
|
/label remove hotspot |
@iklam |
@iklam |
Webrevs
|
FileMapInfo::check_archive((const char*)cur_path, false /*is_static*/); | ||
*top_archive_path = cur_path; | ||
} | ||
|
||
bool Arguments::init_shared_archive_paths() { | ||
void Arguments::init_shared_archive_paths() { | ||
if (ArchiveClassesAtExit != NULL) { |
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.
Maybe change NULL
to nullptr
since your new code below in the same function uses nullptr
?
check_unsupported_dumping_properties(); | ||
SharedDynamicArchivePath = os::strdup_check_oom(ArchiveClassesAtExit, mtArguments); |
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 clearer to leave this assignment alone.
It works in your current patch because in line 3561, the ArchiveClassesAtExit
is used instead of SharedDynamicArchivePath
.
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.
SharedDynamicArchivePath had two meanings before this PR:
- the dynamic archive that will be mapped during VM start-up.
- the dynamic archive that will be dumped.
This made the code complicated (E.g., the old version of DynamicArchive::dump() needed to call into Arguments::init_shared_archive_paths() to set it SharedDynamicArchivePath).
This PR removed the second meaning. That's why I removed line 3504. Now if ArchiveClassesAtExit is specified, SharedDynamicArchivePath will be NULL.
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 your explanation. It makes sense.
} | ||
|
||
if (SharedArchiveFile == NULL) { |
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.
Null
to nullptr
?
@@ -34,9 +34,10 @@ | |||
* @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. SharedArchiveFileOption | |||
*/ |
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.
Please add @bug
in the header section.
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. Some minor comments in arguments.cpp and the testcase.
@tstuefe could you take a look? |
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.
Hi Ioi,
I am not an AppCDS expert, but to me, this looks good.
Thanks, Thomas
@@ -336,7 +338,8 @@ void DynamicArchiveBuilder::write_archive(char* serialized_data) { | |||
class VM_PopulateDynamicDumpSharedSpace: public VM_GC_Sync_Operation { | |||
DynamicArchiveBuilder builder; |
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.
nit, preexisting, but should members not be prefixed with _?
@iklam This change now passes all automated pre-integration checks. 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
|
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.
The update looks good.
Thanks @calvinccheung and @tstuefe for the review. |
Going to push as commit a77d8dd.
Your commit was automatically rebased without conflicts. |
[1] Fixed the error messages for the three scenarios described in the bug report. See the test SharedArchiveFileOption.java for new test cases for these messages.
[2] The global SharedDynamicArchivePath was used for both reading and writing the dynamic archive. Now the writing part is handled by DynamicArchiveBuilder::_archive_name. This simplifies the logic in Arguments::init_shared_archive_paths() and DynamicArchive::dump_for_jcmd(). It also makes the checks in [1] easier to implement.
Testing: running through Oracle CI tiers 1-4.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6383/head:pull/6383
$ git checkout pull/6383
Update a local copy of the PR:
$ git checkout pull/6383
$ git pull https://git.openjdk.java.net/jdk pull/6383/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6383
View PR using the GUI difftool:
$ git pr show -t 6383
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6383.diff