Commit Graph

9829 Commits

Author SHA1 Message Date
Todd Turnidge 956ac4c183 Fix getSourceReport's forceCompile option for unused classes.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1916243002 .
2016-05-04 11:02:06 -07:00
Florian Schneider f54c8d89fa VM: Remove PushTempInstr, simplify SSA renaming.
BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1950553002 .
2016-05-04 10:54:03 +02:00
Ivan Posva 2268bb8530 - Fix build.
BUG=

Review URL: https://codereview.chromium.org/1946953002 .
2016-05-03 20:45:05 -07:00
Ivan Posva 3884fd4e4b - Allow for loading dart:html and friends into the standalone
dart_bootstrap binary to evaluate startup and compilation
  performance.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1916793003 .
2016-05-03 20:33:14 -07:00
Regis Crelier 5294523c20 More efficient identification of dynamic and void types.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1947753002 .
2016-05-03 16:08:37 -07:00
Zachary Anderson fc65d07fdf Adds DBC StoreIntoObject test
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1948803002 .
2016-05-03 14:58:40 -07:00
Zachary Anderson 13c740f4bd Adds more DBC assembler tests
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1950613002 .
2016-05-03 13:55:30 -07:00
Regis Crelier 1b36e9dbe6 Remove small window when function parameter types and names were reset to null
by background compiler, possibly crashing the main thread performing a function
type test (fixes #26101).

R=hausner@google.com

Review URL: https://codereview.chromium.org/1947683002 .
2016-05-03 13:37:35 -07:00
Ryan Macnak f7a3e215a5 Undo "Don't include an object header for instructions in the text section."
This undoes most of b2f3e8efe1.

This optimization prevents precompiled code from being disabled and re-enabled, because disabling causes the code to lose its only reference to its own instructions. This was okay for precompilated code that ran without a JIT because it is never disabled, but precompiled code that runs in a JIT will become disabled when corresponding optimized code is compiled and re-abled after a deopt.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1925153003 .
2016-05-03 11:22:28 -07:00
Zachary Anderson a1d241922f Adds more DBC assembler tests.
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1944503002 .
2016-05-03 09:01:11 -07:00
Siva Annamalai 65c4aaee17 - Add a new constructor to the hash table classes that allow handles to be passed in instead of creating new ones for every lookup/insertion
- Use reusable handles in Symbols::New and Symbols::Lookup with the new constructor defined above

R=hausner@google.com

Review URL: https://codereview.chromium.org/1934263003 .
2016-05-02 17:07:31 -07:00
Ryan Macnak 58a2c13d0a Give OSR compilation its own event name. Rename other optimizated compilation events so they sort together with unoptimized compilation.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1938553002 .
2016-05-02 10:19:32 -07:00
Vyacheslav Egorov b089d4f004 Work around a kernel bug on Android.
Kernel does not clear If-Then execution state bits when entering ARM signal handler which violates requirements imposed by ARM architecture reference. Some CPUs look at these bits even while in ARM mode which causes them
to skip some instructions in the prologue of the signal handler.

To work around the issue we insert enough NOPs in the prologue to ensure that no actual instructions are skipped and then branch to the actual signal handler.

For the kernel patch that fixes the issue see: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6ecf830e5029598732e04067e325d946097519cb

This causes sporadic crashes with SIGILL on some testing devices (e.g. Nexus 7).

R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org/1940883002 .
2016-05-02 19:12:48 +02:00
Zachary Anderson 5d7ecb8500 Adds LoadClassIdInstr to DBC
R=iposva@google.com, vegorov@google.com

Review URL: https://codereview.chromium.org/1922173003 .
2016-05-02 09:02:22 -07:00
Martin Kustermann 620b896e2f Initial support to test.dart for running precompiler tests on android devices
Steps to make this work:

a) Make sure you have an android sdk checkout:

  => See https://github.com/dart-lang/sdk/wiki/Building-Dart-SDK-for-Android

b) Building using android-toolchain crosscompiler:

  $ ./tools/build.py -mrelease -aarm --os=android dart_precompiled_runtime

  => Notice --os=android

c) Testing using attached android phones:

  $ export PATH=$PATH:$PWD/third_party/android_tools/sdk/platform-tools
  $ ./tools/test.py -mrelease -aarm --system=android -cprecompiler -rdart_precompiled --use-blobs

  => Notice --system=android

Failing tests on android can be marked in status files via:

[ $compiler == precompiler && $runtime == dart_precompiled && $system == android ]

R=whesse@google.com

Review URL: https://codereview.chromium.org/1922163002 .
2016-05-02 12:41:22 +02:00
Siva Annamalai d6d8fb827f Fix product build.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1941503002 .
2016-04-29 15:57:23 -07:00
Siva Annamalai 964a659470 - reset 'dirty' flag to false after the libraries mirrors is computed, this ensures that we compute the libraries only when new library modules are loaded and the 'dirty' flag is set to true.
- Use passed in 'zone' argument in the native string functions

- Use passed in 'thread' argument in the library mirror creation functions

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1935703002 .
2016-04-29 15:15:19 -07:00
Matthias Hausner 6cb7d87e56 Don’t cache constants in initializer expressions
Initializer expressions are evaluated only once. Therefore, do not store
constant expressions in the constant cache, since they will never be
used again.

Except: when generating a stack trace and accessing the local variables
in a the stack frame of an initializer expression (static final getter function),
the constant will have to be recomputed instead of retrieved from the cache.
This CL also disables the stacktrace_every stress flag while a stack trace
is being collected, to avoid recursive requests for stack traces.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1934733002 .
2016-04-29 15:06:30 -07:00
Siva Annamalai d5583d6a79 Use a reusable handle in SubString instead of creating one as this path is now used when creating Symbols of identifiers.
R=hausner@google.com

Review URL: https://codereview.chromium.org/1933933002 .
2016-04-29 14:53:07 -07:00
Ryan Macnak 1995651559 Don't include dependent code arrays in snapshots.
Full snapshots never include code that can deopt.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1930263002 .
2016-04-29 14:48:12 -07:00
Siva Annamalai ebd92bf3e0 Do not add a private identifier twice into the symbol table, once without the private key appended and once with the private key.
R=hausner@google.com

Review URL: https://codereview.chromium.org/1925413003 .
2016-04-29 13:19:01 -07:00
Ryan Macnak 3ae8c18359 Fix gcc 4.9 build errors.
(-Werror=clobbered and -Wconversion-null)

BUG=http://dartbug.com/26309
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1932253002 .
2016-04-29 10:34:03 -07:00
Zachary Anderson 1b058141f8 DBC: Enable CpuInfo test
R=iposva@google.com

Review URL: https://codereview.chromium.org/1928473003 .
2016-04-29 09:36:58 -07:00
Zachary Anderson 7c9fe49495 Start to add assembler tests for DBC
R=iposva@google.com

Review URL: https://codereview.chromium.org/1927203002 .
2016-04-29 09:09:42 -07:00
Regis Crelier 664f8e1e03 Dump more info before crashing.
Review URL: https://codereview.chromium.org/1926333002 .
2016-04-28 16:53:47 -07:00
Srdjan Mitrovic 8ffe03a9c5 Add one more stop
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1926133002 .
2016-04-28 12:31:56 -07:00
Srdjan Mitrovic 23d296c144 Assert that background compiler is not adding closure functions; stop background compiler when deoptimizing the world.
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1929743002 .
2016-04-27 16:23:45 -07:00
Srdjan Mitrovic 4ea8b39157 Added flag --inline_smi_string_hashcode and --inline_smi_string_hashcode_ratio to decide when/if should Smi/OnebyteString hashcode be inlined before calling megamorphic. Improve code as suggested by zra.
Added flag --display_sorted_ic_data which displays ICData as sorted by count, unary ICData (e.g., in disassembly).

BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/1920103004 .
2016-04-27 13:27:43 -07:00
Siva Annamalai 8f4bbc98b7 Address problem of back to back old gen GC that happens when new gen GC promotions triggers old gen GC during a Full GC cycle.
R=iposva@google.com

Review URL: https://codereview.chromium.org/1919363003 .
2016-04-27 10:41:28 -07:00
Matthias Hausner d5d8762551 Revert "Don’t cache constants in initializer expressions"
This reverts commit 77b328333f.

BUG=

Review URL: https://codereview.chromium.org/1930553002 .
2016-04-27 10:21:21 -07:00
Zachary Anderson 046715867e Fixes assert assignable check for DBC
R=iposva@google.com

Review URL: https://codereview.chromium.org/1926453002 .
2016-04-27 10:05:39 -07:00
Florian Schneider b043314bce VM: Fix illegal code motion.
Without tracking dependencies more explicitly we can't propagate the
cid of values whose cid is guarded by a CheckClassId:

The CheckClassId c may not be hoisted by LICM because it is guarded
by a Redefinition r. However, after constant propagation and branch simplification
code that was not previously dominated by c (and r) may become dominated by c and r.

