Skip to content

Commit eb963ae

Browse files
committed
Better global GC elapsed time
1 parent 23b1e8a commit eb963ae

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

gc/default/default.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8860,7 +8860,6 @@ gc_start_global(rb_objspace_t *driver, bool compact, enum global_gc_trigger trig
88608860

88618861
global_objspace->global_gc.count++;
88628862
global_objspace->global_gc.trigger_counts[trigger]++;
8863-
global_objspace->global_gc.time_ns += elapsed_hrtime_from(global_gc_start);
88648863

88658864
/* step 10 */
88668865
for (size_t i = 0; i < global_objspace->global_gc.n_objspaces; i++) {
@@ -8884,7 +8883,10 @@ gc_start_global(rb_objspace_t *driver, bool compact, enum global_gc_trigger trig
88848883
* zombie_objspaces entry and posted the merge to main as a postponed job; the objspace
88858884
* stays enumerable until main absorbs it at its next safepoint. */
88868885

8886+
global_objspace->global_gc.time_ns += elapsed_hrtime_from(global_gc_start);
8887+
88878888
gc_exit(driver, gc_enter_event_global, &lock_lev);
8889+
88888890
}
88898891

88908892
static int

0 commit comments

Comments
 (0)