Commit Graph

678 Commits

Author SHA1 Message Date
Carlo Bernaschina 5680532769 Converted Observatory nav-bar element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2173613002 .
2016-07-22 13:53:12 -07:00
Carlo Bernaschina 4cb0cd442c Converted Observatory top-nav-menu element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2159273003 .
2016-07-21 17:20:00 -07:00
Carlo Bernaschina a459125aa1 Converted Observatory curly-block element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2160793004 .
2016-07-21 16:42:46 -07:00
Carlo Bernaschina b04ecef38b Refactoring of nav-notify
Required for the new menu structure.

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

Review URL: https://codereview.chromium.org/2161363002 .
2016-07-21 16:21:49 -07:00
Carlo Bernaschina fd1a529825 Adding _getBoolAttribute helper method
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2170783003 .
2016-07-21 16:14:29 -07:00
Carlo Bernaschina bc14cab5aa Added helper function to automatically dirty a RenderingScheduler on attribute change
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2159273004 .
2016-07-20 12:47:18 -07:00
Carlo Bernaschina 5282bd5b64 Suppressed warnings
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2165863002 .
2016-07-19 16:07:24 -07:00
Carlo Bernaschina 9fb05ba1f8 Converted Observatory nav-menu-item element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2160123002 .
2016-07-19 15:45:07 -07:00
Carlo Bernaschina b7ffd9339c Converted Observatory nav-menu element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2162733002 .
2016-07-19 15:28:29 -07:00
Carlo Bernaschina 0cc589e104 Converted Observatory nav-refresh element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2161633005 .
2016-07-19 15:20:04 -07:00
Carlo Bernaschina 250f2a92a4 Converted Observatory view-footer element
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2154413002 .
2016-07-19 09:43:21 -07:00
Carlo Bernaschina 3ebcc9fdd5 Added custom tags helper classes to the Observatory
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2154343002 .
2016-07-18 11:08:32 -07:00
Todd Turnidge 3a51fceaba First cut at _spawnUri rpc in the vm service.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2072543002 .
2016-07-11 14:25:27 -07:00
Carlo Bernaschina c4cd62032d Removed all analyzer issues from tests
Done by removing dead code, suppressing warning via getters, removed from analysis files with intentional errors and warnings.

Added tests for rpc commands:
 - setName
 - _getObjectStore

Added tests for particular exceptions:
 - OutOfMemory
 - StackOverflow

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

Review URL: https://codereview.chromium.org/2073893002 .
2016-06-20 16:26:57 -07:00
John McCutchan 51ace86544 Bug fixes for hot reload
- [x] Report the reload error synchronously from the _reloadSources RPC.
- [x] Add sticky reload error to an isolate so we can report the error.
- [x] Remove redundant 'OnStackReload'.
- [x] Fix a bug where a class could have a field added but we wouldn't reject it.
- [x] Add unit test for above bug fix.
- [x] Enable reload via the service protocol with a live stack.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2070873002 .
2016-06-16 11:02:35 -07:00
Carlo e1d39e28cf Fixed typo in comment
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2064943003 .
2016-06-14 15:25:59 -07:00
John McCutchan 1a4c2005cc DevFS initial implementation.
This cl implements an experimental filesystem maintained in the vm, called dart-devfs.  This will allow service protocol users to read and write source files while the vm is running.  This is needed for the reload support for flutter.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2059883003 .
2016-06-10 12:33:50 -07:00
Ryan Macnak 435b371cb7 Make the object store visible in Observatory.
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2012333002 .
2016-06-01 13:00:22 -07:00
Ryan Macnak 7bdf01560a Speculatively revert "Make the object store visible in Observatory."
This reverts commit 2eb8408969.

TBR=turnidge@google.com

Review URL: https://codereview.chromium.org/2002253005 .
2016-05-25 17:33:52 -07:00
Ryan Macnak 2eb8408969 Make the object store visible in Observatory.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2005983002 .
2016-05-25 11:12:32 -07:00
John McCutchan 48c8ffa7f3 Initial isolate reload support
This is a cut of the work that Todd and I collaborated on in the reload branch.

In this CL, we've dropped the loader port hacks, in other words, on stack reloading in the standalone embedder does not work yet.

- [x] Support for hot reloading of isolate source code
- [x] Unit test harness and many tests
- [x] Service protocol and Observatory support
- [x] Product build does not include support for hot reloading.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1965823002 .
2016-05-17 12:19:06 -07:00
Todd Turnidge 5e196ada5d VMMustBePaused -> IsolateMustBePaused
Closes #24537

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1973303003 .
2016-05-16 11:19:22 -07:00
Todd Turnidge 4d473a819f Allow users to see more elements of a list/map in Observatory.
Closes #26004

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1977873003 .
2016-05-13 15:08:55 -07:00
John McCutchan b895aa5154 Improve CPU Profile View
Service:

