| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Review requested:
|
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #64969 +/- ##
=======================================
Coverage 90.33% 90.34%
=======================================
Files 760 760
Lines 248496 248496
Branches 46877 46901 +24
=======================================
+ Hits 224481 224492 +11
+ Misses 15454 15448 -6
+ Partials 8561 8556 -5 see 29 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
Sorry, something went wrong.
AllocateCodeNear() searched 1024 pages in each direction for a free page next to the native target, one MAP_FIXED_NOREPLACE mmap per candidate. Every probe is expected to fail, so an exhausted window cost up to 2048 failing syscalls before taking the plain-mmap fallback that was already there, all to enable a jmp rel32 instead of movabs+jmp. Resolving a fast-eligible signature plateaued at ~790us, against ~28us for one that allocates no trampoline. Reduce the window to 16 pages per direction, bounding the exhausted case to 32 probes while still covering typical per-library symbol counts. Placement stays opportunistic: the caller already emits the absolute form when EmitJmpRel32() reports the target is out of range. Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Assisted-by: claude:opus-5 PR-URL: nodejs#64969 Fixes: nodejs#64968 Reviewed-By: Paolo Insogna <paolo@cowtech.it>
AllocateCodeNear() searched 1024 pages in each direction for a free page next to the native target, one MAP_FIXED_NOREPLACE mmap per candidate. Every probe is expected to fail, so an exhausted window cost up to 2048 failing syscalls before taking the plain-mmap fallback that was already there, all to enable a jmp rel32 instead of movabs+jmp. Resolving a fast-eligible signature plateaued at ~790us, against ~28us for one that allocates no trampoline. Reduce the window to 16 pages per direction, bounding the exhausted case to 32 probes while still covering typical per-library symbol counts. Placement stays opportunistic: the caller already emits the absolute form when EmitJmpRel32() reports the target is out of range. Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Assisted-by: claude:opus-5 PR-URL: #64969 Fixes: #64968 Reviewed-By: Paolo Insogna <paolo@cowtech.it>
AllocateCodeNear() searched 1024 pages in each direction for a free page next to the native target, one MAP_FIXED_NOREPLACE mmap per candidate. Every probe is expected to fail, so an exhausted window cost up to 2048 failing syscalls before taking the plain-mmap fallback that was already there, all to enable a jmp rel32 instead of movabs+jmp. Resolving a fast-eligible signature plateaued at ~790us, against ~28us for one that allocates no trampoline. Reduce the window to 16 pages per direction, bounding the exhausted case to 32 probes while still covering typical per-library symbol counts. Placement stays opportunistic: the caller already emits the absolute form when EmitJmpRel32() reports the target is out of range. Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Assisted-by: claude:opus-5 PR-URL: #64969 Fixes: #64968 Reviewed-By: Paolo Insogna <paolo@cowtech.it>
| Back | FazBrowse Home | New Git URL |
Fixes: #64968
AllocateCodeNear() searched 1024 pages in each direction for a free page next to the native target, one MAP_FIXED_NOREPLACE mmap per candidate. Every probe is expected to fail, so an exhausted window cost up to 2048 failing syscalls before taking the plain-mmap fallback that was already there, all to enable a jmp rel32 instead of movabs+jmp. Resolving a fast-eligible signature plateaued at ~790us, against ~28us for one that allocates no trampoline.
Reduce the window to 16 pages per direction, bounding the exhausted case to 32 probes while still covering typical per-library symbol counts. Placement stays opportunistic: the caller already emits the absolute form when EmitJmpRel32() reports the target is out of range.
Add benchmark/ffi/get-function.js, which measures resolution rather than call throughput, so this path has coverage. Its fast arm reports 1,852 ops/sec at the old window and 37,836 at the new one, with the fast-ineligible control arm flat at ~80,000.
Assisted-by: claude:opus-5