Commit Graph

678 Commits

Author SHA1 Message Date
John McCutchan cda760915c Add fine grained command line and service protocol control over timeline streams recording
- Add --timeline-streams= flag which takes a comma separated list of streams to record.
- Send "availableStreams" and "recordedStreams" in the _getVMTimelineFlags RPC. Also include the type of recorder we are using.
- Enable setting of "recordedStreams" in the _setVMTimelineFlags RPC.

R=zra@google.com

Review URL: https://codereview.chromium.org/1690333002 .
2016-02-12 13:18:25 -08:00
John McCutchan 6b22d8e97c Rewrite asyncStepOver to use await
- Add some documentation and use await instead of .then() in asyncStepOver.
- Analyzer fixes to service lib and tests.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1687293003 .
2016-02-11 14:19:03 -08:00
John McCutchan f2844d77b6 If the VM page fails to load, route to the VM connect page
Fixes #25707

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1678353002 .
2016-02-09 12:21:58 -08:00
John McCutchan ce650790a1 Return an error in many service RPCs if the isolate is not runnable
- Return kIsolateMustBeRunnable error when an isolate must be runnable for a service RPC to complete.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1645423002 .
2016-01-29 11:16:23 -08:00
John McCutchan ec020a301b Improve Observatory debugger behaviour when an isolate exits with unhandled exceptions
- When an isolate is paused at exit and has a sticky error, have the debugger display the error.
- Add --pause-isolates-on-unhandled-exceptions flag which sets a default value for break-on-exception.
- Have the debugger display help text about 'set break-on-exception' and '--pause-isolates-on-unhandled-exceptions'
- Signal an unhandled exception even if no client is connected to Observatory.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1636083002 .
2016-01-26 10:12:46 -08:00
Todd Turnidge 1fdde601da Properly display un-compiled nested functions.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1596563003 .
2016-01-15 15:13:09 -08:00
Todd Turnidge 3bf009d8d3 Make local variables sticky-scroll in debugger frames.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1594603003 .
2016-01-15 15:09:08 -08:00
Todd Turnidge 318db33875 Only show breakpoints at possible breakpoint positions in Observatory.
We now use getSourceReport to get an accurate list of possible
breakpoints rather than relying on inaccurate heuristics.  This means,
for example, that variable declarations will stop being labeled
incorrectly as potential breakpoints.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1590353002 .
2016-01-15 14:56:35 -08:00
Todd Turnidge f23610b3e3 Use getSourceReport for coverage/callsites in Observatory.
Move script reloading into the script inset instead of the navbar.

Make the refresh icon do a sticky-header scroll thing (fancy!).

Remove old coverage code from observatory.

BUG=

Review URL: https://codereview.chromium.org/1584173003 .
2016-01-15 09:18:57 -08:00
Todd Turnidge 97a7db5a71 typo: association -> associations
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1578703003 .
2016-01-12 10:31:47 -08:00
John McCutchan 89c49b9e87 Add dart:developer.postEvent for posting events to the service protocol from Dart code
- Add dart:developer.postEvent for posting events to the service protocol.
- Add 'Extension' service protocol event stream.
- Unit test.
- Update service.md

- Bug fix for logging stream.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1537523002 .
2015-12-17 09:34:52 -08:00
John McCutchan f3ee772308 Provide list of service protocol extensions in isolate and emit an event when one is registered.
- Doc improvements.
- Type annotation improvements.
- Isolate includes list of currently registered extensions.
- New event kind on isolate stream emitted whenever an extension is registered (IsolateServiceExtensionRegistered).

Fixes https://dartbug.com/25208
Fixes https://dartbug.com/25257

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1527793004 .
2015-12-16 13:49:37 -08:00
Ryan Macnak a0e0ac78cb Observatory: Include profiler samples in the timeline view.
- Add pre-isolate service RPC that emits profiler samples in about:tracing format.
 - Make timeline UI automatically merge the event timeline with the sample timelines.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1525913002 .
