File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ];
Original file line number Diff line number Diff line change @@ -440,7 +440,7 @@ rb_shape_obj_has_fields(VALUE obj)
440440static inline bool
441441rb_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 :
You can’t perform that action at this time.
0 commit comments