Skip to content

Commit 0089158

Browse files
committed
Cleanup
1 parent 6a23276 commit 0089158

File tree

2 files changed

+4
-20
lines changed

2 files changed

+4
-20
lines changed

mmtk/src/conservative.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub unsafe fn mmtk_conservative_scan_task_stack(ta: *const jl_task_t) {
8080
log::debug!("Skip guard page: {}, {}", active_start, guard_page_start);
8181
conservative_scan_range(guard_page_start, active_start + size);
8282
} else {
83-
// log::warn!("Skip stack for {:?}", ta);
83+
log::warn!("Skip stack for {:?}", ta);
8484
}
8585
}
8686
pub unsafe fn mmtk_conservative_scan_task_registers(ta: *const jl_task_t) {
@@ -99,12 +99,12 @@ pub fn mmtk_conservative_scan_ptls_registers(ptls: &mut _jl_tls_states_t) {
9999
}
100100
// TODO: This scans the entire context type, which is slower.
101101
// We actually only need to scan registers.
102-
pub fn get_range<T>(ctx: &T) -> (Address, Address) {
102+
fn get_range<T>(ctx: &T) -> (Address, Address) {
103103
let start = Address::from_ptr(ctx);
104104
let ty_size = std::mem::size_of::<T>();
105105
(start, start + ty_size)
106106
}
107-
pub fn conservative_scan_range(lo: Address, hi: Address) {
107+
fn conservative_scan_range(lo: Address, hi: Address) {
108108
// The high address is exclusive
109109
let hi = if hi.is_aligned_to(BYTES_IN_ADDRESS) {
110110
hi - BYTES_IN_ADDRESS
@@ -122,7 +122,7 @@ pub fn conservative_scan_range(lo: Address, hi: Address) {
122122
cursor -= BYTES_IN_ADDRESS;
123123
}
124124
}
125-
pub fn is_potential_mmtk_object(addr: Address) -> Option<ObjectReference> {
125+
fn is_potential_mmtk_object(addr: Address) -> Option<ObjectReference> {
126126
if crate::object_model::is_addr_in_immixspace(addr) {
127127
// We only care about immix space. If the object is in other spaces, we won't move them, and we don't need to pin them.
128128
memory_manager::find_object_from_internal_pointer(addr, usize::MAX)

mmtk/src/julia_scanning.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,6 @@ pub unsafe fn mmtk_scan_gcpreserve_stack<EV: SlotVisitor<JuliaVMSlot>>(
519519
}
520520
}
521521

522-
// Scan the shadow stack for root tasks possibly capturing
523-
// more tasks that will also need to be scanned
524522
pub unsafe fn mmtk_scan_gcstack<'a, EV: SlotVisitor<JuliaVMSlot>>(
525523
ta: *const jl_task_t,
526524
mut closure: &'a mut EV,
@@ -627,20 +625,6 @@ pub unsafe fn mmtk_scan_gcstack<'a, EV: SlotVisitor<JuliaVMSlot>>(
627625
}
628626
}
629627

630-
pub unsafe fn capture_potential_task(addr: Address, extra_root_tasks: &mut Vec<ObjectReference>) {
631-
use mmtk::vm::slot::Slot;
632-
let simple_slot = SimpleSlot::from_address(addr);
633-
634-
if let Some(objref) = simple_slot.load() {
635-
let obj = objref.to_raw_address();
636-
let vtag_usize = mmtk_jl_typetagof(obj).as_usize();
637-
638-
if vtag_usize == ((jl_small_typeof_tags_jl_task_tag as usize) << 4) {
639-
extra_root_tasks.push(objref);
640-
}
641-
}
642-
}
643-
644628
#[inline(always)]
645629
pub unsafe fn get_julia_object_type(obj: Address) -> String {
646630
// get Julia object type

0 commit comments

Comments
 (0)