1. 14 Aug, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Change OffThreadIsolate to LocalIsolate · f1589bbe
      Leszek Swirski authored
      This patch introduces a new LocalIsolate and LocalFactory, which use
      LocalHeap and replace OffThreadIsolate and OffThreadFactory. This allows
      us to remove those classes, as well as the related OffThreadSpace,
      OffThreadLargeObjectSpace, OffThreadHeap, and OffThreadTransferHandle.
      OffThreadLogger becomes LocalLogger.
      
      LocalHeap behaves more like Heap than OffThreadHeap did, so this allows
      us to additionally remove the concept of "Finish" and "Publish" that the
      OffThreadIsolate had, and allows us to internalize strings directly with
      the newly-concurrent string table (where the implementation can now move
      to FactoryBase).
      
      This patch also removes the off-thread support from the deserializer
      entirely, as well as removing the LocalIsolateWrapper which allowed
      run-time distinction between Isolate and OffThreadIsolate. LocalHeap
      doesn't support the reservation model used by the deserializer, and we
      will likely move the deserializer to use LocalIsolate unconditionally
      once we figure out the details of how to do this.
      
      Bug: chromium:1011762
      
      Change-Id: I1a1a0a72952b19a8a4c167c11a863c153a1252fc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315990
      Commit-Queue: Andreas Haas <ahaas@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69397}
      f1589bbe
  2. 24 Jul, 2020 1 commit
    • Leszek Swirski's avatar
      [compiler] Off-thread finalize each function immediately · 198deea2
      Leszek Swirski authored
      Allow "iterative" finalization when off-thread finalization is enabled,
      meaning that each compiled function is finalized immediately after
      compilation, rather than all functions being first compiled and then
      finalized.
      
      This is what we do on the main thread, and it reduces peak Zone memory
      usage by being able to discard empty compilation Zones earlier.
      
      One necessary functionality for this was being able to defer the
      finalization of asm.js functions until the main thread pause, since
      they can't be finalized off-thread -- previously we would just bail
      out of doing the off-thread finalization if any inner function was
      asm.js.
      
      Bug: chromium:1011762
      Change-Id: I21ff69d62eaa93b5ff908624b7115601e36f70f1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282536Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#69032}
      198deea2
  3. 10 Jun, 2020 1 commit
  4. 06 May, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Unify compiler.cc finalization logic · 58b12f63
      Leszek Swirski authored
      This patch unfies the finalization logic between the various unoptimized
      compilation paths in compiler.cc, taking the various post-processings and
      fixups needed for off-thread finalization and performing them in the same
      order for the other finalizations.
      
      It also unifies the general compilation path between streaming script
      compilation, main-thread script compilation, and main-thread lazy
      compilation, making the main-thread paths both use an iterative execution
      and finalization, and making all three use the same job helper methods
      and overall finalization helper.
      
      Bug: chromium:1011762
      Change-Id: Ibe56f6d2f75a2deffbe9e0b600ded8a02293b722
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2172790
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#67609}
      58b12f63
  5. 24 Apr, 2020 1 commit
  6. 03 Mar, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Allow off-thread bytecode finalization · 455cb6c0
      Leszek Swirski authored
      Add the remaining missing templatizations to allow an initial wiring in
      of the off-thread factory into streaming compilation finalization.
      
      The off-thread finalization is behind a flag, disabled by default:
          --finalize-streaming-on-background
      
      When the flag is enabled, background tasks will perform perform the
      finalization during their background execution, and will release the
      parser and compilation jobs once they are no longer needed.
      
      The implementation is complete enough for performance testing, but not
      enough for launch. Notably, there is no support for:
      
        * Class boilerplates (the code is marked unreachable),
        * Exceptions during finalization, i.e. parse/compile warnings/errors,
        * Allocation sampling,
        * Logging,
        * Asm.js,
        * Parallel complication tasks
        * Forced source positions (for "NeedsDetailedOptimizedCodeLineInfo()")
      
      This patch also adds some tracing events for the various stages of the
      off-thread finalization (including the main-thread merge) for further
      performance improvements.
      
      Bug: chromium:1011762
      Change-Id: Ia44fa56975dd689f0d92c1543b294cdb063eb199
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2066965
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66566}
      455cb6c0
  7. 04 Feb, 2020 1 commit
    • Leszek Swirski's avatar
      [offthread] Add an OffThreadIsolate · 7a20b6b9
      Leszek Swirski authored
      The Factory/OffThreadFactory allows us to cleanly separate object
      construction behaviour between main-thread and off-thread in a
      syntactically consistent way (so that methods templated on the factory
      type can be made to work on both).
      
      However, there are cases where we also have to access the Isolate, for
      handle creation or exception throwing. So far we have been pushing more
      and more "customization points" into the factories to allow these
      factory-templated methods to dispatch on this isolate behaviour via
      these factory methods. Unfortunately, this is an increasing layering
      violation between Factory and Isolate, particularly around exception
      handling.
      
      Now, we introduce an OffThreadIsolate, analogous to Isolate in the same
      way as OffThreadFactory is analogous to Factory. All methods which were
      templated on Factory are now templated on Isolate, and methods which
      used to take an Isolate, and which were recently changed to take a
      templated Factory, are changed/reverted to take a templated Isolate.
      OffThreadFactory gets an isolate() method to match Factory's.
      
      Notably, FactoryHandle is changed to "HandleFor", where the template
      argument can be either of the Isolate type or the Factory type (allowing
      us to dispatch on both depending on what is available).
      
      Bug: chromium:1011762
      Change-Id: Id144176f7da534dd76f3d535ab2ade008b6845e3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030909
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66101}
      7a20b6b9
  8. 22 Jan, 2020 2 commits
  9. 16 Jan, 2020 2 commits
  10. 08 Jul, 2019 1 commit
  11. 03 Jul, 2019 2 commits
  12. 28 Jun, 2019 2 commits
  13. 24 May, 2019 1 commit
  14. 23 May, 2019 2 commits
  15. 22 May, 2019 1 commit
  16. 10 May, 2019 1 commit
  17. 07 Mar, 2019 1 commit
  18. 25 Jan, 2019 1 commit
    • Mythri's avatar
      Defer inferring language mode as far as possible · 592aeefa
      Mythri authored
      Inferring the language mode involves iterating the stack to find the
      closure. This is an expensive operation and should be done only when
      required. This cl changes the implementation to infer the language
      mode only when we can't defer it any further. Currently, we infer the
      language mode when throwing an exception or when passing this
      information to PropertyCallbackArguments.
      
      This cl also changes the language mode parameter to SetProperty
      related methods to Maybe<ShouldThrow>. We only use the language mode to
      decide if we need to throw and using ShouldThrow instead of language
      mode simplifies the code by avoiding conversions from Maybe<ShouldThrow>
      to Maybe<LanguageMode> and vice-versa.
      
      Bug: v8:8580, chromium:923820, chromium:925289
      Change-Id: I72497497f62fe0d86fcecd57b06b3183b7531f7b
      Reviewed-on: https://chromium-review.googlesource.com/c/1425912
      Commit-Queue: Mythri Alle <mythria@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59094}
      592aeefa
  19. 24 Jan, 2019 1 commit
    • Mythri's avatar
      Reland "Change SetProperty/SetSuperProperty to infer language mode when possible" · e2846ea6
      Mythri authored
      This is a reland of 0896599f with a fix for
      failing layout test.
      
      Original change's description:
      > Change SetProperty/SetSuperProperty to infer language mode when possible
      >
      > In most cases, the language mode can be inferred from the closure and
      > the context. Computing the language mode instead of passing it around
      > simplifies the ICs and will make it possible to go towards lazily
      > allocating feedback vectors. Currently ICs obtain the language mode from
      > the feedback vectors and with lazy feedback allocation we may not always
      > have feedback vectors. Since computing language mode is a bit expensive
      > we want to defer it as far as possible.
      >
      > In Array builtins and other builtins like Reflect.Set we need to force a
      > language mode when setting the properties. To support these cases the
      > SetProperty methods allow the language mode to be overridden when needed.
      >
      > This is a first cl in a series of cls, that will defer the language mode
      > computation further and remove language mode where it is not needed.
      >
      > BUG: v8:8580
      > Change-Id: I9c2396e3bcfe77c3c9d6760c46d86954d54744b9
      > Reviewed-on: https://chromium-review.googlesource.com/c/1409426
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Commit-Queue: Mythri Alle <mythria@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58893}
      
      TBR: ahaas@chromium.org
      Change-Id: Id5d81eae91b55638dbc72168f0e5203e684869fb
      Reviewed-on: https://chromium-review.googlesource.com/c/1421077
      Commit-Queue: Mythri Alle <mythria@chromium.org>
      Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59075}
      e2846ea6
  20. 18 Jan, 2019 1 commit
    • Maya Lekova's avatar
      Revert "Change SetProperty/SetSuperProperty to infer language mode when possible" · 697885b9
      Maya Lekova authored
      This reverts commit 0896599f.
      
      Reason for revert: Speculative revert, seems to cause a layout test failure blocking the LKGR - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/29320
      
      Original change's description:
      > Change SetProperty/SetSuperProperty to infer language mode when possible
      > 
      > In most cases, the language mode can be inferred from the closure and
      > the context. Computing the language mode instead of passing it around
      > simplifies the ICs and will make it possible to go towards lazily
      > allocating feedback vectors. Currently ICs obtain the language mode from
      > the feedback vectors and with lazy feedback allocation we may not always
      > have feedback vectors. Since computing language mode is a bit expensive
      > we want to defer it as far as possible.
      > 
      > In Array builtins and other builtins like Reflect.Set we need to force a
      > language mode when setting the properties. To support these cases the
      > SetProperty methods allow the language mode to be overridden when needed.
      > 
      > This is a first cl in a series of cls, that will defer the language mode
      > computation further and remove language mode where it is not needed.
      > 
      > BUG: v8:8580
      > Change-Id: I9c2396e3bcfe77c3c9d6760c46d86954d54744b9
      > Reviewed-on: https://chromium-review.googlesource.com/c/1409426
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
      > Commit-Queue: Mythri Alle <mythria@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#58893}
      
      TBR=mlippautz@chromium.org,mythria@chromium.org,jgruber@chromium.org,verwaest@chromium.org
      
      Change-Id: I2e0f80a4577a8ca86c05a62205f9dfa488418a52
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/1420758Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
      Commit-Queue: Maya Lekova <mslekova@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58911}
      697885b9
  21. 17 Jan, 2019 1 commit
    • Mythri's avatar
      Change SetProperty/SetSuperProperty to infer language mode when possible · 0896599f
      Mythri authored
      In most cases, the language mode can be inferred from the closure and
      the context. Computing the language mode instead of passing it around
      simplifies the ICs and will make it possible to go towards lazily
      allocating feedback vectors. Currently ICs obtain the language mode from
      the feedback vectors and with lazy feedback allocation we may not always
      have feedback vectors. Since computing language mode is a bit expensive
      we want to defer it as far as possible.
      
      In Array builtins and other builtins like Reflect.Set we need to force a
      language mode when setting the properties. To support these cases the
      SetProperty methods allow the language mode to be overridden when needed.
      
      This is a first cl in a series of cls, that will defer the language mode
      computation further and remove language mode where it is not needed.
      
      BUG: v8:8580
      Change-Id: I9c2396e3bcfe77c3c9d6760c46d86954d54744b9
      Reviewed-on: https://chromium-review.googlesource.com/c/1409426Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Mythri Alle <mythria@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58893}
      0896599f
  22. 08 Dec, 2018 1 commit
  23. 11 Oct, 2018 1 commit
  24. 17 Jul, 2018 1 commit
  25. 02 May, 2018 1 commit
    • Leszek Swirski's avatar
      Revert "[parser] Slice the source string where possible" · 18bc2856
      Leszek Swirski authored
      This reverts commit 2df5e7a7.
      
      Reason for revert: Mystery crashes https://bugs.chromium.org/p/chromium/issues/detail?id=838805
      
      Original change's description:
      > [parser] Slice the source string where possible
      > 
      > When internalizing string literals (for quoted strings or property names),
      > try to create a sliced string of the source string rather than allocating
      > a copy of the bytes.
      > 
      > This will not work for string literals that contain escapes (e.g. unicode
      > escapes), and currently does not support two-byte strings.
      > 
      > Bug: chromium:818642
      > Change-Id: I686e5ad36baecd1a84ce5e124118431249b6c980
      > Reviewed-on: https://chromium-review.googlesource.com/1010282
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
      > Reviewed-by: Marja Hölttä <marja@chromium.org>
      > Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52898}
      
      TBR=marja@chromium.org,yangguo@chromium.org,jarin@chromium.org,mlippautz@chromium.org,leszeks@chromium.org,verwaest@chromium.org
      
      Change-Id: I598b6668c43a3e843e2dd8e60852b2b2f3461954
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:818642
      Reviewed-on: https://chromium-review.googlesource.com/1039885
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52919}
      18bc2856
  26. 01 May, 2018 1 commit
  27. 21 Nov, 2017 1 commit
  28. 27 Oct, 2017 1 commit
  29. 24 Oct, 2017 1 commit
  30. 16 Oct, 2017 1 commit
  31. 13 Oct, 2017 1 commit
  32. 10 Feb, 2017 3 commits
  33. 09 Feb, 2017 1 commit