Commit Graph

740 Commits

Author SHA1 Message Date
Kevin Millikin f31b6d5e2c Reland "Track the 'awaiter return' call stack..."
Original CL: https://codereview.chromium.org/2692803006/

Original commit message:
Tracking the awaiter return call stack:

- [x] Each async function closure now knows who is awaiting on their
return. This is effectively the asynchronous equivalent of the 'frame pointer'.
- [x] Each async* function closure now knows how is listening on their
stream. This is effectively the asynchronous equivalent of the 'frame pointer'.

Detecting uncaught exceptions in async functions:

- [x] Code object keeps a map from :await_jump_var to token position
- [x] Exception Handlers keep track if they are generated (as part of compilation) or directly from user code
- [x] Debugger maps :await_jump_var to a specific try index

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2725623003 .
2017-02-28 16:13:41 +01:00
Kevin Millikin a0965a641f Revert "Track the 'awaiter return' call stack..."
Revert a pair of commits that cause failure of the Kernel continuation
transformer:

  cba7e3e79a
  4fe4f177de

R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2718353002 .
2017-02-28 12:46:31 +01:00
John McCutchan cba7e3e79a Track the 'awaiter return' call stack use it to detect uncaught exceptions in async functions
Tracking the awaiter return call stack:

- [x] Each async function closure now knows who is awaiting on their
return. This is effectively the asynchronous equivalent of the 'frame pointer'.
- [x] Each async* function closure now knows how is listening on their
stream. This is effectively the asynchronous equivalent of the 'frame pointer'.

Detecting uncaught exceptions in async functions:

- [x] Code object keeps a map from :await_jump_var to token position
- [x] Exception Handlers keep track if they are generated (as part of compilation) or directly from user code
- [x] Debugger maps :await_jump_var to a specific try index

Fixes #27242

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2692803006 .
2017-02-27 14:16:15 -08:00
John McCutchan 8a33d63811 Fix checked mode failure of causal_async_star_stack_contents test
BUG=

Review-Url: https://codereview.chromium.org/2719503002 .
2017-02-24 07:30:40 -08:00
John McCutchan 6a312d429b Fix causal_async_star_stack_contents_test with optimization-counter-threshold=5
There was an off by one error when generating the causal async stack trace
in the debugger. We were always adding one more frame pass the sentinel frame.
This frame is always _Closure.call which is filtered out by the debugger
already. However when --optimization-counter-threshold=5, _Closure.call was
inlined and we ended up appending the inliner to the stack trace. The
inliner is not filtered out by the debugger so we got an extra frame in
the stack trace.

Fixes #28861

BUG=
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2707413002 .
2017-02-24 06:58:39 -08:00
Peter von der Ahé f1dc355971 Mark service/isolate_lifecycle_test flaky on all platforms.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2710023004 .
2017-02-23 13:42:55 +01:00
John McCutchan ece78e3d5a Add missing pieces of my last CL
Somehow patch set #1 was landed instead of patch set #2
This CL includes the missing pieces.

BUG=

Review-Url: https://codereview.chromium.org/2694393003 .
2017-02-15 04:09:10 -08:00
John McCutchan d264156cfb Add tests of line numbers to causal async stack tests
BUG=
R=devoncarew@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2694013003 .
2017-02-15 00:38:46 -08:00
John McCutchan 19abef97f1 Reland improvements to causal async stack traces
Original CL: https://codereview.chromium.org/2690683002

Improvements to causal async stack traces

UX improvements:

- [x] Stop printing the suffix <%s_async_body> and <%s_async_gen_body> for the generated closures.

Fixes #28743

- [x] Don't include the duplicate frame below the asynchronous suspension marker.

Fixes #28742

Bug fixes:

- [x] Fix service protocol enum naming so that it is consistent with other enums.

Fixes #28726

Misc:

- [x] Stop using package:stack_trace now that the VM does it for us.

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

