Skip to content

Commit

Permalink
Merge branch 'master' into mutator-scan-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored Aug 13, 2023
2 parents ff0483d + 85617c4 commit 3b440ec
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
21 changes: 21 additions & 0 deletions mmtk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"]
enum-map = ">=2.1"
atomic = "0.4.6"
chrono = "*"
thread-id = "*"

# ykstackmaps = { git = "https://github.com/udesou/ykstackmaps.git", branch = "udesou-master", version = "*" }

Expand Down
8 changes: 6 additions & 2 deletions mmtk/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ impl Collection<JuliaVM> for VMCollection {
crate::api::mmtk_used_bytes(),
crate::api::mmtk_total_bytes()
);

trace!("Resuming mutators.");
}

Expand Down Expand Up @@ -111,11 +112,14 @@ impl Collection<JuliaVM> for VMCollection {
info!("Finished blocking mutator for GC!");
}

fn spawn_gc_thread(tls: VMThread, ctx: GCThreadContext<JuliaVM>) {
fn spawn_gc_thread(_tls: VMThread, ctx: GCThreadContext<JuliaVM>) {
// Just drop the join handle. The thread will run until the process quits.
let _ = std::thread::spawn(move || {
use mmtk::util::opaque_pointer::*;
let worker_tls = VMWorkerThread(tls);
use mmtk::util::Address;
let worker_tls = VMWorkerThread(VMThread(OpaquePointer::from_address(unsafe {
Address::from_usize(thread_id::get())
})));
match ctx {
GCThreadContext::Controller(mut c) => {
mmtk::memory_manager::start_control_collector(&SINGLETON, worker_tls, &mut c)
Expand Down

0 comments on commit 3b440ec

Please sign in to comment.