diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-06-08 10:03:00 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-06-08 10:03:00 -0400 |
commit | fafe68185c1c39949d69754cfac5a15c3438ec08 (patch) | |
tree | 54bf96883d5c683ce9ddb48c8ddf7f9d49b8929c /gc.c | |
parent | a07acbe417fe0e24e3bdbcfadeb678e1cb9c6f9d (diff) | |
download | ruby-fafe68185c1c39949d69754cfac5a15c3438ec08.tar.gz |
Add key force_major_gc_count to GC.stat_heap
force_major_gc_count is the number of times the size pool forced major
GC to run.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -11005,6 +11005,7 @@ enum gc_stat_heap_sym { gc_stat_heap_sym_heap_tomb_slots, gc_stat_heap_sym_total_allocated_pages, gc_stat_heap_sym_total_freed_pages, + gc_stat_heap_sym_force_major_gc_count, gc_stat_heap_sym_last }; @@ -11023,6 +11024,7 @@ setup_gc_stat_heap_symbols(void) S(heap_tomb_slots); S(total_allocated_pages); S(total_freed_pages); + S(force_major_gc_count); #undef S } } @@ -11065,6 +11067,7 @@ gc_stat_heap_internal(int size_pool_idx, VALUE hash_or_sym) SET(heap_tomb_slots, SIZE_POOL_TOMB_HEAP(size_pool)->total_slots); SET(total_allocated_pages, size_pool->total_allocated_pages); SET(total_freed_pages, size_pool->total_freed_pages); + SET(force_major_gc_count, size_pool->force_major_gc_count); #undef SET if (!NIL_P(key)) { /* matched key should return above */ |