-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8344363: FullGCForwarding::initialize_flags is called after ObjLayout::initialize #22255
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 rkennke! A progress list of the required criteria for merging this PR into |
@rkennke 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 109 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 |
/label remove hotspot |
/label add hotspot-runtime |
@rkennke |
@rkennke |
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.
I think this looks good. I ran it through gdb with awatch to see that I there was no obvious reads of the variables before they were set.
A couple of small nits that would be nice fix.
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.
So we are inlining initialize_heap_flags_and_sizes
into initialize
, right? Is ParallelArguments::initialize_heap_flags_and_sizes()
dangling now?
It sounds like there is a little bit of symmetry between CompressedKlassPointers::initialize
that is called in universe_init
, and thus after argument adjustments. I don't know if it makes sense to move ObjLayout::initialize
to universe_init
?
@@ -264,6 +264,7 @@ class Arguments : AllStatic { | |||
static void set_conservative_max_heap_alignment(); | |||
static void set_use_compressed_oops(); | |||
static jint set_ergonomics_flags(); | |||
static void setup_compact_headers(); |
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.
Consistency with adjacent methods: should it be called set_compact_headers
?
No, not really.
No.
Hmm yeah, that makes sense. I'll do 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.
Looks good.
I would prefer though if ObjLayout::initialize moved up to above adjust_heap_sizes_for_dumping, so that adjust_heap_sizes_for_dumping and initialize_heap_sizes continue to be kept together.
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, this makes sense. But it is hairy, so maybe we need someone else to take a look.
/label add hotspot-gc |
@stefank |
Ping hotspot-gc. |
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.
Still good.
Thanks! /integrate |
Going to push as commit cb1c736.
Your commit was automatically rebased without conflicts. |
From the bug description:
ObjLayout::initialize() is called in Arguments::parse(const JavaVMInitArgs*) which sets ObjLayout::_klass_mode. FullGCForwarding::initialize_flags(size_t) is called in init_globals() which seems to be later in the Threads::create_vm(JavaVMInitArgs*, bool*) routine. The latter, however, can unset the UseCompactObjectHeaders flag, which leads to a potential mismatch with ObjLayout::_klass_mode, firing the asserts in ObjLayout::klass_mode().
There is also a related (and somewhat minor) problem: In Arguments::parse() we enable a bunch of stuff when UseCompactObjectHeaders is on (LW locking, but that's the default anyway, and object-monitor-tables, which are otherwise off), but then may disable UseCompactObjectHeaders, e.g. in the GC or when -UseCompressedClassPointers is requested. This then leaves the odd situation that we run without compact headers, but have object monitor tables turned on.
The fix to both issues is:
Testing:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22255/head:pull/22255
$ git checkout pull/22255
Update a local copy of the PR:
$ git checkout pull/22255
$ git pull https://git.openjdk.org/jdk.git pull/22255/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22255
View PR using the GUI difftool:
$ git pr show -t 22255
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22255.diff
Using Webrev
Link to Webrev Comment