-
Notifications
You must be signed in to change notification settings - Fork 76
Chore: Update V8 flag initialization to use V8 API #458
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
Open
rachgreen33
wants to merge
6
commits into
proxy-wasm:main
Choose a base branch
from
rachgreen33:v8_flags_from_string
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a9843a6
Set flags via the v8 API, instead of directly modifying them
rachgreen33 785835d
Merge branch 'main' into v8_flags_from_string
rachgreen33 fbec45d
Continue using the liftoff disable flag, but this time via the v8 API
rachgreen33 965ccd7
Fixed the includes statements.
rachgreen33 d1c7aa2
Fixed includes ordering.
rachgreen33 e061828
Added a comment explaining why we are disabling liftoff.
rachgreen33 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
But why? It was written years ago, but at the time loading Wasm module wouldn't complete before all compilation phases completed, so Liftoff compilation was wasteful. Is that not the case anymore?
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.
Thanks for the callout on this. I discussed with Matt and we do want to keep this disabled - Updated.
Uh oh!
There was an error while loading. Please reload this page.
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.
Keeping it SGTM, but I think it would be helpful to add a comment that provides some context on why we set it. Internal bug b/278233034 contains some pointers to past discussions. I'd suggest something like: "Disable Liftoff compiler to force optimized JIT up-front."
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.
Again, this is based on tests from years ago, but TurboFan was always blocking loading of Wasm modules, and this flag doesn't affect that. What it does is that it skips Liftoff compilation that would be discarded in favor of TurboFan anyway... It would be good to verify that's still the case, though.
There are some docs for V8 here: https://v8.dev/docs/wasm-compilation-pipeline
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 want Turbofan to block on loading of Wasm modules, right? Thanks for the docs link, it aligns with discussion above:
--no-liftoff
sets the "TurboFan only" mode. If liftoff is enabled, calls can immediately use the compiled code, and then re-compilation with TurboFan is triggered in the background only after a certain threshold of calls.