• Leszek Swirski's avatar
    [compiler-dispatcher] Port to Jobs API · 15b1ce39
    Leszek Swirski authored
    Port the CompilerDispatcher to use the Jobs API, instead of its own
    hand-rolled worker management.
    
    This required some re-thinking of how testing is handled, since the
    tests want to be able to
    
      a) Defer calls to PostTask/Job, to actuall post the jobs later. This
         was easy enough with PostTask, since we could simply store the task
         in a list and no-op, but PostJob has to return a JobHandle. The
         tests now have a DelayedJobHandleWrapper, which defers all method
         calls on itself, and because of all the unique_ptrs, there's also
         now a SharedJobHandleWrapper.
    
      b) Wait until tasks/jobs complete. Returning from a Task meant that
         the task had completed, but this isn't necessarily the case with
         JobTasks; e.g. a job might be asked to yield. This patch hacks
         around this by Posting and Joining a non-owning copy of the
         requested JobTask, and then re-posting it once Join returns.
    
    Change-Id: If867b4122af52758ffabcfb78a6701f0f95d896d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2563664
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#77618}
    15b1ce39
Name
Last commit
Last update
..
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
lazy-compile-dispatcher.cc Loading commit data...
lazy-compile-dispatcher.h Loading commit data...
optimizing-compile-dispatcher.cc Loading commit data...
optimizing-compile-dispatcher.h Loading commit data...