Review-Url: https://codereview.chromium.org/2691213003 .
2017-02-14 05:00:04 -08:00
John McCutchan e84d8a1f11 Revert "Improvements to causal async stack traces"
This reverts commit 8538d81473.

BUG=

Review-Url: https://codereview.chromium.org/2694213002 .
2017-02-14 02:29:40 -08:00
John McCutchan 8538d81473 Improvements to causal async stack traces
UX improvements:

- [x] Stop printing the suffix <%s_async_body> and <%s_async_gen_body> for the generated closures.

Fixes #28743

- [x] Don't include the duplicate frame below the asynchronous suspension marker.

Fixes #28742

Bug fixes:

- [x] Fix service protocol enum naming so that it is consistent with other enums.

Fixes #28726

Misc:

- [x] Stop using package:stack_trace now that the VM does it for us.

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

Review-Url: https://codereview.chromium.org/2690683002 .
2017-02-14 00:56:55 -08:00
Zachary Anderson 0111122ca0 [Fuchsia] Update test status files
R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2693643002 .
2017-02-10 21:34:33 -08:00
John McCutchan a0ee5b24db Track async causal stack traces
This CL improves the stack traces that accompany exceptions. Whenever an
async function is entered, we remember how we got there. This is similar
in spirit to package:stack_trace but the implementation is more efficient
and memory usage can be more easily reasoned about.

Tracking causal stack traces:

- [x] Upon entry to an async function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Upon entry to an async* function, capture the synchronous stack trace prefix and store it into the closure.
- [x] Before returning from an async function, clear the Thread's asynchronous stack trace.
- [x] After resuming an async function, load the sychronous stack trace prefix into the Thread.
- [x] Filter stack traces to remove async machinery.

Service protocol changes:

- [x] Send causal async stack trace.

Observatory changes:

- [x] Display causal async stack trace below async functions.

Fixes https://github.com/dart-lang/sdk/issues/27661

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

Comparisons: https://docs.google.com/a/google.com/document/d/10r6jEqr8OCiDZ4y9SYU_uOimcHiOGAZMly2ghTErALI/edit?usp=sharing
Review-Url: https://codereview.chromium.org/2646443005 .
2017-02-09 15:39:44 -08:00
Jens Johansen 65e5de9a42 Make service tests more resilient to isolate load timing
https://github.com/dart-lang/sdk/issues/28609

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2670303003 .
2017-02-09 10:02:16 +01:00
John McCutchan e213cf3b15 Mark that developer_extension_test now passes on app-jit
BUG=

Review-Url: https://codereview.chromium.org/2680203003 .
2017-02-07 16:04:16 -08:00
John McCutchan dcbb57a0c5 Fix developer extension test expectations
BUG=

Review-Url: https://codereview.chromium.org/2684723002 .
2017-02-07 11:56:42 -08:00
John McCutchan 4c621ebd90 Update service.status
Fixes #27225
Fixes #26490

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2679733003 .
2017-02-07 11:17:08 -08:00
John McCutchan 25e8f56425 Fix get_ports_rpc_test to be insensitive to system level ports
Fixes #28560

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2681583002 .
2017-02-06 13:43:45 -08:00
John McCutchan 4b436fa24b Fix vm_timeline_flags_test flake
Fixes #28625

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2683443002 .
2017-02-06 13:29:16 -08:00
Brian Wilkerson 2ee2fe9b5c [Gardening] Disable running strong-mode analyzer tests in code that is not strong mode clean
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2679553003 .
2017-02-06 13:26:39 -08:00
Florian Loitsch d2f9ba6d37 Mark vm_timeline_flags_test as flaky everywhere.
Review-Url: https://codereview.chromium.org/2679633004 .
2017-02-06 19:55:48 +01:00
Kevin Millikin 8d7583b8d1 Mark a service test that seems flaky on Windows
This test has failed twice recently, both times on Windows.  This is
issue #28625.

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2671783004 .
2017-02-03 13:50:57 +01:00
Kevin Millikin 407464ce90 Mark a pair of flaky service tests
These test have (unexpectedly) different event timestamps.  This is
issue #28624.

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2671613007 .
2017-02-03 13:29:20 +01:00
John McCutchan 95b84d898e Fix stale key names in get_isolate_rpc_test.
BUG=
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2673753002 .
2017-02-02 15:10:32 -08:00
Todd Turnidge e60003d1a7 Remove a major source of flaky service test failures.
The first three bugs below have bug reports which indicate that they
will be fixed.  The bottom three bugs were filed without log
information, so it is impossible to know if they will be fixed or not,
but it is quite possible.

