Skip to content
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

8328235: GenShen: Robustify ShenandoahGCSession and fix missing use #407

Closed
wants to merge 52 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6663406
Robustify ShenandoahGCSession, and fix a missing use for
ysramakrishna Mar 15, 2024
f000340
Read active_generetion() only once in is_is_active_generation() to work
ysramakrishna Mar 20, 2024
bbcaf15
Clean up assertion checking for race.
ysramakrishna Mar 20, 2024
b3ea1aa
Weaken assertion so it passes for now; add comment.
ysramakrishna Mar 20, 2024
47a953f
jcheck cleanup.
ysramakrishna Mar 20, 2024
693fc44
Merge branch 'master' into active_generation
ysramakrishna Mar 20, 2024
a86d3ed
Refine assertion further & modify comment block.
ysramakrishna Mar 20, 2024
03dc8c6
More debugging; much of this code will likely be removed once debugging
ysramakrishna Mar 25, 2024
ef65a4a
Merge branch 'master' into active_generation
ysramakrishna Mar 26, 2024
d37ca96
More assertion checks for gc state vis-a-vis active generation.
ysramakrishna Mar 26, 2024
224de67
Separate scope from active_generation via STW snapshots.
ysramakrishna Mar 28, 2024
3e8c00d
Refine some assertions, add a "force" parameter to override the
ysramakrishna Mar 30, 2024
1729257
Some more special cases that violate the safepoint active_generation
ysramakrishna Mar 30, 2024
56b83a7
Fix typo in assert; simplify implementation a tad.
ysramakrishna Mar 30, 2024
cf02b64
Remove a too strong assertion
ysramakrishna Mar 31, 2024
d61c2f2
More debugging asserts.
ysramakrishna Apr 3, 2024
05eb063
Merge branch 'master' into active_generation
ysramakrishna Apr 3, 2024
d6864bb
Merge branch 'master' into active_generation
ysramakrishna Apr 4, 2024
eb35b2c
Merge branch 'master' into active_generation
ysramakrishna Apr 29, 2024
8af7323
Fix mismerge.
ysramakrishna May 1, 2024
521d536
Strengthen an assert in `is_in_generation()` and remove forcing of
ysramakrishna May 4, 2024
599336f
Relax an over-enthusiastic assert (under new regime).
ysramakrishna May 7, 2024
d5784db
Remove an incorrect gc status setting.
ysramakrishna May 7, 2024
36b0862
Disallow forcing.
ysramakrishna May 8, 2024
99daf9f
Relax an assert that is too strong; still iterating execution paths,
ysramakrishna May 9, 2024
474e8b7
Banish forcing entirely. Fix one case where full gc sets
ysramakrishna May 10, 2024
828f442
jcheck whitespace
ysramakrishna May 10, 2024
658e26e
Clean ups.
ysramakrishna May 10, 2024
4b031ad
Greater separation of gc_generation and active_generation fields of
ysramakrishna May 15, 2024
5e8cab3
Merge branch 'master' into active_generation
ysramakrishna May 16, 2024
6cf64da
Fixed mismerge because of code moving between files in merge from
ysramakrishna May 17, 2024
61848c8
jcheck whitespace
ysramakrishna May 17, 2024
b609d78
Small clean-ups.
ysramakrishna May 21, 2024
70014a9
shenandoah_assert_generations_reconciled() macro instead of a method in
ysramakrishna May 28, 2024
982dcd2
Macro-ize previously inlined shenandoah assert.
ysramakrishna May 28, 2024
9f1e1d6
Remove static _thread field introduced in ShenandoahController, as its
ysramakrishna May 28, 2024
7ee2fe4
jcheck white-space
ysramakrishna May 28, 2024
0541a99
cosmetic
ysramakrishna May 28, 2024
56e35ac
Remove vestigial thread() method in ShenandoahController.
ysramakrishna May 28, 2024
f1f4098
Merge branch 'master' into active_generation
ysramakrishna May 28, 2024
fead6fd
Some asserts to catch a tricky race. These assertions may be too strong
ysramakrishna May 30, 2024
6293498
Merge branch 'master' into active_generation
ysramakrishna May 31, 2024
b2ff5e4
Code called from LRB cannot rely on SGH::_gc_generation and must instead
ysramakrishna Jun 3, 2024
4e6a61e
Merge branch 'master' into active_generation
ysramakrishna Jun 5, 2024
561c2f1
Merge branch 'master' into active_generation
ysramakrishna Jun 10, 2024
b513aba
Merge branch 'master' into active_generation
ysramakrishna Jun 12, 2024
556e5cd
Revert debugging detritus.
ysramakrishna Jun 20, 2024
73ea469
Merge branch 'master' into active_generation
ysramakrishna Jun 20, 2024
b12e17c
Merge branch 'master' into active_generation
ysramakrishna Jun 27, 2024
cbb6000
Merge branch 'master' into active_generation
ysramakrishna Jun 29, 2024
af57394
Fix for the few remaining review comments.
ysramakrishna Jun 29, 2024
c79fea1
Disallow mutator threads from reading the asynchronously updated
ysramakrishna Jun 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp
Original file line number Diff line number Diff line change
@@ -928,10 +928,7 @@ void ShenandoahEvacUpdateCleanupOopStorageRootsClosure::do_oop(oop* p) {
const oop obj = RawAccess<>::oop_load(p);
if (!CompressedOops::is_null(obj)) {
if (!_mark_context->is_marked(obj)) {
// YSR TODO: This needs to be thought through carefully; in many of these
// cases, it makes more sense to place the state in the closure rather than
// do the async/snapshot field split we are doing with _gc_generation() and
// _active_generation().
_heap->assert_generations_reconciled();
if (_heap->is_in_active_generation(obj)) {
// TODO: This worries me. Here we are asserting that an unmarked from-space object is 'correct'.
// Normally, I would call this a bogus assert, but there seems to be a legitimate use-case for
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/shenandoah/shenandoahSTWMark.cpp
Original file line number Diff line number Diff line change
@@ -105,6 +105,7 @@ void ShenandoahSTWMark::mark() {

// Weak reference processing
ShenandoahReferenceProcessor* rp = heap->gc_generation()->ref_processor();
heap->assert_generations_reconciled();
assert(heap->gc_generation() == heap->active_generation(), "Should be identical at stw phases");
rp->reset_thread_locals();
rp->set_soft_reference_policy(heap->soft_ref_policy()->should_clear_all_soft_refs());
@@ -174,8 +175,7 @@ void ShenandoahSTWMark::finish_mark(uint worker_id) {
ShenandoahPhaseTimings::Phase phase = _full_gc ? ShenandoahPhaseTimings::full_gc_mark : ShenandoahPhaseTimings::degen_gc_stw_mark;
ShenandoahWorkerTimingsTracker timer(phase, ShenandoahPhaseTimings::ParallelMark, worker_id);
ShenandoahReferenceProcessor* rp = ShenandoahHeap::heap()->gc_generation()->ref_processor();
assert(ShenandoahHeap::heap()->gc_generation() == ShenandoahHeap::heap()->active_generation(),
"Should be identical at stw phases");
ShenandoahHeap::heap()->assert_generations_reconciled();
StringDedup::Requests requests;

mark_loop(worker_id, &_terminator, rp,