Thanks to visit codestin.com
Credit goes to github.com

Skip to content

YJIT: Add RubyVM::YJIT.code_gc #6644

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

Merged
merged 2 commits into from
Oct 31, 2022
Merged

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Oct 28, 2022

This could be useful when triggering this at the end of initialization is efficient enough and it's more time-consuming to find a good --yjit-exec-mem-size that stabilizes Code GC.

Railsbench stats

I checked the impact of calling the RubyVM::YJIT.code_gc at config/initializers/yjit_code_gc.rb (last initializer):

mem size (MiB) Call YJIT.code_gc code_gc_count live_page_count freed_page_count
9 No 0 575 0
9 Yes 1 436 0
8 No 1 263 249
8 Yes 1 437 0

It seems like config/initializers is still too early for Code GC, but it's still better than never triggering Code GC.

P.S. Looks like now --yjit-exec-mem-size=9 is needed to fit all code today (it was 6 in #6406), maybe due to the reduced # of size exits (which is a good thing).

@matzbot matzbot requested a review from a team October 28, 2022 00:09
@k0kubun k0kubun force-pushed the yjit-code-gc-api branch 2 times, most recently from c706b91 to 18967fa Compare October 28, 2022 00:33
@maximecb maximecb merged commit 2b39640 into ruby:master Oct 31, 2022
@maximecb maximecb deleted the yjit-code-gc-api branch October 31, 2022 18:29
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