1. 22 Mar, 2019 8 commits
  2. 21 Mar, 2019 22 commits
  3. 20 Mar, 2019 10 commits
    • Simon Zünd's avatar
      [stack-trace] Use single string builder instance for serialization · cdda5dea
      Simon Zünd authored
      This CL changes ToString of stack frames to optionally take a
      IncrementalStringBuilder instance. Instead of using one instance per
      frame when serializing a stack trace, a single instance is now used.
      
      This improves local stack serialization micro benchmarks by ~6%.
      
      R=jgruber@chromium.org
      
      Bug: v8:8742
      Change-Id: I067069f91919c167434979b4d9013019e46ed3b8
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532063
      Commit-Queue: Simon Zünd <szuend@chromium.org>
      Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60378}
      cdda5dea
    • Igor Sheludko's avatar
      [ptr-compr][arm64] Fix accesses to CodeDataContainer::kind_specific_flags · 6e7c7238
      Igor Sheludko authored
      This field's size is kIntSize but it was read as a 8-byte value in
      assembly code.
      
      Bug: v8:7703
      Change-Id: I16e8c845c27b224b368c8888073cff6d53f28a54
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532324
      Auto-Submit: Igor Sheludko <ishell@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60377}
      6e7c7238
    • Suraj Sharma's avatar
      [parser] Improve parse error message for missing name in FunctionDeclaration · f43e8845
      Suraj Sharma authored
      Added a new Error Message for Missing Function Name.
      
      The program:
      
      function(){}
      
      ...now produces:
      	SyntaxError: Function statements require a valid function name.
      
      ...instead of:
      	SyntaxError: Unexpected Token (
      
      Bug: v8:3698, v8:6513
      Change-Id: I3c12dfcfe80b94209aa9af434ae1d212970cf362
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1500914
      Commit-Queue: Adam Klein <adamk@chromium.org>
      Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60376}
      f43e8845
    • Michael Starzinger's avatar
      [wasm] Use proper zap value for jump table zapping. · d54644de
      Michael Starzinger authored
      R=clemensh@chromium.org
      
      Change-Id: Ie699372bd60fe6e78107cc2a53d90e8fe83a835e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532322
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60375}
      d54644de
    • Michael Starzinger's avatar
      [wasm] Drop obsolete {CodeSpaceMemoryModificationScope}. · 4a722b87
      Michael Starzinger authored
      This has been functionally obsolete for a while now. From a performance
      point of view it also became obsolete, because the only on-heap {Code}
      object being generated within this scope is the start function wrapper.
      
      R=clemensh@chromium.org
      BUG=v8:6792
      
      Change-Id: I978488fbd8d26b55d957d56449c5ff021b888ce1
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532320Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
      Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
      Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60374}
      4a722b87
    • Clemens Hammacher's avatar
      [wasm] Publish background compiled code in batches · 9b81ab7d
      Clemens Hammacher authored
      In order to reduce lock contention in the NativeModule, to publish
      compiled code in batches.
      This is implemented via a new {NativeModule::AddCompiledCode} variant
      that takes a {Vector<WasmCompilationResult>}, allocates code space for
      all of the results, copies all code over and relocates it, and then
      publishes all of it.
      
      R=titzer@chromium.org
      
      Bug: v8:8916
      Change-Id: I437bd222dc2471b89b114cdb42049991af36f1f4
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532062
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60373}
      9b81ab7d
    • Leszek Swirski's avatar
      Revert "V8 x64 backend doesn't emit ABI compliant stack frames" · 9f6ddb48
      Leszek Swirski authored
      This reverts commit 3cda21de.
      
      Reason for revert: Breaks the roll on Windows (see https://cr-buildbucket.appspot.com/build/8918477701097622400)
      
      Original change's description:
      > V8 x64 backend doesn't emit ABI compliant stack frames
      > 
      > On 64 bit Windows, the OS stack walking does not work because the V8 x64
      > backend doesn't emit unwinding info and also because it doesn't emit ABI
      > compliant stack frames. See
      > https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
      > for more details.
      > 
      > This problem can be fixed by observing that V8 frames usually all have the same
      > prolog and epilog:
      > 
      > push rbp,
      > mov rbp, rsp
      > ...
      > pop rbp
      > ret N
      > 
      > and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
      > should walk through V8 frames. Furthermore, since V8 Code objects are all
      > allocated in the same code-range for an Isolate, it is possible to register a
      > single PDATA/XDATA entry to cover stack walking for all the code generated
      > inside that code-range.
      > 
      > This PR contains changes required to enable stack walking on Win64:
      > 
      > EmbeddedFileWriter now adds assembler directives to the builtins
      > snapshot source file (embedded.cc) to emit additional entries in the .pdata and
      > in the .xdata section of the V8 executable. This takes care of stack walking
      > for embedded builtins. (The case of non-embedded builtins is not supported).
      > The x64 Assembler has been modified to collect the information required to emit
      > this unwind info for builtins.
      > 
      > Stack walking for jitted code is handled is Isolate.cpp, by registering
      > dynamically PDATA/XDATA for the whole code-range address space every time a new
      > Isolate is initialized, and by unregistering them when the Isolate is
      > destroyed.
      > 
      > Stack walking for WASM jitted code is handled is the same way in
      > wasm::NativeModule (wasm/wasm-code-manager.cpp).
      > 
      > It is important to note that Crashpad and Breakpad are already registering
      > PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
      > builtins). Since it is not possible to register multiple PDATA entries for the
      > same address range, a new function is added to the V8 API:
      > SetUnhandledExceptionCallback() can be used by an embedder to register its own
      > unhandled exception handler for exceptions that arise in v8-generated code.
      > V8 embedders should be modified accordingly (code for this is in a separate PR
      > in the Chromium repository:
      > https://chromium-review.googlesource.com/c/chromium/src/+/1474703).
      > 
      > All these changes are experimental, behind:
      > 
      > the 'v8_win64_unwinding_info' build flag, and
      > the '--win64-unwinding-info' runtime flag.
      > 
      > Bug: v8:3598
      > Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
      > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
      > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Commit-Queue: Paolo Severini <paolosev@microsoft.com>
      > Cr-Commit-Position: refs/heads/master@{#60330}
      
      TBR=bbudge@chromium.org,ulan@chromium.org,mvstanton@chromium.org,mstarzinger@chromium.org,gdeepti@chromium.org,jgruber@chromium.org,paolosev@microsoft.com
      
      Change-Id: If8470da94c58df8c800cbe8887f9f86236e43353
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:3598
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532321Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60372}
      9f6ddb48
    • Sigurd Schneider's avatar
      [turbofan] Turn on 'preprocess ranges' in register allocator · 8282f1af
      Sigurd Schneider authored
      This flag has been on, but was disabled for the reland of the control
      flow aware register allocator (currently behind a flag).
      
      Change-Id: I4a6aabd0c2a10160ef9bd96372fc5c72096d5369
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532079Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60371}
      8282f1af
    • Igor Sheludko's avatar
      Reland "[ptr-compr][x64] Temporarily enable pointer compression on x64" · 7b896836
      Igor Sheludko authored
      This is a reland of 4f051fd5
      
      Relanding because last revert was caused by unrelated flakes.
      
      Original change's description:
      > [ptr-compr][x64] Temporarily enable pointer compression on x64
      >
      > ... and make sure that the x64 ptr-compr bots proceed testing V8 without
      > pointer compression in order to keep testing the full pointer mode.
      >
      > Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng,v8_linux64_tsan_rel
      > Bug: v8:7703
      > Change-Id: Ied4e7bacf99c9d63e0459613fec522273f595de8
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523327
      > Commit-Queue: Igor Sheludko <ishell@chromium.org>
      > Auto-Submit: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Achenbach <machenbach@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#60339}
      
      Bug: v8:7703
      Change-Id: I9c588de77070d4fbf1bb1a21ae58c398a22eed9c
      Cq-Include-Trybots: luci.v8.try:v8_linux64_ubsan_rel_ng, v8_linux64_tsan_rel, v8_mac64_gc_stress_dbg
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530819
      Commit-Queue: Igor Sheludko <ishell@chromium.org>
      Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60370}
      7b896836
    • Clemens Hammacher's avatar
      [wasm] Split adding code from publishing it · 25d8a157
      Clemens Hammacher authored
      This prepares a refactoring to add and publish compilation results in
      batches. For this, we need to separate the two phases, so that we can
      lock the module, allocate all the code space, release the lock, copy
      the code, lock the module, publish the code, and release the lock
      again.
      In particular, this CL does the following:
      1) It removes the {AddOwnedCode} method. The functionality of creating
         the {WasmCode} and memcpy'ing the instruction into that is done in
         the other {Add*Code} methods. Adding to {owned_code_} is done in
         {PublishCode}.
      2) {PublishInterpreterEntry} is now functionally equivalent to
         {PublishCode}, so it's removed.
      3) After {AddCode}, the caller has to call {PublishCode}. In a
         follow-up CL, this will be called in batches (first {AddCode} them
         all, then {PublishCode} them all).
      4) {AddCompiledCode} now assumes that the {WasmCompilationResult}
         succeeded. Otherwise, the caller should directly call {SetError} on
         the {CompilationState}.
      5) {PublishCode} is now the chokepoint for installing code to the code
         table, the owned code vector, the jump table, and setting interpreter
         redirections. It replaces previous direct calls to {InstallCode} or
         explicitly adding to {owned_code_}.
      6) Increasing the {generated_code_size_} counter is now done in
         {AllocateForCode}, which is the chokepoint for allocating space for
         generated code. This way, we will only increase this counter once
         once we allocate in batches.
      
      R=titzer@chromium.org
      
      Bug: v8:8916
      Change-Id: I71e02e3a838f21797915cee3ebd373804fb12237
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1530817
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#60369}
      25d8a157