-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8367708: GenShen: Reduce total evacuation burden #27278
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back kdnilsen! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
|
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 there is an accidental change in here that reverts #26256.
assert(start->is_humongous_start(), "reclaim regions starting with the first one"); | ||
|
||
oop humongous_obj = cast_to_oop(start->bottom()); | ||
size_t size = humongous_obj->size(); |
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 this intentional? This looks like it would reintroduce #26256 (crash trying to access size of humongous object after its class has been unloaded).
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.
good catch. I'll change how this is implemented.
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've fixed this.
@@ -838,7 +838,7 @@ class ShenandoahHeap : public CollectedHeap { | |||
static inline void atomic_clear_oop(narrowOop* addr, oop compare); | |||
static inline void atomic_clear_oop(narrowOop* addr, narrowOop compare); | |||
|
|||
size_t trash_humongous_region_at(ShenandoahHeapRegion *r) const; | |||
size_t trash_humongous_region_at(ShenandoahHeapRegion *r); |
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.
Original method was const
, removal seems unintentional.
size_t index = region->index(); | ||
do { | ||
assert(region->is_humongous(), "Expect correct humongous start or continuation"); | ||
// Cannot access humongous_obj->size() in case class has been unloaded |
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.
Why do we want to make two passes over the humongous object? I don't see why the original code needs to change or how this change is related to this PR?
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.
There's a comment in the "new code" that we have to reclaim from the tail. Otherwise assertion fails when printing region to trace log.
I agree it is unclear how this relates to current PR. I'll revert and see if something breaks.
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. We talked about this comment in the original PR: #26256. It's a stale comment. I ran a pipeline with gc*=trace
(and also inspected all usages).
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.
Running this change through test pipelines. Perhaps the original problem that I had encountered was fixed in a different way upstream, and my change was no longer necessary or relevant after merging from upstream.
This PR provides several improvements that cumulatively reduce the amount of evacuation performed by GenShen compared to traditional Shenandoah. Specifically:
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27278/head:pull/27278
$ git checkout pull/27278
Update a local copy of the PR:
$ git checkout pull/27278
$ git pull https://git.openjdk.org/jdk.git pull/27278/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27278
View PR using the GUI difftool:
$ git pr show -t 27278
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27278.diff
Using Webrev
Link to Webrev Comment