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

erts: Refactor the export table, and optimize fun table inserts #8674

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

jhogberg
Copy link
Contributor

Inspired by #8664, this takes the idea a bit further by avoiding locks altogether when there's already an active fun entry for closures coming through the external term format. It does this by versioning the fun table in the same manner as the export table, sharing the same implementation for both.

This required making fun entries live forever (like export entries), which might kill the PR if there's enough disagreement over that. However, as doing this reclaims at least one word per local fun term I conjecture that it will lead to lower memory usage in practice, given the relative rarity of code purging vs fun creation in most applications.

@jhogberg jhogberg added team:VM Assigned to OTP team VM enhancement labels Jul 17, 2024
@jhogberg jhogberg self-assigned this Jul 17, 2024
Copy link
Contributor

github-actions bot commented Jul 17, 2024

CT Test Results

    4 files    152 suites   51m 20s ⏱️
1 708 tests 1 657 ✅ 50 💤 1 ❌
2 425 runs  2 354 ✅ 70 💤 1 ❌

For more details on these failures, see this check.

Results for commit e53d572.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

By breaking out the staging-related parts into a separate header,
we can use the same mechanism for other things like funs in the
near future.
@jhogberg jhogberg force-pushed the john/erts/versioned-fun-tables branch 3 times, most recently from b6a0b16 to 3357657 Compare July 17, 2024 16:20
@jhogberg jhogberg added the testing currently being tested, tag is used by OTP internal CI label Jul 18, 2024
@jhogberg jhogberg force-pushed the john/erts/versioned-fun-tables branch from 3357657 to e53d572 Compare July 23, 2024 11:57
@jhogberg jhogberg merged commit dc17a15 into erlang:master Aug 9, 2024
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant