Commit Graph

1605 Commits

Author SHA1 Message Date
John McCutchan d2751e2094 Fix last column calculation in scanForLocalVariableLocations
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1187953005.
2015-06-18 07:53:27 -07:00
Ryan Macnak 9d16fe0078 Re-focus the command box after a stack refresh.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1181943009.
2015-06-17 09:39:45 -07:00
Ryan Macnak 7c1bccb263 Add lib/base64.dart to Observatory's gypi.
Review URL: https://codereview.chromium.org//1179393003.
2015-06-15 12:39:31 -07:00
Ryan Macnak 392a83221f Allow setting break-on-exceptions option over the service protocol. Add command to Observatory's debugger.
Decide whether to cache service objects based on the fixedId property.

Be more tolerant of eval scripts and functions.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1174313002.
2015-06-15 12:05:23 -07:00
Florian Schneider 09b59b6c16 Fix checked mode service test.
The object pool is not an Instance, but a VM object now.

TBR=johnmccutchan@google.com,

Review URL: https://codereview.chromium.org//1174943002.
2015-06-10 13:24:09 +02:00
Florian Schneider 265a54411a Object pool with support for untagged entries.
This adds meta-information to object pool entries to allow storing
untagged immediates or code addresses (ExternalLabel) directly.

This eliminates the need to generate extra code to preserve the LSB
when storing immediates as smis (x64, arm64).

BUG=

Review URL: https://codereview.chromium.org//1175523002.
2015-06-10 11:41:22 +02:00
Ryan Macnak 304382c1b4 Add TypedData instance kinds.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1157003003.
2015-06-08 17:30:11 -07:00
John McCutchan 82d3caefc7 Fix code display in Observatory
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1164413002
2015-06-08 14:55:26 -07:00
Todd Turnidge 996f012707 2nd attempt at adding streamListen/streamCancel to the service protocol.
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
2015-06-04 09:57:22 -07:00
Todd Turnidge 1b59b9ea06 Service cleanups...
- Allow for multiple breakpoints in the service protocol.
  The info isn't actually provided or used yet.
- Drop index for list elements returned by the protocol.  Flatten structure.
- Drop index for context elements.  Keep sub-structure so we
   can choose to add extra slot info later.
- Errors now have ids and kinds.
- exception and stacktrace move from @Error to Error.
- All heap Objects now include class/size.
- Changed BoundedType.type and TypeRef.type to different names.
  Turns out we already have a "type" property that conflicts.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1152753005
2015-06-04 09:09:22 -07:00
Srdjan Mitrovic b666398745 Fix fix (again)
BUG=

Review URL: https://codereview.chromium.org//1153413006
2015-06-03 17:13:27 -07:00
Srdjan Mitrovic 1c18123cea Fix analyzer run on bot
BUG=

Review URL: https://codereview.chromium.org//1162023007
2015-06-03 16:52:20 -07:00
Regis Crelier a5669190ab Fixed breakpoint handling at return statement with inlined finally clauses.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1170483002
2015-06-03 15:25:42 -07:00
Todd Turnidge 4a3b6fe160 Rework the format of the FlagList response.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1149403007
2015-06-03 10:09:15 -07:00
Todd Turnidge bf17319a3c Update gypi.
BUG=

Review URL: https://codereview.chromium.org//1169513003
2015-06-03 09:13:33 -07:00
Todd Turnidge 6c2ebfcc60 Switch to using SourceLocation universally in service protocol.
Add <location-link> and <location-inset> to provide links and insets
for a location.

Make Frame, Message, and SourceLocation first class in service lib.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1150303004
2015-06-03 09:02:40 -07:00
Ryan Macnak eca0d72abe Provide a logical view of VM-internal maps in Observatory.
BUG=http://dartbug.com/20551
BUG=http://dartbug.com/21185
R=koda@google.com

Review URL: https://codereview.chromium.org//1150103005
2015-06-02 11:38:39 -07:00
Ryan Macnak 98999e6a02 Misc Observatory patches:
- Address some editor hints.
 - Place eval box above fields and be much more generous in expanding fields.
 - Treat maps as plain instances so their refs aren't blank.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1159783004
2015-06-01 14:59:54 -07:00
Todd Turnidge f6d3d4681d Rename some service protocol errors.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1164463005
2015-06-01 09:26:54 -07:00
Ryan Macnak c6ebef9526 Address hints in the Observatory.
R=turnidge@google.com

