-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8311604: Simplify NOCOOPS requested addresses for archived heap objects #14792
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
8311604: Simplify NOCOOPS requested addresses for archived heap objects #14792
Conversation
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
Webrevs
|
// stored into the CDS archive. These are entered into HeapShared::archived_object_cache(). | ||
// | ||
// - "buffered objects" are copies of the "source objects", and are stored in into | ||
// ArchiveHeapWriter::_buffer, which is a GrowableArray that sites outside of |
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.
s/sites/sits
@@ -2086,7 +2069,7 @@ address FileMapInfo::heap_region_requested_address() { | |||
} else { | |||
// We can avoid relocation if each region is mapped into the exact same address | |||
// where it was at dump time. | |||
return /*dumptime*/header()->heap_begin() + r->mapping_offset(); | |||
return (address)ArchiveHeapWriter::NOCOOPS_REQUESTED_BASE; |
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.
Can you please update the comment above this line as well to remove each region
as we only have single heap region now.
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 review. I updated the comment to clarify that this address was hard-coded at dump time, and explained the reason for that.
minor nitpicks, otherwise 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.
Just couple of nits.
#ifndef SHARED_CDS_SERIALIZECLOSURE_HPP | ||
#define SHARED_CDS_SERIALIZECLOSURE_HPP |
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.
Since the directory name is share
, I think the above should be SHARE_
instead of SHARED_
.
template <typename T> void do_ptr(T** p) { do_ptr((void**)p); } | ||
}; | ||
|
||
#endif // SHARED_CDS_SERIALIZECLOSURE_HPP |
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.
Should be SHARE_
instead of SHARED_
.
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 fixed the SHARED_
include guards in this file, plus a few other headers in the share/cds/
directory. I also took this opportunity to fix some indent issues in cds_globals.hpp.
st->print_cr("- heap_begin: " INTPTR_FORMAT, p2i(_heap_begin)); | ||
st->print_cr("- heap_end: " INTPTR_FORMAT, p2i(_heap_end)); |
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 print the _heap_roots_offset?
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 Calvin, thanks for the review. I added the _heap_roots_offset
into the debug output.
@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 |
…ed line escapes in cds_globals.hpp
Thanks @ashu-mehra and @calvinccheung for the review. |
Going to push as commit 581f90e. |
This PR attempts to clean up some of the cruds in the existing code:
UseCompressedOops
is disabled -- the archived heap objects are always written starting from 0x10000000HeapShared::to_requested_address()
so we don't have two kinds of "requested address"SerializeClosure::oop()
as the only oop we need to store into the archive header isHeapShared::roots()
, which can be handled more easily withFileMapHeader::_heap_roots_offset
G1CollectedHeap::heap()->reserved()
Also:
UseCompressedOops
was disabled.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14792/head:pull/14792
$ git checkout pull/14792
Update a local copy of the PR:
$ git checkout pull/14792
$ git pull https://git.openjdk.org/jdk.git pull/14792/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14792
View PR using the GUI difftool:
$ git pr show -t 14792
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14792.diff
Webrev
Link to Webrev Comment