Closes #26470
Closes #28947
Closes #28605
Closes #28091
Closes #28184
Closes #28185

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2671603004 .
2017-02-02 14:54:20 -08:00
Ben Konyi c8e275537d Surfaced native heap memory allocation information to the Observatory
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2667743004 .
2017-01-31 16:09:49 -08:00
Ben Konyi b00df4d4ac Modified service to include current native zone memory consumption information in the VM object. Added a field to display this new information on the main page of the Observatory.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2657283004 .
2017-01-31 13:26:01 -08:00
Todd Turnidge bcb7cfa79e Better reporting of ambiguous and "not found" commands in Obs debugger.
Add a missing space in another random file.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2552783003 .
2017-01-31 11:31:31 -08:00
Ben Konyi de72bf4991 Moved isolate high watermark calculations into the Observatory client.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2656723002 .
2017-01-25 15:03:42 -08:00
Florian Schneider 1f046952d8 Fix service test script to avoid unhandled exception.
This caused the test to fail sometimes.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2647573006 .
2017-01-20 16:44:49 -08:00
Florian Schneider 3e59f95717 Fix debugger's calculation of the context level in async code.
The synthetic call to completeError has the function end as a token position.

This caused the < comparison to fail, and not find the correct context level
when creating a stacktrace in the debugger.

Fixes #28443

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2646093006 .
2017-01-20 16:08:38 -08:00
Ryan Macnak 26a364f998 Support spawnUri in app snapshots.
- Don't mark core_isolate_snapshot_buffer as a const pointer.
 - Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.

Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2637193002 .
2017-01-17 15:59:41 -08:00
Kevin Moore 7c6b933e35 Improve display of long isolate names on summary page
Helps with https://github.com/dart-lang/sdk/issues/28413

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

Review-Url: https://codereview.chromium.org/2630423003 .
2017-01-17 13:34:38 -08:00
Ryan Macnak 12a3699301 Revert "Support spawnUri in app snapshots."
Failures on IA32.

This reverts commit c6ecfe1746.

Review-Url: https://codereview.chromium.org/2631893002 .
2017-01-13 15:52:36 -08:00
Ryan Macnak c6ecfe1746 Support spawnUri in app snapshots.
Don't mark core_isolate_snapshot_buffer as a const pointer.

Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2623423007 .
2017-01-13 15:18:27 -08:00
Ryan Macnak f89056f6cd Revert "Support spawnUri in app snapshots."
This reverts commit 593d4504b0.
This reverts commit 113aa64b98.
This reverts commit 422afa2ead.

Review-Url: https://codereview.chromium.org/2633543003 .
2017-01-13 11:02:44 -08:00
Ryan Macnak 593d4504b0 Support spawnUri in app snapshots.
Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2628283002 .
2017-01-13 10:37:51 -08:00
Matthias Hausner f405632801 Fix test with broken token position expectations
BUG=

TBR=regis

Review-Url: https://codereview.chromium.org/2629263002 .
2017-01-12 14:42:39 -08:00
Florian Schneider bef4967ea1 Remove dart_noopt and related parts from the VM.
dart_noopt is not needed anymore because we have testing
and builbot integration of the real precompilation pipeline in place now.

Fixes #24569
Fixes #25726
Fixes #25845

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2624393002 .
2017-01-11 16:55:55 -08:00
Jennifer Messerly 816592a941 fixes #28236, generic methods should not cause warnings in Dart 1
Instantiate universal functions in subtype tests & tear-offs. Also updates the status files and one Analyzer test that covered the tear-off type.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2621433003 .
2017-01-09 12:46:20 -08:00
Ben Konyi 4024151adb Added isolate + thread high watermark tracking to Observatory
This is a fixed version of c84f30741c90d040254767ff769a40d2cba3fb1a that
resolves issues with comparing uint and intptr_t.

Original Commit Message:
Added tracking of memory usage inside of threads. In addition, the max memory usage is kept track of using a high watermark for both the threads and the isolates. Isolate high watermark information is updated when a thread exits the isolate. The isolate high watermark consists of the sum of all thread high watermarks (including the high watermark of the exiting thread). High watermark information for both threads and isolates is now visible in the isolate view in the Observatory.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2610253002 .
2017-01-05 14:24:53 -08:00
Zach Anderson 9dd4c11e8c Mark vm_restart_test Pass, Slow
R=johnmccutchan@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2609173006 .
2017-01-05 08:40:57 -08:00
Kevin Millikin e2ee86b3f7 Fix dart:typed_data runtimeType getters.
The proper way to override runtimeType in the VM is not to provide an
overriding getter in Dart code but to rely on Class::UserVisibleName.
This works both with optimizations and also with external typed data.

Closes https://github.com/dart-lang/sdk/issues/28183

BUG=
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2610513004 .
2017-01-05 11:28:22 +01:00
Ben Konyi ffda801791 Revert "Added isolate + thread high watermark tracking to Observatory"
This reverts commit c84f30741c90d040254767ff769a40d2cba3fb1a.

TBR=johnmccutchan@google.com

BUG=

Review-Url: https://codereview.chromium.org/2617513004 .
2017-01-04 15:21:35 -08:00
Ben Konyi b3c55f972f Added isolate + thread high watermark tracking to Observatory
Added tracking of memory usage inside of threads. In addition, the max memory usage is kept track of using a high watermark for both the threads and the isolates. Isolate high watermark information is updated when a thread exits the isolate. The isolate high watermark consists of the sum of all thread high watermarks (including the high watermark of the exiting thread). High watermark information for both threads and isolates is now visible in the isolate view in the Observatory.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2609253002 .
2017-01-04 15:08:02 -08:00
John McCutchan ebe7d148f3 Document some recent service protocol features
Document the `reloadSources` RPC.

Document the `PausePostRequest` pause event.

Document the 'IsolateReloaded' event.

BUG=
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2614643003 .
2017-01-04 13:45:27 -08:00
Ben Konyi 82cf4cc374 Added methods to surface number of zone and scoped handles for each isolate.
Added methods to surface number of zone and scoped handles in each isolate. These values are displayed in the isolate view page in the Observatory. These handle counts for the native IO isolate will be surfaced in another CL.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2601153002 .
2017-01-03 12:21:16 -08:00
Lasse R.H. Nielsen 44594277e1 Make core libraries use generic method syntax.
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math

The HTML related libraries are not changed. The templates used to build them
must be changed as well.

R=floitsch@google.com

Committed: https://github.com/dart-lang/sdk/commit/68818315b5cc6c63fea0e10e90f515f6083ec095
Committed: https://github.com/dart-lang/sdk/commit/3f74b8d82edca8c342c43306714e68ddf84548e1
Review-Url: https://codereview.chromium.org/2529393002 .
2017-01-03 12:05:40 +01:00
William Hesse 1b6cff6585 Skip debugger test that leaves running Dart process on app-jit.
BUG=https://github.com/dart-lang/sdk/issues/28180
R=sortie@google.com

Review-Url: https://codereview.chromium.org/2611513002 .
2017-01-02 10:44:33 +01:00
Ben Konyi e28b3e3c60 Revert "Added isolate + thread high watermark tracking to Observatory"
This reverts commit 0a1a534fd9.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2605933003 .
2016-12-28 16:49:47 -08:00