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

GC: Only force alloc slowpath for NEWOBJ hook #8378

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

jhawthorn
Copy link
Member

@jhawthorn jhawthorn commented Sep 5, 2023

We want to be able to cheaply subscribe to some GC events to track GC pauses.

Previously, configuring any GC event hook would cause all allocations to go through the newobj slowpath. We should only need to do that when the newobj specifically is subscribed to.

This renames flags.has_hook to flags.has_newobj_hook, to make this new usage clear. newobj_of0 was the only place which previously checked this flag.

Previously, configuring any GC event hook would cause all allocations to
go through the newobj slowpath. We should only need to do that when the
newobj specifically is subscribed to.

This renames flags.has_hook to flags.has_newobj_hook, to make this new
usage clear. newobj_of0 was the only place which previously checked this
flag.
@jhawthorn jhawthorn merged commit 094f336 into ruby:master Sep 7, 2023
93 checks passed
@jhawthorn jhawthorn deleted the alloc_hook branch September 7, 2023 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants