Commit graph

9613 commits

Author SHA1 Message Date
John McCutchan e389ab73d3 Speedup function profile by using a hash table instead of a linear scan
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1830473002 .
2016-03-23 12:35:57 -07:00
Jacob Richman 5c8de46a7d Fix broken dartium build due to invalid dependencies when dart_io_support=0
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/1831533002 .
2016-03-23 10:40:32 -07:00
John McCutchan 0a8c668e5c Add graph intrinsics for many math library functions:
- sin, cos, tan, asin, acos, atan, and atan2.

Other fixes:

- support calling from intrinsic code

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1823263002 .
2016-03-23 06:58:12 -07:00
Florian Schneider ef1c7211bf VM: Use propagated type to improve checked smi operations in aot compiler.
Avoid checking inputs that are known to be smis.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1826463002 .
2016-03-23 10:03:24 +01:00
Matthias Hausner 07a52f6711 Fix name resolution through re-exported libraries
Make sure a re-exported setter is resolved even when no corresponding
getter exists.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1824213002 .
2016-03-22 16:27:16 -07:00
John McCutchan ea8a824912 Increase default profiler depth
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1816063006 .
2016-03-22 15:18:43 -07:00
Zachary Anderson a87fca4d0a Remove unused gyp variable
Review URL: https://codereview.chromium.org/1825233002 .
2016-03-22 14:31:54 -07:00
Srdjan Mitrovic 3c70445a68 Cleanup
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1819543002 .
2016-03-22 14:18:19 -07:00
Srdjan Mitrovic f360e1a2b6 Fix background compilation: handle compilation abort during parsing. Abort background compilation if finalization is necessary.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1821283002 .
2016-03-22 13:42:54 -07:00
Zachary Anderson b10f3e7be9 Some build file cleanup
R=iposva@google.com

Review URL: https://codereview.chromium.org/1824053002 .
2016-03-22 13:29:26 -07:00
John McCutchan 1e0abf4df0 Revert "Add graph intrinsics for many math library functions"
This reverts commit f5bc8fa353.

BUG=

Review URL: https://codereview.chromium.org/1825603002 .
2016-03-22 12:45:46 -07:00
Stephen Adams 30f3df8f26 vm: Avoid list allocation for empty map literals.
This reduces the number of _List(0) allocations in a dart2js compile by ~3%.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1819673002 .
2016-03-22 10:33:43 -07:00
Ryan Macnak 28846c4bd4 Reapply "Remove Code::active_instructions_."
Was reverted because it altered timing and saw a profile tick during
deoptimization, fixed in 7e9c892435.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1820333002 .
2016-03-22 10:16:13 -07:00
Florian Schneider dae61fee7a VM: Intrinsify double arithmetic operations with a smi rhs.
This avoids calling the native C++ implementation from
unoptimized and precompiled code when the rhs of a double +, -, * or /
is a smi.

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1823123002 .
2016-03-22 17:56:49 +01:00
Zachary Anderson 27f5c1f81c Don't compile in root certs on Android.
This works by using SSL_CTX_load_verify_locations in
SecurityContext._trustBuiltinRoots() to specify
/system/etc/security/cacerts as the certificate directory.

This saves about 240KB from a stripped ProductAndroidARM build.

This has the drawback that SSL_do_handshake will synchronously
hit the filesystem looking for root certs during its trust evaluation.
We call SSL_do_handshake directly from the Dart thread so that Dart
code can be invoked from the "bad certificate" callback called by
SSL_do_handshake. If there was no need to support this callback,
it would be easier to move the handshake to the IOService thread, and
thus remove the compiled-in certs without the need for blocking IO
on the Dart thread.

R=whesse@google.com

Review URL: https://codereview.chromium.org/1811583003 .
2016-03-22 09:30:04 -07:00
John McCutchan f5bc8fa353 Add graph intrinsics for many math library functions
- sin, cos, tan, asin, acos, atan, and atan2.

This is my original CL including the CheckClass instruction.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1821783002 .
2016-03-22 09:28:49 -07:00
Ivan Posva 3b2a695d71 - Properly return null if an unknown package is resolved.
- Allow short form package:foo imports.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1822863002 .
2016-03-22 09:02:04 -07:00
John McCutchan a48732a03d Remember thread's task when sampling use it when filtering
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1820013002 .
2016-03-22 08:42:06 -07:00
John McCutchan 7e9c892435 Don't take a stack trace if we are in the middle of a deoptimization
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1824883002 .
2016-03-22 07:57:14 -07:00
Zach Anderson ed4589ae9d Use SecItemImport instead of SecKeychainItemImport
BUG=

