Commit Graph

9676 Commits

Author SHA1 Message Date
Florian Schneider f6c19ee595 VM: Improve single-target polymorphic calls.
Use the existing class-id check for dense ranges in more places.
Previously we would fall back to megamorphic lookup with >4 cids,
even though we can check cid ranges up to word-size efficiently.

Next step is to generalize the dense class id checks to multiple
word-sizes.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1847293002 .
2016-04-01 09:59:27 -07:00
John McCutchan b1eb8859a5 Add call tree filter to Observatory CPU profile tree
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1846713003 .
2016-04-01 06:41:09 -07:00
Siva Annamalai 4b38c3dfc2 - Fix the hash code for raw objects that are added into the object pool
index table
- Do not try to figure out if the passed in handle is a temporary scoped
  handle, instead have all the callers create a ZoneHandle

Compilation of the ESS initialization code in GreenTea reduces from 2.56secs to .497 secs

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1846063002 .
2016-03-31 21:41:16 -07:00
Siva Annamalai 78a6b46155 Provide ability to patch external functions in a class that has already been finalized. The following restrictions are in place:
- No new fields or patching of existing fields can be done
 - Only external methods that have not already executed (i.e code for it has been   generated) can be patched

This change enables patching of JS Interop methods into a class and provides close to 5 sec drop in start up times for Green Tea app.

R=hausner@google.com, regis@google.com

Review URL: https://codereview.chromium.org/1850653003 .
2016-03-31 20:06:44 -07:00
Zach Anderson b0475caa7f Allows adding trusted certs on iOS.
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1845273004 .
2016-03-31 15:51:14 -07:00
Srdjan Mitrovic c86ad33bca Fix product run
BUG=

Review URL: https://codereview.chromium.org/1850693004 .
2016-03-31 13:50:11 -07:00
Srdjan Mitrovic f9150317fb Fix product build
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1850873002 .
2016-03-31 13:33:14 -07:00
Zach Anderson 08450dc432 Begin work on ios secure sockets
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1839123003 .
2016-03-31 12:55:31 -07:00
Srdjan Mitrovic f8f120bb17 Fix disassembly with background compilation: parsing can report 'errors' in background compilation
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1843253003 .
2016-03-31 12:17:51 -07:00
John McCutchan 29225365fd Automatically fetch timeline when timeline page is loaded
R=asiva@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1847043003 .
2016-03-31 11:03:14 -07:00
Srdjan Mitrovic 8e03dddabf Fix crash by disabling problematic functionalitie (VerifyPointers)
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1848843002 .
2016-03-31 10:35:52 -07:00
Ryan Macnak 7007644ba4 Include snapshot size in the events for reading the isolate snapshots.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1844423003 .
2016-03-31 10:17:50 -07:00
John McCutchan bb70592aa0 Update trace-viewer to a154c2f5e4ee5e7bafa82340a69b3cd32047de8c
BUG=

Review URL: https://codereview.chromium.org/1834223010 .
2016-03-31 10:07:53 -07:00
Ryan Macnak 1c107c4fbd vm-service: Include bytecode with _RegExp objects.
BUG=http://dartbug.com/26042
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1822933002 .
2016-03-31 10:05:18 -07:00
John McCutchan ad0878d1a8 Remove redundant timeline API
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1848683002 .
2016-03-31 09:13:54 -07:00
John McCutchan a72409a0d4 Refactor call tree search to support both Code and Function trees
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1837373002 .
2016-03-30 17:13:48 -07:00
John McCutchan d8df41c483 Add support for async, metadata, and counter timeline events to be reported by the embedder
Fixes #26142

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1849643002 .
2016-03-30 16:45:46 -07:00
Florian Schneider dd72d74964 Fix --trace-isolates VM crash.
Thread::Current() is NULL when shutting down, causing a seg fault when
executing thread()->sticky_error().

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1818883003 .
2016-03-30 16:35:10 -07:00
Florian Schneider 2783afd607 VM: Fix receiver type propagation in presence of try-catch.
With catch blocks appearing as additional function entry blocks,
there can be phis for the receiver (parameter 0).

This CL fixes the problem that the receiver type information
was lost in the presence of try-catch.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1841073003 .
2016-03-30 15:55:11 -07:00
Srdjan Mitrovic a7a7a5be55 Fix CompilerStats aggregation: do not aggregate if there is no mutator thread (isolate shutting down).
Disable background compilation in Profiler_StringInterpolation.

BUG=

Review URL: https://codereview.chromium.org/1847683002 .
2016-03-30 14:24:08 -07:00
Srdjan Mitrovic 1a9fc8b2fa Move CompilerStats from isolate to thread. Aggregate stats.
The mutator thread holds the aggregate values, the background compiler adds its value to it.

BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org/1841213003 .
2016-03-30 13:38:32 -07:00
Ryan Macnak ba608694b7 Ensure deoptimizing frames have a valid pc marker before deferred materialization.
BUG=http://dartbug.com/26131
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1847623002 .
2016-03-30 13:11:14 -07:00
Regis Crelier 48dc790398 Fix core lib DateTime in the VM (fixes #19923).
Symptom of the problem:
Set your Linux workstation (or Mac or MIPS board) to the Europe/London timezone
and the corelib/date_time test will fail, claiming that 1/1/1970 was a Wednesday
(it was actually a Thursday, trust me, I was already born).

Problem:
The implementation of DateTime in the VM relies on Unix time_t, the number of
seconds since the Epoch (1/1/1970 UTC). When asked for the weekday of a given
time, our implementation limits itself to a 32-bit positive range of time_t.
If the time falls outside of this range, the implementation picks an equivalent
time in the valid range with the same weekday, also in leap year or not, etc...
The issue is that DateTime is using the underlying OS in an inconsistent manner.
Let's take the example above: 1/1/1970 in the Europe/London timezone.
First, the number of seconds since the Epoch in UTC is calculated, here 0.
Then, the timezone offset at the given time is calculated using the underlying
OS. In this case, an historical deviation is taken into account. Indeed, London
stayed on British Summer Time between 27 October 1968 and 31 October 1971. See
https://en.wikipedia.org/wiki/British_Summer_Time#Periods_of_deviation for
details.
Our resulting time is therefore negative (one hour difference with UTC).
When asked about the weekday of this time, the implementation notices that the
time is not in the positive range and picks an "equivalent" time in the future.
It then asks the underlying OS about the timezone offset for this time, which
is 0 (usually no daylight saving time in January in London). Unfortunately,
this time is not really equivalent, because it ignores the original historical
deviation. The result is wrongly equivalent to 12/31/1969 23:00 in London, i.e.
a Wednesday, and not a Thursday as expected.

Solution:
We should use the underlying OS in a consistent way, by simply allowing the
value of time_t passed to the underlying OS to be negative, which is legal.

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

Review URL: https://codereview.chromium.org/1845483002 .
2016-03-30 10:09:58 -07:00
Zachary Anderson a742ea06b3 Try to fix Windows Dartium build again
BUG=

Review URL: https://codereview.chromium.org/1843793004 .
2016-03-30 07:55:40 -07:00
Florian Schneider a91f758b86 VM: Fix incorrect debug assertion.
BUG=

Review URL: https://codereview.chromium.org/1840173003 .
2016-03-29 18:10:18 -07:00
Florian Schneider 15f23eedc9 VM: Fix --no-use-field-guards.
Fields read from the snapshot must be initialized in the same way
as when allocated with Field::New.

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

Review URL: https://codereview.chromium.org/1842853002 .
2016-03-29 17:40:58 -07:00
Ryan Macnak e228e78264 Precompilation: Don't look at embedder allocated pages when finalizing the VM isolate.
On precompiled Space Blast on an iTouch 6, reduces finalizing the vm isolate from 60ms to <1 ms, but loading the isolate snapshot doesn't happen any sooner.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1834333002 .
2016-03-29 16:49:33 -07:00
Srdjan Mitrovic 40d8eee81e Remove unnecessary isolate argument from some visitors
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1838373002 .
2016-03-29 14:47:51 -07:00
Zachary Anderson 9f43293f27 Fix build
TBR

BUG=

Review URL: https://codereview.chromium.org/1844693002 .
2016-03-29 13:48:24 -07:00
Zachary Anderson c44617fca7 Fix Dartium Windows build
BUG=

Review URL: https://codereview.chromium.org/1844613003 .
2016-03-29 13:32:51 -07:00
Ryan Macnak 1666393f89 Timeline: If the embedder stream is enabled at startup, invoke the embedder's callback to let it know.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1836303002 .
2016-03-29 13:22:36 -07:00
Ryan Macnak 92d492f9e2 VM/Mac: Prevent dead_strip from removing API functions.
strip -x xcodebuild/ReleaseX64/dart
6915912 -> 6996096 (+1.15%)

BUG=http://dartbug.com/26113
R=iposva@google.com

Review URL: https://codereview.chromium.org/1842613002 .
2016-03-29 13:08:21 -07:00
Srdjan Mitrovic 7b86508143 Fix bug with exports2()
BUG=

Review URL: https://codereview.chromium.org/1838303003 .
2016-03-29 12:50:41 -07:00
Ryan Macnak f0d4f3151c Precompilation:
- Fix crash sending full class responses.
  - Don't wait for service isolate startup.
  - Add timeline events for deserializing and premarking the VM isolate.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1835633002 .
2016-03-29 12:30:47 -07:00
Zachary Anderson 7308e58c3f Really remove io support when dart:io is unsupported.
Previously we would compile in implementaitions of native calls for
IO functions that would never be used. This CL provides implementations
that throw a Dart exception if they're called by mistake. It also uses
a DART_IO_DISABLED preprocessor define to clean up the build files and
check that we're not including code we shouldn't.

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

Review URL: https://codereview.chromium.org/1839463002 .
2016-03-29 11:22:03 -07:00
Ryan Macnak b2f3e8efe1 Precompilation: don't include an object header for instructions in the text section.
Reference Instructions only through Code::entry_point_ (or Function::entry_point_). Store the instructions size in its corresponding Code object.

precompiled dart2js x64 22163470 -> 21621102 (-2.45%)

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1808553002 .
2016-03-29 11:04:04 -07:00
Ryan Macnak 1539647e4d Add a timeline recorder that drops new events after its buffer is full.
(With --complete-timeline, my iPod runs of memory processing the
timeline. With the ring recorder, the startup events have already been
bumped out by time I can connect to Observatory.)

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1834383002 .
2016-03-29 11:01:45 -07:00
Srdjan Mitrovic 7ed2b851a9 Enable export lookup by two threads (mutator and background compiler) by carying a copy of exports_ in exports2_.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org/1839123002 .
2016-03-29 10:56:56 -07:00
John McCutchan 35773929e4 Collect a single frame sample in the profiler if we can't validate stack boundaries
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1837023003 .
2016-03-29 10:46:41 -07:00
Zach Anderson 5cee7ff634 Fixes handling of short reads/writes for Mac SSL
The SecureTransport API is a bit finicky about the return code
and length from SSL{Read,Write}Callback. I think I've got it
right now, but we'll have to keep an eye on it.

Also a small tweak to avoid an extra trip through the event loop
before putting a write event on the secure socket stream.

related #26104

R=iposva@google.com

Review URL: https://codereview.chromium.org/1842703003 .
2016-03-29 10:30:09 -07:00
John McCutchan 80967ca4e5 Add API timeline durations for snapshot creation
- Useful for tracing Dartium startup....

R=asiva@google.com

Review URL: https://codereview.chromium.org/1844553003 .
2016-03-29 09:02:15 -07:00
Ivan Posva c2700473c4 - Update test with available flag.
BUG=

Review URL: https://codereview.chromium.org/1838013002 .
2016-03-28 17:55:30 -07:00
Ivan Posva 528baf2173 - Limit 32-bit platforms to 1.5GB of memory for old gen by default.
- Fixed documentation for Dart_NewWeakPersistentHandle.
- Add clarifying comment.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1837803003 .
2016-03-28 17:37:52 -07:00
Srdjan Mitrovic 5083d314f3 fix build
BUG=

Review URL: https://codereview.chromium.org/1834393002 .
2016-03-28 16:10:55 -07:00
Srdjan Mitrovic f60e86fd83 Track loading happening in parallel with background compilation and abort compilation if necessary.
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1834763004 .
2016-03-28 16:02:32 -07:00
Ryan Macnak 00eff0ff6a Improve error message when attempting to evaluate against a VM-internal object (e.g., a MegamorphicCache's table).
Don't accumulate object annotations on the disassembly when refreshing a Code view.

BUG=http://dartbug.com/26008
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1835393002 .
2016-03-28 14:51:06 -07:00
John McCutchan 2c17c75899 Fix X86 bots
BUG=

Review URL: https://codereview.chromium.org/1835893004 .
2016-03-28 13:49:01 -07:00
John McCutchan 24230689df Intrinsify some double operations, helps in AOT
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1832343003 .
2016-03-28 13:09:40 -07:00
Siva Annamalai 341643cb2b Do not compile a class when the class mirror tries to access the metadata.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1834673003 .
2016-03-28 11:16:15 -07:00
John McCutchan ad81c8df8f Don't allocate a new handle unnecessarily
BUG=

Review URL: https://codereview.chromium.org/1834963002 .
2016-03-28 10:42:58 -07:00