Commit Graph

10622 Commits

Author SHA1 Message Date
Matthias Hausner 7e82552124 Make local var assignments debuggable in checked mode
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2352993003 .
2016-09-20 17:31:22 -07:00
James Robinson 8a53ba91de Stop using deprecated (names of) magenta syscalls.
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2355953004 .
2016-09-20 15:55:51 -07:00
Matthias Hausner 631a48600b Fix debug break on assignment to global variable
Make sure a debug break is also inserted in checked mode.

BUG=#27287

Review URL: https://codereview.chromium.org/2351373002 .
2016-09-20 14:57:05 -07:00
Ryan Macnak fb127ddf4a Standalone: Add missing tree-shaker root.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2356953002 .
2016-09-20 14:44:05 -07:00
Matthias Hausner 0dd760092d Add debugger safe point on assignment to global variables
Just like we do for local variables, add a debug step check (and
thus a breakpoint location) to global variable assignment if
the right side of the assignment has no possible breakpoint locations.

BUG=#27287
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2354773002 .
2016-09-20 14:05:45 -07:00
Regis Crelier b91d74172a Make sure unresolved function type parameter bounds do not end up in snapshot.
Read and write parent_level field of function type parameters in snapshots.
Update TypeParameter::ToCString() to handle function type parameters.
Address Siva's comments in previous cl.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2359543003 .
2016-09-20 13:18:01 -07:00
Ryan Macnak 8610536da7 Misc Observatory tweaks.
- Fix profiler mode descriptions.
 - Add count for ports and class hierarchy.
 - Group 'heap snapshot' and 'heap map' together.

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

Review URL: https://codereview.chromium.org/2359553002 .
2016-09-20 12:44:36 -07:00
Zachary Anderson 43231d9ff4 Pull boringssl generated source from boringssl_gen
Dart and Flutter engine both need to have the code generated for
boringssl under //third_party/boringssl. To avoid having two
copies of this code, this CL removes it from the Dart repo and
instead pulls it from a github repo that Flutter engine can
share.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2354623003 .
2016-09-20 08:46:44 -07:00
William Hesse 80572c4038 Update status for browser tests
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2358583002 .
2016-09-20 16:36:01 +02:00
William Hesse 0695b1db3a Remove package root target and support scripts
BUG=https://github.com/dart-lang/sdk/issues/23565
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2346163005 .
2016-09-20 13:32:50 +02:00
Florian Schneider cd05ee0c81 VM: Fix canonicalization of old-space allocated instances
Instances of objects allocated in old-space would not get canonicalized properly,
resulting in duplicates of these instances on the heap.

This can be e.g. argument descriptors allocated in the background compiler thread.

This also fixes the same issue occurring with isolate reload.

Also, add a NoSafepointScope for consistency.

BUG=#27364
R=asiva@google.com

Review URL: https://codereview.chromium.org/2351613005 .
2016-09-19 17:27:05 -07:00
John McCutchan d78cbce63d Fix Observatory recompiles on fresh build
- [x] GYPI: Remove buggy dependency on the sdk's packages.stamp which shouldn't have been a dependency in the first place.
- [x] GN: Switch output names to match new non-polymer based build

BUG=

Review URL: https://codereview.chromium.org/2351933002 .
2016-09-19 16:41:42 -07:00
John McCutchan 500f4e4e7d Fix VM test Service_IsolateStickyError
BUG=

