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

reset mark queue indices at the end of GC #52780

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all 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
11 changes: 11 additions & 0 deletions src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3087,6 +3087,17 @@ void gc_mark_clean_reclaim_sets(void)
free(a);
}
}
// Reset queue indices
for (int i = 0; i < gc_n_threads; i++) {
jl_ptls_t ptls2 = gc_all_tls_states[i];
if (ptls2 == NULL) {
continue;
}
jl_atomic_store_relaxed(&ptls2->mark_queue.ptr_queue.bottom, 0);
jl_atomic_store_relaxed(&ptls2->mark_queue.ptr_queue.top, 0);
jl_atomic_store_relaxed(&ptls2->mark_queue.chunk_queue.bottom, 0);
jl_atomic_store_relaxed(&ptls2->mark_queue.chunk_queue.top, 0);
}
}

static void gc_premark(jl_ptls_t ptls2)
Expand Down