mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
parent
ade4558602
commit
f608095b84
5 changed files with 14 additions and 27 deletions
|
@ -108,8 +108,7 @@ pub extern "C" fn mmtk_builder_default() -> *mut MMTKBuilder {
|
|||
if !builder.options.threads.set(threads) {
|
||||
// MMTk will validate it and reject 0.
|
||||
eprintln!(
|
||||
"[FATAL] Failed to set the number of MMTk threads to {}",
|
||||
threads
|
||||
"[FATAL] Failed to set the number of MMTk threads to {threads}"
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
@ -121,8 +120,7 @@ pub extern "C" fn mmtk_builder_default() -> *mut MMTKBuilder {
|
|||
|
||||
if heap_min >= heap_max {
|
||||
eprintln!(
|
||||
"[FATAL] MMTK_HEAP_MIN({}) >= MMTK_HEAP_MAX({})",
|
||||
heap_min, heap_max
|
||||
"[FATAL] MMTK_HEAP_MIN({heap_min}) >= MMTK_HEAP_MAX({heap_max})"
|
||||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ impl RubyBinding {
|
|||
}
|
||||
|
||||
pub fn register_wb_unprotected_object(&self, object: ObjectReference) {
|
||||
debug!("Registering WB-unprotected object: {}", object);
|
||||
debug!("Registering WB-unprotected object: {object}");
|
||||
let mut objects = self.wb_unprotected_objects.lock().unwrap();
|
||||
objects.insert(object);
|
||||
}
|
||||
|
|
|
@ -42,8 +42,7 @@ impl Collection<Ruby> for VMCollection {
|
|||
.spawn(move || {
|
||||
let ordinal = worker.ordinal;
|
||||
debug!(
|
||||
"Hello! This is MMTk Worker Thread running! ordinal: {}",
|
||||
ordinal
|
||||
"Hello! This is MMTk Worker Thread running! ordinal: {ordinal}"
|
||||
);
|
||||
crate::register_gc_thread(thread::current().id());
|
||||
let ptr_worker = &mut *worker as *mut GCWorker<Ruby>;
|
||||
|
@ -56,8 +55,7 @@ impl Collection<Ruby> for VMCollection {
|
|||
worker,
|
||||
);
|
||||
debug!(
|
||||
"An MMTk Worker Thread is quitting. Good bye! ordinal: {}",
|
||||
ordinal
|
||||
"An MMTk Worker Thread is quitting. Good bye! ordinal: {ordinal}"
|
||||
);
|
||||
crate::unregister_gc_thread(thread::current().id());
|
||||
})
|
||||
|
|
|
@ -48,9 +48,7 @@ impl Scanning<Ruby> for VMScanning {
|
|||
let forwarded_target = object_tracer.trace_object(target_object);
|
||||
if forwarded_target != target_object {
|
||||
trace!(
|
||||
" Forwarded target {} -> {}",
|
||||
target_object,
|
||||
forwarded_target
|
||||
" Forwarded target {target_object} -> {forwarded_target}"
|
||||
);
|
||||
}
|
||||
forwarded_target
|
||||
|
@ -252,14 +250,12 @@ impl<F: RootsWorkFactory<RubySlot>> GCWork<Ruby> for ScanWbUnprotectedRoots<F> {
|
|||
for object in self.objects.iter().copied() {
|
||||
if object.is_reachable() {
|
||||
debug!(
|
||||
"[wb_unprot_roots] Visiting WB-unprotected object (parent): {}",
|
||||
object
|
||||
"[wb_unprot_roots] Visiting WB-unprotected object (parent): {object}"
|
||||
);
|
||||
(upcalls().scan_object_ruby_style)(object);
|
||||
} else {
|
||||
debug!(
|
||||
"[wb_unprot_roots] Skipping young WB-unprotected object (parent): {}",
|
||||
object
|
||||
"[wb_unprot_roots] Skipping young WB-unprotected object (parent): {object}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ impl GCWork<Ruby> for ProcessObjFreeCandidates {
|
|||
|
||||
let n_cands = obj_free_candidates.len();
|
||||
|
||||
debug!("Total: {} candidates", n_cands);
|
||||
debug!("Total: {n_cands} candidates");
|
||||
|
||||
// Process obj_free
|
||||
let mut new_candidates = Vec::new();
|
||||
|
@ -113,9 +113,7 @@ impl GCWork<Ruby> for ProcessObjFreeCandidates {
|
|||
// Forward and add back to the candidate list.
|
||||
let new_object = object.forward();
|
||||
trace!(
|
||||
"Forwarding obj_free candidate: {} -> {}",
|
||||
object,
|
||||
new_object
|
||||
"Forwarding obj_free candidate: {object} -> {new_object}"
|
||||
);
|
||||
new_candidates.push(new_object);
|
||||
} else {
|
||||
|
@ -158,11 +156,10 @@ trait GlobalTableProcessingWork {
|
|||
let forward_object = |_worker, object: ObjectReference, _pin| {
|
||||
debug_assert!(
|
||||
mmtk::memory_manager::is_mmtk_object(object.to_raw_address()).is_some(),
|
||||
"{} is not an MMTk object",
|
||||
object
|
||||
"{object} is not an MMTk object"
|
||||
);
|
||||
let result = object.forward();
|
||||
trace!("Forwarding reference: {} -> {}", object, result);
|
||||
trace!("Forwarding reference: {object} -> {result}");
|
||||
result
|
||||
};
|
||||
|
||||
|
@ -217,13 +214,11 @@ impl GCWork<Ruby> for UpdateWbUnprotectedObjectsList {
|
|||
// Forward and add back to the candidate list.
|
||||
let new_object = object.forward();
|
||||
trace!(
|
||||
"Forwarding WB-unprotected object: {} -> {}",
|
||||
object,
|
||||
new_object
|
||||
"Forwarding WB-unprotected object: {object} -> {new_object}"
|
||||
);
|
||||
objects.insert(new_object);
|
||||
} else {
|
||||
trace!("Removing WB-unprotected object from list: {}", object);
|
||||
trace!("Removing WB-unprotected object from list: {object}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue