-
Notifications
You must be signed in to change notification settings - Fork 737
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
Allow --keepfuncs and --splitfuncs to be use alongside a profile data #6322
Allow --keepfuncs and --splitfuncs to be use alongside a profile data #6322
Conversation
@tlively Can you see if this is a suitable improvement that we can include for wasm-split? |
This makes sense to me! I think we do want to extend it to the |
Thanks! |
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.
Looks pretty good! Just a few comments on the code itself.
src/tools/wasm-split/wasm-split.cpp
Outdated
|
||
if (splitFuncs.count(func) > 0){ | ||
splitFuncs.erase(func); | ||
} |
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.
This will already do the right thing if the key is not found:
if (splitFuncs.count(func) > 0){ | |
splitFuncs.erase(func); | |
} | |
splitFuncs.erase(func); |
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.
Resolved in eb3ddfa
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.
@tlively I have made some changes, please help to take a look again
@tlively Thanks for your review and the comments! |
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, this looks good besides the missing newline and the fix to the warning message
Co-authored-by: Thomas Lively <tlively123@gmail.com>
@tlively Fixed comment and the newline at the eof. |
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!
Looks like there are some formatting issues to fix. You can ignore the failing Emscripten tests, though. |
@tlively sorry for the delayed response. I'm still interested to get this in if possible. |
I restarted the tests now. |
…oi/binaryen into wip/ben/enhance-wasmsplit
Head branch was pushed to by a user without write access
I've attempted to fix the linting and the test failures. |
(tests restarted) |
There are times after collecting a profile, we wish to manually include specific functions into the primary module.
It could be due to non-deterministic profiling or functions for error scenarios (e.g. _trap).
This PR helps to unlock this workflow by honoring both the
--keep-funcs
flag as well as the--profile
flag