Review URL: https://codereview.chromium.org//1161553013
2015-05-29 13:42:31 -07:00
Todd Turnidge 8adf7de6d1 Introduce Instance.kind.
Use this instead of subclassing Instance in the service protocol.

Revise many instance property names.

BUG=
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//1162133002
2015-05-29 13:02:36 -07:00
Todd Turnidge 67adc6102d Add getVersion and setLibraryDebuggable RPCs to the service protocol.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1149373006
2015-05-28 13:34:23 -07:00
Ryan Macnak 2764bcefba Give structured information about imports and export in the service's library response.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1160943002
2015-05-28 11:37:20 -07:00
Todd Turnidge ab6b2218b0 Standardize on using "kind" to distinguish sub-varieties of a type.
- Event.eventType -> Event.kind.
- Sentinel.id -> Sentinel.kind.

We were already doing this for Code and will do so for Instance in
an upcoming cl.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1153193006
2015-05-28 11:04:32 -07:00
Todd Turnidge 3d02f21309 Service protocol cleanups.
- ServiceEvent -> Event, protocol only.
- Use camel-case for StepOption
- Hide FlagType but make it camel-case too.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1156803003
2015-05-28 10:24:09 -07:00
Todd Turnidge 563083696c Sundry service protocol cleanups before version 1.0.
Frame.depth -> Frame.index
Message.depth -> Message.index
Remove Message.type
Message.priority becomes private
frame -> frameIndex for evaluateInFrame
Class.finalized, Class.implemented, Class.patch Class.allocationStats become private
Instance.nativeFields becomes private
Field.value moves out of "ref" into full object
Field.value -> Field.staticValue
Move Function.static, Function.const to "ref"
Make Script.kind private in docs
Make Function.kind private

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1160873002
2015-05-28 09:30:55 -07:00
Todd Turnidge 95dc56e27e Make several service protocol RPCs private.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1159003002
2015-05-27 11:25:56 -07:00
Ryan Macnak 74dfae69e3 Reapply "Per-closure breakpoints; restructure breakpoint implementation to keep a list of conditions."
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
2015-05-27 09:59:33 -07:00
Ryan Macnak dfee2bf45d Mark script kinds as private in the service protocol.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1158863002
2015-05-27 09:28:19 -07:00
Ryan Macnak 69c50f7294 Use words! closureFunc -> function, closureCtxt -> context.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1158103002
2015-05-26 16:08:32 -07:00
Ryan Macnak 1fa8c92f31 Libraries have uris not urls. Scripts have uris not names.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1154163004
2015-05-26 16:03:05 -07:00
Todd Turnidge 8d24372339 Revert "Add the streamListen and streamCancel rpcs to the vm service."
This reverts commit 0967b63073.

Conflicts:
	runtime/observatory/tests/service/graph_test.dart
	runtime/vm/service.cc

BUG=

Review URL: https://codereview.chromium.org//1152283005
2015-05-26 15:22:39 -07:00
Ryan Macnak bad1ccb2f7 Heap snapshot visualizations:
- Dominator tree with retained sizes
- Merge nodes by class

- Split snapshot into chunks so the browser's websockets implementation can handle them.
- Use TypedData indexed by node ids instead of lists of objects and a higher time complexity but more memory efficient algorithm to find the dominator tree (reduces memory usage to ~2X the size of the heap being analyzed from >10X).

R=johnmccutchan@google.com, koda@google.com

Review URL: https://codereview.chromium.org//1124153006
2015-05-26 14:46:28 -07:00
John McCutchan f01b6dd5b2 privatize and remove some fields in Isolate response
- Remove features
- Make heaps -> _heaps
- Make tagCounters -> _tagCounters.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//1156183002
2015-05-26 14:05:50 -07:00
Todd Turnidge 0967b63073 Add the streamListen and streamCancel rpcs to the vm service.
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
2015-05-26 13:52:35 -07:00
Ryan Macnak e674f0dc62 Revert "Per-closure breakpoints; restructure breakpoint implementation to keep a list of conditions."
This reverts commit d37149ad3b.

Review URL: https://codereview.chromium.org//1145053004
2015-05-21 17:20:57 -07:00
Ryan Macnak d37149ad3b Per-closure breakpoints; restructure breakpoint implementation to keep a list of conditions.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1146173003
2015-05-21 16:52:08 -07:00
John McCutchan d075f24f82 Fix reload() for VM object
Calling reload() on a VM didn't reload the VM because it lacks an id.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1129423003
2015-05-19 16:20:21 -07:00
rmacnak@google.com 06bd41df60 Use words please.
eval -> evaluate

