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

Issue 1371193005: VM restart + shutdown fixes (Closed)

Created:
5 years, 2 months ago by turnidge
Modified:
5 years, 2 months ago
Reviewers:
zra, Cutch
CC:
reviews_dartlang.org, rmacnak, Cutch, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

VM restart + shutdown fixes This change add the ability to restart the vm through the service protocol. All isolates are killed, and then the main isolate is restarted cooperatively by the embedder. This change also fixes the message handler to prevent it from accidentally ignoring vm shutdown messages. Previously, we would stop handling messages whenever we hit an error (such as a compile error or an unhandled exception). This would leave shutdown requests sitting the oob queue, neglected. We now process *all* oob requests, up to the first shutdown request. When we hit a shutdown request, we clear the oob queue and process no more messages. To make all of this work, we had to change the return value of HandleMessage from bool to a new enum type, allowing the message handler to distinguish *normal* error cases from the more rarified shutdown and restart cases. R=johnmccutchan@google.com, zra@google.com Committed: https://github.com/dart-lang/sdk/commit/0d501ad53d1be5689934ceb8a38d9cde39399eb8

Patch Set 1 #

Patch Set 2 : fix return types #

Patch Set 3 : modal debugger input #

Patch Set 4 : fix ups #

Total comments: 20

Patch Set 5 : code review #

Total comments: 2

Patch Set 6 : more code review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+807 lines, -316 lines) Patch
M runtime/bin/main.cc View 1 2 3 12 chunks +160 lines, -128 lines 0 comments Download
M runtime/include/dart_api.h View 2 chunks +15 lines, -1 line 0 comments Download
M runtime/observatory/lib/src/elements/debugger.dart View 1 2 12 chunks +115 lines, -22 lines 0 comments Download
M runtime/observatory/lib/src/elements/debugger.html View 1 2 1 chunk +21 lines, -1 line 0 comments Download
M runtime/observatory/lib/src/service/object.dart View 1 chunk +4 lines, -0 lines 0 comments Download
A runtime/observatory/tests/service/vm_restart_test.dart View 1 2 3 4 1 chunk +106 lines, -0 lines 0 comments Download
M runtime/vm/dart.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 3 chunks +12 lines, -3 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 5 3 chunks +11 lines, -6 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 24 chunks +78 lines, -50 lines 0 comments Download
M runtime/vm/message_handler.h View 1 2 3 4 4 chunks +16 lines, -6 lines 0 comments Download
M runtime/vm/message_handler.cc View 1 2 3 4 9 chunks +120 lines, -53 lines 0 comments Download
M runtime/vm/message_handler_test.cc View 1 2 3 4 7 chunks +84 lines, -10 lines 0 comments Download
M runtime/vm/native_message_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/native_message_handler.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 3 4 5 3 chunks +9 lines, -1 line 0 comments Download
M runtime/vm/port_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/service.cc View 1 2 3 4 4 chunks +21 lines, -6 lines 0 comments Download
M runtime/vm/service_isolate.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/service_test.cc View 1 16 chunks +20 lines, -20 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
turnidge
5 years, 2 months ago (2015-10-02 20:50:37 UTC) #2
zra
https://codereview.chromium.org/1371193005/diff/20002/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1371193005/diff/20002/runtime/vm/isolate.cc#newcode641 runtime/vm/isolate.cc:641: // Unwind errors are always fatal and don't notify ...
5 years, 2 months ago (2015-10-05 16:56:47 UTC) #3
Cutch
https://codereview.chromium.org/1371193005/diff/20002/runtime/observatory/tests/service/vm_restart_test.dart File runtime/observatory/tests/service/vm_restart_test.dart (right): https://codereview.chromium.org/1371193005/diff/20002/runtime/observatory/tests/service/vm_restart_test.dart#newcode82 runtime/observatory/tests/service/vm_restart_test.dart:82: expect(event.isolate, equals(isolate)); nit: flip order of print and expect ...
5 years, 2 months ago (2015-10-05 18:10:47 UTC) #4
turnidge
PTAL https://codereview.chromium.org/1371193005/diff/20002/runtime/observatory/tests/service/vm_restart_test.dart File runtime/observatory/tests/service/vm_restart_test.dart (right): https://codereview.chromium.org/1371193005/diff/20002/runtime/observatory/tests/service/vm_restart_test.dart#newcode82 runtime/observatory/tests/service/vm_restart_test.dart:82: expect(event.isolate, equals(isolate)); On 2015/10/05 18:10:46, Cutch wrote: > ...
5 years, 2 months ago (2015-10-05 22:18:24 UTC) #5
zra
lgtm
5 years, 2 months ago (2015-10-05 22:59:47 UTC) #6
Cutch
LGTM with one suggestion https://codereview.chromium.org/1371193005/diff/70001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1371193005/diff/70001/runtime/vm/isolate.cc#newcode645 runtime/vm/isolate.cc:645: // Unwind don't notify error ...
5 years, 2 months ago (2015-10-05 23:02:52 UTC) #7
turnidge
https://codereview.chromium.org/1371193005/diff/70001/runtime/vm/isolate.cc File runtime/vm/isolate.cc (right): https://codereview.chromium.org/1371193005/diff/70001/runtime/vm/isolate.cc#newcode645 runtime/vm/isolate.cc:645: // Unwind don't notify error listeners and ignore whether ...
5 years, 2 months ago (2015-10-06 18:19:07 UTC) #8
turnidge
5 years, 2 months ago (2015-10-06 18:27:30 UTC) #9
Message was sent while issue was closed.
Committed patchset #6 (id:90001) manually as
0d501ad53d1be5689934ceb8a38d9cde39399eb8 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698