-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fix filesystem/syscall optimization #8438
Merged
Merged
Conversation
This file contains 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
This reverts commit cb7da86.
…libraries means we can know at pre render time which library code is included
kripken
added a commit
that referenced
this pull request
Apr 19, 2019
…e filesystem. that flag means we manually want to not include filesystem support, even if the code seems to use it.
kripken
added a commit
that referenced
this pull request
Apr 25, 2019
They just surfaced because of it - we were lucky before that they were not noticeable, since we included too much code, which hid things. * Split up PATH into PATH and PATH_FS, where the latter depends on FS while the former does not. This allows code to use basic path functionality without getting the whole FS. * Fix missing PATH dependencies through the codebase - turns out we missed them because FS depended on it, and we assumed that covered things (which it mostly does). * Refactor syscall internals to move sockets code into the sockets syscall, so non-socket-using code doesn't get sockets + FS + all the support for that. * Optimize syscall internals to not depend on ERRNO_CODES.
VirtualTim
pushed a commit
to VirtualTim/emscripten
that referenced
this pull request
May 21, 2019
Fixes emscripten-core#8421 The problem there is that if we see too few syscalls for serious streams operations, then we don't emit filesystem support - but that's wrong if other code uses the filesystem in a non-syscall manner, like calling utimes. To fix that, we don't disable the whole filesystem when we see so few syscalls, rather we just note that SYSCALLS_REQUIRE_FILESYSTEM is false, and then emit no filesystem support in the syscalls themselves. This leaves other code free to include filesystem support if it needs to.
VirtualTim
pushed a commit
to VirtualTim/emscripten
that referenced
this pull request
May 21, 2019
…created (emscripten-core#8464) They just surfaced because of it - we were lucky before that they were not noticeable, since we included too much code, which hid things. * Split up PATH into PATH and PATH_FS, where the latter depends on FS while the former does not. This allows code to use basic path functionality without getting the whole FS. * Fix missing PATH dependencies through the codebase - turns out we missed them because FS depended on it, and we assumed that covered things (which it mostly does). * Refactor syscall internals to move sockets code into the sockets syscall, so non-socket-using code doesn't get sockets + FS + all the support for that. * Optimize syscall internals to not depend on ERRNO_CODES.
VirtualTim
pushed a commit
to VirtualTim/emscripten
that referenced
this pull request
May 21, 2019
…_FILESYSTEM` as 0 too (emscripten-core#8524) Otherwise, we incorrectly try to use the filesystem in some cases, like the testcase added here with libc++ code. This also affected binaryen which is how I noticed. Followup to emscripten-core#8438 and emscripten-core#8464.
VirtualTim
added a commit
to VirtualTim/emscripten
that referenced
this pull request
May 23, 2019
…that PR created (emscripten-core#8464)" This reverts commit 6f080ae.
VirtualTim
added a commit
to VirtualTim/emscripten
that referenced
this pull request
May 23, 2019
This reverts commit 645bdcc.
VirtualTim
added a commit
to VirtualTim/emscripten
that referenced
this pull request
May 23, 2019
…that PR created (emscripten-core#8464)" This reverts commit 6f080ae.
VirtualTim
added a commit
to VirtualTim/emscripten
that referenced
this pull request
May 23, 2019
This reverts commit 645bdcc.
belraquib
pushed a commit
to belraquib/emscripten
that referenced
this pull request
Dec 23, 2020
Fixes emscripten-core#8421 The problem there is that if we see too few syscalls for serious streams operations, then we don't emit filesystem support - but that's wrong if other code uses the filesystem in a non-syscall manner, like calling utimes. To fix that, we don't disable the whole filesystem when we see so few syscalls, rather we just note that SYSCALLS_REQUIRE_FILESYSTEM is false, and then emit no filesystem support in the syscalls themselves. This leaves other code free to include filesystem support if it needs to.
belraquib
pushed a commit
to belraquib/emscripten
that referenced
this pull request
Dec 23, 2020
…created (emscripten-core#8464) They just surfaced because of it - we were lucky before that they were not noticeable, since we included too much code, which hid things. * Split up PATH into PATH and PATH_FS, where the latter depends on FS while the former does not. This allows code to use basic path functionality without getting the whole FS. * Fix missing PATH dependencies through the codebase - turns out we missed them because FS depended on it, and we assumed that covered things (which it mostly does). * Refactor syscall internals to move sockets code into the sockets syscall, so non-socket-using code doesn't get sockets + FS + all the support for that. * Optimize syscall internals to not depend on ERRNO_CODES.
belraquib
pushed a commit
to belraquib/emscripten
that referenced
this pull request
Dec 23, 2020
…_FILESYSTEM` as 0 too (emscripten-core#8524) Otherwise, we incorrectly try to use the filesystem in some cases, like the testcase added here with libc++ code. This also affected binaryen which is how I noticed. Followup to emscripten-core#8438 and emscripten-core#8464.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #8421
The problem there is that if we see too few syscalls for serious streams operations, then we don't emit filesystem support - but that's wrong if other code uses the filesystem in a non-syscall manner, like calling
utimes
.To fix that, we don't disable the whole filesystem when we see so few syscalls, rather we just note that
SYSCALLS_REQUIRE_FILESYSTEM
is false, and then emit no filesystem support in the syscalls themselves. This leaves other code free to include filesystem support if it needs to.