Review URL: https://codereview.chromium.org/2356613002 .
2016-09-19 15:26:25 -07:00
Regis Crelier 11562f6874 Support generic method syntax (fixes #25869).
Function type parameters are parsed and resolved, but mapped to malformed types
(i.e. dynamic) until full support is implemented.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2349593003 .
2016-09-19 15:17:33 -07:00
Ryan Macnak 7432d20eaa Fix IsCompiletimeErrorObject for precompiled.
R=hausner@google.com

Review URL: https://codereview.chromium.org/2350973002 .
2016-09-19 14:11:29 -07:00
John McCutchan 632c76942c Add Dart_GetStickyError
- [x] Add Dart_GetStickyError.
- [x] Change Dart_SetStickyError to allow for null and also not set the pause on exit bit.

BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/2350633003 .
2016-09-19 13:31:09 -07:00
John McCutchan 699e328105 Fix VM connect element test
BUG=

Review URL: https://codereview.chromium.org/2348313002 .
2016-09-19 07:33:44 -07:00
William Hesse 9f3b5d8680 Update observatory_tool.py to remove package-root
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2346483007 .
2016-09-19 10:11:31 +02:00
Ryan Macnak 5ecc880ffc Remove assumption from the heap verifier that objects occupy a narrow range of the address space.
Fixes #27373.

R=zra@google.com

Review URL: https://codereview.chromium.org/2349023002 .
2016-09-16 15:41:47 -07:00
Florian Schneider 9f00ce2b6e VM: Fix for deadlock with background tasks.
We have to do NotifyAll whenever a task finishes.

Also, remove thread notifications when a task is created, since we only ever wait for tasks to finish.

BUG=#27365
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2349853002 .
2016-09-16 15:03:36 -07:00
Zachary Anderson 509e6f3eb3 Fixes Dartium build
R=asiva@google.com

Review URL: https://codereview.chromium.org/2345773004 .
2016-09-16 13:52:45 -07:00
John McCutchan cbbb82cfbe Ship Observatory with non-minified sources
This will help our users report more actionable bug reports.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2348673003 .
2016-09-16 13:00:38 -07:00
John McCutchan b961fc01ad Fix bad commit of stale patch set of original CL "Make NoReloadScope thread safe" (https://codereview.chromium.org/2344193002/)
BUG=

Review URL: https://codereview.chromium.org/2344263002 .
2016-09-16 11:33:43 -07:00
John McCutchan d5f138e459 Fix async_generator_breakpoint_test so it awaits on isolate resume requests
BUG=

Review URL: https://codereview.chromium.org/2344253002 .
2016-09-16 11:24:53 -07:00
John McCutchan d113638891 Make NoReloadScope thread safe
Fixes #27366

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2344193002 .
2016-09-16 11:18:36 -07:00
Matthias Hausner be003d70f2 Fix Windows build
BUG=

Review URL: https://codereview.chromium.org/2342303003 .
2016-09-16 11:16:50 -07:00
Zachary Anderson 5348efba7d Skip heap verify on 64-bit with an app snapshot
See issue: https://github.com/dart-lang/sdk/issues/27373

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2348793004 .
2016-09-16 10:41:19 -07:00
John McCutchan e2b922b4c5 Fix service test websocket error edge case
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2343183002 .
2016-09-16 10:31:05 -07:00
Matthias Hausner 3e0d13bc28 Make compile-time errors catchable
If an error happens during the compilation of a function body, an Error is thrown which can be intercepted, and ensures that finally blocks are executed before the isolate is terminated.

The language spec is vague about compilation errors. A doc describing the intentions behind this CL is at
https://docs.google.com/document/d/1_MWOgwJadLCQSBps0zD6Rj5dG4iP1UBuiDvTMH-WMzI/edit#

Example:
     1	void bad() {
     2	    return 5
     3	}
     4
     5	void main(args) {
     6	    bad();
     7	}

Before this CL:
$ dart ~/tmp/e.dart
'file:///Users/hausner/tmp/e.dart': error: line 2 pos 11: semicolon expected
  return 5
          ^
$

After this change:
$ dart ~/tmp/e.dart
Unhandled exception:
'file:///Users/hausner/tmp/e.dart': error: line 2 pos 11: semicolon expected
  return 5
          ^

#0      main (file:///Users/hausner/tmp/e.dart:6:3)
#1      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#2      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)
$

Notice that the stack trace points to the call site of bad(), not the text location of the syntax error. That's not a bug. The location of the syntax error is given in the error message.

BUG= https://github.com/dart-lang/sdk/issues/23684
R=asiva@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/2044753002 .
2016-09-16 10:10:38 -07:00
John McCutchan 0d831bd5c8 Use Chain.capture instead of runZoned
- [x] Swap all calls of runZoned to Chain.capture.

Chain.capture is a wrapper around runZoned that tracks stack traces across asynchronous gaps.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2349753002 .
2016-09-16 09:44:06 -07:00
Zachary Anderson 139db22be5 Use OS-provided trusted root certs on Linux
First, the look for trusted root certificates
in standard locations on the file system
(/etc/pki/tls/certs/ca-bundle.crt followed by
/etc/ssl/certs), and only if these do not exist
will we fall back on the compiled-in trusted root
certificates. This behavior can be overridden
with the new flags --root-certs-file and
--root-certs-cache.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2346683003 .
2016-09-16 09:08:51 -07:00
Zachary Anderson 44a04f18f9 Use tcmalloc on Linux
Statically linking in the tcmalloc code is enough
to override the built-in malloc. I have this set up to
exclude the code for collecting heap profiles in a
Product build. There's still about a 230KB increase in
binary size, though. I think this isn't a big problem
since right now this is enabled only for server Linux.

product binary size:
before x64: 9569600
after  x64: 9807840
increase: 238240 (2.5%)

before ia32: 9122836
after  ia32: 9360944
increase: 238108 (2.6%)

before mips: 9418680
after  mips: 9640940
increase: 222260 (2.4%)

InitialRSS:
product:
before x64: 6307840
after x64:  7430144
increase: 1122304 (17.8%)

release (--no-profiler)
before x64: 7843840
after x64:  9207808
increase: 1363968 (17.4%)

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

Review URL: https://codereview.chromium.org/2316813002 .
2016-09-16 08:24:54 -07:00
John McCutchan 7fca076fbb Use dartfmt on Observatory code
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2345023003 .
2016-09-16 06:59:51 -07:00
William Hesse 61eee9ee52 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

BUG=https://github.com/dart-lang/sdk/issues/23565
R=rnystrom@google.com

Committed: https://github.com/dart-lang/sdk/commit/5d3e356ca75be8aeff3efde5df946d746b9f8352

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

Reverted: https://github.com/dart-lang/sdk/commit/6d238ba197c8bda71afe790f16f6e9adaf7abd13
2016-09-16 15:03:18 +02:00
Ryan Macnak 47cc06ae66 Shrink AOT snapshot size and memory usage.
- Conditionally remove fields of Code, Function and ICData that are not used in the AOT runtime.
 - Don't include RawClosureData.context_scope_ in AOT snapshots.
 - Remove parameter names not needed for method resolution.
 - Remove parameter types not needed for function type tests.
 - Deduplicate parameter name and parameter type lists.
 - Shrink and share the initial MegamorphicCache table.

Flutter gallery (IsolateSnapshotReader event)
snapshot size 2731129 -> 2199999 (-19.4%)
initial heap  7899568 -> 5433176 (-31.2%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2326483005 .
2016-09-15 15:06:42 -07:00
John McCutchan ce8d0653da Improve async stack traces in Observatory
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2333923007 .
2016-09-15 13:44:51 -07:00
Ryan Macnak 57d558fa5f Observatory: Fix instance view of lists.
Fixes #27351.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2342943002 .
2016-09-15 13:35:18 -07:00
John McCutchan 72b79d970b Improve VM connection flow in Observatory
- [x] Don't show "(Connected)" next to a VM we aren't connected to.
- [x] Navigate to the vm-connect page if we get an initial connection error.
- [x] Fix regression of the 'vm disconnected' notification bubble not appearing.
- [x] Use the Uris helper class instead of hard coded paths
- [x] Improve user inputted URI normalization
- [x] Ignore network errors on stream subscription requests
- [x] On first launch, attempt to connect to the default target and not the last target connected to.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2340973002 .
2016-09-15 11:29:06 -07:00
Ryan Macnak 872b38ef4e Exclude clustered snapshot writer from AOT runtime.
product, stripped, precompiled runtime
4862848 -> 4760663 (-2.1%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2346713002 .
2016-09-15 09:24:07 -07:00
Zachary Anderson bc1dc06687 DBC: Double converstion instructions
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2341683003 .
2016-09-15 09:18:32 -07:00
William Hesse 6d238ba197 Revert "Use checked-in .package file for building and testing"
This reverts commit 5d3e356ca7.

BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2340813004 .
2016-09-15 15:46:49 +02:00
William Hesse 5d3e356ca7 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

BUG=https://github.com/dart-lang/sdk/issues/23565
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1746743002 .
2016-09-15 14:50:30 +02:00
John McCutchan 87dcad607e Cleanup some Observatory errors caught by dart2js
Not sure why the analzyer didn't notice these but dart2js (when invoked via pub serve does).

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2339303003 .
2016-09-14 15:45:14 -07:00
Ryan Macnak cd4c9fc46b Observatory: Fix allocation profile CSV export. Fix heap snapshot in/out reference counts.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2340883002 .
2016-09-14 15:44:28 -07:00
Zachary Anderson 360d55b4f6 DBC: Another allocation fast path
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2335363002 .
2016-09-14 10:24:58 -07:00
Florian Schneider 743fe92c49 VM: Better handling of OOM errors in the background compiler
Don't expect to find a Dart frame on the stack when an exception
occurs in background compilation.  Propagate OOM error as an
unhandled exception, and disable optimization for the function
where it occurred.

BUG=#27206
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2341523002 .
2016-09-13 17:13:49 -07:00
Matthias Hausner 3e60d48842 Fix parsing of generic closure formal parameter
BUG=#27299
R=regis@google.com

Review URL: https://codereview.chromium.org/2341493002 .
2016-09-13 15:11:10 -07:00
Zachary Anderson e2d269225b [fuchsia] Add InitialRSS to status list, add missing launchpad call.
R=asiva@google.com

Review URL: https://codereview.chromium.org/2337883004 .
2016-09-13 10:49:17 -07:00
Zachary Anderson 7d01ca5e0d DBC: A couple allocation fastpaths.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2331033003 .
2016-09-13 10:21:27 -07:00
Matthias Hausner 3829c00e10 Improve compile time constant evaluation
Eliminate the need to invoke an execute-once function to compute
type literals and implicit closures. This reduces the number of
execute-once invocations from 6000 to 60 when compiling all of
the greentea sources, about 1MB of generated code. Sadly, no
significant runtime gain was observed.

Also simplify the caching of computed compile-time constants.

Reinstate the compiler stat counter for number of constants cached.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2338463003 .
2016-09-12 16:23:00 -07:00