- [x] Add "_profilerMode" to VM response. "VM" or "Dart" depending on --profile-vm flag.
- [x] Output a tree where VM tag are treated as executing "exit frame" functions when profiling Dart.
- [x] tick "exit frame" tag functions when profiling Dart.

Observatory:

- [x] don't include option for VM tags when profiling Dart.
- [x] default to no tags when profiling Dart.

- [x] indent the colored bar closer to the down arrow.
- [x] don't show percentages for user tag rows.

- [x] Update cpu profile table view to use virtual tree.
- [x] Update class allocation view to use virtual tree.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1851293005 .
2016-05-13 10:07:19 -07:00
John McCutchan c566fc30c6 Add Timeline Developer Profiles for faster category switching
- [x] Add a drop down of preset enabled streams.
- [x] Relabel 'Get' button to 'Refresh'.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1975953002 .
2016-05-12 13:32:42 -07:00
John McCutchan db07faaa8c Improve Observatory Timeline UI
- [x] Remove Stop / Start buttons and replace with fine grained category control.
- [x] Restrict the cpu profile to the time span of the timeline.
- [x] Display recorder name.
- [x] Show a popup when fetching the timeline from the VM.
- [x] Show a popup when fetching the cpu profile(s) from the VM.

Fixes #26401
Fixes #26394

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1972523003 .
2016-05-12 07:16:19 -07:00
John McCutchan 5331af35bc Skip adding line based range data for ranges that don't map to a line.
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1960213002 .
2016-05-09 13:40:09 -07:00
Stephen Adams fcf5278b6c Observatory: Tweak disassembly comments
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1885273004 .
2016-04-15 09:56:13 -07:00
John McCutchan b1eb8859a5 Add call tree filter to Observatory CPU profile tree
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1846713003 .
2016-04-01 06:41:09 -07:00
John McCutchan 29225365fd Automatically fetch timeline when timeline page is loaded
R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1847043003 .
2016-03-31 11:03:14 -07:00
Ryan Macnak 1c107c4fbd vm-service: Include bytecode with _RegExp objects.
BUG=http://dartbug.com/26042
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1822933002 .
2016-03-31 10:05:18 -07:00
John McCutchan a72409a0d4 Refactor call tree search to support both Code and Function trees
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1837373002 .
2016-03-30 17:13:48 -07:00
Ryan Macnak 00eff0ff6a Improve error message when attempting to evaluate against a VM-internal object (e.g., a MegamorphicCache's table).
Don't accumulate object annotations on the disassembly when refreshing a Code view.

BUG=http://dartbug.com/26008
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1835393002 .
2016-03-28 14:51:06 -07:00
John McCutchan bae39a100c Dramatically increase the performance of Observatory's profile UI
- Add new VirtualTree view model. Only renders visible tree rows and keeps DOM load light regardless of tree size.

- Port Observatory profiler UI to new VirtualTree.

- sra's dart2js stress test instantly displays with this CL

Some trade offs:

- We get instant tree expand / collapse but scrolling is slower / janky. Need to investigate how to make this fast.

(short term) loss of functionality:

- UI is minimal for now. We don't display the attribute boxes or the InfoBox button.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1833453004 .
2016-03-25 15:02:38 -07:00
John McCutchan ecc6f0a050 Implement MojoSharedBufferGetInformation for Dart
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1809913002 .
2016-03-18 14:09:09 -07:00
Ryan Macnak 366f1f1ed1 Collect samples for background threads.
- Don't tick vm tags for background threads so the Observatory's summary pie chart reflects how the mutator spent its time.
 - Similarly, don't factor background samples in the CPU profile view.
 - Do include background samples in the timeline view.

Use a different event name for background compilations.

Add timeline events for the mark and sweep tasks.

Reload the isolate list when refreshing the timeline view so it includes profile ticks when the page is loading directly (e.g., F5) instead of only after visiting the vm page.

Fix loading the timeline when profiling is disabled.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1814813003 .
2016-03-18 10:18:38 -07:00
Todd Turnidge 0585ef2eca Fix observatory warnings
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1813033002 .
2016-03-18 09:42:36 -07:00
Todd Turnidge 22c37b9516 Improve class-tree, class-view, and instance-view.
class-tree
- Make all the rows have the same height.
- Hide synthetic mixin classes from the tree.
- Show mixin information in a different way.
- Show the total subclass count for each row if non-zero.

class-view
- Display supertype and mixin information

instance-view
- Display typeArguments, parameterizedClass, parameterIndex,
  targetType and bound information for Types.
- Display a source for Types.
- Provide an [eval] link for the runtimeType.

isolate-view
- Display the list of extension rpcs.

Update service.md.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1807263004 .
2016-03-17 12:48:48 -07:00
Ryan Macnak 6eaa45058c Perform a full GC by default when requesting a heap snapshot.
Prevents the snapshot from include objects that are only weakly
reachable.

BUG=http://dartbug.com/25994
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1811713002 .
2016-03-17 11:11:38 -07:00
John McCutchan 08c282bf7d Display source profiling information in Observatory
Depends on https://codereview.chromium.org/1779333004/

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1786703004 .
2016-03-14 12:38:58 -07:00
John McCutchan 32abe2ce55 Stream blocks of timeline events over the service protocol. Can be used to monitor long running programs without buffering all events inside the VM.
- Rename TimelineEventStreamingRecorder to TimelineEventCallbackRecorder. Note that this should only be used for tests.

- Add 'Timeline' service event stream.
- Send a 'TimelineEvents' event on the 'Timeline' stream whenever a TimelineEventBlock is finished and the 'Timeline' stream is subscribed to.

- Simple service protocol test.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1765563002 .
2016-03-04 12:30:50 -08:00
John McCutchan 49dc7e557b Fix some service protocol isolate life cycle races that were discovered by the Flutter testing tool.
Fixes #25902

Issue #1

Assuming --pause-isolates-on-start, there is a window of time after an isolate is made runnable and before it pauses at the first message that we say the isolate is "resumed".

- Fix issue #1 by claiming the isolate is paused on start if it will eventually pause on start.
- Also, handle the resume command for this state by clearing the 'should pause on start' bit.

Issue #2

Before an isolate is made runnable we say the isolate is "resumed".

- Fix issue #2 by introducing a new pause event "None".

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1756393002 .
2016-03-03 11:30:41 -08:00
Todd Turnidge 45ec466ce5 Make getSourceReport public.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1753903003 .
2016-03-02 10:26:27 -08:00
John McCutchan b2249f30fd Add persistent handles to service protocol and Observatory UI
VM Changes:

- Add private _getPersistentHandles service RPC.
- Add service_test for _getPersistentHandles.

Observatory Changes:

- Add Persistent Handles page.
- Display persistent handles in a curly-block
- Display weak persistent handles in a sortable table.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1719313002 .
2016-03-01 07:31:29 -08:00
John McCutchan 003fa8863f Fix analysis bots
BUG=

Review URL: https://codereview.chromium.org/1732303003 .
2016-02-25 12:51:16 -08:00
John McCutchan 5d50f1c64a Fix bots: Only load class if the isolate is runnable.
BUG=

Review URL: https://codereview.chromium.org/1735993002 .
2016-02-25 08:58:04 -08:00
John McCutchan b482480b65 Improve behaviour when we hit a stack overflow / OOM error
Fixes #25815

VM changes:

- Don't crash in SignalExceptionThrown when we have no stack frames.

- Notify the debugger about an unhandled stack overflow / OOM *after* setting the sticky error. This allows Observatory to display it.

- When pausing without a debugger attached, print the sticky error if one is set.

- Improve stack trace frame numbers when printing for a stack overflow.

Observatory changes:

- Report the sticky error for pause at unhandled exception as well as exit.

- Let the user know that we cannot pause for unhandled stack overflow / OOM exceptions.

- Don't show the "at <func> (<script location>)" string in the isolate summary, if we don't have a top frame.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1709383002 .
2016-02-25 07:33:01 -08:00
John McCutchan b39b2c8cfb Add ability to save and load timelines from Observatory
Fixes #25180

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1722373002 .
2016-02-24 09:12:30 -08:00
John McCutchan 7656cedf47 Refactor service tests in preparation of running on sky_shell
- Split service test common helper into separate file.
- Make many tests easier to adapt to line number changes.
- Refactor test launching in preparation of running these tests against sky_shell
- Pass --testee-mode as an environment variable instead of of a command line flag because Flutter applications cannot receive command line arguments.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1726773002 .
2016-02-23 10:51:48 -08:00
John McCutchan 5c8d79c55a Add step OverAwait to service protocol
Additions to service protocol:

- PauseEvent includes an "atAsyncContinuation" boolean value.
- Resume command can take an 'OverAsyncContinuation' step mode.
- Breakpoints have an optional 'isSyntheticAsyncContinuation' boolean value.

Added low level step_over_await_test.

Issuing the OverAsyncContinuation resume command does the following:

- Adds a synthetic breakpoint (#1) to the async closure.
- Resumes the isolate.
- When we hit #1, the VM issues a StepOver and then reports us paused at #1.

At the next resume command, the VM will remove #1.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1699153002 .
2016-02-17 11:02:55 -08:00