Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to monitor YJIT stats #330

Merged
merged 3 commits into from
Sep 24, 2024
Merged

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Sep 23, 2024

This PR adds an option to print the diff of YJIT stats at each iteration. It also allows you to print the value of arbitrary YJIT stats at the end. This should be useful for monitoring YJIT's warm-up and investigating various issues.

$ ./run_benchmarks.rb lobsters --chruby 'ruby --yjit' --yjit-stats=compiled_block_count
itr:   time compiled_block_count
 #1: 1092ms               29,979
 #2:  547ms                9,351
 #3:  413ms                1,391
 #4:  406ms                1,176
 #5:  386ms                  365
 #6:  387ms                  796
 #7:  396ms                  877
 #8:  416ms                1,677
 #9:  381ms                  465
#10:  375ms                  437
#11:  388ms                  221
#12:  384ms                  322
#13:  380ms                  265
#14:  377ms                  106
#15:  389ms                  440
#16:  376ms                  116
#17:  368ms                    2
#18:  386ms                  306
#19:  380ms                    3
#20:  385ms                  644
#21:  366ms                    8
#22:  384ms                   16
#23:  380ms                    0
#24:  379ms                  497
#25:  376ms                   38
compiled_block_count:     70,739
inline_code_size:      4,701,761
outlined_code_size:    4,318,392
code_region_size:     11,497,472
yjit_alloc_size:      26,485,097
yjit_compile_time:     1143.24ms

README.md Outdated Show resolved Hide resolved
@maximecb maximecb merged commit d3ce8da into Shopify:main Sep 24, 2024
4 checks passed
@k0kubun k0kubun deleted the yjit-stats branch September 24, 2024 20:01
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.

2 participants