-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Workaround for GC issues in interpreter specs #11634
Workaround for GC issues in interpreter specs #11634
Conversation
84a76f3
to
137e692
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two really minor comments.
end | ||
|
||
def interpret_with_context(code, *, prelude = "primitives") | ||
def interpret_with_context(code, prelude = "primitives") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make sense to make this one private to avoid shooting ourselves in the foot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't make this helper private, because it's used in specs when it needs access to the context, instead of just the value.
But I suppose we can remove the prelude
parameter to fix it to "primitives"
.
I think we should merge this re-enabling CI, explicitly stating that it reverses #11623. I think a specific revert to it adds some bureaucracy without any real gain. |
Co-authored-by: Beta Ziliani <[email protected]>
Nice, thanks! |
Co-authored-by: Beta Ziliani <[email protected]>
This patch prevents the GC issues in interpeter specs (#11580) as suggested as second option in #11602
The implementation hooks into
Spec
s option parser in order to add an alternative operation mode for the spec executable which works as an interpreter implementation that meets the specific needs of spec execution. This is a bit dirty, but I think it's acceptable as a temporary solution. It's definitely the fastest solution because it doesn't require an extra compiler build (neither explicitly nor implicitly). Everything necessary is already available in the spec executable, it just needs a way to expose that so it can be called externally.Now the interpreter specs execute in 2:22 minutes (on my machine) and takes about 3.3 GB of memory. Previously, it took forever and claimed all the memory 😈
With this change (
and #11624merged by now), thetest_interpreter
job in CI should succeed again. I'm merging that and enabling CI in this branch to verify that. But it doesn't need to be merged with it. #11624 should obviously be merged on its own. I don't see a reason to delay enabling CI, but we might want to merge an explicit revert of #11623.Resolves #11602
Reverts #11623