Commit Graph

678 Commits

Author SHA1 Message Date
rmacnak@google.com e50afbe963 Build script views programmatically.
Preparation for displaying source annotations attached to locations more specific than a line number.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44140 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 19:19:51 +00:00
johnmccutchan@google.com 3e8a273f83 Make getIsolate ensure that the VM has been loaded before checking for the isolate
Fixes 'reload' development workflow.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44093 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-27 14:31:35 +00:00
johnmccutchan@google.com f2333f63a5 Add Function based profile tree
Profiler improvements:
- Track Functions in profile and build Function based trie
- Associate code objects with functions
- Created cpu_profile.dart library
- Major speed improvements for disassembly view
- Fix truncation of disassembly comments
- Ability to get code object ticks from disassembly view
- Inlining mini-map in disassembly view.
- Remove a bunch of unused data from profile service response
- In some cases a caller PC that is better than the PC marker is inserted into the stack trace
- Inlined functions are expanded
- Ability to clear profile
- New flag '--keep_code' which keeps deoptimized code around for use by the profiler.

General fixes:
- Fix caching in service library
- Remove pubspec.yaml before running pub get

R=asiva@google.com, rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44067 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 18:48:55 +00:00
johnmccutchan@google.com cadc1a495b Fix isolate lifecycle handling in service library
- Use IsolateCreated and IsolateShutdown events to edit the VM's isolate cache directly.
- IsolateCreated and IsolateShutdown events are owned by the VM.
- When eagerly loading a new isolate, consume any errors rather than letting them bubble up to the application level.
- When reloading the VM perform an edit the isolate cache instead of replacing it.
- When reloading the VM do not reload all isolates.
- Fix flaky coverage_test fail by delaying setting the breakpoint.
- Add isolate lifecycle unit test.
- Make the isolate cache observable and send an observable notification that the 'isolates' property has changed when editing the isolate cache.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44056 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-26 17:00:50 +00:00
turnidge@google.com 6cf5792469 Add command line history to Observatory debugger.
BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43785 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 23:36:27 +00:00
turnidge@google.com ace003886c Implement function entry breakpoints in Observatory debugger.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43782 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 22:37:39 +00:00
turnidge@google.com b4dc1dbd66 Add Breakpoint class to Observatory.
BUG=
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43776 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 19:19:32 +00:00
turnidge@google.com 62a169114c Implement 'help' command for Observatory debugger.
Supports tab-completion.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43749 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 05:15:00 +00:00
turnidge@google.com 596413dc93 Add 'break' and 'clear' commands to Observatory debugger.
break adds a breakpoint, clear removes it.

Formats:
  break                   - break at current position
  break 13                - break at line 13, current script
  break	13:20 	          - break at line 13, col 20, current script
  break	script.dart:13    - break at line 13, script.dart
  break	script.dart:13:20 - break at line 13, col 20, script.dart
  break	main              - break at function
  break	FormatException   - break at constructor
  break	_SHA1._updateHash - break at method

clear supports the same location specifiers.

TAB completion works for all of these formats.

The protocol does not yet support setting column-specific or
function/constructor/method breakpoints.  For now we just support
parsing these formats.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43733 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 18:49:06 +00:00
turnidge@google.com e1f31e1513 Add a working command line debugger to Observatory.
Try it!

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43618 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 22:03:31 +00:00
turnidge@google.com 8ebad12515 Fix dart warnings.
BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43515 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 18:21:23 +00:00
turnidge@google.com d554f4fbfe Finish moving service protocol to json rpc.
Service

- Remove support for old-style service requests.

- Drop 'arguments' from JsonStream and ServiceRequestHandler.

- Json-rpc inspired renaming: command->method, options->params all over.

- Implement getFlagList, setFlag, getObjectByAddress.

- Add helpers PrintMissingParamError and PrintInvalidParamError
  to make our error messages more regular.

- Update tests.

- Service_SetSource removed for now.  John will resurrect.

Observatory

- Drop all Deprecated 'get' functions.  We now use json rpc for everything.

- Drop 'link' and 'relativeLink' from ServiceObject -- they were
  ui-specific and they are no longer meaningful anyways.  Use 'id' instead.

- New pages: VMPage, FlagsPage, InspectPage, ErrorPage.  All urls
  used by Observatory are now 'new school' and have a proper
  prefix.  ErrorPage is the new catch-all.