Review URL: https://codereview.chromium.org/1820183002 .
2016-03-21 19:10:19 -07:00
Ryan Macnak b070d98f6e Simpler regex names:
C++ JSRegExp -> RegExp
  Dart _JSSyntaxRegExp -> _RegExp
  Function RegExp.:irregexp: pattern -> RegExp.:matcher: pattern

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1815333002 .
2016-03-21 17:21:05 -07:00
Zach Anderson e82b3c9092 Try to fix Mac build
BUG=

Review URL: https://codereview.chromium.org/1821693003 .
2016-03-21 15:57:38 -07:00
Zach Anderson e900b1b944 Implements secure sockets on Mac OS with SecureTransport API
R=iposva@google.com

Review URL: https://codereview.chromium.org/1721283002 .
2016-03-21 15:46:29 -07:00
Regis Crelier 966aea003b Remove recently introduced FunctionType vm class by merging it into class Type.
Fix syntax used when printing function type with optional named parameters.
Fix several issues discovered with cloning function types.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1815733003 .
2016-03-21 14:08:57 -07:00
Ryan Macnak d3901a3fa1 Revert "Remove Code::active_instructions_."
This reverts commit 714027a81b.

Review URL: https://codereview.chromium.org/1821793002 .
2016-03-21 13:06:46 -07:00
Ryan Macnak d8cd1d66bc Add missing x64 sequences that load objects from THR.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1818053004 .
2016-03-21 12:38:37 -07:00
Siva Annamalai 8364da0e1b Adjust status files for product mode to skip tests that require checked mode as we do not support the flags --enable_asserts and --enable_type_checks in product mode.
tools/test.py -mproduct -cdart2app -rdart_product

should run clean after this CL

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1817623003 .
2016-03-21 11:09:38 -07:00
John McCutchan f1db5b25d0 Revert "Add graph intrinsics for many math library functions"
This reverts commit 7dc6bdefa3.

BUG=

Review URL: https://codereview.chromium.org/1816193002 .
2016-03-21 10:58:45 -07:00
Ryan Macnak 714027a81b Remove Code::active_instructions_.
It is only used to test if the Code has been disabled, and we can instead test if the active entry point matches the Instruction's entry point. A Code's entry point is either for its own Instructions or Instructions of stub code in the VM isolate, so we don't need this field to keep the Instructions alive.

precompiled dart2js x64 22254552 -> 22165795 (-0.39%)

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

Review URL: https://codereview.chromium.org/1814623003 .
2016-03-21 10:53:31 -07:00
John McCutchan 7dc6bdefa3 Add graph intrinsics for many math library functions
- sin, cos, tan, asin, acos, atan, and atan2.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1808503003 .
2016-03-21 10:23:50 -07:00
John McCutchan 41d9f2d107 Add Thread TaskKind
BUG=
R=asiva@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org/1814243002 .
2016-03-21 09:41:47 -07:00
Stephen Adams dce10bba79 VM library tweaks to avoid megamorphic calls in dart2js
Problems this addresses:

1. dart2js has hashCode functions like

   get hashCode = this.x.hashCode + 17 * this.y.hashCode

When x and y are ints or bools VM optimizing compiler inlined the call
to Object.hashCode and generated MegamorphicLookups for
Object._identityHashCode.

2. HashMaps with _Smi keys had a double MegamorphicLookup: The hash
table reasonably calls MegamorphicLookup(get:hashCode) which returns
Object.hashCode; the compiled Object.hashCode is essentially
MegamorphicLookup(get:_identityHashCode), which returns
_Smi._identityHashCode which finally returns 'this'.

3. _interpolateSingle's call to o.toString() is megamorphic. We can
avoid it for the common case of String arguments, this is often
comming from StringBuffer.write() with a literal or interpolated
argument.

R=srdjan@google.com

Review URL: https://codereview.chromium.org/1820653002 .
2016-03-21 09:38:13 -07:00
Florian Schneider f3de2377ab Move the VM's typed_data implementation to runtime/lib.
This removes the additional indirection to the VM's implementation
for all the factory constructors.

Additionally, it removes one class per typed data list type, thus reducing
snapshot and generated code size.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1790593002 .
2016-03-21 13:39:49 +01:00
Siva Annamalai c110b6f355 Map typed data class back to the original names, we need to do this as we do not have type objects set up for these. The cost of adding type objects in each of these dart classes would be more expensive than the simple switch statement here.
R=regis@google.com

Review URL: https://codereview.chromium.org/1814233004 .
2016-03-18 15:03:42 -07:00
Siva Annamalai fbcee48779 Fix monitor wait to be safepoint aware.
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1814343002 .
2016-03-18 14:39:28 -07:00
Siva Annamalai bb62e8c702 Fix to ensure the product mode builds again.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1813053005 .
2016-03-18 14:27:35 -07:00
John McCutchan ecc6f0a050 Implement MojoSharedBufferGetInformation for Dart
BUG=
R=turnidge@google.com

