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

Issue 11052006: 1. Create a port when a debugger object is created for an isolate, use this (Closed)

Created:
8 years, 2 months ago by siva
Modified:
8 years, 2 months ago
Reviewers:
hausner, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

1. Create a port when a debugger object is created for an isolate, use this port as the unique ID to represent an isolate in the debugger message format. 2. Switch the Event handler API to use an isolate id instead of the isolate object itself. 3. Add a unit test case for isolate debugger event handling with an interrupt of isolate to ensure that interrupting the isolate runs the interrupt event handler. Committed: https://code.google.com/p/dart/source/detail?r=13207

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 10

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -26 lines) Patch
M bin/dbg_message.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M bin/dbg_message.cc View 1 2 3 4 1 chunk +2 lines, -10 lines 0 comments Download
M include/dart_debugger_api.h View 1 2 3 4 3 chunks +21 lines, -1 line 0 comments Download
M vm/debugger.h View 1 2 3 4 4 chunks +5 lines, -1 line 0 comments Download
M vm/debugger.cc View 1 2 3 4 7 chunks +20 lines, -1 line 0 comments Download
M vm/debugger_api_impl.cc View 1 2 3 4 3 chunks +9 lines, -5 lines 0 comments Download
M vm/debugger_api_impl_test.cc View 1 2 3 4 2 chunks +171 lines, -0 lines 0 comments Download
M vm/isolate.cc View 1 2 3 4 3 chunks +1 line, -7 lines 0 comments Download
M vm/message_handler.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M vm/port.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M vm/port.cc View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
siva
8 years, 2 months ago (2012-10-03 00:44:33 UTC) #1
siva
synched upto top of tree and resolved conflicts.
8 years, 2 months ago (2012-10-03 17:34:00 UTC) #2
hausner
lgtm https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger.h File vm/debugger.h (right): https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger.h#newcode291 vm/debugger.h:291: static void SignalIsolateEvent(EventType type); Does this function still ...
8 years, 2 months ago (2012-10-03 18:53:13 UTC) #3
Ivan Posva
Question about the Dart API: We have Dart_IsolateEventHandler and Dart_IsolateInterruptCallback. Does that mean that both ...
8 years, 2 months ago (2012-10-03 20:18:57 UTC) #4
siva
8 years, 2 months ago (2012-10-03 23:59:45 UTC) #5
Yes currently both the callbacks get called. The interrupt
callback which is setup by Dart_Initialize is always NULL.

https://chromiumcodereview.appspot.com/11052006/diff/11002/include/dart_debug...
File include/dart_debugger_api.h (right):

https://chromiumcodereview.appspot.com/11052006/diff/11002/include/dart_debug...
include/dart_debugger_api.h:559: * Returns a handle to the isolate object
corresponding to the isolate id.
It is not a handle so I have changed the comment to "returns the isolate
object..."

On 2012/10/03 20:18:57, Ivan Posva wrote:
> Is Dart_Isolate really a handle in the Dart API sense? If not, then maybe we
> should adjust the comment to be something like "Returns a reference to the
> isolate object..." or just "Returns the isolate object...". The second version
> actually matches the description further below.

https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger.h
File vm/debugger.h (right):

https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger.h#newc...
vm/debugger.h:291: static void SignalIsolateEvent(EventType type);
In the case of interrupts it is still outside and accessed from StackOverflow

On 2012/10/03 18:53:13, hausner wrote:
> Does this function still need to be public now that you moved the signaling of
> isolate creation/destruction into the debugger class?

https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger.h#newc...
vm/debugger.h:337: Dart_Port isolate_id_;  // An unique ID for the isolate in
the debugger.
On 2012/10/03 18:53:13, hausner wrote:
> nit: A unique

Done.

https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger_api_im...
File vm/debugger_api_impl_test.cc (right):

https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger_api_im...
vm/debugger_api_impl_test.cc:1080: EXPECT_VALID(retval);
On 2012/10/03 18:53:13, hausner wrote:
> Maybe check that test_isolate_id contains a value that is set by the callback
> when  it is called. Or have an additional global variable that is used as a
> bitset, with each callback kind setting a different bit, then check here that
> all 3 callbacks did happen.

Done.

https://chromiumcodereview.appspot.com/11052006/diff/11002/vm/debugger_api_im...
vm/debugger_api_impl_test.cc:1134: void InterruptIsolateRun(uword unused) {
On 2012/10/03 20:18:57, Ivan Posva wrote:
> static?

Done.

Powered by Google App Engine
This is Rietveld 408576698