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
Review URL: https://codereview.chromium.org/1371193005 .
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1192103004 .
I was able to convert 49 SNPrint(NULL, 0, ...) patterns to use the
macro. I had to use a #define for the format string 5 times due to
uses that didn't fit the macro.
2 occurences of SNPrint(NULL, 0, ...) had >=2 possibilities for the
format string based on runtime values, and I didn't try to convert
them.
Fixed ~10 format strings.
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1331623002 .
- Rename accessors of class Field to make it more apparent as to what is being accessed (static field values or instance field offsets
- Use precompiled initializer state (Used only during precompilation) to also store saved initial value of static fields (Used only during application snapshot generation)
BUG=
R=hausner@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org//1289643005 .
- Display paused time as tooltip over "paused" word.
- Send a timestamp with every ServiceEvent.
- Unit tests verifying that paused on start, exit, and breakpoint timestamps are stable.
- Remember the pause time in DebuggerEvent.
- Remember the pause time in MessageHandler.
- Updated service protocol documentation.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1311503004 .
If null is not initialized before the VM Isolate's ObjectStore, the
ObjectStore's fields are initialized to kHeapObjectTag, which causes
a crash in VM Isolate shutdown.
There is also a crash when the VM Isolate is signaled with the
shutdown event, so this CL removes adding a Debugger to the
VM Isolate, so that there is no need to shut it down, and send
the signal.
NB: This change does *not* actually enable shutdown. It just fixes
crashes that would happen if it were enabled.
BUG=
R=iposva@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1168933002.
This time I am committing the protocol changes first and saving the
Observatory changes for a second cl.
------
We currently support 5 streams: Isolate, Debug, GC, _Echo, and _Graph.
Only generate events when at least one client is listening to the
corresponding event stream.
Only send events to the clients that actually request them.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1166433008
kClosureCall and kOptStaticCall are not needed anymore.
Closure calls are implemented as instance calls - the ClosureCall instruction
only occurs in the synthetic FunctionImpl.call dispatcher - and does not correspond
to a source location where breakpoints can be set.
kOptStaticCall is not needed because breakpoints can only be set in unoptimized
code. kOther is used instead.
This also removes an unused PC descriptor at closure calls from unoptimized
code.
BUG=
R=vegorov@google.com
Review URL: https://codereview.chromium.org//1160063002
Fix copying breakpoints over to a new location when a latent location is resolved.
Fix bad assumption that BreakpointLocationAtLine always returns non-null result.
Review URL: https://codereview.chromium.org//1149983003
We currently support 5 streams: Isolate, Debug, GC, _Echo, and _Graph.
Only generate events when at least one client is listening to the
corresponding event stream.
Only send events to the clients that actually request them.
Implement this all as Dart streams in the service lib.
Update tests. Fix a race in async_generator_..._test that was biting me.
Review URL: https://codereview.chromium.org//1143783003
When possible the ThreadInterrupter enters a deep sleep mode (to conserve CPU usage). We wake the ThreadInterrupter up whenever we schedule an isolate on a thread, but, two edges cases that were not covered:
* After explicitly starting an isolate that was paused with --pause-isolates-on-start the thread interrupter may not wake up.
* After continuing an isolate that was being single stepped.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1142283003
- Add LocalVariableAnnotation to script-inset
- Tweak shortName for a closure
- Teach Script how to find local variable locations (not perfect yet)
- Send tokenPos and endTokenPos for debugger local variables
Performance improvements:
- Reduced script-inset update/computeAnnotations calls from 5 to 1 for each stack frame that is opened
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1126363005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45725 260f80e4-7a28-3924-810f-c04153c831b5
- Add _getCrashDump RPC
- crash dump service response is map of request uris to responses, includes:
-- getVM
-- getFlagList
-- for each isolate:
-- getIsolate
-- _getAllocationProfile
-- getStack
- Add FakeVM to service library
- Add load crash dump to Observatory connect page
- Removes old chromium target support from connect page
- Make debugger page display stack even if libraries can't be loaded
- Fix reload of vm-connect page
- Fix polymer initialization calls
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1100583006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45390 260f80e4-7a28-3924-810f-c04153c831b5