1. 10 Mar, 2021 1 commit
  2. 09 Feb, 2021 1 commit
  3. 12 Jan, 2021 1 commit
    • Benedikt Meurer's avatar
      [inspector][wasm] Improve Scope view and instance preview. · a23adbbc
      Benedikt Meurer authored
      This adds the following internal properties to `WasmInstanceObject`
      values in DevTools:
      
       - `[[Module]]` pointing to the `WasmModuleObject`, allowing the
         developer to find the module to an instance no matter where in
         DevTools front-end the instance is inspected.
       - `[[Functions]]`, `[[Globals]]`, `[[Memories]]`, and `[[Tables]]`
         are shown (when they aren't empty), allowing developers to inspect
         the entities within an instance no matter where in DevTools front-end
         it's inspected.
      
      This also updates the _Module_ scope for Wasm frames to show the entity
      containers (`functions`, `globals`, `memories` and `tables`) in addition
      to the `instance` and `module` to make it easier accessible (fewer
      clicks to get there), but also to align it better with the _Add property
      path to Watch_ and _Copy property path_ features (since exactly the same
      names are exposed via Debug Evaluate on Wasm frames).
      
      ```
      > Stack
      > Locals
      v Module
        > module
        > instance
        > functions
        > globals
        > memories
        > tables
      ```
      
      Drive-by-fix: Move GetWasmModuleObjectInternalProperties() logic into
      debug-wasm-support.cc
      
      Screenshot: https://imgur.com/ksEHG2I.png
      Doc: http://bit.ly/devtools-wasm-entities
      Fixed: chromium:1165294
      Bug: chromium:1071432, chromium:1164241, chromium:1165304
      Change-Id: Ia88fb2705287c79988ff2b432e4a33ac34e098f5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622912Reviewed-by: 's avatarPhilip Pfaffe <pfaffe@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72042}
      a23adbbc
  4. 11 Jan, 2021 1 commit
    • Benedikt Meurer's avatar
      [inspector][wasm] Unify locals, stack, and globals objects. · 85fdbd91
      Benedikt Meurer authored
      This change unifies the locals, stack, and globals objects exposed for
      WebAssembly frames via the Scope view and via DebugEvaluate to use the
      same underlying objects (implemented via interceptors). This also
      means that for locals and globals we now consistently expose names
      prefixed by a dollar symbol everywhere.
      
      Drive-by-fix: Move the debug::ScopeIterator implementation for WasmFrame
      into debug-wasm-support.cc, so WebAssembly scope details are all found
      in one place instead of scattered around the code.
      
      Drive-by-cleanup: Rename GetJSDebugProxy to GetWasmDebugProxy for
      consistency. GetJSDebugProxy is a bit misleading, since the debug proxy
      is not about JavaScript, but just exposed to JavaScript.
      
      Doc: http://bit.ly/devtools-wasm-entities
      Bug: chromium:1159307, chromium:1127914, chromium:1162229
      Change-Id: If932bd06bbce72542823f63dac1bd976ab33937a
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615348
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#72009}
      85fdbd91
  5. 08 Jan, 2021 1 commit
    • Benedikt Meurer's avatar
      [inspector] Remove special wasm RemoteObject type. · cde7a77e
      Benedikt Meurer authored
      Previously we had introduced a special `v8::internal::WasmValue` type
      which we used to expose Wasm values to the Scope view in Chromium
      DevTools. The problem however is that these values cannot be exposed to
      JavaScript (and in particular not to Debug Evaluate), which means that
      particularly for v128 and i64 we have inconsistent representations
      across the various parts of DevTools.
      
      This change removes the `wasm` type from the RemoteObject and all the
      adjacent logic, and paves the way for a uniform representation of Wasm
      values throughout DevTools. For i64 we will simply use BigInt
      consistently everywhere, and for i32, f32 and f64 we'll just use Number.
      For externref we will represent the values as-is directly. For v128
      values we currently use a Uint8Array, but will introduce a dedicated
      WasmSimd128 class in a follow-up CL.
      
      Bug: chromium:1071432
      Fixed: chromium:1159402
      Change-Id: I0671e5736c9c27d7ca376e23ed74f16d36e03c80
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2614428Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71962}
      cde7a77e
  6. 05 Jan, 2021 2 commits
    • Benedikt Meurer's avatar
      [inspector] Remove redundant tests. · adea008b
      Benedikt Meurer authored
      The wasm-scope-info-liftoff.js and wasm-set-breakpoint-liftoff.js tests
      were originally testing the Liftoff path (when we still had the Wasm
      interpreter), and have received some updates along the way. Nowadays the
      interpreter is going and the non-liftoff versions of these tests don't
      provide any additional test coverage, but are merely a slightly less
      updated version of the liftoff test.
      
      Bug: chromium:1162229
      Change-Id: Ifc9933d47f33674a83b99425ef9d0e4bc5550323
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609415
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71909}
      adea008b
    • Benedikt Meurer's avatar
      [inspector] Make wasm tests fail rather than time out. · 6f448efb
      Benedikt Meurer authored
      Consistently use InspectorTest.runAsyncTestSuite() in wasm inspector
      tests to make tests easier to debug (they'll fail instead of timing
      out in case of errors).
      
      Bug: chromium:1162229, chromium:1071432
      Change-Id: I7aada196f9e34071aa1bb059bb45f85f75226060
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609414
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71908}
      6f448efb
  7. 29 Dec, 2020 1 commit
    • Benedikt Meurer's avatar
      [wasm][debug] Expose instance and module instead of imports / exports. · ad42f966
      Benedikt Meurer authored
      The "imports" and "exports" that were exposed on WebAssembly frames via
      Debug-Evaluate aren't useful for the DWARF C/C++ extension (and likely
      not for any other language extension), since they only expose static
      information that's easily available (upfront) by reading the Wasm wire
      bytes.
      
      In fact, there are already standardized functions in the WebAssembly
      specification, namely `WebAssembly.Module.imports(module)` and
      `WebAssembly.Module.exports(module)`, which yield static information
      about the imports and exports of a Wasm module.
      
      So instead of exposing special, non-standard "imports" and "exports", we
      now instead expose both the "instance" and the "module" objects via both
      the Debug Proxy and the Scope view, and also add internal [[Exports]]
      and [[Imports]] properties to WasmModuleObject, which under the hood use
      the standard methods mentioned above.
      
      Fixed: chromium:1162069
      Bug: chromium:1071432, chromium:1083146
      Screenshot: https://imgur.com/lcaW2jL.png
      Doc: https://docs.google.com/document/d/1rqbu0jKTl3q_xCxLnKzkjGXWEsHnJ9aERVhKV9RNDgE#bookmark=id.925bb2qgou38
      Change-Id: Ie27e55bb08ea5f90493c57375bf2b48dfb11a4d2
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2606050
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71893}
      ad42f966
  8. 24 Dec, 2020 1 commit
    • Benedikt Meurer's avatar
      [wasm][debug] Make Scope order consistent. · f4d408fd
      Benedikt Meurer authored
      JavaScript scopes are reported from inner-most to outer-most, while
      previously we would report WebAssembly frames from outer-most to
      inner-most. This is quite confusing for developers, and also doesn't
      really make sense, so this CL fixes this inconsistency.
      
      Bug: chromium:1071432
      Change-Id: I6a4742f13b9a0df33e50c6fcd40992873996aaf5
      Fixed: chromium:1159309
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2602947
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Commit-Queue: Yang Guo <yangguo@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71875}
      f4d408fd
  9. 07 Dec, 2020 1 commit
    • Benedikt Meurer's avatar
      [wasm] Use WebAssembly.Memory objects in the scope chain. · 058299a8
      Benedikt Meurer authored
      Previously V8 would wrap the WebAssembly.Memory backing stores into
      Uint8Arrays and report that as memories, but that's confusing to the
      developer, since that's not what's really being used. The way that
      DevTools presents the backing stores of memories, it's still perfectly
      possible to get hold of an Uint8Array if that's what the developer is
      looking for.
      
      To make it possible to easily identify the WebAssembly.Memory objects
      in the DevTools front-end (in particular for the memory inspector) we
      add a 'webassemblymemory' subtype to the Chrome DevTools Protocol. We
      also improve the description for the memories to include the number
      of active pages.
      
      Fixed: chromium:1155566
      Screenshot: https://imgur.com/8enx57u.png
      Change-Id: I63dbabe0e372e9ad6dcc8e6642cdb743147a620c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2574699Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
      Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#71641}
      058299a8
  10. 30 Oct, 2020 1 commit
  11. 16 Oct, 2020 1 commit
  12. 05 Oct, 2020 1 commit
  13. 23 Sep, 2020 1 commit
  14. 16 Jun, 2020 1 commit
  15. 06 Jun, 2020 1 commit
  16. 03 Jun, 2020 1 commit
  17. 26 May, 2020 1 commit
  18. 19 May, 2020 1 commit
  19. 15 Apr, 2020 1 commit
  20. 07 Apr, 2020 1 commit
  21. 27 Mar, 2020 2 commits
  22. 26 Mar, 2020 1 commit
  23. 25 Mar, 2020 1 commit
  24. 11 Mar, 2020 1 commit
  25. 25 Feb, 2020 1 commit
  26. 18 Feb, 2020 1 commit
  27. 17 Feb, 2020 1 commit
  28. 14 Jan, 2020 1 commit
    • Clemens Backes's avatar
      [wasm][debug] Fix index-named locals · 4d69c548
      Clemens Backes authored
      This fixes local names that are the string representation of a valid
      element index.
      Even though both the Liftoff and the interpreter-based test are changed,
      only the latter needs to be fixed right now since Liftoff does not use
      the names currently. Modifying the test just ensures that we implement
      this correctly once we use the name.
      
      R=jkummerow@chromium.org
      
      Bug: v8:10019
      Change-Id: Ib7f7d6e244a344a85ab540b6c2c67f98b1f3078e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1998079
      Commit-Queue: Clemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65751}
      4d69c548
  29. 13 Jan, 2020 1 commit
  30. 09 Jan, 2020 1 commit
  31. 27 Dec, 2019 1 commit
  32. 22 Nov, 2019 1 commit
  33. 25 Oct, 2019 1 commit
  34. 24 Oct, 2019 3 commits
  35. 21 May, 2019 1 commit
  36. 10 May, 2019 1 commit