Skip to content

Commit ec606f1

Browse files
committed
Fix -DRUBY_DEBUG=1 with --enable-parallel-sweep (conf.)
1 parent e98b85a commit ec606f1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

gc/default/default.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5202,7 +5202,11 @@ gc_sweep_finish(rb_objspace_t *objspace)
52025202
#endif
52035203

52045204
#if RUBY_DEBUG
5205+
#if USE_PARALLEL_SWEEP
52055206
if (!objspace->flags.was_compacting && !objspace->sweep_rest && gc_config_full_mark_val) {
5207+
#else
5208+
if (!objspace->flags.was_compacting && gc_config_full_mark_val) {
5209+
#endif
52065210
if (objspace->will_be_swept_slots != objspace->have_swept_slots) {
52075211
fprintf(stderr, "Expecting to free %lu slots, freed %lu slots (major:%d)\n", objspace->will_be_swept_slots, objspace->have_swept_slots, is_full_marking(objspace));
52085212
for (int i = 0; i < HEAP_COUNT; i++) {
@@ -8780,7 +8784,7 @@ rb_gc_impl_start(void *objspace_ptr, bool full_mark, bool immediate_mark, bool i
87808784
}
87818785

87828786
garbage_collect(objspace, reason);
8783-
#if RUBY_DEBUG
8787+
#if RUBY_DEBUG && USE_PARALLEL_SWEEP
87848788
if (immediate_sweep) {
87858789
sweep_lock_lock(objspace);
87868790
{

0 commit comments

Comments
 (0)