2015-12-16 10:11:44 -08:00
Todd Turnidge 3a28a1297e Fix line number reporting for unresolved breakpoints.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1524263002 .
2015-12-15 10:08:30 -08:00
Ryan Macnak c44419805c - Display a pseudo-receiver for static function activations.
- Add missing breadcrumbs to class heirarchy, flags and timetime view.
 - Truncate large objects by default so we can look at them without falling over.
 - Demangle local variable names.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1463123002 .
2015-11-24 12:39:43 -08:00
Ryan Macnak 75cd019a9c Add RPC and UI for reachable size of an object / all instances of a class.
BUG=http://dartbug.com/24945
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1453983002 .
2015-11-20 10:02:16 -08:00
Todd Turnidge b9af3683fd Don't unsubscribe to streams we aren't subscribed to.
Gets rid of some stray uncaught exceptions when running Flutter.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1456643002 .
2015-11-17 11:29:39 -08:00
Ryan Macnak f1391c7841 Observatory: handle the case where package:foo imports are canonicalized as packages/foo.
BUG=http://dartbug.com/24925
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1447383002 .
2015-11-16 17:55:39 -08:00
Florian Loitsch 31c73aef7c Fix ambigous typos.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1443723004 .
2015-11-16 22:06:44 +01:00
Ryan Macnak 816e665ae1 Use the new Base64 support from dart:convert in Observatory.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1374113006 .
2015-11-13 15:36:27 -08:00
Ryan Macnak df64bb1619 - Annotate instructions that load objects from the ObjectPool or Thread.
- Remove disassembly tooltips.
- Surface whether a function has an intrinsic or is recognized.
- Mark intrinsified or ffi functions in the profile.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1439893002 .
2015-11-12 15:18:31 -08:00
John McCutchan c6a8c44eae Include field reference with implicit getter / setter functions
- When printing implicit getter or setter functions, include the field that the implicit functions were generated for.
- Display field on function view in Observatory.
- Service unit test.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1440753002 .
2015-11-11 14:13:45 -08:00
John McCutchan 43b0ae00e7 Timeline service protocol support with Observatory UI
Service Protocol:
- _clearVMTimeline (clear timeline)
- _getVMTimeline (fetch timeline)
- _setVMTimelineFlag (control recording)
- _getVMTimelineFlag (...)
- _getVMTimeline service unit test

Observatory:
- timeline page with record on/off, clear timeline, and refresh buttons.
- trace-viewer based timeline view that runs in an iframe driven by a small javascript program

Misc:
- Fix default enable logic bugs
- Add 'Debugger Pause' timeline event
- Threads can have a name and that name will be displayed in Observatory
- Tighten up locking when printing JSON

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1406413006 .
2015-11-10 08:02:22 -08:00
John McCutchan b9399cd964 Allow for FakeVMRpcExceptions when listening for streams
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1406343004 .
2015-10-27 07:44:10 -07:00
Ryan Macnak 9de6b3be0a Move selector and arguments descriptor into MegamorphicCache.
Towards making call sites swappable between ICs and MegamorphicCaches.

R=srdjan@google.com

Review URL: https://codereview.chromium.org/1420433004 .
2015-10-20 13:44:21 -07:00
Todd Turnidge f5a07f6a9c Pad line number appropriately when generating script insets.
This avoid jagged indentation when we jump from 9->10, 99->100, etc.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1402193003 .
2015-10-14 13:28:33 -07:00
Ryan Macnak 8df96f0f48 -Fix display of megamorphic miss function.
-Fix inbound reference of megamorphic miss function.
-Speculative fix for eval Script.
-Rationalize isolate list as isolate list.
-Fix attempted eval in precompiled isolate.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1403883002 .
2015-10-13 10:26:44 -07:00
Ryan Macnak 8341085f11 Add view for MegamorphicCache. Update view for ObjectPool.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1392953003 .
2015-10-12 13:57:48 -07:00
John McCutchan 49b627c366 Shrink by 33% the allocation profile pie charts
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1401763003 .
2015-10-12 13:08:53 -07:00
John McCutchan fc3baf97e3 Fix class hierarchy display
- Left align 'Class'
- Increase minimum width for expander to be 2em (fixes offset problem)

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1395423002 .
2015-10-12 13:01:02 -07:00
John McCutchan 53ebbc968b Fix bad isolate summary charts
Charted charts persist some DOM children in the element and Polymer sends multiple attached() events, resulting in a stale chart svg element offsetting the current one.

