1. 19 Mar, 2019 1 commit
    • Benedikt Meurer's avatar
      [turbofan] Significantly improve ConsString creation performance. · d6a60a0e
      Benedikt Meurer authored
      This change significantly improves the performance of string
      concatenation in optimized code for the case where the resulting string
      is represented as a ConsString. On the relevant test cases we go from
      
        serializeNaive: 10762 ms.
        serializeClever: 7813 ms.
        serializeConcat: 10271 ms.
      
      to
      
        serializeNaive: 10278 ms.
        serializeClever: 5533 ms.
        serializeConcat: 10310 ms.
      
      which represents a 30% improvement on the "clever" benchmark, which
      tests specifically the ConsString creation performance.
      
      This was accomplished via a couple of different steps, which are briefly
      outlined here:
      
        1. The empty_string gets its own map, so that we can easily recognize
           and handle it appropriately in the TurboFan type system. This
           allows us to express (and assert) that the inputs to NewConsString
           are non-empty strings, making sure that TurboFan no longer creates
           "crippled ConsStrings" with empty left or right hand sides.
        2. Further split the existing String types in TurboFan to be able to
           distinguish between OneByte and TwoByte strings on the type system
           level. This allows us to avoid having to dynamically lookup the
           resulting ConsString map in case of ConsString creation (i.e. when
           we know that both input strings are OneByte strings or at least
           one of the input strings is TwoByte).
        3. We also introduced more finegrained feedback for the Add bytecode
           in the interpreter, having it collect feedback about ConsStrings,
           specifically ConsOneByteString and ConsTwoByteString. This feedback
           can be used by TurboFan to only inline the relevant code for what
           was seen so far. This allows us to remove the Octane/Splay specific
           magic in JSTypedLowering to detect ConsString creation, and instead
           purely rely on the feedback of what was seen so far (also making it
           possible to change the semantics of NewConsString to be a low-level
           operator, which is only introduced in SimplifiedLowering by looking
           at the input types of StringConcat).
        4. On top of the before mentioned type and interpreter changes we added
           new operators CheckNonEmptyString, CheckNonEmptyOneByteString, and
           CheckNonEmptyTwoByteString, which perform the appropriate (dynamic)
           checks.
      
      There are several more improvements that are possible based on this, but
      since the change was already quite big, we decided not to put everything
      into the first change, but do some follow up tweaks to the type system,
      and builtin optimizations later.
      
      Tbr: mstarzinger@chromium.org
      Bug: v8:8834, v8:8931, v8:8939, v8:8951
      Change-Id: Ia24e17c6048bf2b04df966d3cd441f0edda05c93
      Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
      Doc: https://bit.ly/fast-string-concatenation-in-javascript
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499497
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60318}
      d6a60a0e
  2. 07 Mar, 2019 1 commit
  3. 15 Feb, 2019 1 commit
  4. 12 Feb, 2019 1 commit
  5. 18 Dec, 2018 1 commit
  6. 11 Dec, 2018 1 commit
  7. 04 Dec, 2018 1 commit
  8. 27 Nov, 2018 1 commit
  9. 26 Nov, 2018 1 commit
  10. 11 Oct, 2018 1 commit
  11. 03 Oct, 2018 1 commit
  12. 02 Oct, 2018 1 commit
  13. 17 Sep, 2018 1 commit
  14. 14 Sep, 2018 1 commit
  15. 31 Jul, 2018 1 commit
  16. 26 Jul, 2018 1 commit
  17. 23 Jul, 2018 2 commits
  18. 18 Jul, 2018 1 commit
  19. 16 Jul, 2018 1 commit
  20. 13 Jul, 2018 1 commit
    • Michael Lippautz's avatar
      Revert "Reland "[heap] Added External Strings to external memory accounting."" · 71dddd14
      Michael Lippautz authored
      This reverts commit 7bff339e.
      
      Reason for revert: Breaks autoroll, see bug.
      
      Bug: v8:7944
      
      Original change's description:
      > Reland "[heap] Added External Strings to external memory accounting."
      > 
      > This is a reland of 5863c0b6
      > 
      > Original change's description:
      > > [heap] Added External Strings to external memory accounting.
      > > 
      > > Bug: chromium:845409
      > > Change-Id: I3fe2b294f6e038d77787cf0870d244ba7cc20550
      > > Reviewed-on: https://chromium-review.googlesource.com/1118164
      > > Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
      > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#54110}
      > 
      > Bug: chromium:845409
      > Change-Id: Ied341ec6268000343d2a577b22f2a483460b01f5
      > Reviewed-on: https://chromium-review.googlesource.com/1121736
      > Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#54410}
      
      TBR=ulan@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,petermarshall@chromium.org,rfbpb@google.com
      
      Change-Id: Ie55586e84f44a2d83c7f97110d60abb86f0730c5
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: chromium:845409
      Reviewed-on: https://chromium-review.googlesource.com/1136312Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#54428}
      71dddd14
  21. 12 Jul, 2018 2 commits
  22. 10 Jul, 2018 1 commit
  23. 04 Jul, 2018 2 commits
  24. 21 Jun, 2018 1 commit
  25. 09 May, 2018 1 commit
    • Dan Elphick's avatar
      Reland "[heap] Mark RO_SPACE as read-only after deserialization" · 60064133
      Dan Elphick authored
      This is a reland of 40f1aaf3
      
      Put back padding clearing into the SerializeObject method but only when
      the String is not in RO_SPACE. For RO_SPACE strings, if required
      iterate over the space before serialization clearing the strings.
      
      Original change's description:
      > [heap] Mark RO_SPACE as read-only after deserialization
      >
      > Adds MarkAsReadOnly and MarkAsReadWrite to ReadOnlySpace. The latter
      > is only usable with ReadOnlySpace::WritableScope to avoid the space
      > being left writable). MarkAsReadOnly updates the high water mark and
      > makes several previously mutating methods into no-ops.
      >
      > Moves some writes to immutable objects out of the bootstrapper to
      > setup-heap-internal so they don't write to a read-only page.
      >
      > Also avoid writing hashes to strings that already have the value set as
      > that invariably means writing to the "0" and "1" constant strings in
      > RO_SPACE.
      >
      > Before serialization, it makes RO_SPACE writable again so that any
      > padding can be cleared before writing it.
      >
      > Bug: v8:7464
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      > Change-Id: I22edc20dba7dde8943991a8fcaf87244af4490a3
      > Reviewed-on: https://chromium-review.googlesource.com/1014128
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52943}
      
      Bug: v8:7464
      Change-Id: Ia8386c4ff5f5df3207f584caf7a9b1ff1e405f25
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1042145Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53087}
      60064133
  26. 03 May, 2018 2 commits
    • Michael Achenbach's avatar
      Revert "[heap] Mark RO_SPACE as read-only after deserialization" · d14bca61
      Michael Achenbach authored
      This reverts commit 40f1aaf3.
      
      Reason for revert:
      https://luci-milo.appspot.com/buildbot/client.v8/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/21000
      
      Original change's description:
      > [heap] Mark RO_SPACE as read-only after deserialization
      > 
      > Adds MarkAsReadOnly and MarkAsReadWrite to ReadOnlySpace. The latter
      > is only usable with ReadOnlySpace::WritableScope to avoid the space
      > being left writable). MarkAsReadOnly updates the high water mark and
      > makes several previously mutating methods into no-ops.
      > 
      > Moves some writes to immutable objects out of the bootstrapper to
      > setup-heap-internal so they don't write to a read-only page.
      > 
      > Also avoid writing hashes to strings that already have the value set as
      > that invariably means writing to the "0" and "1" constant strings in
      > RO_SPACE.
      > 
      > Before serialization, it makes RO_SPACE writable again so that any
      > padding can be cleared before writing it.
      > 
      > Bug: v8:7464
      > Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      > Change-Id: I22edc20dba7dde8943991a8fcaf87244af4490a3
      > Reviewed-on: https://chromium-review.googlesource.com/1014128
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52943}
      
      TBR=yangguo@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,delphick@chromium.org
      
      Change-Id: Id4770c0fdb21cd9eea2f62a019f44a6bdea8f0a7
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:7464
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/1041948Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52944}
      d14bca61
    • Dan Elphick's avatar
      [heap] Mark RO_SPACE as read-only after deserialization · 40f1aaf3
      Dan Elphick authored
      Adds MarkAsReadOnly and MarkAsReadWrite to ReadOnlySpace. The latter
      is only usable with ReadOnlySpace::WritableScope to avoid the space
      being left writable). MarkAsReadOnly updates the high water mark and
      makes several previously mutating methods into no-ops.
      
      Moves some writes to immutable objects out of the bootstrapper to
      setup-heap-internal so they don't write to a read-only page.
      
      Also avoid writing hashes to strings that already have the value set as
      that invariably means writing to the "0" and "1" constant strings in
      RO_SPACE.
      
      Before serialization, it makes RO_SPACE writable again so that any
      padding can be cleared before writing it.
      
      Bug: v8:7464
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
      Change-Id: I22edc20dba7dde8943991a8fcaf87244af4490a3
      Reviewed-on: https://chromium-review.googlesource.com/1014128
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52943}
      40f1aaf3
  27. 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
  28. 01 May, 2018 1 commit
  29. 18 Apr, 2018 1 commit
  30. 09 Apr, 2018 2 commits
  31. 06 Apr, 2018 2 commits
    • Michael Achenbach's avatar
      Revert "[cleanup] Refactor the Factory" · 503e07c3
      Michael Achenbach authored
      This reverts commit f9a2e24b.
      
      Reason for revert: gc stress failures not all fixed by follow up.
      
      Original change's description:
      > [cleanup] Refactor the Factory
      > 
      > There is no good reason to have the meat of most objects' initialization
      > logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
      > this CL changes the protocol between Heap and Factory to be AllocateRaw,
      > and all object initialization work after (possibly retried) successful
      > raw allocation happens in the Factory.
      > 
      > This saves about 20KB of binary size on x64.
      > 
      > Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      > Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
      > Reviewed-on: https://chromium-review.googlesource.com/959533
      > Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Hannes Payer <hpayer@chromium.org>
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#52416}
      
      TBR=jkummerow@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,hpayer@chromium.org
      
      Change-Id: Idbbc53478742f3e9525eee83342afc6aedae122f
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Reviewed-on: https://chromium-review.googlesource.com/999414Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Commit-Queue: Michael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52420}
      503e07c3
    • Jakob Kummerow's avatar
      [cleanup] Refactor the Factory · f9a2e24b
      Jakob Kummerow authored
      There is no good reason to have the meat of most objects' initialization
      logic in heap.cc, all wrapped by the CALL_HEAP_FUNCTION macro. Instead,
      this CL changes the protocol between Heap and Factory to be AllocateRaw,
      and all object initialization work after (possibly retried) successful
      raw allocation happens in the Factory.
      
      This saves about 20KB of binary size on x64.
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
      Change-Id: Icbfdc4266d7be8b48d2fe085f03411743dc6a0ca
      Reviewed-on: https://chromium-review.googlesource.com/959533
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52416}
      f9a2e24b
  32. 20 Feb, 2018 1 commit
  33. 13 Feb, 2018 1 commit
    • Sigurd Schneider's avatar
      Reland "[cleanup] Harden the SubString CSA/Runtime implementations." · bb282636
      Sigurd Schneider authored
      This is a reland of 6d5b54df82e27a82811a836dcdbbfe26829f0e6d
      Original change's description:
      > [cleanup] Harden the SubString CSA/Runtime implementations.
      >
      > Remove the self-healing for invalid parameters in the
      > CodeStubAssembler::SubString helper and the %SubString runtime function,
      > which is used as a fallback for the CodeStubAssembler implementation.
      > All call sites must do appropriate parameter validation anyways now that
      > the self-hosted JavaScript builtins using these helpers are gone, and we
      > have proper contracts with the uses.
      >
      > Also remove the context parameter from the CodeStubAssembler::SubString
      > method, which is unnecessary, since this can no longer throw an
      > exception.
      >
      > Bug: v8:5269, v8:6936, v8:7109, v8:7137
      > Change-Id: I19d93bad5f41faa0561c4561a48f78fcba99a549
      > Reviewed-on: https://chromium-review.googlesource.com/795720
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#49702}
      
      Bug: v8:5269, v8:6936, v8:7109, v8:7137
      Change-Id: I5e84998a2dd3990d7981505b401ffc770e0b7ac5
      Reviewed-on: https://chromium-review.googlesource.com/913130Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#51265}
      bb282636
  34. 06 Feb, 2018 1 commit