Skip to content

Commit

Permalink
Less info level log. Use active_start/end for stacks. Update Julia: pin
Browse files Browse the repository at this point in the history
donenotify in jl_task_t
  • Loading branch information
qinsoon committed Oct 2, 2024
1 parent 6c05c8b commit 461b1bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 4 additions & 2 deletions julia/mmtk_julia.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,8 +789,10 @@ JL_DLLEXPORT void *mmtk_jl_task_stack_buffer(void *task, size_t *size, int *ptid
char* active_start = 0, *active_end = 0, *total_start = 0, *total_end = 0;
jl_active_task_stack((jl_task_t*)task, &active_start, &active_end, &total_start, &total_end);
// TODO: Should try use active start/end.
*size = total_end - total_start;
return (void*) total_start;
// *size = total_end - total_start;
*size = active_end - active_start;
// return (void*) total_start;
return (void*) active_start;
}

Julia_Upcalls mmtk_upcalls = (Julia_Upcalls) {
Expand Down
2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2018"
[package.metadata.julia]
# Our CI matches the following line and extract mmtk/julia. If this line is updated, please check ci yaml files and make sure it works.
julia_repo = "https://github.com/qinsoon/julia.git"
julia_version = "523ba0b2d6fe1e41352962807efc61f37bdb6585"
julia_version = "653728a97a44022adf90fc11e25c1bb963b6b691"

[lib]
crate-type = ["cdylib"]
Expand Down
14 changes: 7 additions & 7 deletions mmtk/src/conservative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,25 @@ pub fn mmtk_conservative_scan_task_stack(

let mut size: u64 = 0;
let mut ptid: i32 = 0;
log::info!("mmtk_conservative_scan_native_stack begin ta = {:?}", ta);
log::debug!("mmtk_conservative_scan_native_stack begin ta = {:?}", ta);
let stk = unsafe {
((*UPCALLS).mmtk_jl_task_stack_buffer)(ta, &mut size as *mut _, &mut ptid as *mut _)
};
log::info!(
log::debug!(
"mmtk_conservative_scan_native_stack continue stk = {}, size = {}, ptid = {:x}",
stk,
size,
ptid
);
if !stk.is_zero() {
log::info!("Conservatively scan the stack");
log::debug!("Conservatively scan the stack");

let guard_page_start = stk + JL_GUARD_PAGE;
log::info!("Skip guard page: {}, {}", stk, guard_page_start);
log::debug!("Skip guard page: {}, {}", stk, guard_page_start);

conservative_scan_range(guard_page_start, stk + size as usize, buffer);
} else {
log::warn!("Skip stack for {:?}", ta);
log::debug!("Skip stack for {:?}", ta);
}
}

Expand All @@ -86,7 +86,7 @@ pub fn mmtk_conservative_scan_ptls_stack(

let stackstart = stackbase - stacksize;
let guard_page_start = stackstart + JL_GUARD_PAGE;
log::info!(
log::debug!(
"mmtk_conservative_scan_ptls_stack: {} to {}",
stackstart,
stackbase
Expand Down Expand Up @@ -130,7 +130,7 @@ fn conservative_scan_range(lo: Address, hi: Address, buffer: &mut Vec<ObjectRefe
hi.align_down(BYTES_IN_ADDRESS)
};
let lo = lo.align_up(BYTES_IN_ADDRESS);
log::info!("Scan {} (lo) {} (hi)", lo, hi);
log::trace!("Scan {} (lo) {} (hi)", lo, hi);

let mut cursor = hi;
while cursor >= lo {
Expand Down

0 comments on commit 461b1bc

Please sign in to comment.