Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Issue 2650803003: [inspector] change target promise for kDebugWillHandle & kDebugDidHandle (Closed)

Created:
3 years, 11 months ago by kozy
Modified:
3 years, 11 months ago
Reviewers:
dgozman, Yang, gsathya
CC:
v8-reviews_googlegroups.com, devtools-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[inspector] change target promise for kDebugWillHandle & kDebugDidHandle - kDebugPromiseCreated(task, parent_task) This event occurs when promise is created (PromiseHookType::Init). V8Debugger uses this event to maintain task -> parent task map. - kDebugEnqueueAsyncFunction(task) This event occurs when first internal promise for async function is created. V8Debugger collects stack trace at this point. - kDebugEnqueuePromiseResolve(task), This event occurs when Promise fulfills with resolved status. V8Debugger collects stack trace at this point. - kDebugEnqueuePromiseReject(task), This event occurs when Promise fulfills with rejected status. V8Debugger collects stack trace at this point. - kDebugPromiseCollected, This event occurs when Promise is collected and no other chained callbacks can be added. V8Debugger removes information about async task for this promise. - kDebugWillHandle, This event occurs when chained promise function (either resolve or reject handler) is called. V8Debugger installs parent promise's stack (based on task -> parent_task map) as current if available or current promise's scheduled stack otherwise. - kDebugDidHandle, This event occurs after chained promise function has finished. V8Debugger restores asynchronous call chain to previous one. With this change all instrumentation calls are related to current promise (before WillHandle and DidHandle were related to next async task). Before V8Debugger supported only the following: - asyncTaskScheduled(task1) - asyncTaskStarted(task1) - asyncTaskFinished(task1) Now V8Debugger supports the following: - asyncTaskScheduled(parent_task) .. - asyncTaskCreated(task, parent_task), - asyncTaskStarted(task), uses parent_task scheduled stack - asyncTaskScheduled(task) - asyncTaskFinished(task) Additionally: WillHandle and DidHandle were migrated to PromiseHook API. More details: https://docs.google.com/document/d/1u19N45f1gSF7M39mGsycJEK3IPyJgIXCBnWyiPeuJFE BUG=v8:5738 R=dgozman@chromium.org,gsathya@chromium.org,yangguo@chromium.org Review-Url: https://codereview.chromium.org/2650803003 Cr-Commit-Position: refs/heads/master@{#42644} Committed: https://chromium.googlesource.com/v8/v8/+/cb545a8c0ca79440d40515df86335a3c28c10965

Patch Set 1 #

Patch Set 2 : remove more code #

Patch Set 3 : needs fix for async functions.. #

Patch Set 4 : ready for review #

Total comments: 10

Patch Set 5 : fixed tests #

Total comments: 1

Patch Set 6 : added missing guard in asyncTaskCreated #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -192 lines) Patch
M src/assembler.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/assembler.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/builtins/builtins-promise.cc View 13 chunks +11 lines, -22 lines 0 comments Download
M src/code-stub-assembler.h View 1 chunk +1 line, -1 line 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 2 chunks +7 lines, -7 lines 0 comments Download
M src/debug/debug.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/debug/debug.cc View 1 2 3 4 3 chunks +58 lines, -1 line 0 comments Download
M src/debug/debug-interface.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/debug/interface-types.h View 1 chunk +1 line, -1 line 0 comments Download
M src/external-reference-table.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M src/inspector/v8-debugger.h View 2 chunks +5 lines, -2 lines 0 comments Download
M src/inspector/v8-debugger.cc View 1 2 3 4 5 7 chunks +16 lines, -10 lines 0 comments Download
M src/isolate.h View 2 chunks +6 lines, -2 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 4 chunks +10 lines, -27 lines 0 comments Download
M src/objects.h View 2 chunks +2 lines, -6 lines 0 comments Download
M src/objects-debug.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M src/objects-inl.h View 2 chunks +0 lines, -2 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M src/runtime/runtime-debug.cc View 1 2 3 1 chunk +0 lines, -7 lines 0 comments Download
M src/runtime/runtime-promise.cc View 1 2 3 4 2 chunks +15 lines, -81 lines 2 comments Download
M test/cctest/test-code-stub-assembler.cc View 3 chunks +1 line, -3 lines 0 comments Download
M test/inspector/debugger/async-instrumentation.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M test/inspector/debugger/async-instrumentation-expected.txt View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (21 generated)
kozy
Dmitry, please take a look on inspector changes. Sathya, please take a look one one ...
3 years, 11 months ago (2017-01-24 17:06:25 UTC) #6
dgozman
Looks good, but let's figure out the tests. https://codereview.chromium.org/2650803003/diff/60001/src/debug/debug.cc File src/debug/debug.cc (right): https://codereview.chromium.org/2650803003/diff/60001/src/debug/debug.cc#newcode1929 src/debug/debug.cc:1929: bool ...
3 years, 11 months ago (2017-01-24 18:13:51 UTC) #12
kozy
all done, please take another look! https://codereview.chromium.org/2650803003/diff/60001/src/debug/debug.cc File src/debug/debug.cc (right): https://codereview.chromium.org/2650803003/diff/60001/src/debug/debug.cc#newcode1929 src/debug/debug.cc:1929: bool is_async = ...
3 years, 11 months ago (2017-01-24 18:41:41 UTC) #13
dgozman
lgtm
3 years, 11 months ago (2017-01-24 20:06:54 UTC) #20
gsathya
nice cleanup! https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc File src/runtime/runtime-promise.cc (right): https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc#newcode150 src/runtime/runtime-promise.cc:150: CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); Why do we have ...
3 years, 11 months ago (2017-01-24 20:18:07 UTC) #21
kozy
https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc File src/runtime/runtime-promise.cc (right): https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc#newcode150 src/runtime/runtime-promise.cc:150: CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); On 2017/01/24 20:18:07, gsathya wrote: > ...
3 years, 11 months ago (2017-01-24 20:40:23 UTC) #22
kozy
On 2017/01/24 20:18:07, gsathya wrote: > nice cleanup! > > https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc > File src/runtime/runtime-promise.cc (right): ...
3 years, 11 months ago (2017-01-24 20:42:36 UTC) #23
gsathya
On 2017/01/24 20:40:23, kozy wrote: > https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc > File src/runtime/runtime-promise.cc (right): > > https://codereview.chromium.org/2650803003/diff/100001/src/runtime/runtime-promise.cc#newcode150 > ...
3 years, 11 months ago (2017-01-24 21:00:54 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650803003/100001
3 years, 11 months ago (2017-01-25 00:20:47 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/33255)
3 years, 11 months ago (2017-01-25 00:24:17 UTC) #28
kozy
Yang, please take a look on src/debug*
3 years, 11 months ago (2017-01-25 01:52:12 UTC) #29
Yang
On 2017/01/25 01:52:12, kozy wrote: > Yang, please take a look on src/debug* lgtm.
3 years, 11 months ago (2017-01-25 06:56:02 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650803003/100001
3 years, 11 months ago (2017-01-25 07:03:45 UTC) #32
commit-bot: I haz the power
3 years, 11 months ago (2017-01-25 07:05:51 UTC) #35
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/v8/v8/+/cb545a8c0ca79440d40515df86335a3c28c...

Powered by Google App Engine
This is Rietveld 408576698