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: 5 additions & 0 deletions src/hotspot/share/gc/shenandoah/shenandoahAsserts.hpp
Original file line number Diff line number Diff line change
@@ -170,6 +170,10 @@
ShenandoahAsserts::assert_heaplocked_or_fullgc_safepoint(__FILE__, __LINE__)
#define shenandoah_assert_control_or_vm_thread() \
assert(Thread::current()->is_VM_thread() || Thread::current() == ShenandoahHeap::heap()->control_thread(), "Expected control thread or vm thread")
// A stronger version of the above that checks that we are at a safepoint if the vm thread
#define shenandoah_assert_control_or_vm_thread_at_safepoint() \
assert(Thread::current() == ShenandoahHeap::heap()->control_thread() || (SafepointSynchronize::is_at_safepoint() && Thread::current()->is_VM_thread()), \
"Expected control thread, or vm thread at a safepoint")

Check failure on line 176 in src/hotspot/share/gc/shenandoah/shenandoahAsserts.hpp

openjdk / jcheck-openjdk/shenandoah-407

Whitespace error

Column 75: trailing whitespace

#define shenandoah_assert_generational() \
assert(ShenandoahHeap::heap()->mode()->is_generational(), "Must be in generational mode here.")
@@ -236,6 +240,7 @@
#define shenandoah_assert_heaplocked_or_safepoint()
#define shenandoah_assert_heaplocked_or_fullgc_safepoint()
#define shenandoah_assert_control_or_vm_thread()
#define shenandoah_assert_control_or_vm_thread_at_safepoint()
#define shenandoah_assert_generational()
#define shenandoah_assert_generations_reconciled() \

4 changes: 1 addition & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
Original file line number Diff line number Diff line change
@@ -1574,10 +1574,8 @@ void ShenandoahHeap::print_tracing_info() const {
}

void ShenandoahHeap::set_gc_generation(ShenandoahGeneration* generation) {
shenandoah_assert_control_or_vm_thread_at_safepoint();
_gc_generation = generation;
assert(Thread::current() == ShenandoahController::thread() ||
(SafepointSynchronize::is_at_safepoint() && Thread::current()->is_VM_thread()),
"Unexpected thread or condition");
}

// Active generation may only be set by the VM thread at a safepoint.