Commit Graph

1103 Commits

Author SHA1 Message Date
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
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
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
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 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 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 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
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
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
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
John McCutchan 146efcfde0 Mark coverage_test as Pass Slow and enable tracing
BUG=

Review URL: https://codereview.chromium.org/1630993002 .
2016-01-25 13:02:56 -08:00
Regis Crelier 7f57ebcfa1 Remove signature classes from the VM.
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.

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

Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
John McCutchan 77101d63e3 Source positions for constructors and lots of async machinery
- Rework token position address space.
- Use ClassifyingTokenPositions::kMethodExtractor for the token position of a method extractor.
- Plumb token positions through all of Ast Transformer.
- Plumb token positions for temporary expressions, etc in Flow Graph Builder.
- Add token positions for parts of the await machinery.
- Move ClassifyingTokenPositions into token.h.
- Remove default token position of Scanner::kNoSourcePos for many IR instructions.
- A couple of unit tests.
- Use synthetic token positions for synthetic AstNodes.
- Fix SLEB128 encoding / decoding + test
- s/Scanner::kNoSourcePos/Token::kNoSourcePos.
- Remove >= 0 and < 0 checks against token positions and use helpers instead.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1589643002 .
2016-01-19 15:01: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 539ac23fb4 Add PossibleBreakpoints source reporting.
This allows tools developers to discover which token positions
correspond to possible breakpoints in the code.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1586253002 .
2016-01-15 09:02:38 -08:00
Rico Wind 55c7aa561b Print the data we get back from the tcp socket meta data service
We are seeing flakes on win64 with this test

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org/1565403003 .
2016-01-08 11:46:33 +01:00
Todd Turnidge a283265955 Add the forceCompile param to _getSourceReport.
Deal with some empty ranges that were being emitted.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1562993003 .
2016-01-07 11:33:33 -08:00
Todd Turnidge 61d9752c7e Expose the new _getSourceReport api in the service protocol.
Allow multiple reports to be requested simultaneously.

I'm not exposing this publicly yet -- still nailing down the format a bit.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1566793002 .
2016-01-06 13:01:33 -08:00
John McCutchan cb8b641cc9 Make Scanner::kNoSourcePos be a true sentinel value
- It is possible to write a Dart program with a function token_pos of 0.
- Switch Scanner::kNoSourcePos from 0 to -1.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1564493002 .
2016-01-06 09:06:28 -08:00
John McCutchan bedd2cbf25 Support narrowing a timeline to a given time window
- Assign correct timestamps for timeline events from Dart code.
- Support optional 'timeOriginMicros' and 'timeExtentMicros' to _getVMTimeline service RPC.
- Relax time extent check in profiler.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1533323004 .
2015-12-22 09:18:45 -08:00
Ryan Macnak 6b964b83ac Add ./tools/test.py -c precompiler -r dart_precompiled.
- Make --gen/run-precompiled-snapshot take a directory to use for the snapshot pieces.
 - Throw on Platform.executeable to prevent tests from becoming fork-bombs.
 - Update status files so 'dart_precompiled' is generally expected to behave the same as 'vm'.

Currently multitests will fail unless run with --jobs=1 because the test harness assigns them the same temporary directory.

Running this also requires a great deal of space. My out directory is 380G.

BUG=http://dartbug.com/24975
R=fschneider@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org/1507943002 .
2015-12-18 12:08:10 -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
William Hesse 6485590527 Remove old java-based analyzer from test scripts and status files
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1537653002 .
2015-12-17 14:44:57 +01:00
Ryan Macnak 0980c1af96 Further fix get_cpu_profile_timeline_rpc_test.
Review URL: https://codereview.chromium.org/1529093005 .
2015-12-16 14:59:33 -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 55a22037fb Fix get_cpu_profile_timeline_rpc_test.
AddProperty64 encodes as a JSON integer, not a JSON string.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1535513002 .
2015-12-16 13:42:06 -08:00
John McCutchan 2db0ad84d0 Test that we can load Observatory frontend resources
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1529153003 .
2015-12-16 13:03:01 -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
John McCutchan fb33d9deff Fix get_vm_timeline_rpc_test
BUG=

Review URL: https://codereview.chromium.org/1530703002 .
2015-12-15 11:17:45 -08:00