- Pages now use a Uri instead of a url String.  This lets them
  grab query parameters more easily.

- SimplePage replaces IsolateSuffixPage.

- We now use gotoLink() or makeLink() to make our navigation
  links.  gotoLink gets some optional parameters to make it
  easier to construct links to ServiceObjects.

- Rework mouse clicks on the heap map to use getObjectByAddress.

- Remove the breakpoint_list.  It wasn't working.  I'll add it back later.

- Silence logging of getIsolateMetric/getVMMetric.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43514 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 17:45:52 +00:00
johnmccutchan@google.com 1426cfc03b Port metrics to RPC
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43486 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 21:27:49 +00:00
johnmccutchan@google.com d9e951d5a3 Port _echo, etc commands to RPC
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43447 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 23:17:05 +00:00
turnidge@google.com 91afcbdfc9 Rename the get* methods in preparation for removing them.
Add proper caching to getObject, etc.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43431 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 21:47:39 +00:00
johnmccutchan@google.com 9d1bb3aa6b Port type arguments to new RPC protocol
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43428 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 21:26:19 +00:00
turnidge@google.com 3fbbf4edc2 Support root-level json rpc requests in the vm service.
Add getVM and getIsolate rpcs.

Add support for Code objects to getObject.

Begin using getVM, getIsolate, and getObject in the Observatory.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43423 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 20:31:11 +00:00
johnmccutchan@google.com 57ea35671c Add getClassList RPC
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43414 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 17:59:45 +00:00
johnmccutchan@google.com 7794b4a71e Small refactor of pages
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43408 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 17:11:23 +00:00
turnidge@google.com e65e6fab9d Begin migrating the vm service from a rest-style interface to a json-rpc style interface.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43370 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-02 23:15:40 +00:00
johnmccutchan@google.com 694f85ae3a Fix Observatory disassembly view
BUG=
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43116 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-23 18:46:14 +00:00
turnidge@google.com 26e192cc9e Command line parsing utilities. Not yet used in observatory.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42968 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 18:45:32 +00:00
turnidge@google.com 7446002f34 Introduce elipses when there are long stretches of blank lines in observatory.
This is a reheat/rewrite of an old CL that got lost in the mill.

BUG=
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42966 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 18:13:37 +00:00
johnmccutchan@google.com 4526f3ed72 Improve performance of table trees by around 3x
*) Stop using Polymer's template repeat for building table trees.
*) Refactor TableTree and TableTreeRow to be easier to use without template repeat.
*) Port class tree to new TableTree interface.
*) Rename isolate-profile to cpu-profile.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42755 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 22:03:14 +00:00
koda@google.com 98e2fafbf2 Rank most retaining instances for each class.
Keep a heap snapshot (object graph) in the isolate.
On request from a class view, show 10 most retaining instances.

Currently, a new snapshot is fetched every time a ranking is requested.
In the future, we will want more fine-grained management of snapshots,
with its own dedicated view/console.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42754 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 21:31:14 +00:00
johnmccutchan@google.com 261200c587 Build Observatory as part of runtime
Relanding https://codereview.chromium.org/810623005/

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42645 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 21:59:42 +00:00
whesse@google.com aa5a986d5d Revert "Build Observatory with runtime"
This reverts commit 76df7b3c1bf83c08d3994d61df4c9c530fadb4e5.
This commit breaks dartium compilation.

BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42619 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 10:07:58 +00:00
johnmccutchan@google.com 9d6ac72b46 1) Remove prebuilt Observatory sources
2) Move observatory from runtime/bin/vmservice/observatory to runtime/observatory

3) Add two tools scripts:
- tools/run_pub.py (runs pub before SDK is built)
- tools/obs_tool.py (helper for get, build, and deploy stages)

4) Build Observatory with runtime:
- pub get --offline
- pub build
- deploy

5) Build artifacts are now in standard output directory, for example, out/DebugIA32/observatory.

6) Add a new 'dart_boostrap' host target (no snapshot, no observatory) that can be used as the Dart executable to run pub when building Observatory. This is behind a build.py flag --use-bootstrap-for-observatory because:

- It is only necessary on older Linux distributions that are incompatible with the prebuilt Dart testing executable.
- running pub build with the boostrap Debug build is significantly slower.

7) Detect if the prebuilt executable doesn't work and automatically switch to the 'dart_bootstrap' executable. Also, warn the user and provide a Wiki link with more information.

R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42614 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 21:26:52 +00:00