isolate.evaluate(object, expression) -> object.evaluate(expression)

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1133733005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45823 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 20:28:28 +00:00
turnidge@google.com 2757d6e686 Rework error handling in the service protocol and in Observatory.
In JSON RPC, error results and regular results are distinguished structurally.  We now do this in the service protocol instead of returning a regular result with the "Error" type.

VM:

- Add PrintError method to JSONStream.  Use this to generate all errors in the service protocol.

- Fix some bugs with "limit" parameter handling.

- Change return value for heap rpcs when they find a collected/expired reference.

- Update tests.

Observatory:

- Add app.handleExceptions -- this is a widely-used exception handler that puts up a notification when there is an uncaught/unexpected exception.  Added a top-level zone catch that uses this handler, as well as explicit uses of this handler at various points in the code.  Most pages use this implicitly or explictly, except for the debugger page, which displays exceptions in the console.

[ General rule, when a function returns a Future, generally let the error pass through.  If a function does async work but doesn't return the Future, then it should handle errors explicitly by calling app.handleExceptions, etc. ]

- Fixed notifications.  They were generally broken.  Some hard-coded type names needed to be fixed, some hacks needed to be removed.

- Add a new class RpcException and a variety of subclasses which capture the error cases when making an rpc.

- Redo refresh buttons so their callbacks return Futures instead of taking a "done" closure.  Cleaner.  Allows us to move error handling outside of the callback.

- Drop ServiceError, ServiceException and the associated views.

- Redo notifications so that event and exception notifications are supported.

- No longer null out the vm when it is disconnected.

- Remove notifications when we visit the vm-connect page.  Only show the "Proceeding will lose current page" dialog when we aren't on the vm-connect page already.

- Improve error message on cpu profile page when profiling is disabled on the VM.

- Allow variables to wrap on debugger page.

- Make eval-box and eval-link tolerant of errors during rpc.  Make the errors display nicely.

- When a breakpoint is marked "not possible", make sure it disappears.  This got broken during script view refactor.

- Drop vm's errors and exceptions streams.  No longer needed.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1120133002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45792 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 19:34:37 +00:00
johnmccutchan@google.com f01c1490f7 Revert 45783
BUG=

Review URL: https://codereview.chromium.org//1138993005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com 95515238cc Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1139503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
rmacnak@google.com 69eea9a3c4 Add annotations for field and class declarations.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1133473007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45781 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 21:06:42 +00:00
johnmccutchan@google.com f4c3119a2e Add Service ID zones to service protocol
- Add ServiceIdZone interface for getting temporary ids.
- Add RingServiceIdZone which uses the isolate's object id ring.
- Add GrowableServiceIdZone which uses a growable array.
- Unit tests for ServiceIdZones.
- JSONStream has a service id zone.
- Default service id zone is ring with eager id allocation.
- All service RPCs can include a _serviceIdZone parameter.
- Value of _serviceIdZone can be Ring.NewId or Ring.ExistingId.
- All ObjectIdRing usage in object.cc has been replaced with `jsobj.AddServiceId("id", *this);`
- Add a policy for id reuse to ObjectIdRing::GetIdForObject
- ObjectIdRing can dump its contents to JSON.
- Add _dumpRingRequests RPC which dumps the isolate's ring.
- _getCrashDump includes complete object id ring.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//1132323002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45754 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 23:48:01 +00:00
johnmccutchan@google.com 8c10ef0558 Show tooltip with local variable value in Observatory debugger
- 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
2015-05-12 02:41:43 +00:00
rmacnak@google.com aba09abcb5 Update debugger_inspect_test for move to top-level method.
TBR=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1133713004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45667 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 23:10:22 +00:00
rmacnak@google.com 016214f002 Add Debugger.inspect. 1976 here we come!
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1132153002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45664 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 22:18:43 +00:00
johnmccutchan@google.com 1f851efdbb Rename 'dart:debugger' to 'dart:developer'
- Rename 'dart:debugger' to 'dart:developer'
- Make 'breakHere' and 'breakHereIf' top level functions.

R=iposva@google.com

Review URL: https://codereview.chromium.org//1132113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45658 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 21:24:57 +00:00
rmacnak@google.com d36add736d Make copying from script insets omit line numbers and breakpoint indicators.
Review URL: https://codereview.chromium.org//1137523002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45652 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 19:58:29 +00:00
johnmccutchan@google.com 95064c2d0d Fix Observatory rebuild
BUG=

Review URL: https://codereview.chromium.org//1133603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45589 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 12:45:33 +00:00