Skip to content

Commit 5a6319c

Browse files
authored
No longer restrict STW to coordinator (#114)
After introducing the companion thread, stop-the-world can be triggered by any GC thread. This commit makes use of the change in mmtk-core to elide one redundant context switch.
1 parent f92358d commit 5a6319c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mmtk/src/collection.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ extern "C" fn create_mutator_scan_work<E: ProcessEdgesWork<VM = OpenJDK>>(
2020
}
2121

2222
impl Collection<OpenJDK> for VMCollection {
23+
/// With the presence of the "VM companion thread",
24+
/// the OpenJDK binding allows any MMTk GC thread to stop/start the world.
25+
const COORDINATOR_ONLY_STW: bool = false;
26+
2327
fn stop_all_mutators<E: ProcessEdgesWork<VM = OpenJDK>>(tls: VMWorkerThread) {
2428
let f = {
2529
if <OpenJDK as VMBinding>::VMScanning::SCAN_MUTATORS_IN_SAFEPOINT {

0 commit comments

Comments
 (0)