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

Update to MMTk core PR #875 #86

Merged
merged 5 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
8 changes: 4 additions & 4 deletions mmtk/Cargo.lock

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

2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lazy_static = "1.1"
# - change branch
# - change repo name
# But other changes including adding/removing whitespaces in commented lines may break the CI
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "47ee126f91f25b911498b3d49c35f672f5e935f9" }
mmtk = { git = "https://github.com/qinsoon/mmtk-core.git", rev = "eda3e695a03a669f3a7ba34e7e1d4871dbc4f473" }
# Uncomment the following to build locally
# mmtk = { path = "../repos/mmtk-core" }
log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"] }
Expand Down
18 changes: 10 additions & 8 deletions mmtk/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static GC_START: AtomicU64 = AtomicU64::new(0);
pub struct VMCollection {}

impl Collection<JuliaVM> for VMCollection {
fn stop_all_mutators<F>(_tls: VMWorkerThread, _mutator_visitor: F)
fn stop_all_mutators<F>(_tls: VMWorkerThread, mut mutator_visitor: F)
where
F: FnMut(&'static mut Mutator<JuliaVM>),
{
Expand All @@ -30,6 +30,15 @@ impl Collection<JuliaVM> for VMCollection {

trace!("Stopped the world!");

// Tell MMTk the stacks are ready.
{
use mmtk::vm::ActivePlan;
for mutator in crate::active_plan::VMActivePlan::mutators() {
info!("stop_all_mutators: visiting {:?}", mutator.mutator_tls);
mutator_visitor(mutator);
}
}

// Record the start time of the GC
let now = unsafe { ((*UPCALLS).jl_hrtime)() };
trace!("gc_start = {}", now);
Expand Down Expand Up @@ -133,13 +142,6 @@ impl Collection<JuliaVM> for VMCollection {
unsafe { ((*UPCALLS).jl_throw_out_of_memory_error)() };
}

fn prepare_mutator<T: MutatorContext<JuliaVM>>(
_tls_w: VMWorkerThread,
_tls_m: VMMutatorThread,
_mutator: &T,
) {
}

fn vm_live_bytes() -> usize {
crate::api::JULIA_MALLOC_BYTES.load(Ordering::SeqCst)
}
Expand Down
8 changes: 0 additions & 8 deletions mmtk/src/scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,11 @@ use std::sync::MutexGuard;
pub struct VMScanning {}

impl Scanning<JuliaVM> for VMScanning {
fn scan_roots_in_all_mutator_threads(
_tls: VMWorkerThread,
_factory: impl RootsWorkFactory<JuliaVMEdge>,
) {
// Thread roots are collected by Julia before stopping the world
}

fn scan_roots_in_mutator_thread(
_tls: VMWorkerThread,
_mutator: &'static mut Mutator<JuliaVM>,
_factory: impl RootsWorkFactory<JuliaVMEdge>,
) {
unimplemented!()
}
fn scan_vm_specific_roots(
_tls: VMWorkerThread,
Expand Down
Loading