• Arnaud Robin's avatar
    [wasm] Implement dynamic tiering in wasm · f181dff3
    Arnaud Robin authored
    On desktop systems, we use a very basic tiering strategy: Everything is
    initially compiled with Liftoff, and once that is done, the module can
    start being used. Concurrently to the execution, we re-compile all code
    with TurboFan, and hot-swap each function once TurboFan finishes.
    
    We should start using a more dynamic strategy where each function is
    tiered-up when judged necessary. This change will then tier-up each
    liftoff function once it has been called 5 times.
    
    I then added a counter in the native module, that is updated directly
    from Liftoff code, and a runtime call is then made when the counter
    reaches the goal.
    
    R=clemensb@chromium.org
    CC=​thibaudm@chromium.org
    
    Bug: v8:10728
    Change-Id: I8dc2b02fdff8d97781bb1cf496886594b3d7f644
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2306803
    Commit-Queue: Arnaud Robin <arobin@google.com>
    Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#68971}
    f181dff3
wasm-code-manager.cc 81.3 KB