Commit Graph

1605 Commits

Author SHA1 Message Date
John McCutchan bb70592aa0 Update trace-viewer to a154c2f5e4ee5e7bafa82340a69b3cd32047de8c
BUG=

Review URL: https://codereview.chromium.org/1834223010 .
2016-03-31 10:07:53 -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
Ivan Posva c2700473c4 - Update test with available flag.
BUG=

Review URL: https://codereview.chromium.org/1838013002 .
2016-03-28 17:55:30 -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
Florian Schneider f3de2377ab Move the VM's typed_data implementation to runtime/lib.
This removes the additional indirection to the VM's implementation
for all the factory constructors.

Additionally, it removes one class per typed data list type, thus reducing
snapshot and generated code size.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1790593002 .
2016-03-21 13:39:49 +01: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 2939c74450 Add debugging output to crash_dump_test to help track down timeout.
BUG=

Review URL: https://codereview.chromium.org/1818443002 .
2016-03-18 10:01:45 -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
Erik Ernst 0d6af3c7a1 Reverts CL 1783423002 'Marked tests as Timeout ..'
Review URL: https://codereview.chromium.org/1790643002 .
2016-03-11 20:09:27 +01:00
Erik Ernst 2ee2fdb27c Marked tests as Timeout to match actual behavior.
The tests service/{vm_timeline_events_test,coverage_test}.dart were
marked in service.status as possible timeouts, because I received
buildbot failure email that they had timed out.

The CL https://codereview.chromium.org/1779173003 that I had landed
only added 3 new test files and changed the status files for them, so
it is my interpretation that the timeouts are unrelated to my changes.

Review URL: https://codereview.chromium.org/1783423002 .
2016-03-11 19:30:50 +01:00
Bob Nystrom cb7aa02116 Type check for-in statements.
This does nominal checking on the iterable expression used in a for-in
statement:

1. It must implement Iterable.
2. The type argument to Iterable must be assignable to the variable's
   type.

R=brianwilkerson@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org/1771153002 .
2016-03-08 11:25:49 -08: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 5d83c5ec9b Print isolate properly in debug output for IsolateRunnable events.
Be a bit more verbose in test_helper to help us track down some test hangs.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1760963002 .
2016-03-03 09:53:44 -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 59873fa42a Support for running service tests against sky_shell
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1752523002 .
2016-03-02 10:15:28 -08:00
Todd Turnidge 2284cfe839 Simplify pause_idle_isolate_test and add more debugging output.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1761503002 .
2016-03-02 10:02:36 -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 d08d4d8dba Dump functions on circular dependency parser error
Help with: https://github.com/dart-lang/sdk/issues/25545

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1751523003 .
2016-02-29 12:32:20 -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 543a7af08c Fix checked mode failures in service tests
BUG=

Review URL: https://codereview.chromium.org/1725993002 .
2016-02-23 12:35:48 -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
Siva Annamalai 64a5845d19 Fix status files to account for dart_product runtime.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1688423002 .
2016-02-17 12:22:35 -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
Todd Turnidge 2ef7f6f140 Improve --trace-service to help track down problems in full_coverage_test.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1690263003 .
2016-02-12 13:26:16 -08:00
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
Todd Turnidge 0de97fbaba Trace compilation during developer_extension_test.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1684283002 .
2016-02-10 13:46:59 -08:00
John McCutchan b9b0649b9c dart:developer service extension fixes
Fixes #25724
Fixes Florian Loitsch's emailed request (get rid of k prefix on constants).

- Rename ServiceExtensionResponse constants to not have a 'k' prefix.
- Provide more explanation on how to invoke service extensions (they require an 'isolateId' parameter).
- Require extension method names to begin with "ext." and recommend the template: "ext.package.command" to avoid conflicts with other packages.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1680593004 .
2016-02-10 08:54:51 -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 e2e7af1229 Remove more feature in product mode
- Remove Timeline.
- Remove more vmservice code.
- Remove AST printing.
- Remove IL printing.
- Remove profiler.
- Remove thread interrupter.
- Remove disassembler.
- Remove Library::CheckFunctionFingerprints.

- Update test status files for product mode.

Size of dart_bootstrap before: 5287631
Size of dart_bootstrap after: 5112783

Reduction in size: 174848 bytes.

Total reduction in size (382734 + 174848): 557582 bytes.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1678203002 .
2016-02-09 08:45:32 -08:00
John McCutchan 1e6c5f196b Add 'runnable' to Isolate service response
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1676233003 .
2016-02-08 10:14:17 -08:00
John McCutchan 3bf51e0138 Fix unnecessary Observatory rebuilds in Flutter
The cause of the rebuilds was that in v 1.14, running `pub build` modifies pubspec.lock file (v 1.13 and below did not do this, bug filed #25688) resulting in unnecessary rebuilds.

- Remove two output build rules because they cause issues with Make.
- Write our own stamp file and use that instead of pubspec.lock.

R=zra@google.com

Review URL: https://codereview.chromium.org/1664403002 .
2016-02-04 13:23:50 -08:00
Todd Turnidge 246c15257f Turn on service tracing for all service tests.
Minor refactor of hasPausedAtStart.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1664273002 .
2016-02-04 09:58:29 -08:00
Todd Turnidge 47a8f953e4 Fix race in service/logging_test.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1662833002 .
2016-02-02 16:57:12 -08:00
Todd Turnidge 222f6726d0 getObject now supports specifying offset,count for strings.
Closes #25157

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1653183002 .
2016-02-01 14:49:47 -08:00
Todd Turnidge dacb44079a If testeeBefore returns a future, wait for it.
This fixes some flakiness in a bunch of service tests that assumed this
would work.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1656483002 .
2016-01-29 16:41:16 -08:00
Todd Turnidge 1911f508dd "Pass Slow" -> "Pass, Slow". Add a debugging print.
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1649123002 .
2016-01-29 12:54:44 -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
Todd Turnidge bf385e448c Document the getSourceReport rpc in service.md. Bump version to 3.1.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1641133004 .
2016-01-29 10:40:18 -08:00
Todd Turnidge bf130de6c0 Fix a bug where breakpoints where not getting properly deleted.
This bug was causing it to be impossible to single-step to locations
which had deleted breakpoints.

In fixing this problem, another issue was exposed, where, if we single
step while at a breakpoint, we would hit the same pc twice in the
debugger.  I have added a "skip step" mechanism which allows us to
skip the next single-step after a breakpoint.

Added a test.

Closes #25465

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1641793002 .
2016-01-27 11:49:56 -08:00