This code won't be using the redefined value r, but the original value and therefore
LICM can illegally eliminated checks / hoist dependent loads.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1928633002 .
2016-04-27 19:05:19 +02:00
Matthias Hausner 77b328333f Don’t cache constants in initializer expressions
... they will never be used again.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1923743002 .
2016-04-27 09:28:29 -07:00
Regis Crelier b633e09ad2 Dump more info before crashing.
Review URL: https://codereview.chromium.org/1914343002 .
2016-04-26 17:33:30 -07:00
Ryan Macnak f55c9c54a8 Split Snapshot::kFull into kCore, kAppWithJIT, and kAppNoJIT. Remove snapshot_code flag.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1918313003 .
2016-04-26 17:03:24 -07:00
Siva Annamalai 9069cb88a2 Cleanup some handle creation code, was showing up in the CompileAll testing that we are doing with large applications.
R=regis@google.com

Review URL: https://codereview.chromium.org/1914293002 .
2016-04-26 16:59:11 -07:00
Siva Annamalai 4547165abe Fix product build compile and ensure all tests run cleanly again.
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1921343002 .
2016-04-26 16:45:17 -07:00
John McCutchan 14ec00f86b Disable a call to the profiler in product mode
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1917233002 .
2016-04-26 11:12:48 -07:00
Zachary Anderson db86be4901 Fixes and enables FindCodeObject test for dbc
DBC always encodes branches similarly to arm64's far branches. In
particular, the unconditional jump takes a signed 26-bit offset.
This CL just modifies the test to generate enough code to test that
dbc can handle branches the same distance as the other platforms.

R=iposva@google.com

Review URL: https://codereview.chromium.org/1919283003 .
2016-04-26 10:40:28 -07:00
Srdjan Mitrovic 4a920397c0 Print only native stack trace when crashing in IsInstantiated (debugging code)
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1920263002 .
2016-04-26 09:44:17 -07:00
Zachary Anderson b1ece64035 Enable BoringSSL for Android in GN build
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1846343002 .
2016-04-26 09:13:33 -07:00
Florian Schneider 6ff337f724 Revert "VM: Improve phi-elimination to improve code inside of try-catch."
This reverts commit 6d537d7e61.

Need more time to investigate test failures that occur with this CL.

TBR=vegorov@google.com

BUG=

Review URL: https://codereview.chromium.org/1922953002 .
2016-04-26 17:24:35 +02:00
Zachary Anderson ba550f1c43 Fixes NetworkInterface.list crash on Android
Previously, Socket::ListInterfaces failed to set the os_error out
parameter causing a crash in the caller. This change sets an error here.

I've also added NetworkInterface.listSupported, which returns false on
Android, and true everywhere else. ifaddrs.h continues not to exist in
the NDK, so in order to support NetworkInterface.list, we'd have to
reimplement it, or find a suitable reimplementation somewhere.

related #26329

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1916223003 .
2016-04-26 07:48:58 -07:00
Florian Schneider 6d537d7e61 VM: Improve phi-elimination to improve code inside of try-catch.
Since we don't have precise liveness information inside try-catch blocks,
there are often redundant phis inside try-catch of the form

v <- phi(v, v, ..., R, v, v, ...)

This CL finds these redundant phis and replaces them with R.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1918913002 .
2016-04-26 12:50:25 +02:00
Srdjan Mitrovic 733b6df785 Faster code for megamorphic calls fo get:hashCode for Smi and OneByteString
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1921893002 .
2016-04-25 16:55:19 -07:00
Srdjan Mitrovic c46fe8c23f Quick step 1: dump stack in AbstractType::IsInstantiated
Later: attempt to tie it in with all FATALs

BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1916143003 .
2016-04-25 16:29:30 -07:00
Ryan Macnak f262fad639 Option to output precompiled instructions as a blob for use with mmap instead of assembly for use in a shared library.
BUG=http://dartbug.com/26199
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1915853004 .
2016-04-25 16:19:34 -07:00
John McCutchan eb0079eb44 Fix Mac build
BUG=

Review URL: https://codereview.chromium.org/1913953002 .
2016-04-25 14:05:32 -07:00
John McCutchan 7abafbea20 Add Profiler::DumpStackTrace
BUG=
R=regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org/1919743003 .
2016-04-25 13:58:15 -07:00
Zachary Anderson 3d7202bad3 DBC: Adds simdbc64 target, adds arm64 arithmetic overflow logic
There were differences between linux gcc, android gcc,
MacOS clang, and 32 vs. 64-bit w.r.t the __builtin
functions for detecting arithmetic overflow. I couldn't get
them all working at the same time. Instead, I removed them,
and changed to always use the inline assembly. This works
in all the configurations above.

This change also adds a simdbc64 target for building simdbc
for 64-bit, and sets up the android targets. simdbc targets
arm, and simdbc64 targets arm64. You can build them with:

$ ./tools/build.py -m release -a simdbc{64} --os=android runtime

R=iposva@google.com

Review URL: https://codereview.chromium.org/1904153003 .
2016-04-25 12:48:34 -07:00