• Benedikt Meurer's avatar
    [builtins] Refactor the Microtask pumping to CSA-only. · c8da060b
    Benedikt Meurer authored
    This adjusts the RunMicrotask logic to invoke CallHandlerInfo microtasks
    from CSA land directly (via a runtime function call), instead of bailing
    out to C++ for the rest of the microtask queue entries. Even in simple
    micro-benchmarks there doesn't seem to be a huge performance difference.
    In fact performance get's better when CallHandlerInfo and promises are
    mixed, which makes sense, since calling from C++ to JS land is more
    expensive than the other way around.
    
    But just in case the runtime function call overhead ever becomes the
    bottleneck we can introduce a direct C++ call and setup a handle scope
    around it, much like a very simple version of CallApiFunctionStub.
    
    This greatly simplifies the microtask handling and paves the way for
    refactoring the queue to significant reduce the GC overhead associated
    with promises currently.
    
    Bug: v8:7253
    Change-Id: I33adb62a6bada138674d324f36d4be894e27f3c9
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
    Reviewed-on: https://chromium-review.googlesource.com/890441Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#50934}
    c8da060b
isolate.cc 138 KB