1. 24 Aug, 2021 1 commit
    • Dan Elphick's avatar
      Reland "[include] Split out v8.h" · ec06bb6c
      Dan Elphick authored
      This is a reland of d1b27019
      
      Fixes include:
      Adding missing file to bazel build
      Forward-declaring classing before friend-classing them to fix win/gcc
      Add missing v8-isolate.h include for vtune builds
      
      Original change's description:
      > [include] Split out v8.h
      >
      > This moves every single class/function out of include/v8.h into a
      > separate header in include/, which v8.h then includes so that
      > externally nothing appears to have changed.
      >
      > Every include of v8.h from inside v8 has been changed to a more
      > fine-grained include.
      >
      > Previously inline functions defined at the bottom of v8.h would call
      > private non-inline functions in the V8 class. Since that class is now
      > in v8-initialization.h and is rarely included (as that would create
      > dependency cycles), this is not possible and so those methods have been
      > moved out of the V8 class into the namespace v8::api_internal.
      >
      > None of the previous files in include/ now #include v8.h, which means
      > if embedders were relying on this transitive dependency then it will
      > give compile failures.
      >
      > v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      > that Chrome continue to compile but that change will be reverted once
      > those transitive #includes in chrome are changed to include it directly.
      >
      > Full design:
      > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      >
      > Bug: v8:11965
      > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76424}
      
      Cq-Include-Trybots: luci.v8.try:v8_linux_vtunejit
      Bug: v8:11965
      Change-Id: I99f5d3a73bf8fe25b650adfaf9567dc4e44a09e6
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113629Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76460}
      ec06bb6c
  2. 23 Aug, 2021 2 commits
    • Dan Elphick's avatar
      Revert "[include] Split out v8.h" · 44fe02ce
      Dan Elphick authored
      This reverts commit d1b27019.
      
      Reason for revert: Broke vtune build, tsan build and possibly others
      
      Original change's description:
      > [include] Split out v8.h
      >
      > This moves every single class/function out of include/v8.h into a
      > separate header in include/, which v8.h then includes so that
      > externally nothing appears to have changed.
      >
      > Every include of v8.h from inside v8 has been changed to a more
      > fine-grained include.
      >
      > Previously inline functions defined at the bottom of v8.h would call
      > private non-inline functions in the V8 class. Since that class is now
      > in v8-initialization.h and is rarely included (as that would create
      > dependency cycles), this is not possible and so those methods have been
      > moved out of the V8 class into the namespace v8::api_internal.
      >
      > None of the previous files in include/ now #include v8.h, which means
      > if embedders were relying on this transitive dependency then it will
      > give compile failures.
      >
      > v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      > that Chrome continue to compile but that change will be reverted once
      > those transitive #includes in chrome are changed to include it directly.
      >
      > Full design:
      > https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      >
      > Bug: v8:11965
      > Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448
      > Reviewed-by: Yang Guo <yangguo@chromium.org>
      > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
      > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
      > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
      > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
      > Commit-Queue: Dan Elphick <delphick@chromium.org>
      > Cr-Commit-Position: refs/heads/main@{#76424}
      
      Bug: v8:11965
      Change-Id: Id57313ae992e720c8b19abc975cd69729e1344aa
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3113627
      Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
      Commit-Queue: Leszek Swirski <leszeks@chromium.org>
      Owners-Override: Leszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76428}
      44fe02ce
    • Dan Elphick's avatar
      [include] Split out v8.h · d1b27019
      Dan Elphick authored
      This moves every single class/function out of include/v8.h into a
      separate header in include/, which v8.h then includes so that
      externally nothing appears to have changed.
      
      Every include of v8.h from inside v8 has been changed to a more
      fine-grained include.
      
      Previously inline functions defined at the bottom of v8.h would call
      private non-inline functions in the V8 class. Since that class is now
      in v8-initialization.h and is rarely included (as that would create
      dependency cycles), this is not possible and so those methods have been
      moved out of the V8 class into the namespace v8::api_internal.
      
      None of the previous files in include/ now #include v8.h, which means
      if embedders were relying on this transitive dependency then it will
      give compile failures.
      
      v8-inspector.h does depend on v8-scripts.h for the time being to ensure
      that Chrome continue to compile but that change will be reverted once
      those transitive #includes in chrome are changed to include it directly.
      
      Full design:
      https://docs.google.com/document/d/1rTD--I8hCAr-Rho1WTumZzFKaDpEp0IJ8ejZtk4nJdA/edit?usp=sharing
      
      Bug: v8:11965
      Change-Id: I53b84b29581632710edc80eb11f819c2097a2877
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3097448Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#76424}
      d1b27019
  3. 16 Aug, 2021 1 commit
    • Santiago Aboy Solanes's avatar
      Revert "Reland "[debugger] Try to trigger pause-on-oom flakes with an extra printf"" · c357f447
      Santiago Aboy Solanes authored
      This reverts commit a4a152ec.
      
      Reason for revert: We haven't seen the flakes in a while, we can re-enable functionality
      
      Original change's description:
      > Reland "[debugger] Try to trigger pause-on-oom flakes with an extra printf"
      >
      > This is a reland of 8f7e9158
      >
      > Original change's description:
      > > [debugger] Try to trigger pause-on-oom flakes with an extra printf
      > >
      > > We have an issue that we can't repro locally. Enable back the
      > > pause-on-oom tests with an extra printf with DEBUG. We will be able to
      > > better assess the failures when they appear on the bot.
      > >
      > > Bug: v8:10876
      > > Change-Id: I066539c4b5865ecb6f2e589e9543e8c9ebd4830b
      > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2474782
      > > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > > Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      > > Cr-Commit-Position: refs/heads/master@{#70558}
      >
      > Bug: v8:10876
      > Change-Id: Ice31c9455830da320ab057293c341f69e1f0c510
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2484799
      > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
      > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
      > Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#70643}
      
      Bug: v8:10876
      Change-Id: I901d31e1e92bfef0b2917ea611354618e5cda585
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3071404Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#76302}
      c357f447
  4. 23 Jul, 2021 1 commit
  5. 01 Jul, 2021 1 commit
  6. 01 Jun, 2021 1 commit
  7. 27 May, 2021 1 commit
  8. 30 Apr, 2021 1 commit
  9. 02 Mar, 2021 1 commit
  10. 16 Feb, 2021 1 commit
  11. 24 Dec, 2020 1 commit
  12. 23 Dec, 2020 1 commit
  13. 22 Dec, 2020 1 commit
  14. 28 Nov, 2020 1 commit
  15. 20 Oct, 2020 1 commit
  16. 16 Oct, 2020 2 commits
  17. 11 Aug, 2020 1 commit
  18. 26 Mar, 2020 1 commit
  19. 20 Mar, 2020 1 commit
  20. 09 Mar, 2020 1 commit
  21. 06 Feb, 2020 1 commit
    • Z Nguyen-Huu's avatar
      Reland "[wasm] Tierdown wasm module upon "Debugger.enable"" · 1f7861c8
      Z Nguyen-Huu authored
      This is a reland of 410ca4c5
      
      Skip new test for unsupported liftoff architecture.
      Previously, if there is some unsupported liftoff functions, it fall
      through Turbofan but recompilation didn't catch and count it. This CL
      fixes it by using requested_tier on finished units.
      
      Avoid to tier down asm.js.
      Introduce reached recompilation tier to monitor recompilation progress.
      
      Original change's description:
      > [wasm] Tierdown wasm module upon "Debugger.enable"
      >
      > Put a logic in Wasm Engine to tier down all existing modules per isolate
      > when debugger is enabled. This CL does not handle new module added after
      > debugger is enabled yet.
      >
      > Bug: v8:9654
      > Change-Id: I87060f5c416506543fcaf231bff9999d06ba4c0d
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013692
      > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66017}
      
      TBR=szuend@chromium.org,bmeurer@chromium.org
      
      Bug: v8:9654
      Change-Id: I6014ae52d1e04726e64ee9267c5ce559090414d7
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031744
      Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66164}
      1f7861c8
  22. 03 Feb, 2020 1 commit
    • Sigurd Schneider's avatar
      [debugger] Allow termination-on-resume when paused at a breakpoint · 9e52d5c5
      Sigurd Schneider authored
      This CL implements functionality to allow an embedder to mark a
      debug scope as terminate-on-resume. This results in a termination
      exception when that debug scope is left and execution is resumed.
      Execution of JavaScript remains possible after a debug scope is
      marked as terminate-on-resume (but before execution of the paused
      code resumes).
      This is used by blink to correctly prevent resuming JavaScript
      execution upon reload while being paused at a breakpoint.
      
      This is important for handling reloads while paused at a breakpoint
      in blink. The resume command terminates blink's nested message loop
      that is used while to keep the frame responsive while the debugger
      is paused. But if a reload is triggered while execution is paused
      on a breakpoint, but before execution is actually resumed from the
       breakpoint (that means before returning into the V8 JavaScript
      frames that are paused on the stack below the C++ frames that belong
      to the nested message loop), we re-enter V8 to do tear-down actions
      of the old frame. In this case Runtime.terminateExecution() cannot be
      used before Debugger.resume(), because the tear-down actions that
      re-enter V8 would trigger the termination exception and crash the
      browser (because the browser expected the tear-down to succeed).
      
      Hence we introduce this flag on V8 that says: It is OK if someone
      re-enters V8 (to execute JS), but upon resuming from the breakpoint
      (i.e. returning to the paused frames that are on the stack below),
      generate a termination exception.
      
      We deliberated adding a corresponding logic on the blink side (instead
      of V8) but we think this is the simplest solution.
      
      More details in the design doc:
      
      https://docs.google.com/document/d/1aO9v0YhoKNqKleqfACGUpwrBUayLFGqktz9ltdgKHMk
      
      Bug: chromium:1004038, chromium:1014415
      
      Change-Id: I896692d4c21cb0acae89c1d783d37ce45b73c113
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1924366
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Reviewed-by: 's avatarDmitry Gozman <dgozman@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66084}
      9e52d5c5
  23. 31 Jan, 2020 1 commit
  24. 30 Jan, 2020 1 commit
    • Eric Leese's avatar
      Revert "[wasm] Tierdown wasm module upon "Debugger.enable"" · fb96381b
      Eric Leese authored
      This reverts commit 410ca4c5.
      
      Reason for revert: This was causing Chrome to hang when debugging large wasm binaries.
      
      Clean revert except for modification to test/debugger/debugger.status
      
      Bug: chromium:1047210, v8:9654
      
      Original change's description:
      > [wasm] Tierdown wasm module upon "Debugger.enable"
      >
      > Put a logic in Wasm Engine to tier down all existing modules per isolate
      > when debugger is enabled. This CL does not handle new module added after
      > debugger is enabled yet.
      >
      > Bug: v8:9654
      > Change-Id: I87060f5c416506543fcaf231bff9999d06ba4c0d
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2013692
      > Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
      > Reviewed-by: Simon Zünd <szuend@chromium.org>
      > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
      > Reviewed-by: Clemens Backes <clemensb@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#66017}
      
      TBR=clemensb@chromium.org,bmeurer@chromium.org,duongn@microsoft.com,szuend@chromium.org
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      
      Bug: v8:9654
      Change-Id: Id49e8c69f8212e95e698d7e7267056fb2eb7e60a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030737
      Auto-Submit: Eric Leese <leese@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66054}
      fb96381b
  25. 29 Jan, 2020 1 commit
  26. 13 Jan, 2020 1 commit
  27. 09 Jan, 2020 1 commit
  28. 07 Jan, 2020 1 commit
  29. 15 Nov, 2019 1 commit
    • Eric Leese's avatar
      Report real module in addition to fake scripts · 6ec6ed9c
      Eric Leese authored
      Currently the inspector reports Wasm in one of two ways:
       - If there is a source map, report one script per Wasm script, with
         bytecode but no source.
       - If there is no source map, report one script per Wasm function, with
         source (Wasm disassembly) but no bytecode.
      
      With this change, behavior with source map is same, but without source
      map it will report both ways. This will allow us to change the frontend
      to do its own disassembly, allowing us to remove the per-function scripts
      in a future change.
      
      Bug: chromium:1013527
      Change-Id: I0c559ad08896e8d0da419e3c6ad8d1edff3976fc
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1899782Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Eric Leese <leese@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64980}
      6ec6ed9c
  30. 24 Oct, 2019 1 commit
  31. 08 Oct, 2019 1 commit
    • Ingvar Stepanyan's avatar
      [wasm] Pretend that DWARF section is a fake source map · 1b5f3be0
      Ingvar Stepanyan authored
      Unfortunately, codebase contains lots of places that use one of the two
      formats as an internal representation for Wasm locations:
      1) {line: 0, column: byte offset within entire module}
      2) {line: function index, column: byte offset within function}
      
      These places choose these formats interchangeably and convert from one
      to another depending on the presence of source map URL in Wasm.
      
      This is not very convenient and makes it hard to add support for DWARF
      which should behave just like Wasm with source maps - that is, report a
      raw Wasm script instead of fake scripts per each disassembled function,
      and use representation (1) instead of (2) internally.
      
      I tried to refactor these locations and avoid checking for source map
      URLs in the previous CL - https://crrev.com/c/v8/v8/+/1833688. However,
      it quickly got out of hand, and updating code in one place just kept
      revealing yet another that gets broken by the changes, so I made a
      decision to abandon it and leave to someone who knows the codebase
      better.
      
      Instead, this CL is based on https://crrev.com/c/v8/v8/+/1809375, but,
      rather than trying to integrate DWARF separately and only for supported
      agents, it pretends that encountering DWARF section is the same as
      encountering a `sourceMappingURL` section with fake URL "wasm://dwarf".
      
      This ensures that Wasm with DWARF behaves exactly in the same way as
      Wasm with source maps, just like we want, with minimal changes to the
      codebase. The only downside is that frontends without DWARF support
      won't get even a disassembled version of Wasm that contains DWARF info.
      This is unfortunate, but, as per previous discussions, should be fine
      given current state of Wasm debugging.
      
      Change-Id: Ia7256075e4bfd2f407d001d02b96883d7267436e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1834341
      Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64157}
      1b5f3be0
  32. 26 Sep, 2019 1 commit
  33. 25 Sep, 2019 1 commit
    • Ingvar Stepanyan's avatar
      Add support for reporting raw Wasm scripts · c7848612
      Ingvar Stepanyan authored
      This addition will allow to experiment with parsing DWARF information from
      WebAssembly on the frontend side for improved debugging.
      
      The frontend must explicitly opt-in to this experiment by setting
      `supportsWasmDwarf: true` in `Debugger.enable` params.
      
      When this option is present, and Wasm appears to contain DWARF information
      (heuristic: `.debug_info` custom section is present), V8 will not try to
      disassemble and report each WebAssembly function as a separate fake script, but
      instead will report Wasm module as a whole.
      
      Note that V8 already does this when Wasm is associated with a source map.
      
      Additionally, this CL adds a dedicated `Debugger.getWasmBytecode` command that
      accepts scriptId and returns raw wire bytes of the chosen WebAssembly module.
      
      Change-Id: I7a6e80daf8d91ffaaba04fa15688f2ba9552870f
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1809375
      Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63969}
      c7848612
  34. 20 Sep, 2019 1 commit
  35. 13 Sep, 2019 1 commit
    • Dmitry Gozman's avatar
      [inspector] Simplify async stepping · fe3d51e1
      Dmitry Gozman authored
      Currently, debugger pauses on async call schedule and then waits for Debugger.pauseOnAsyncCall
      with parentStackTraceId to actually schedule the pause.
      
      This CL combines these two steps:
      - For local async tasks, it just stores m_taskWithScheduledBreak at the time of schedule,
        to be able to pause once this task is run.
      - For external async tasks, it plumbs "should_pause" boolean in V8StackTraceId from
        the point of schedule to the point of execution, and schedules a pause once
        externalAsyncTaskStarted is called with "should_pause" set to true.
      
      This approach greatly simplifies the implementation, and reduced frontend to a single
      "breakOnAsyncCall: true" parameter in Debugger.stepInto.
      
      Drive-by: introduce hasScheduledBreakOnNextFunctionCall() to make
      SetBreakOnNextFunctionCall management more robust.
      
      Note: artificial pauses at async call schedule time are gone from test expectations -
      we now only pause when user actually wants to pause, which makes protocol much simpler.
      
      See also design doc linked in the bug.
      
      BUG=chromium:1000475
      
      Change-Id: I2d16f79c599fe196b2aaeca8223c63437a2954a9
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1783724
      Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
      Reviewed-by: 's avatarAleksey Kozyatinskiy <kozyatinskiy@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63737}
      fe3d51e1
  36. 08 Jul, 2019 1 commit
  37. 12 Jun, 2019 1 commit
  38. 03 May, 2019 1 commit