- 09 Jun, 2022 1 commit
-
-
Michael Lippautz authored
Users can just use std::vector<Global<T>>. Bug: v8:12915 Change-Id: I59fc8458e336df0dfaa3524f1197d4423482530e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695578Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81023}
-
- 29 Apr, 2022 1 commit
-
-
Simon Zünd authored
Doc: https://bit.ly/revive-restart-frame This CL adds the V8 debugger part of the restart frame logic as well as some bits for the inspector. The CL is centered around two key pieces: When the user requests a restart, we stash the stack frame ID (aka the stack pointer) and optionally the inlined frame index for optimized frames, and then continue execution. Once execution bubbles back into JS land, we throw a termination exception when a frame restart was requested. Note that the CL doesn't hook up the logic yet to CDP and the CL also does not the actual handling of the termination exception in the unwinder. R=bmeurer@chromium.org, kimanh@chromium.org Bug: chromium:1303521 Change-Id: I12cfb408c66072dd19f8180e530f84c987d1374d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3613383Reviewed-by:
Kim-Anh Tran <kimanh@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/main@{#80272}
-
- 22 Feb, 2022 1 commit
-
-
Kim-Anh Tran authored
Calling didContinue() after having paused on an instrumentation break clears the breakpoint reasons that were stored in the debugger agent. This removes clearBreakDetails() from didContinue() and specifically calls it if we need it. Drive-by: removing left-over dead code Bug: chromium:1229541 Change-Id: I49f598d0e97801661e003c3911967c64ea63373e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3477099Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#79203}
-
- 11 Feb, 2022 1 commit
-
-
Kim-Anh Tran authored
This changes the way how we are handling instrumentation breakpoints. Motivation: with instrumentation breakpoints, we need a way to break on (conditional) breakpoints that were just set by the client on the instrumentation pause. How: We want to first find out if we have an instrumentation break, and trigger a pause. For this to work, we need to distinguish between regular and instrumentation breakpoints in the debugger back-end. On resume, we want to check if we have hit any breakpoints (may now contain new breakpoints due to the client setting new breakpoints at the previous instrumentation pause) and trigger a separate pause for them. Fixed: chromium:1292930 Change-Id: Idaadd276c44c693f856c4b08c7a72ea67271f420 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3442676Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#79053}
-
- 08 Feb, 2022 1 commit
-
-
Benedikt Meurer authored
Previously the inspector was trying to handle step-out for async functions by annotating the async stacks, but this was merely a hack and didn't work reliably (a) when the async caller that is `await`ing the result of the callee was still in the synchronous part (because then there was no async task yet in the inspector), or (b) not at all when the async stack tracking wasn't enabled or the maximum async stack depth was too small. This CL replaces that hack with a pragmatic solution inside the V8 debugger, where upon `await` we memorize the async function object of the caller on the outer promise of the callee, and when stepping out of the callee we check whether the returned promise has a memorized async function object and if so, we schedule that to resume. This CL thereby effectively reverts https://crrev.com/c/1054618 and replaces it with a V8 debug solution, and thereby further reduces the (memory) overhead of an AsyncStackTrace. Fixed: chromium:1246867 Bug: v8:6161, v8:7753, chromium:1277451, chromium:1280519 Change-Id: I6aa79e90f49d204f66bfd37e7a328c7fb8d635b1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3439865Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78990}
-
- 04 Feb, 2022 1 commit
-
-
Alex Turner authored
This method returns the unique debugger ID for a v8::Context (i.e. the V8DebuggerID), serialized to a pair of int64_ts. Bug: v8:12528 Change-Id: Ib2cdda73447f8233f9afb773fed4a634d4618aef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3369124Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Alex Turner <alexmt@chromium.org> Cr-Commit-Position: refs/heads/main@{#78958}
-
- 01 Feb, 2022 2 commits
-
-
Kim-Anh Tran authored
This explicitly passes along the break reason when requesting a pause that is handled via an interrupt. Pushing the break reason is not enough (as done before), as the reason may be used and consumed on another pause call that triggers a setPauseOnNextCall. Fixed: chromium:1292519 Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Auto-Submit: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#78885}
-
Kim-Anh Tran authored
Bug: none Change-Id: I00903b3d709106b0aa6493bec916c70fa522b529 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3429199 Auto-Submit: Kim-Anh Tran <kimanh@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/main@{#78882}
-
- 13 Jan, 2022 1 commit
-
-
Benedikt Meurer authored
This unifies and simplifies the way we instrument async functions for the purpose of async stack traces and async stepping. It does so while retaining the observable behavior on the inspector level (for now). Previously we'd mark the implicit promise of the async function object with the async task ID, and whenever we awaited, we'd copy the async task ID to the throwaway promise that is created by the `await`. This however made things unnecessarily interesting in the following regards: 1. We'd see `DebugDidHandle` and `DebugWillHandle` events after the `AsyncFunctionFinished` events, coming from the throwaway promises, while the implicit promise is "done". This is especially confusing with rejection propagation and requires very complex stepping logic for async functions (after this CL it'll be possible to unify and simplify the stepping logic). 2. We have to thread through the "can suspend" information from the Parser all the way through AsyncFunctionReject/AsyncFunctionResolve to the async function instrumentation to decide whether to cancel the pending task when the async function finishes. This CL changes the instrumentation to only happen (non recurringly) for the throwaway promises allocated upon `await`. This solves both problems mentioned above, and works because upon the first `await` the stack captured for the throwaway promise will include the synchronous part as expected, while upon later `await`s the synchronous part will be empty and the asynchronous part will be the stack captured for the previous throwaway promise (and the V8Debugger automatically short circuits stacks with empty synchronous part). Bug: chromium:1280519, chromium:1277451, chromium:1246867 Change-Id: Id604dabc19ea133ea2e9dd63181b1fc33ccb5eda Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3383775Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Maya Lekova <mslekova@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78599}
-
- 04 Jan, 2022 1 commit
-
-
Benedikt Meurer authored
This change fixes the implementation of the previously introduced API `Runtime.setMaxCallStackSizeToCapture` to work correctly and also apply (consistently) to stack traces captured by V8 when exceptions are thrown. It does so in a fully backwards compatible manner. This change thus makes the previous fix for catapult (which landed in http://crrev.com/c/3347789) effective, and therefore ensures that real world performance benchmarks aren't affected by the use of the `Runtime` domain in the catapult test framework. Note this is basically a reland of crrev.com/c/3361839, but without touching the stack traces for console messages (which led to the regressions in crbug/1283516, crbug/1283523, etc.). Fixed: chromium:1280831 Bug: chromium:1283162, chromium:1278650, chromium:1258599 Bug: chromium:1280803, chromium:1280832, chromium:1280818 Doc: https://bit.ly/v8-cheaper-inspector-stack-traces Change-Id: I3dcec7b75d76ca267fac8bd6fcb2cda60d5e60dd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3364086Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78479}
-
- 03 Jan, 2022 1 commit
-
-
Benedikt Meurer authored
This reverts commit 34f73cc7. Reason for revert: Performance regressions throughout a lot of system health and browsing benchmarks. Original change's description: > [inspector] Fix `Runtime.setMaxCallStackSizeToCapture`. > > This change fixes the implementation of the previously introduced API > `Runtime.setMaxCallStackSizeToCapture` to work correctly and also apply > (consistently) to stack traces captured by V8 when exceptions are > thrown. It does so in a fully backwards compatible manner. > > This change thus makes the previous fix for catapult (which landed in > http://crrev.com/c/3347789) effective, and therefore ensures that real > world performance benchmarks aren't affected by the use of the `Runtime` > domain in the catapult test framework. > > Bug: chromium:1283162, chromium:1278650, chromium:1258599 > Bug: chromium:1280803, chromium:1280832, chromium:1280818 > Fixed: chromium:1280831 > Doc: https://bit.ly/v8-cheaper-inspector-stack-traces > Change-Id: I4ec951a858317fa49096cd4023deb0104d92c9c9 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3361839 > Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> > Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> > Reviewed-by: Yang Guo <yangguo@chromium.org> > Cr-Commit-Position: refs/heads/main@{#78458} Bug: chromium:1283162, chromium:1278650, chromium:1258599 Bug: chromium:1280803, chromium:1280832, chromium:1280818 Bug: chromium:1280831 Change-Id: Id1efaffa2f7f08c47f833f68b8a297494edee21e Fixed: chromium:1283751, chromium:1283749, chromium:1283746 Fixed: chromium:1283729, chromium:1283700, chromium:1283700 Fixed: chromium:1283691, chromium:1283687, chromium:1283678 Fixed: chromium:1283677, chromium:1283676, chromium:1283675 Fixed: chromium:1283674, chromium:1283618, chromium:1283536 Fixed: chromium:1283523, chromium:1283516 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3364078 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/main@{#78462}
-
- 31 Dec, 2021 1 commit
-
-
Benedikt Meurer authored
This change fixes the implementation of the previously introduced API `Runtime.setMaxCallStackSizeToCapture` to work correctly and also apply (consistently) to stack traces captured by V8 when exceptions are thrown. It does so in a fully backwards compatible manner. This change thus makes the previous fix for catapult (which landed in http://crrev.com/c/3347789) effective, and therefore ensures that real world performance benchmarks aren't affected by the use of the `Runtime` domain in the catapult test framework. Bug: chromium:1283162, chromium:1278650, chromium:1258599 Bug: chromium:1280803, chromium:1280832, chromium:1280818 Fixed: chromium:1280831 Doc: https://bit.ly/v8-cheaper-inspector-stack-traces Change-Id: I4ec951a858317fa49096cd4023deb0104d92c9c9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3361839 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/main@{#78458}
-
- 30 Dec, 2021 1 commit
-
-
Benedikt Meurer authored
This introduces a new `GetLocation()` method for `v8::StackFrame`s, which returns both line and column number at the same time (using the existing `v8::Location` class). Since `v8::StackFrame` instances store only the source position (per https://bit.ly/v8-stack-frame), we currently need to look up the source position in the Script's line table twice, once when we request the line number, and another time when we request the column number. With `GetLocation()` we perform only a single lookup in the Script's line table and return both line and column number at the same time. This cuts roughly 8% of the average execution time from the `standalone.js` benchmark mentioned in crbug.com/1280519. Bug: chromium:1280519, chromium:1278650, chromium:1069425 Bug: chromium:1077657, chromium:1283162 Doc: https://bit.ly/v8-cheaper-inspector-stack-traces Change-Id: Ia3a0502990b6230363112a358b59875283399404 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3359628Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78452}
-
- 08 Dec, 2021 1 commit
-
-
Benedikt Meurer authored
On the way to a cheaper and more scalable stack frame representation for the inspector (crbug/1258599), this removes the need to expose both what was called "function name" and what was called "function debug name" on a v8::StackFrame instance. The reason to having a distinction between that the V8 API exposes and what the inspector exposes as frame function name is that after the initial refactoring around v8::internal::StackFrameInfo, some wasm cctests would still dig into the implementation details and insist on seeing the "function name" rather than the "function debug name". This CL now addresses that detail in the wasm cctests and going forward unifies the function names used by the inspector and the V8 API (which is not only needed for internal consistency and reduced storage requirements in the future, but also because Blink for example uses v8 API and v8_inspector API interchangeably and assumes that they agree, even though at this point Blink luckily wasn't paying attention to the function name): - The so-called "detailed stack trace", which is produced for the inspector and exposed by the v8 API, always yields the "function debug name" (which for example in case of wasm will be a WAT compatible name), - while the so-called "simple stack trace", which is what is used to implement the CallSite API and underlies Error.stack continues to stick to the "function name" which in case of wasm is not WAT compatible). Bug: chromium:1258599 Change-Id: Ib15d038f3ec893703d0f7b03f6e7573a38e82b39 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3312274Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78283}
-
- 07 Dec, 2021 2 commits
-
-
Kim-Anh Tran authored
This removes the additional call to `didPause` solely for instrumentation breakpoints. They will be reported along with any other pause reasons, and if several apply, 'ambiguous' will be reported as a reason. Bug: chromium:1229541 Change-Id: I38557248dc2274c2ff2c396aa19073f4a5c5abd5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300134Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#78271}
-
Simon Zünd authored
R=bmeurer@chromium.org Bug: chromium:1267427 Change-Id: Ibee0fb62fda5f834b1866e2b6ae17bebca34f4ba Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3317425 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/main@{#78267}
-
- 02 Dec, 2021 1 commit
-
-
Kim-Anh Tran authored
This CL makes sure to forward the information that we are pausing because of a debugger statement, and to encode it explicitly as an 'other' reason when reporting the pause to the front-end. Drive-by: refactoring the way break reasons are propagated by introducing a new enum for break reasons Bug: chromium:1229541, chromium:1133307 Change-Id: I9d2e8d8da54d96a231eff9d1f62b74507955b18f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306978Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#78202}
-
- 29 Nov, 2021 2 commits
-
-
Benedikt Meurer authored
With https://crrev.com/c/3272577 we introduced a `StackFrame` cache for the inspector, which is keyed on the script ID, line and column number, so the syntactic properties of the function. However, the name that we report for functions is dynamic and can change (per closure) by explicitly reconfiguring the "name" property via ```js var f = function() { /* ... */ } Object.defineProperty(f, "name", {value: "super duper function"}); ``` for example, so we need to take that into account as well, and only use the cached `StackFrame` instance if the dynamic names still match up. Otherwise we just overwrite the cached entry with a new instance (the assumption here is that "name" isn't reconfigured often). Fixed: chromium:1274529 Bug: chromium:1268436 Change-Id: I519017c762aed5b4f93b9dc4553fa81d5979f1a1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306376 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/main@{#78127}
-
Kim-Anh Tran authored
Previously, we would encode 'other' as a reason for pausing when stepping too, however, it would not show as such in case it would overlap with another reason. This CL makes sure that we always report 'other' as a reason if we are stepping. Drive-by: only encode 'other' as a reason once Bug: chromium:1229541 Change-Id: Id73822dff68d1d54a2f1fafdf2a097e1377ece75 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3295346Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#78118}
-
- 11 Nov, 2021 1 commit
-
-
Benedikt Meurer authored
This introduces a stack frame cache on the V8Debugger level, which de-duplicates StackFrame instances based on their scriptId, line and column number. This greatly reduces the memory pressure when debugging huge Web applications that have a lot of async activity (and potentially have scripts with huge URLs). This is guided by the observation that even in huge applications, there are only a very limited number of call sites that initiate async activity and hence we only have a limited number of distinct StackFrames to worry about (despite having to maintain a large number of async stack traces overall). As a nice side effect, this CL also greatly reduces the negative performance impact of collecting async stack traces in these huge applications. Generally speaking this is mostly duct tape however, and we might want to follow up with changes to make capturing (and storing) stack frames even cheaper. Fixed: chromium:1268436 Change-Id: Ib212b3c97dce2bb7ca47d5875d45cf20b9b97afe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3272577 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/main@{#77835}
-
- 13 Oct, 2021 1 commit
-
-
Benedikt Meurer authored
There's no point in maintaining a separate counter for the size of a `std::list`. Also changing the type to `size_t` consistently. Bug: chromium:1257637 Change-Id: I4f938b9888bb09cd1223ae6b6ae1db0fa1181096 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3220332 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/main@{#77376}
-
- 12 Oct, 2021 1 commit
-
-
Kim-Anh Tran authored
The previous implementation would not explicitly send `Debugger.paused` events for instrumentation breakpoints if they were to overlap with breaks due to: * regular breakpoints * OOM * exceptions * asserts This CL is a step towards making sure that a separate `Debugger.paused` event is always sent for an instrumentation breakpoint. In some cases where we have overlapping reasons but only know of one, the 'instrumentation' reason, we still just send out one paused event with the reason being `instrumentation`. Drive-by: send instrumentation notification to all sessions, remember which breakpoints are instrumentation breakpoints Bug: chromium:1229541, chromium:1133307 Change-Id: Ie15438f78b8b81a89c64fa291ce7ecc36ebb2182 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3211892Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#77333}
-
- 08 Oct, 2021 1 commit
-
-
Benedikt Meurer authored
The V8Debugger maintains a list of async stack traces that were captured so far, two mappings pointing weakly to async stack traces in this (one mapping for tasks and one mapping for stored async stack traces). The V8Debugger regularly prunes the list (and cleans up the stale weak pointers afterwards) by going through the list in insertion order and removing items until the number is below half the limit of 128k entries. This approach wastes a lot of memory, since the list grows very big before this manual collection starts, and it doesn't pay any attention to whether the stack traces are still in active use or not. Also the limit of 128k seems incredibly high (and arbitrary). This leads to crashes observed in applications with lots of async task activity (i.e. huge Angular applications) as soon as the debugger is attached. This CL performs a quickfix by reducing the limit for async stack traces to a more reasonable number of 8k. We will need to follow up with a proper fix that ensures that we only hold on strongly to async stack traces that are still in need. Also-By: jarin@chromium.org Fixed: chromium:1258000 Bug: chromium:1257637, chromium:1254279, chromium:1203218 Change-Id: I2c482a688df4c6df575a0045d443db89d89b3d73 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3211709 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/main@{#77301}
-
- 30 Sep, 2021 1 commit
-
-
Benedikt Meurer authored
The V8 Inspector was sending an additional frame as part of async stack traces for async functions, which pointed to the first executed `await` in the async function. This is leaking an implementation detail of how (and more precisely when) the inspector decides to collect this stack trace. From the users perspective the async part of the stack trace is supposed to capture what happened _prior to the task_ - meaning in case of async functions: What lead to the execution of the async function. This is reflected by the fact that the DevTools front-end (and the V8 Inspector itself) performs post-processing on these async call stacks, removing the misleading top frame from it. But this post-processing is not applied consistently to all async stack traces (i.e. the Console message stack traces don't get this), and potentially also not applied consistently across consumers of the Chromium debugger backend. Instead the V8 Inspector now removes the top frame itself and thus reports `await` consistently with how other async tasks are reported to debugger front-ends. Note: This preserves backwards compatibility with old versions of devtools-frontend, which do post-processing (for the Call Stack) only on async stack traces marked with "async function", while we now mark these async stack traces with "await" instead (aligned with what the front-end is using as user visibile string anyways in the Call Stack section, and this matching will be updated in a separate follow up CL to look for "await" instead of "async function"). Before: https://imgur.com/kIrWcIc.png After: https://imgur.com/HvZGqiP Fixed: chromium:1254259 Bug: chromium:1229662 Change-Id: I57ce051a28892177b6b96221f083ae957f967e52 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3193535 Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#77157}
-
- 27 Sep, 2021 1 commit
-
-
Ng Zhi An authored
Bug: v8:12244 Change-Id: I57a54b43c1821b57ef45de38c4d7782534f74d2d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3183521Reviewed-by:
Simon Zünd <szuend@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/main@{#77098}
-
- 24 Aug, 2021 1 commit
-
-
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:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Simon Zünd <szuend@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/main@{#76460}
-
- 23 Aug, 2021 2 commits
-
-
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}
-
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:
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}
-
- 16 Aug, 2021 1 commit
-
-
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:
Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Cr-Commit-Position: refs/heads/master@{#76302}
-
- 23 Jul, 2021 1 commit
-
-
Benedikt Meurer authored
The AsyncStackTrace had some magical self-healing where it'd try to not stitch together async stack traces when the instrumentation seemed to be broken. This silent self-healing however seems to be broken itself, and instead of papering over the problem we should fix instrumentation bugs when they are observed. Fixed: chromium:1231064 Change-Id: I2bcc85679abdbe6f4df4866cb951c5f6cefb4f67 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3048181 Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#75885}
-
- 01 Jul, 2021 1 commit
-
-
Peter Kasting authored
There are still a few cases remaining that seem more controversial; I'll upload those separately. Bug: chromium:1066980 Change-Id: Iabbaf23f9bbe97781857c0c589f2b3db685dfdc2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2994804 Commit-Queue: Peter Kasting <pkasting@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#75494}
-
- 01 Jun, 2021 1 commit
-
-
Benedikt Meurer authored
In the Chrome DevTools Protocol, the step actions are named StepOut, StepOver, and StepInto, but internally we used StepOut, StepNext, and StepIn instead. This change adjusts the naming to be consistent. Bug: chromium:901814, chromium:1162229 Change-Id: Id3502a1b0a4aadd94734ec3d1fef73c1782fa220 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928510Reviewed-by:
Yang Guo <yangguo@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74877}
-
- 27 May, 2021 1 commit
-
-
Scott Violet authored
When 'beforeScriptExecution' is enabled, a pause event may be generated with a reason of 'instrumentation' rather than 'other.' This patch ensures that in the case of a schedule-break, both an 'instrumentation' and 'other' pause event is generated. This is important for debuggers that rely on getting 'other' breakpoints to determine if they should actually break, or continue executation. Change-Id: I73613f4df6fa7942e7ca2be58853e5420589ba0f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2915680Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#74827}
-
- 30 Apr, 2021 1 commit
-
-
Clemens Backes authored
cpplint rules change over time, and we change the exact rules we enable for v8. This CL removes NOLINT annotations which are not needed according to the currently enabled rules. R=szuend@chromium.org Bug: v8:11717 Change-Id: Icce08a55509b06bacfc75276a2ae69c59e8b021d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859951Reviewed-by:
Simon Zünd <szuend@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#74298}
-
- 02 Mar, 2021 1 commit
-
-
Clemens Backes authored
This removes all wasm includes from src/debug and src/inspector if webassembly is disabled (v8_enable_webassembly=false). It also removes the definition of {WasmValueObject} and {v8::debug::WasmScript}. This will allow to later fully exclude the src/wasm directory from compilation (once other components are fixed). R=bmeurer@chromium.org, machenbach@chromium.org Bug: v8:11238 Change-Id: I41a1d83d01fbb6c015cdfd6cc063bad90052505d Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2726506Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Maya Lekova <mslekova@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#73138}
-
- 16 Feb, 2021 1 commit
-
-
Sathya Gunasekaran authored
The current API returns a Handle<NativeContext> which can be optionally null and all the users of this API never actually checked for this null value. Previously, this wasn't a problem as all the possible JSObjects that were user visible would return a valid NativeContext but now there are wasm objects that don't have a valid constructor so don't have a NativeContext. Bug: v8:11451, chromium:1166077 Change-Id: I4fd5edf8f1a750e6f0abb931fd41358e5ae4dfcf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692695 Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#72769}
-
- 24 Dec, 2020 1 commit
-
-
Yang Guo authored
If we attempt to pause, we'd check whether frames are framework code which we pattern match with a regexp. That could cause re-entering regexp, which is not allowed. Fixed: chromium:1125934 Change-Id: I3b52b202a5570f7929def39176cfe5e52be3dfd5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2602948 Commit-Queue: Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#71876}
-
- 23 Dec, 2020 1 commit
-
-
Andrey Kosyakov authored
This adds ExecutionContextDescription.uniqueId for a system-unique way to identify an execution context and supports it in Runtime.evaluate. This allows a client to avoid accidentally executing an expression in a context different from that originally intended if a navigation occurs while Runtime.evaluate is in flight. Design doc: https://docs.google.com/document/d/1vGVWvKP9FTTX6kimcUJR_PAfVgDeIzXXITFpl0SyghQ Bug: v8:11268, chromium:1101897 Change-Id: I4c6bec562ffc85312559316f639d641780144039 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2594538 Commit-Queue: Andrey Kosyakov <caseq@chromium.org> Reviewed-by:
Dmitry Gozman <dgozman@chromium.org> Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#71869}
-
- 22 Dec, 2020 1 commit
-
-
Andrey Kosyakov authored
This lets embedder to produce an id with sufficient entropy to facilitate an id appropriate for a multi-process system and immune to regular RNG seed being overriden, while maintaining deterministic id allocation for tests. Design doc: https://docs.google.com/document/d/1vGVWvKP9FTTX6kimcUJR_PAfVgDeIzXXITFpl0SyghQ Related blink-side change: https://chromium-review.googlesource.com/c/chromium/src/+/2600273 Bug: v8:11268 Change-Id: I1a4d12463cf56d4378859dfa3ee4d717e176d468 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2600442Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Yang Guo <yangguo@chromium.org> Commit-Queue: Andrey Kosyakov <caseq@chromium.org> Cr-Commit-Position: refs/heads/master@{#71864}
-
- 28 Nov, 2020 1 commit
-
-
Camillo Bruni authored
Bug: v8:11195 Change-Id: I19211af9e440940f85351fb38920eb620c222213 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555010Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Victor Gomes <victorgomes@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#71465}
-