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

Issue 2633803002: [inspector] implemented blackboxing inside v8 (Closed)

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

Description

[inspector] implemented blackboxing inside v8 V8 has internal mechanism to ignore steps and breaks inside internal scripts, in this CL it's reused for blackboxing implementation. Advantages: - much faster blackboxing implementation (before we at least wrap and collect current call stack for each step), - get rid of StepFrame action and potential pause in blackboxed code after N StepFrame steps, - simplification of debugger agent logic. Disadvtanges: - currently when user was paused in blackboxed code (e.g. on breakpoint) and then makes step action, debugger ignores blackboxed state of the script and allows to use step actions as usual - this behavior is regressed, we still able to support it on frontend side. Current state and proposed changes for blackboxing: https://docs.google.com/document/d/1hnzaXPAN8_QC5ENxIgxgMNDbXLraM_OXT73rAyijTF8/edit?usp=sharing BUG=v8:5842 R=yangguo@chromium.org,dgozman@chromium.org,alph@chromium.org Review-Url: https://codereview.chromium.org/2633803002 Cr-Commit-Position: refs/heads/master@{#42614} Committed: https://chromium.googlesource.com/v8/v8/+/ac50c79a3e07cbe3c420ce55c1a3e0e3d5bd6454

Patch Set 1 #

Patch Set 2 : better test #

Patch Set 3 : migrate to V8.. #

Patch Set 4 : a #

Patch Set 5 : format test #

Patch Set 6 : rebased #

Total comments: 8

Patch Set 7 : addressed comments #

Patch Set 8 : one more test #

Total comments: 33

Patch Set 9 : addressed comments #

Patch Set 10 : one more test #

Patch Set 11 : fixing compilation #

Patch Set 12 : added missing handle scope #

Patch Set 13 : used bits in end_position for blackboxing #

Patch Set 14 : removed nl #

Patch Set 15 : fixed tests #

Total comments: 2

Patch Set 16 : addressed comments #

Total comments: 14

Patch Set 17 : fixed test #

Patch Set 18 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+907 lines, -235 lines) Patch
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +23 lines, -6 lines 0 comments Download
M src/debug/debug.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +6 lines, -2 lines 0 comments Download
M src/debug/debug.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +67 lines, -20 lines 0 comments Download
M src/debug/debug-interface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +14 lines, -6 lines 0 comments Download
M src/inspector/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/inspector/v8-debugger.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +4 lines, -2 lines 0 comments Download
M src/inspector/v8-debugger.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 9 chunks +27 lines, -27 lines 0 comments Download
M src/inspector/v8-debugger-agent-impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +9 lines, -25 lines 0 comments Download
M src/inspector/v8-debugger-agent-impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 22 chunks +51 lines, -143 lines 0 comments Download
M src/inspector/v8-debugger-script.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M src/inspector/v8-debugger-script.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -0 lines 0 comments Download
A test/inspector/debugger/framework-break.js View 1 2 3 4 5 6 7 1 chunk +189 lines, -0 lines 0 comments Download
A test/inspector/debugger/framework-break-expected.txt View 1 2 1 chunk +56 lines, -0 lines 0 comments Download
A test/inspector/debugger/framework-precise-ranges.js View 1 2 3 4 5 6 7 8 1 chunk +78 lines, -0 lines 0 comments Download
A test/inspector/debugger/framework-precise-ranges-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +140 lines, -0 lines 0 comments Download
A test/inspector/debugger/framework-stepping.js View 1 2 3 4 5 6 7 8 9 1 chunk +113 lines, -0 lines 0 comments Download
A test/inspector/debugger/framework-stepping-expected.txt View 1 2 3 4 5 6 7 8 9 1 chunk +100 lines, -0 lines 0 comments Download
M test/inspector/debugger/stepping-with-blackboxed-ranges.js View 1 2 3 4 5 6 1 chunk +9 lines, -4 lines 0 comments Download

Messages