Review URL: https://codereview.chromium.org/1809913002 .
2016-03-18 14:09:09 -07:00
Ryan Macnak 27b2248f06 Don't create matcher functions when interpreting regex.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1814983004 .
2016-03-18 14:05:35 -07:00
Srdjan Mitrovic edeba8eb1d Turn off background compilation; occasional crashes observed on buildbot only
BUG=

Review URL: https://codereview.chromium.org/1812263003 .
2016-03-18 11:57:33 -07:00
Ryan Macnak 366f1f1ed1 Collect samples for background threads.
- Don't tick vm tags for background threads so the Observatory's summary pie chart reflects how the mutator spent its time.
 - Similarly, don't factor background samples in the CPU profile view.
 - Do include background samples in the timeline view.

Use a different event name for background compilations.

Add timeline events for the mark and sweep tasks.

Reload the isolate list when refreshing the timeline view so it includes profile ticks when the page is loading directly (e.g., F5) instead of only after visiting the vm page.

Fix loading the timeline when profiling is disabled.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1814813003 .
2016-03-18 10:18:38 -07:00
Todd Turnidge 2939c74450 Add debugging output to crash_dump_test to help track down timeout.
BUG=

Review URL: https://codereview.chromium.org/1818443002 .
2016-03-18 10:01:45 -07:00
Todd Turnidge 0585ef2eca Fix observatory warnings
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1813033002 .
2016-03-18 09:42:36 -07:00
Srdjan Mitrovic 3c0dc0ab1b Fix fast intrinsics for getters and setters; previous strategy was too conservative.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1812103002 .
2016-03-18 09:38:46 -07:00
Zachary Anderson 078d89ef5c Fix dangling pointer
The resolved executable path is returned to the static in Platform as
a scope allocated string. This change strdups it when it is cached in
a static for return on subsequent calls. Previously, the memory would
be deallocated on exit from the scope.

fixes #26031

R=asiva@google.com

Review URL: https://codereview.chromium.org/1813943004 .
2016-03-18 08:34:23 -07:00
Siva Annamalai af32c047b1 Set the stack base value for thread pool threads at the start so that profile ticks for threads show up even if it never runs Dart code.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1815533002 .
2016-03-17 16:40:02 -07:00
Ryan Macnak aefb7a424c Precompilation: Change instance call sequence to load the entry point and Code object from the ic data array instead of loading them indirectly from the Function object loaded from the same array.
Load the Code from the ic data array instead of the ObjectPool because we still need the Code object in the frame to find stackmaps / build stacktraces / build profile results.

Keep doing things the old way until all compilation is finished because evaluation of constants still needs functional lazy compilation and the compiler works with ICData that may contain as-yet-uncompiled functions. After compilation is finished, transform all the ICData from (cid, target function, count) to (cid, target code, entry point) and switch to the ICLookup stub that works with this representation.

Golem average +3.133% on ARM, +3.544% on x64

R=srdjan@google.com

Review URL: https://codereview.chromium.org/1799793002 .
2016-03-17 15:41:04 -07:00
Siva Annamalai f7d2b2e31e - Fix for issue 25950 (add registration of a thread exit callback)
- Moved some of the file and entropy callbacks to class Dart from
  class Isolate as they are not isolate specific.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1807293002 .
2016-03-17 13:40:20 -07:00
Srdjan Mitrovic dda658f48a Restructure/fix thread pointer visiting; added some asserts.
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1814853005 .
2016-03-17 13:25:46 -07:00
Siva Annamalai 56e888d4cd - Move
stack_limit_,
   stack_overflow_flags_,
   saved_stack_limit_,
   stack_overflow_count_ and
   other interrupts mask fields from Isolate structure to Thread structure

- Change the stack overflow check in the prolog to load the stack limit
  from the THR register, this removes the back to back dependent loads to
  load the stack limit from the Isolate structure

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

Review URL: https://codereview.chromium.org/1812753002 .
2016-03-17 12:57:36 -07:00
Todd Turnidge 22c37b9516 Improve class-tree, class-view, and instance-view.
class-tree
- Make all the rows have the same height.
- Hide synthetic mixin classes from the tree.
- Show mixin information in a different way.
- Show the total subclass count for each row if non-zero.

class-view
- Display supertype and mixin information

instance-view
- Display typeArguments, parameterizedClass, parameterIndex,
  targetType and bound information for Types.
- Display a source for Types.
- Provide an [eval] link for the runtimeType.

isolate-view
- Display the list of extension rpcs.

Update service.md.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1807263004 .
2016-03-17 12:48:48 -07:00