Fix is simple- remove stale elements in detached().

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1401113004 .
2015-10-12 12:53:30 -07:00
John McCutchan 9dd7680fd8 Straw man setExceptionPauseMode
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1399743002 .
2015-10-12 11:04:44 -07:00
Todd Turnidge 435bcdbe6c We can now name the current VM using the service protocol.
Adds a 'VM' stream and a 'VMUpdate' event.

Makes Event.isolate optional in service.md.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1398823002 .
2015-10-08 15:37:49 -07:00
Todd Turnidge 97c643a5f4 Improve isolate list. Expose isolate origin.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1395693003 .
2015-10-07 14:35:01 -07:00
Todd Turnidge 228e527793 Reload an isolate once it is runnable.
This makes sure that an isolate has its rootLib properly initialized.

This issue came up while doing tab completion after vm restart.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1390343002 .
2015-10-07 13:12:45 -07:00
Todd Turnidge 7415161a1f Trim a line on the right before determining max breakpoint column
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1387413003 .
2015-10-07 11:04:13 -07:00
Todd Turnidge b3267fe638 Support tab completion of line:col in the debugger.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1393523002 .
2015-10-07 09:44:38 -07:00
Todd Turnidge 0d501ad53d 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

Review URL: https://codereview.chromium.org/1371193005 .
2015-10-06 11:27:26 -07:00
Todd Turnidge 23823cd0fd Add a scroll bar when the console prints looooooooong lines.
Closes #24299

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1383843002 .
2015-10-01 11:10:50 -07:00
John McCutchan fd6135927e Ensure that service protocol specification and implementation use the correct numeric types
Fixes #24245

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1387433002 .
2015-10-01 11:05:13 -07:00
Todd Turnidge 473413753d Some changes to service protocol before we land 1.13.
- Split AddBreakpoint into two rpcs: AddBreakpoint and
  AddBreakpointWithScriptUri.

- Remove Isolate.entry.

Closes #24329

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1379163002 .
2015-10-01 10:46:44 -07:00
Matthias Hausner 4995b84051 Remove obsolete timer list from VM
The functionality is now covered with TimeLine and CompilerStats

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1375343002 .
2015-09-30 12:47:23 -07:00
John McCutchan 95513b0a1d Switch from Google charts to Charted
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1310153002 .
2015-09-29 12:59:05 -07:00
Todd Turnidge 66f9abc7e3 Refactor isolate interrupts to use OOB messages instead of interrupt bits.
Closes #24349

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1344993002 .
2015-09-23 12:13:25 -07:00
John McCutchan eb3fe78200 Automatically set correct Observatory analytics version
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1352493002 .
2015-09-16 10:47:19 -07:00
John McCutchan fad876aa30 Fix static analysis warnings in Observatory
- Type check SourceLocation and UnresolvedSourceLocation.
- Return null explicitly.
- Remove unused import.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//1340073002 .
2015-09-15 12:57:43 -07:00
Todd Turnidge 5dcad9482d Fix analyzer problems in object.dart.
BUG=

Review URL: https://codereview.chromium.org//1320793005 .
2015-09-09 09:56:36 -07:00
Todd Turnidge dee6ddf966 Support column-based breakpoints in the VM and Observatory.
BUG=
R=hausner@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//1312763010 .
2015-09-09 09:01:13 -07:00
John Messerly e30f7638e2 observatory: change help text to match break-on-exception option name
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1317563008 .
2015-09-02 17:05:58 -07:00
Todd Turnidge 535f57a84a Add source annotations for breakpoints.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1305413004 .
2015-08-31 12:10:49 -07:00