Total messages: 71 (45 generated)
kozy
Please take a look!
3 years, 11 months ago (2017-01-18 16:29:22 UTC) #3
Yang
On 2017/01/18 16:29:22, kozyatinskiy wrote: > Please take a look! src/debug part is looking good. ...
3 years, 11 months ago (2017-01-19 13:55:21 UTC) #4
Yang
oh yeah. the actual comments. https://codereview.chromium.org/2633803002/diff/100001/src/compiler.cc File src/compiler.cc (right): https://codereview.chromium.org/2633803002/diff/100001/src/compiler.cc#newcode1091 src/compiler.cc:1091: isolate->debug()->OnNewSharedFunctionInfo(result); I wonder whether ...
3 years, 11 months ago (2017-01-19 13:55:35 UTC) #5
kozy
all done, please take another look! https://codereview.chromium.org/2633803002/diff/100001/src/compiler.cc File src/compiler.cc (right): https://codereview.chromium.org/2633803002/diff/100001/src/compiler.cc#newcode1091 src/compiler.cc:1091: isolate->debug()->OnNewSharedFunctionInfo(result); On 2017/01/19 ...
3 years, 11 months ago (2017-01-19 16:08:38 UTC) #6
dgozman
https://codereview.chromium.org/2633803002/diff/140001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2633803002/diff/140001/src/api.cc#newcode9136 src/api.cc:9136: void debug::Script::BlackboxStateChanged() const { Why doesn't this get a ...
3 years, 11 months ago (2017-01-19 21:49:15 UTC) #8
dgozman
https://codereview.chromium.org/2633803002/diff/140001/src/debug/debug-interface.h File src/debug/debug-interface.h (right): https://codereview.chromium.org/2633803002/diff/140001/src/debug/debug-interface.h#newcode127 src/debug/debug-interface.h:127: void BlackboxStateChanged() const; - ResetBlackboxedStateCache - Make it a ...
3 years, 11 months ago (2017-01-19 22:34:20 UTC) #9
kozy
all done, please take another look. https://codereview.chromium.org/2633803002/diff/140001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/2633803002/diff/140001/src/api.cc#newcode9136 src/api.cc:9136: void debug::Script::BlackboxStateChanged() const ...
3 years, 11 months ago (2017-01-20 02:32:37 UTC) #12
Yang
On 2017/01/20 02:32:37, kozyatinskiy wrote: > all done, please take another look. > > https://codereview.chromium.org/2633803002/diff/140001/src/api.cc ...
3 years, 11 months ago (2017-01-20 08:32:50 UTC) #13
Yang
https://codereview.chromium.org/2633803002/diff/140001/src/debug/debug.cc File src/debug/debug.cc (right): https://codereview.chromium.org/2633803002/diff/140001/src/debug/debug.cc#newcode967 src/debug/debug.cc:967: it.frame()->function()->shared()->DebugIsBlackboxed())) { On 2017/01/19 21:49:14, dgozman wrote: > Should ...
3 years, 11 months ago (2017-01-20 09:30:48 UTC) #14
kozy
One more test is added, Dmitry please take a look.
3 years, 11 months ago (2017-01-20 17:56:28 UTC) #15
kozy
Yang, I need your help with this, after adding new flags related to no side ...
3 years, 11 months ago (2017-01-21 00:12:00 UTC) #28
Yang
On 2017/01/21 00:12:00, kozyatinskiy wrote: > Yang, I need your help with this, after adding ...
3 years, 11 months ago (2017-01-21 05:39:05 UTC) #29
kozy
On 2017/01/21 05:39:05, Yang wrote: > On 2017/01/21 00:12:00, kozyatinskiy wrote: > > Yang, I ...
3 years, 11 months ago (2017-01-21 16:20:47 UTC) #30
Yang
On 2017/01/21 16:20:47, kozyatinskiy wrote: > On 2017/01/21 05:39:05, Yang wrote: > > On 2017/01/21 ...
3 years, 11 months ago (2017-01-21 16:22:27 UTC) #31
Yang
On 2017/01/21 16:22:27, Yang wrote: > On 2017/01/21 16:20:47, kozyatinskiy wrote: > > On 2017/01/21 ...
3 years, 11 months ago (2017-01-21 16:29:59 UTC) #32
kozy
On 2017/01/21 16:29:59, Yang wrote: > On 2017/01/21 16:22:27, Yang wrote: > > On 2017/01/21 ...
3 years, 11 months ago (2017-01-21 23:27:23 UTC) #33
kozy
On 2017/01/21 16:22:27, Yang wrote: > I can also take a look at this on ...
3 years, 11 months ago (2017-01-21 23:37:24 UTC) #34
Yang
On 2017/01/21 23:37:24, kozyatinskiy wrote: > On 2017/01/21 16:22:27, Yang wrote: > > I can ...
3 years, 11 months ago (2017-01-22 06:09:04 UTC) #48
Yang
On 2017/01/22 06:09:04, Yang wrote: > On 2017/01/21 23:37:24, kozyatinskiy wrote: > > On 2017/01/21 ...
3 years, 11 months ago (2017-01-22 07:01:51 UTC) #49
kozy
On 2017/01/22 07:01:51, Yang wrote: > On 2017/01/22 06:09:04, Yang wrote: > > I thought ...
3 years, 11 months ago (2017-01-22 19:19:48 UTC) #50
Yang
This should make enough room for the bits: https://codereview.chromium.org/2649873002/# Also consider comments below. https://codereview.chromium.org/2633803002/diff/340001/src/objects.cc File ...
3 years, 11 months ago (2017-01-23 08:48:29 UTC) #51
kozy
rebased on top of "flags" CL, thank you for your help. Dmitry, please take a ...
3 years, 11 months ago (2017-01-23 20:28:01 UTC) #54
dgozman
lgtm https://codereview.chromium.org/2633803002/diff/360001/src/debug/debug-interface.h File src/debug/debug-interface.h (right): https://codereview.chromium.org/2633803002/diff/360001/src/debug/debug-interface.h#newcode164 src/debug/debug-interface.h:164: virtual bool IsBlackboxed(v8::Local<debug::Script> script, IsFunctionBlackboxed https://codereview.chromium.org/2633803002/diff/360001/src/debug/debug.cc File src/debug/debug.cc ...
3 years, 11 months ago (2017-01-24 00:12:08 UTC) #61
kozy
thank you, all done! https://codereview.chromium.org/2633803002/diff/360001/src/debug/debug-interface.h File src/debug/debug-interface.h (right): https://codereview.chromium.org/2633803002/diff/360001/src/debug/debug-interface.h#newcode164 src/debug/debug-interface.h:164: virtual bool IsBlackboxed(v8::Local<debug::Script> script, On ...
3 years, 11 months ago (2017-01-24 01:11:52 UTC) #62
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/2633803002/400001
3 years, 11 months ago (2017-01-24 01:42:26 UTC) #68
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 01:50:34 UTC) #71
Message was sent while issue was closed.
Committed patchset #18 (id:400001) as
https://chromium.googlesource.com/v8/v8/+/ac50c79a3e07cbe3c420ce55c1a3e0e3d5b...

Powered by Google App Engine
This is Rietveld 408576698