Skip to content

Report more Garbage Collection allocation statistics. #61

Merged
tmcgilchrist merged 4 commits intotarides:mainfrom
tmcgilchrist:gc_stats_words
Apr 16, 2026
Merged

Report more Garbage Collection allocation statistics. #61
tmcgilchrist merged 4 commits intotarides:mainfrom
tmcgilchrist:gc_stats_words

Conversation

@tmcgilchrist
Copy link
Copy Markdown
Collaborator

This PR uses the runtime_counters to produce extra details about GC activity.

$ olly gc-stats <executable>
...
GC allocations (in words): 
Total heap:	 3531570382
Minor heap:	 3531570349
Major heap:	 10230309
Promoted words:	 10230276 (0.29%)

Per domain stats: 
Domain   Total        Minor        Promoted   Major      Promoted(%)  
0        3531570382   3531570349   10230276   10230309   0.29         
Minor Gen: 13478 collections
Major Gen: 12 collections 0 forced collections
Compactions: 0

@tmcgilchrist tmcgilchrist force-pushed the gc_stats_words branch 2 times, most recently from cd1497a to 4d25fd1 Compare September 8, 2025 02:33
@tmcgilchrist tmcgilchrist force-pushed the gc_stats_words branch 2 times, most recently from 4feeda5 to f1de09f Compare April 13, 2026 04:09
Reports global allocations and promotion rates as well as
per-domain. Total GC collections, forced collections and
compactions.

OCaml 5.0 - 5.2* will get overall allocation stats but not per-domain
stats as the runtime counters are missing. OCaml 5.3 onwards gets
per-domain statistics.
@tmcgilchrist tmcgilchrist marked this pull request as ready for review April 15, 2026 05:47
@tmcgilchrist tmcgilchrist merged commit de7893d into tarides:main Apr 16, 2026
11 checks passed
@tmcgilchrist tmcgilchrist deleted the gc_stats_words branch April 16, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant