Commit Graph

16 Commits

Author SHA1 Message Date
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
Vyacheslav Egorov 23fd1a184b VM: Support bootstrapping core libraries from Kernel binaries instead of source.
BUG=http://dartbug.com/27590
R=asiva@google.com

Review URL: https://codereview.chromium.org/2485993002 .
2016-11-16 13:56:20 +01:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Florian Schneider eb600a9af6 VM: Add more array intrinsics.
Make building array intrinsics a little easier for future additions.

For now I added a few that are frequently used in Flutter.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2235433002 .
2016-08-09 17:38:53 -07:00
Ryan Macnak 2e9c5f9a91 Reapply "VM: Add result cid information for recognized methods."
- _HashVMBase._index is nullable
 - _HashVMBase._data is a regular Array
 - DBC fixes from Zach.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2033553002 .
2016-06-02 09:59:48 -07:00
Ryan Macnak 907a6b1c3b Revert "VM: Add result cid information for recognized methods."
In Flutter, this caused

  RangeError (index): Index out of range: index should be less than null: 0
  Uint32List.[]= (dart:typed_data)
  _HashVMBase&MapMixin&&_LinkedHashMapMixin._insert (dart:collection-patch/compact_hash.dart)

This reverts commit 0ae4ae5033.

TBR=fschneider@google.com

Review URL: https://codereview.chromium.org/2023423002 .
2016-06-01 14:08:48 -07:00
Florian Schneider 0ae4ae5033 VM: Add result cid information for recognized methods.
We already had this for recognized factories. This CL adds a result cid
for the remaining recognized methods.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2018363004 .
2016-06-01 09:42:48 +02:00
Florian Schneider 60b4e00770 VM: Intrinsify some common SIMD methods to speed up precompiled SIMD code.
This speeds up precompiled code using SIMD (around 2x on Tracer).

Also fix printing of recognized methods which was off-by-one.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1347203005 .
2015-09-22 18:28:01 +02:00
John McCutchan 6e42aec4f6 Deprecate 'dart:profiler' and move functionality to 'dart:developer'
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1133713006
2015-05-18 11:31:20 -07:00
johnmccutchan@google.com f01c1490f7 Revert 45783
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com 95515238cc Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
asiva@google.com 8f9eee3f22 - Use conditional code inclusion for the dart_no_snapshot and dart executables using the MACRO DART_NO_SNAPSHOT
- Do some minor modifications to the intrinsifier code to not do redundant fingerprint checks and avoid code duplication.

These changes result in a text segment size savings of about 110k.

Old Sizes:
   text    data     bss     dec     hex filename
3801418    7696   19261 3828375  3a6a97 (TOTALS)

New sizes:
   text    data     bss     dec     hex filename
3690342    7696   19261 3717299  38b8b3 (TOTALS)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45704 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 18:31:55 +00:00
vegorov@google.com e31313efea Refactor _ByteDataView.[set|get]<Type> methods to improve their performance.
- don't manually truncate values before passing them to TypedData._[set|get]<Type> - these methods already have truncating semantics;

- don't call into runtime for endianess conversion, implement it in pure Dart instead (with an intent to provide optimized version on platforms that support fast byte-swapping instructions);

- force inlining of these methods (change the order of checks in the ShouldWeInline to guarantee inlining of whitelisted methods).

Unrelated change:

- tweak output of Function::CheckSourceFingerprint to be immediately copy&paste useful.

R=fschneider@google.com
BUG=http://dartbug.com/22107

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43038 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 14:21:49 +00:00
fschneider@google.com a49870e721 VM: Remove use of IterableMixinWorkaround from _List, _ImmutableList and _GrowableList.
_List, _ImmutableList and _GrowableList now extend ListBase which uses ListMixin.

Note that typed data lists are still using IterableMixinWorkaround for now.
They will be changed in a separate CL since it involves a few more changes
to the VM.

BUG=dartbug.com/13647
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42061 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 10:38:51 +00:00
vegorov@google.com 41bc926f6c Suppress inlining of complex Bigint intrinsics.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41558 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 13:56:19 +00:00
fschneider@google.com 4983823977 VM: Improve performance of method recognizer and unify the it with the intrinsifier.
The method recognizer is now in a separate file and the intrinsifier uses the
same infrastructure. Each function is marked at initialization time, so that
recognizing a method is a fast operation (reading a field from the Function object)

I cleaned the symbol table from unused symbols since I had to regenerate the
binary snapshot in the repository anyway for this change.

I had to rename the methods that are duplicated between the recognized method list
and the intrinsics list to match the naming convention used by the method recognizer.
I left the other intrinsics unchanged for now. They will be renamed in a future CL.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39444 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 10:21:09 +00:00