mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
df441c491f
This exposes synchronous file reading to workers. It's intended to be used by profiler symbolication. The API only supports reading into an existing Uint8Array. This avoids creating garbage, and minimizes copies. It also keeps the file open so that it doesn't need to be reopened for each read. The implementation uses nsFileStream. I first tried an implementation which used mmap + memcpy rather than read, but it didn't work for files larger than 2GiB due to limitations in NSPR's mmap support, and the profiler needs to read >2GiB files. Specifically, the profiler sometimes needs to read /System/Library/dyld/dyld_shared_cache_arm64e , which is 2.2GiB big on macOS 11.5. Differential Revision: https://phabricator.services.mozilla.com/D124207 |
||
---|---|---|
.. | ||
android | ||
linux | ||
mac | ||
tests | ||
windows | ||
components.conf | ||
IOUtils.cpp | ||
IOUtils.h | ||
moz.build | ||
NetworkGeolocationProvider.jsm | ||
nsDeviceSensors.cpp | ||
nsDeviceSensors.h | ||
nsIOSFileConstantsService.idl | ||
nsIOSPermissionRequest.idl | ||
nsOSPermissionRequest.h | ||
nsOSPermissionRequestBase.cpp | ||
nsOSPermissionRequestBase.h | ||
OSFileConstants.cpp | ||
OSFileConstants.h | ||
PathUtils.cpp | ||
PathUtils.h |