Skip to content

Commit 66dbe55

Browse files
committed
Remove the coordinator thread
1 parent 6f38359 commit 66dbe55

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

mmtk/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ lazy_static = "1.1"
3131
# - change branch
3232
# - change repo name
3333
# But other changes including adding/removing whitespaces in commented lines may break the CI
34-
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev="ef2bd6d043d8675badaa415db89be7b52439725f" }
34+
mmtk = { git = "https://github.com/wks/mmtk-core.git", rev="7cb0b2c12be341c084e03f2cd943fad8ac088f83" }
3535
# Uncomment the following to build locally
3636
# mmtk = { path = "../repos/mmtk-core" }
3737
log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"] }

mmtk/src/api.rs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use crate::{BUILDER, DISABLED_GC, MUTATORS, USER_TRIGGERED_GC};
1212
use libc::c_char;
1313
use log::*;
1414
use mmtk::memory_manager;
15-
use mmtk::scheduler::GCController;
1615
use mmtk::scheduler::GCWorker;
1716
use mmtk::util::opaque_pointer::*;
1817
use mmtk::util::{Address, ObjectReference, OpaquePointer};
@@ -132,15 +131,6 @@ pub extern "C" fn mmtk_gc_init(
132131
}
133132
}
134133

135-
#[no_mangle]
136-
pub extern "C" fn mmtk_start_control_collector(
137-
tls: VMWorkerThread,
138-
gc_controller: *mut GCController<JuliaVM>,
139-
) {
140-
let mut gc_controller = unsafe { Box::from_raw(gc_controller) };
141-
memory_manager::start_control_collector(&SINGLETON, tls, &mut gc_controller);
142-
}
143-
144134
#[no_mangle]
145135
pub extern "C" fn mmtk_bind_mutator(tls: VMMutatorThread, tid: usize) -> *mut Mutator<JuliaVM> {
146136
let mutator_box = memory_manager::bind_mutator(&SINGLETON, tls);
@@ -231,8 +221,8 @@ pub extern "C" fn mmtk_will_never_move(object: ObjectReference) -> bool {
231221

232222
#[no_mangle]
233223
pub extern "C" fn mmtk_start_worker(tls: VMWorkerThread, worker: *mut GCWorker<JuliaVM>) {
234-
let mut worker = unsafe { Box::from_raw(worker) };
235-
memory_manager::start_worker::<JuliaVM>(&SINGLETON, tls, &mut worker)
224+
let worker = unsafe { Box::from_raw(worker) };
225+
memory_manager::start_worker::<JuliaVM>(&SINGLETON, tls, worker)
236226
}
237227

238228
#[no_mangle]
@@ -477,14 +467,6 @@ pub extern "C" fn mmtk_start_spawned_worker_thread(
477467
mmtk_start_worker(tls, ctx);
478468
}
479469

480-
#[no_mangle]
481-
pub extern "C" fn mmtk_start_spawned_controller_thread(
482-
tls: VMWorkerThread,
483-
ctx: *mut GCController<JuliaVM>,
484-
) {
485-
mmtk_start_control_collector(tls, ctx);
486-
}
487-
488470
#[inline(always)]
489471
pub fn store_obj_size(obj: ObjectReference, size: usize) {
490472
let addr_size = obj.to_raw_address() - 16;

mmtk/src/collection.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ impl Collection<JuliaVM> for VMCollection {
8080
Address::from_usize(thread_id::get())
8181
})));
8282
match ctx {
83-
GCThreadContext::Controller(mut c) => {
84-
mmtk::memory_manager::start_control_collector(&SINGLETON, worker_tls, &mut c)
85-
}
86-
GCThreadContext::Worker(mut w) => {
87-
mmtk::memory_manager::start_worker(&SINGLETON, worker_tls, &mut w)
83+
GCThreadContext::Worker(w) => {
84+
mmtk::memory_manager::start_worker(&SINGLETON, worker_tls, w)
8885
}
8986
}
9087
});

0 commit comments

Comments
 (0)