Commit graph

10606 commits

Author SHA1 Message Date
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: 5d3e356ca7

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

Reverted: 6d238ba197
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
Adam Barth 22010919e9 Update to use mx_process_self()
The map and unmap calls now need mx_process_self() instead of zero as the
process handle.
2016-09-12 14:06:33 -07:00
Ryan Macnak fcda790b9c Fix bad origin check.
localhost.malicious.com is not localhost.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2298943004 .
2016-09-09 16:34:03 -07:00
Florian Schneider 60e6faa7c3 VM: Zero-cost try-finally with an empty finally-block.
Consider code like

try {
    something();
} finally {
    assert(expr);
}

The compiler de-sugars this into

try {
  something();
} catch (_) {
  rethrow;
} finally {
  assert(expr);
}

In unchecked mode this leaves an empty finally-block, but we would still
have the overhead of the try-catch. This CL avoids this unnecessary overhead
by making try-finally with an empty finally zero-cost.

BUG=#27274
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2322853003 .
2016-09-09 14:00:47 -07:00
Carlo Bernaschina 1b4afdab2d Restored SVGs in Observatory script-inset element
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2328943003 .
2016-09-09 09:58:07 -07:00
Ryan Macnak ebc0c261a5 Minor UI tweaks.
R=cbernaschina@google.com

Review URL: https://codereview.chromium.org/2324833005 .
2016-09-09 09:55:50 -07:00
Zachary Anderson dbcd602b18 Adds InitialRSS benchmark
Measuring memory footprint of the VM after initialization.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2329003002 .
2016-09-09 09:47:56 -07:00
Ryan Macnak 3a63f4890c Fix some errors from UBSan.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2325863002 .
2016-09-09 09:28:27 -07:00
Ryan Macnak 6137d020b9 AOT: Use a cid range check when possible to implement type tests.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2314133003 .
2016-09-08 15:25:08 -07:00
Carlo Bernaschina 5b838cfb01 Allow to compact header in allocation-profile
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2322643004 .
2016-09-08 14:36:43 -07:00
Ryan Macnak 1bc2b04198 Fix bug in AOT compiler where we would propogate a result type for instances calls where the target is not known.
Interacted with cid range checks to incorrectly reduce

foo(x) => (x * 1.0) is double;

to

foo(x) { x * 1.0; return true; }

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2325753002 .
2016-09-08 14:36:28 -07:00
John McCutchan 079ced0367 Fix Windows build
BUG=

Review URL: https://codereview.chromium.org/2323073002 .
2016-09-08 12:32:34 -07:00
John McCutchan ea535f2d9b Fix Mac build
BUG=

Review URL: https://codereview.chromium.org/2320183002 .
2016-09-08 11:32:38 -07:00
John McCutchan ed3f4f2dfe Record Timeline to Android Systrace
- [x] Add TimelineEventSystraceRecorder (enabled via --systrace_timeline or --timeline_recoder=systrace)
- [x] Support Begin, End, and Counter events
- [x] Unit test Systrace serialization

BUG=
R=chinmaygarde@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2315353004 .
2016-09-08 11:28:34 -07:00
Carlo Bernaschina de2cea8f57 Added missing content to nav-top-menu
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2325613003 .
2016-09-08 10:47:40 -07:00
James Robinson b56b355ca7 Update for mx_object_get_info() changes.
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/2319363002 .
2016-09-07 16:29:56 -07:00
Carlo Bernaschina d9a886c397 Reverted change to ServiceMap
TBR=rmacnak@google.com

Review URL: https://codereview.chromium.org/2323543002 .
2016-09-07 15:03:00 -07:00