Skip to content

Commit 3da4ec5

Browse files
committed
tmp
1 parent 94d31d6 commit 3da4ec5

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

gc/default/default.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5525,10 +5525,9 @@ gc_sweep_continue(rb_objspace_t *objspace, rb_heap_t *sweep_heap)
55255525
heap->pre_swept_slots_deferred = 0;
55265526
}
55275527
if (num_heaps_need_continue > 0) {
5528+
objspace->sweep_thread_sweep_requested = true;
55285529
if (!objspace->sweep_thread_sweeping && !objspace->sweep_thread_sweep_requested) {
55295530
psweep_debug(-2, "[gc] gc_sweep_continue: requesting sweep thread\n");
5530-
objspace->sweep_thread_sweep_requested = true;
5531-
rb_native_cond_broadcast(&objspace->sweep_cond);
55325531
}
55335532
else {
55345533
psweep_debug(-2, "[gc] gc_sweep_continue: sweep thread restart heaps\n");
@@ -5542,11 +5541,16 @@ gc_sweep_continue(rb_objspace_t *objspace, rb_heap_t *sweep_heap)
55425541
}
55435542
}
55445543
sweep_lock_unlock(&objspace->sweep_lock);
5544+
if (num_heaps_need_continue > 0) {
5545+
rb_native_cond_broadcast(&objspace->sweep_cond);
5546+
}
55455547
bool sweep_backwards = num_heaps_need_continue > 0 && !heaps[0].skip_sweep_continue;
55465548

55475549
#if PSWEEP_LOCK_STATS > 0
55485550
current_step_type = 1;
5549-
step_contention[1].step_count++;
5551+
if (num_heaps_need_continue) {
5552+
step_contention[1].step_count++;
5553+
}
55505554
#endif
55515555
for (int i = sweep_heap_first(sweep_backwards); i != sweep_heap_last(sweep_backwards); sweep_heap_iter(sweep_backwards, &i)) {
55525556
rb_heap_t *heap = &heaps[i];

shape.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ rb_shape_obj_has_fields(VALUE obj)
440440
static inline bool
441441
rb_obj_gen_fields_p(VALUE obj)
442442
{
443-
switch (TYPE(obj)) {
443+
switch (BUILTIN_TYPE(obj)) {
444444
case T_NONE:
445445
case T_OBJECT:
446446
case T_CLASS:

0 commit comments

Comments
 (0)