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

Issue 855383002: DevTools: use async operation id instead of AsyncCallChain (Closed)

Created:
5 years, 11 months ago by yurys
Modified:
5 years, 11 months ago
Reviewers:
aandrey
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, malch+blink_chromium.org, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, paulirish+reviews_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, sergeyv+blink_chromium.org, aandrey+blink_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

DevTools: use async operation id instead of AsyncCallChain Debugger agent API now allows to assign asinc operation a unique identifier and use it to trace that operation. Async operation id returned by traceAsyncOperationStarting is always valid and greater than zero (HashMap would crash on store/lookup of special values like -1 and 0 in it, to avoid that we just make sure that the key is always >0) hence there is no need to check if its valid or not anymore. If the client needs to report that a callback is starting executing but its operation id is unknown (e.g. because the tracking was off when the operation started) it just passes InspectorDebuggerAgent::unknownAsyncOperationId as it id. BUG=439376 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188733

Patch Set 1 #

Total comments: 20

Patch Set 2 : Addressed comments #

Patch Set 3 : Remove unnecessary checks as operationId is always valid now #

Patch Set 4 : Rebase #

Patch Set 5 : Fixed assert #

Total comments: 6

Patch Set 6 : Addressed comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -92 lines) Patch
M Source/core/inspector/AsyncCallChainMap.h View 4 chunks +8 lines, -8 lines 0 comments Download
M Source/core/inspector/AsyncCallTracker.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/AsyncCallTracker.cpp View 1 2 18 chunks +25 lines, -53 lines 0 comments Download
M Source/core/inspector/InspectorDebuggerAgent.h View 1 4 chunks +9 lines, -5 lines 0 comments Download
M Source/core/inspector/InspectorDebuggerAgent.cpp View 1 2 3 4 5 7 chunks +29 lines, -21 lines 2 comments Download
M Source/core/inspector/V8AsyncCallTracker.cpp View 1 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
yurys
5 years, 11 months ago (2015-01-19 15:46:06 UTC) #2
aandrey
looks good https://codereview.chromium.org/855383002/diff/1/Source/core/inspector/AsyncCallTracker.cpp File Source/core/inspector/AsyncCallTracker.cpp (right): https://codereview.chromium.org/855383002/diff/1/Source/core/inspector/AsyncCallTracker.cpp#newcode56 Source/core/inspector/AsyncCallTracker.cpp:56: const int noOperationId = 0; noAsyncOperationId or ...
5 years, 11 months ago (2015-01-20 14:33:36 UTC) #3
yurys
https://codereview.chromium.org/855383002/diff/1/Source/core/inspector/AsyncCallTracker.cpp File Source/core/inspector/AsyncCallTracker.cpp (right): https://codereview.chromium.org/855383002/diff/1/Source/core/inspector/AsyncCallTracker.cpp#newcode56 Source/core/inspector/AsyncCallTracker.cpp:56: const int noOperationId = 0; On 2015/01/20 14:33:35, aandrey ...
5 years, 11 months ago (2015-01-20 17:15:39 UTC) #4
yurys
PTAL
5 years, 11 months ago (2015-01-21 06:48:09 UTC) #7
aandrey
lgtm https://codereview.chromium.org/855383002/diff/80001/Source/core/inspector/InspectorDebuggerAgent.cpp File Source/core/inspector/InspectorDebuggerAgent.cpp (right): https://codereview.chromium.org/855383002/diff/80001/Source/core/inspector/InspectorDebuggerAgent.cpp#newcode135 Source/core/inspector/InspectorDebuggerAgent.cpp:135: , m_lastAsyncOperationId(1) 1 -> 0 https://codereview.chromium.org/855383002/diff/80001/Source/core/inspector/InspectorDebuggerAgent.cpp#newcode1070 Source/core/inspector/InspectorDebuggerAgent.cpp:1070: RefPtrWillBeRawPtr<AsyncCallChain> ...
5 years, 11 months ago (2015-01-21 08:39:45 UTC) #8
yurys
https://codereview.chromium.org/855383002/diff/80001/Source/core/inspector/InspectorDebuggerAgent.cpp File Source/core/inspector/InspectorDebuggerAgent.cpp (right): https://codereview.chromium.org/855383002/diff/80001/Source/core/inspector/InspectorDebuggerAgent.cpp#newcode135 Source/core/inspector/InspectorDebuggerAgent.cpp:135: , m_lastAsyncOperationId(1) On 2015/01/21 08:39:45, aandrey wrote: > 1 ...
5 years, 11 months ago (2015-01-21 08:50:05 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/855383002/100001
5 years, 11 months ago (2015-01-21 08:50:45 UTC) #11
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://src.chromium.org/viewvc/blink?view=rev&revision=188733
5 years, 11 months ago (2015-01-21 11:43:54 UTC) #12
aandrey
https://codereview.chromium.org/855383002/diff/100001/Source/core/inspector/InspectorDebuggerAgent.cpp File Source/core/inspector/InspectorDebuggerAgent.cpp (right): https://codereview.chromium.org/855383002/diff/100001/Source/core/inspector/InspectorDebuggerAgent.cpp#newcode1082 Source/core/inspector/InspectorDebuggerAgent.cpp:1082: m_asyncOperations.set(m_lastAsyncOperationId, chain); there should be corresponding m_asyncOperations.remove() somewhere
5 years, 11 months ago (2015-01-21 12:51:27 UTC) #13
yurys
5 years, 11 months ago (2015-01-21 13:05:22 UTC) #14
Message was sent while issue was closed.
https://codereview.chromium.org/855383002/diff/100001/Source/core/inspector/I...
File Source/core/inspector/InspectorDebuggerAgent.cpp (right):

https://codereview.chromium.org/855383002/diff/100001/Source/core/inspector/I...
Source/core/inspector/InspectorDebuggerAgent.cpp:1082:
m_asyncOperations.set(m_lastAsyncOperationId, chain);
On 2015/01/21 12:51:27, aandrey wrote:
> there should be corresponding m_asyncOperations.remove() somewhere

Good catch, thank you! Please take a look at the fix
https://codereview.chromium.org/849333003/

Powered by Google App Engine
This is Rietveld 408576698