8000 Implement Write Barrier for `autoload_data` by casperisfine · Pull Request #7392 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

Implement Write Barrier for autoload_data #7392

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 1 commit into from
Feb 28, 2023

Conversation

casperisfine
Copy link
Contributor

It's not uncommon for libraries to add thing sinto autoload that won't necessarily be loaded.

This can cause hundreds or thousands of entries to be left over in the autoload table, so it's best not to mark them on every minor.

autoload_const is in the same situation, but is a bit harder to implement Write Barriers for as its sometimes updated from callbacks that don't have access to the VALUE.

cc @peterzhu2118

It's not uncommon for libraries to add thing sinto
autoload that won't necessarily be loaded.

This can cause hundreds or thousands of entries to be
left over in the autoload table, so it's best not to
mark them on every minor.
@casperisfine casperisfine force-pushed the autoload-write-barrier branch from ad8fb71 to 813c3f2 Compare February 27, 2023 14:54
Copy link
Member
@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also make autoload_table_type WB protected since most (if not all) autoload_data_type should have a autoload_table_type.

If we do that, we also need a write barrier when adding a node in autoload_data->constants in autoload_synchronized.

@casperisfine
Copy link
Contributor Author

Yeah, I'm trying to take baby steps :)

@byroot byroot merged commit cf18f0b into ruby:master Feb 28, 2023
@casperisfine casperisfine mentioned this pull request Apr 3, 2023
40 tasks
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.

3 participants
0