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

Issue 812583003: Support tasks injection into a running VM. (Closed)

Created:
6 years ago by alph
Modified:
6 years ago
CC:
Paweł Hajdan Jr., v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Support tasks injection into a running VM. The new mechanism unlike DebugCommands will run even when the debugger is not active. In other words it doesn't require setting DebugEventListener. One of supposed usages is an ability to start profiling while JS is running a tight loop. Slightly tweaked patch from yurys@

Patch Set 1 #

Total comments: 16

Patch Set 2 : Addressing comments. #

Total comments: 1

Patch Set 3 : Added a comment. #

Total comments: 16

Patch Set 4 : Addressing comments. #

Total comments: 8

Patch Set 5 : Addressing comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -3 lines) Patch
M include/v8.h View 1 2 3 3 chunks +2 lines, -2 lines 0 comments Download
M include/v8-debug.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M src/api.cc View 2 chunks +9 lines, -1 line 0 comments Download
M src/debug.h View 1 2 3 4 chunks +19 lines, -0 lines 0 comments Download
M src/debug.cc View 1 2 3 3 chunks +53 lines, -0 lines 0 comments Download
M test/cctest/test-debug.cc View 1 2 3 4 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
alph
Folks, please take a look.
6 years ago (2014-12-17 13:09:17 UTC) #2
yurys
Please add into the description that the new mechanism unlike DebugCommands will run when debugger ...
6 years ago (2014-12-17 14:25:03 UTC) #3
alph
https://codereview.chromium.org/812583003/diff/1/include/v8-debug.h File include/v8-debug.h (right): https://codereview.chromium.org/812583003/diff/1/include/v8-debug.h#newcode188 include/v8-debug.h:188: // VM thread. The task is deleted after execution. ...
6 years ago (2014-12-17 15:05:46 UTC) #4
yurys
lgtm https://codereview.chromium.org/812583003/diff/20001/test/cctest/test-debug.cc File test/cctest/test-debug.cc (right): https://codereview.chromium.org/812583003/diff/20001/test/cctest/test-debug.cc#newcode7436 test/cctest/test-debug.cc:7436: DelayedTask delayed_task(env->GetIsolate(), task, 10); Please add a comment ...
6 years ago (2014-12-17 15:29:10 UTC) #5
alph
Benedikt, could you please take a look. Thanks!
6 years ago (2014-12-17 15:30:33 UTC) #7
Benedikt Meurer
I think it's OK in general, but the debug api is not my area of ...
6 years ago (2014-12-18 04:11:57 UTC) #9
Sven Panne
Hmmm, the overall approach looks a bit... adventurous: Calling arbitrary C++ code in the context ...
6 years ago (2014-12-18 08:27:51 UTC) #10
jochen (gone - plz use gerrit)
I'd recommend to extend the RequestInterrupt() API to support more than one callback for the ...
6 years ago (2014-12-18 12:27:37 UTC) #11
alph
@svenpanne We already allow execution of "arbitrary C++ code" on VM thread with SetDebugEventListener API. ...
6 years ago (2014-12-18 14:28:03 UTC) #12
Sven Panne
lgtm https://codereview.chromium.org/812583003/diff/60001/test/cctest/test-debug.cc File test/cctest/test-debug.cc (right): https://codereview.chromium.org/812583003/diff/60001/test/cctest/test-debug.cc#newcode7403 test/cctest/test-debug.cc:7403: void Run() override { Use OVERRIDE, not all ...
6 years ago (2014-12-18 14:53:31 UTC) #13
alph
https://codereview.chromium.org/812583003/diff/60001/test/cctest/test-debug.cc File test/cctest/test-debug.cc (right): https://codereview.chromium.org/812583003/diff/60001/test/cctest/test-debug.cc#newcode7403 test/cctest/test-debug.cc:7403: void Run() override { On 2014/12/18 14:53:31, Sven Panne ...
6 years ago (2014-12-18 15:05:01 UTC) #14
alph
On 2014/12/18 12:27:37, jochen (slow) wrote: > I'd recommend to extend the RequestInterrupt() API to ...
6 years ago (2014-12-18 15:32:16 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/812583003/80001
6 years ago (2014-12-18 15:33:22 UTC) #17
jochen (gone - plz use gerrit)
I'd just add a new API for the existing mechanism where the RequestInterrupt() call returns ...
6 years ago (2014-12-18 15:38:48 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_arm64_rel on tryserver.v8 (http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_rel/builds/1843)
6 years ago (2014-12-18 15:55:42 UTC) #21
alph
6 years ago (2014-12-18 16:00:32 UTC) #22
On 2014/12/18 15:38:48, jochen (slow) wrote:
> I'd just add a new API for the existing mechanism where the RequestInterrupt()
> call returns an id and the Clear call takes the ID. The old API can then be
> implemented on top of this...
> 
> I think that's preferable over having two ways to achieve the same thing.

I'm going to try this way. Thank you. Let it be QueueInterruptRequest and
CancelInterruptRequest.

Powered by Google App Engine
This is Rietveld 408576698