OSDN Git Service

android-x86/art.git
8 years agoReduce code size by sharing slow paths.
Aart Bik [Thu, 7 Jan 2016 23:33:50 +0000 (15:33 -0800)]
Reduce code size by sharing slow paths.

Rationale:
Sharing identical slow path code reduces code size.

Background:
Currently, slow paths with the same dex-pc, same physical register
spilling code, and identical stack maps are shared (making this
only useful for deopt slow paths). The newly introduced mechanism
is sufficiently general to allow future improvements by e.g.
allowing different dex-pc (by passing this to runtime) or even
the kind of slow paths (by passing runtime addresses to the slowpath).

Change-Id: I819615c47b4fd98440a241f681f93e4fc22d12e0

8 years agoMerge "Disable mterp for the read barrier config."
Hiroshi Yamauchi [Tue, 12 Jan 2016 23:45:26 +0000 (23:45 +0000)]
Merge "Disable mterp for the read barrier config."

8 years agoMerge "Correct value_type for some TrackingAllocators."
Dan Albert [Tue, 12 Jan 2016 23:02:00 +0000 (23:02 +0000)]
Merge "Correct value_type for some TrackingAllocators."

8 years agoMerge "Do not leave intermediate addresses across Java calls."
Mathieu Chartier [Tue, 12 Jan 2016 22:38:30 +0000 (22:38 +0000)]
Merge "Do not leave intermediate addresses across Java calls."

8 years agoCorrect value_type for some TrackingAllocators.
Dan Albert [Tue, 12 Jan 2016 22:23:14 +0000 (14:23 -0800)]
Correct value_type for some TrackingAllocators.

The standard says that the value_type for the allocator of a
map/multimap must be std::pair<const Key, T>. These instances were not
properly carrying the const, and the updated version of libc++ has a
static_assert to make sure that map::allocator_type and
allocator::value_type really do match (as mismatches will tickle
undefined behavior in libc++).

Change-Id: I7a3a49fccea4ecc4579929d9ddd7872c62b60f5f

8 years agoMerge "Revert "Disable flaky test on host.""
Mathieu Chartier [Tue, 12 Jan 2016 21:47:56 +0000 (21:47 +0000)]
Merge "Revert "Disable flaky test on host.""

8 years agoMerge "Disable mterp if unstarted runtime"
Bill Buzbee [Tue, 12 Jan 2016 21:23:35 +0000 (21:23 +0000)]
Merge "Disable mterp if unstarted runtime"

8 years agoDisable mterp if unstarted runtime
buzbee [Tue, 12 Jan 2016 20:45:51 +0000 (12:45 -0800)]
Disable mterp if unstarted runtime

Mterp uses entrypoints that assume the runtime is started.  If it isn't,
revert to the fallback interpreter.

Bug: 26510411

Change-Id: I08278981ee1e7bc21163c6584426cc18a5e261fc

8 years agoRevert "Disable flaky test on host."
Mathieu Chartier [Tue, 12 Jan 2016 21:13:29 +0000 (13:13 -0800)]
Revert "Disable flaky test on host."

Bug: 26483935

This reverts commit 72f7236cbc00e3a3f93dffb627417d666ee22518.

Change-Id: I57eb2b8315d274ad751aa2054a298a556c7b0cd9

8 years agoMerge "Add sleep in SuspendAllDaemonThreadsForShutdown"
Mathieu Chartier [Tue, 12 Jan 2016 21:10:06 +0000 (21:10 +0000)]
Merge "Add sleep in SuspendAllDaemonThreadsForShutdown"

8 years agoDisable mterp for the read barrier config.
Hiroshi Yamauchi [Tue, 12 Jan 2016 20:05:08 +0000 (12:05 -0800)]
Disable mterp for the read barrier config.

For now. Volantis boots with this.

Bug: 26510411
Bug: 12687968
Change-Id: Ifc9799404306c973ad1085c42c399d6eef05dcc6

8 years agoMerge "Disable tests while investigating."
Nicolas Geoffray [Tue, 12 Jan 2016 18:21:51 +0000 (18:21 +0000)]
Merge "Disable tests while investigating."

8 years agoDisable tests while investigating.
Nicolas Geoffray [Tue, 12 Jan 2016 18:21:05 +0000 (18:21 +0000)]
Disable tests while investigating.

Change-Id: Idc7b81df6e41794728e6cf990f64dcb1b0544289

8 years agoAdd sleep in SuspendAllDaemonThreadsForShutdown
Mathieu Chartier [Mon, 11 Jan 2016 18:19:06 +0000 (10:19 -0800)]
Add sleep in SuspendAllDaemonThreadsForShutdown

Only sleep if there are still daemon threads. Since we have already
shutdown the runtime daemons, this is a rare case. The goal of the
sleep is to leave daemon threads time to become blocked in a place
where they ideally will not touch runtime state.

Bug: 26483935
Bug: 18577101

Change-Id: Iad12209e771720523620e0a3829a75ec4647f58b

8 years agoMerge "Ignore ZipFileTest and ZipInputStreamTest failures with CC."
Roland Levillain [Tue, 12 Jan 2016 16:39:37 +0000 (16:39 +0000)]
Merge "Ignore ZipFileTest and ZipInputStreamTest failures with CC."

8 years agoIgnore ZipFileTest and ZipInputStreamTest failures with CC.
Roland Levillain [Tue, 12 Jan 2016 16:24:52 +0000 (16:24 +0000)]
Ignore ZipFileTest and ZipInputStreamTest failures with CC.

These tests sometimes fail with a
java.util.concurrent.TimeoutException on ART Builbot's x86
and x86-64 concurrent collector configurations:
* libcore.java.util.zip.ZipFileTest#testZipFileWithLotsOfEntries
* libcore.java.util.zip.ZipInputStreamTest#testLongMessage

Bug: 26507762
Change-Id: I344d3ce4fbb4709025861ef2f009d768cc7524b8

8 years agoDo not leave intermediate addresses across Java calls.
Nicolas Geoffray [Tue, 12 Jan 2016 16:03:16 +0000 (16:03 +0000)]
Do not leave intermediate addresses across Java calls.

bug:26472446
Change-Id: Ie4a9b5fe6f1d61a76c71eceaa2299fe55512c612

8 years agoMerge "Revert "Change condition to opposite if lhs is constant""
Nicolas Geoffray [Tue, 12 Jan 2016 14:01:41 +0000 (14:01 +0000)]
Merge "Revert "Change condition to opposite if lhs is constant""

8 years agoRevert "Change condition to opposite if lhs is constant"
Nicolas Geoffray [Tue, 12 Jan 2016 14:00:24 +0000 (14:00 +0000)]
Revert "Change condition to opposite if lhs is constant"

Breaks arm64

This reverts commit f9f196c55f3b25c3b09350cd8ed5d7ead31f1757.

Change-Id: Ie1027a218154b8ded6c1c8f0007720f5be68780d

8 years agoMerge "Change condition to opposite if lhs is constant"
Nicolas Geoffray [Tue, 12 Jan 2016 13:09:59 +0000 (13:09 +0000)]
Merge "Change condition to opposite if lhs is constant"

8 years agoChange condition to opposite if lhs is constant
Anton Shamin [Tue, 8 Sep 2015 11:33:16 +0000 (17:33 +0600)]
Change condition to opposite if lhs is constant

Swap operands if lhs is constant. Handeled unsigned comparison
in insruction simplifier. Fixed NaN comparison: no matter what
bias is set result of Equal and NotEqual operations should not
depend on it. Added checker tests.

Change-Id: I5a9ac25fb10f2705127a52534867cee43368ed1b
Signed-off-by: Anton Shamin <anton.shamin@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
8 years agoMerge "Optimizing/ARM: Fix CmpConstant()."
Vladimir Marko [Tue, 12 Jan 2016 12:19:19 +0000 (12:19 +0000)]
Merge "Optimizing/ARM: Fix CmpConstant()."

8 years agoMerge "Clean up SwapSpace."
Vladimir Marko [Tue, 12 Jan 2016 12:19:03 +0000 (12:19 +0000)]
Merge "Clean up SwapSpace."

8 years agoMerge "Ignore libcore.java.lang.OldSystemTest#test_gc failures with CC."
Roland Levillain [Tue, 12 Jan 2016 11:42:52 +0000 (11:42 +0000)]
Merge "Ignore libcore.java.lang.OldSystemTest#test_gc failures with CC."

8 years agoIgnore libcore.java.lang.OldSystemTest#test_gc failures with CC.
Roland Levillain [Tue, 12 Jan 2016 11:10:06 +0000 (11:10 +0000)]
Ignore libcore.java.lang.OldSystemTest#test_gc failures with CC.

This test is sometimes failing on ART Builbot's ARMv8
concurrent collector configuration.

Bug: 26155567
Change-Id: I0a6ead8e9136d4125b58c86e13ce9a359bcb113e

8 years agoMerge "Fast Art interpreter"
Bill Buzbee [Mon, 11 Jan 2016 21:06:06 +0000 (21:06 +0000)]
Merge "Fast Art interpreter"

8 years agoFast Art interpreter
buzbee [Fri, 6 Mar 2015 22:43:04 +0000 (14:43 -0800)]
Fast Art interpreter

Add a Dalvik-style fast interpreter to Art.
Three primary deficiencies in the existing Art interpreter
will be addressed:

1.  Structural inefficiencies (primarily the bloated
    fetch/decode/execute overhead of the C++ interpreter
    implementation).
2.  Stack memory wastage.  Each managed-language invoke
    adds a full copy of the interpreter's compiler-generated
    locals on the shared stack.  We're at the mercy of
    the compiler now in how much memory is wasted here.  An
    assembly based interpreter can manage memory usage more
    effectively.
3.  Shadow frame model, which not only spends twice the memory
    to store the Dalvik virtual registers, but causes vreg stores
    to happen twice.

This CL mostly deals with #1 (but does provide some stack memory
savings).  Subsequent CLs will address the other issues.

Current status:
   Passes all run-tests.
   Phone boots interpret-only.
   2.5x faster than Clang-compiled Art goto interpreter on fetch/decode/execute
       microbenchmark, 5x faster than gcc-compiled goto interpreter.
   1.6x faster than Clang goto on Caffeinemark overall
   2.0x faster than Clang switch on Caffeinemark overall
   68% of Dalvik interpreter performance on Caffeinemark (still much slower,
       primarily because of poor invoke performance and lack of execute-inline)
   Still nearly an order of magnitude slower than Dalvik on invokes
       (but slightly better than Art Clang goto interpreter.
   Importantly, saves ~200 bytes of stack memory per invoke (but still
       wastes ~400 relative to Dalvik).

What's needed:
   Remove the (large quantity of) bring-up hackery in place.
   Integrate into the build mechanism.  I'm still using the old Dalvik manual
       build step to generate assembly code from the stub files.
   Remove the suspend check hack.  For bring-up purposes, I'm using an explicit
       suspend check (like the other Art interpreters).  However, we should be
       doing a Dalvik style suspend check via the table base switch mechanism.
       This should be done during the alternative interpreter activation.
   General cleanup.
   Add CFI info.
   Update the new target bring-up README documentation.
   Add other targets.

In later CLs:
   Consolidate mterp handlers for expensive operations (such as new-instance) with
       the code used by the switch interpreter.  No need to duplicate the code for
       heavyweight operations (but will need some refactoring to align).
   Tuning - some fast paths needs to be moved down to the assembly handlers,
       rather than being dealt with in the out-of-line code.
   JIT profiling.  Currently, the fast interpreter is used only in the fast
       case - no instrumentation, no transactions and no access checks. We
       will want to implement fast + JIT-profiling as the alternate fast
       interpreter.  All other cases can still fall back to the reference
       interpreter.
   Improve invoke performance.  We're nearly an order of magnitude slower than
       Dalvik here.  Some of that is unavoidable, but I suspect we can do
       better.
   Add support for our other targets.

Change-Id: I43e25dc3d786fb87245705ac74a87274ad34fedc

8 years agoMerge "Isolate concurrent collector related libcore failures."
Roland Levillain [Mon, 11 Jan 2016 16:54:52 +0000 (16:54 +0000)]
Merge "Isolate concurrent collector related libcore failures."

8 years agoMerge "Remove ElfFile::GdbJITSupport"
David Srbecky [Mon, 11 Jan 2016 16:46:17 +0000 (16:46 +0000)]
Merge "Remove ElfFile::GdbJITSupport"

8 years agoMerge "ART: Use libopenjdkd"
Andreas Gampe [Mon, 11 Jan 2016 16:34:49 +0000 (16:34 +0000)]
Merge "ART: Use libopenjdkd"

8 years agoIsolate concurrent collector related libcore failures.
Roland Levillain [Mon, 11 Jan 2016 15:51:00 +0000 (15:51 +0000)]
Isolate concurrent collector related libcore failures.

Expect CC-related failures on the CC configuration only.

Bug: 25883050
Change-Id: I326f727fef3eb8048a08d195ddcee85e1319810b

8 years agoRemove ElfFile::GdbJITSupport
David Srbecky [Mon, 11 Jan 2016 15:25:22 +0000 (15:25 +0000)]
Remove ElfFile::GdbJITSupport

This method notified gdb about loaded ELF file.
Since we use dlopen to load the ELF file now, it should not be needed.

Note that the method had nothing to do with JIT compiler.

Change-Id: I967495c39e42112023a495ce5fac25b97669d1d5

8 years agoMerge "Generate Nops to ensure that debug stack maps have distinct PC."
David Srbecky [Mon, 11 Jan 2016 14:47:37 +0000 (14:47 +0000)]
Merge "Generate Nops to ensure that debug stack maps have distinct PC."

8 years agoMerge "Fix brainos in makefiles."
Nicolas Geoffray [Mon, 11 Jan 2016 14:25:03 +0000 (14:25 +0000)]
Merge "Fix brainos in makefiles."

8 years agoFix brainos in makefiles.
Nicolas Geoffray [Mon, 11 Jan 2016 14:23:36 +0000 (14:23 +0000)]
Fix brainos in makefiles.

Change-Id: If6f9aae6fc18bf5a28e7804303dcdb319dea0cb2

8 years agoMerge "Don't use std::abs on INT_MIN/LONG_MIN, it's undefined."
Nicolas Geoffray [Mon, 11 Jan 2016 14:20:52 +0000 (14:20 +0000)]
Merge "Don't use std::abs on INT_MIN/LONG_MIN, it's undefined."

8 years agoMerge "Fix "check" file, and mark test as failing on device."
Nicolas Geoffray [Mon, 11 Jan 2016 14:20:11 +0000 (14:20 +0000)]
Merge "Fix "check" file, and mark test as failing on device."

8 years agoFix "check" file, and mark test as failing on device.
Nicolas Geoffray [Mon, 11 Jan 2016 14:18:52 +0000 (14:18 +0000)]
Fix "check" file, and mark test as failing on device.

Change-Id: Ie1f9a2e86f94ccc3c9859ac172ee4b3da0f85d63

8 years agoGenerate Nops to ensure that debug stack maps have distinct PC.
David Srbecky [Fri, 8 Jan 2016 18:13:53 +0000 (18:13 +0000)]
Generate Nops to ensure that debug stack maps have distinct PC.

Change-Id: I5740ec958a20d236634b66df0e675382ed5c16fc

8 years agoMerge "Emit an error message when looking for String#offset."
Nicolas Geoffray [Mon, 11 Jan 2016 12:01:16 +0000 (12:01 +0000)]
Merge "Emit an error message when looking for String#offset."

8 years agoMerge "Disable flaky test on host."
Nicolas Geoffray [Mon, 11 Jan 2016 11:56:22 +0000 (11:56 +0000)]
Merge "Disable flaky test on host."

8 years agoDisable flaky test on host.
Nicolas Geoffray [Mon, 11 Jan 2016 11:45:27 +0000 (11:45 +0000)]
Disable flaky test on host.

bug:26483935
Change-Id: I6e1f7b2d33182969d08d75d217ff0891920dc35b

8 years agoMerge "ART: Do not build Checker tests with `dx --no-optimize`"
David Brazdil [Mon, 11 Jan 2016 11:37:52 +0000 (11:37 +0000)]
Merge "ART: Do not build Checker tests with `dx --no-optimize`"

8 years agoDon't use std::abs on INT_MIN/LONG_MIN, it's undefined.
Nicolas Geoffray [Mon, 4 Jan 2016 08:39:49 +0000 (08:39 +0000)]
Don't use std::abs on INT_MIN/LONG_MIN, it's undefined.

bug:25494265

Change-Id: I560a3a589b92440020285f9adfdf7c9efb06217c

8 years agoMerge "Revert "Disable test while investigating.""
Shubham Ajmera [Mon, 11 Jan 2016 10:29:59 +0000 (10:29 +0000)]
Merge "Revert "Disable test while investigating.""

8 years agoART: Do not build Checker tests with `dx --no-optimize`
David Brazdil [Mon, 11 Jan 2016 10:27:13 +0000 (10:27 +0000)]
ART: Do not build Checker tests with `dx --no-optimize`

Change-Id: Ice9298b92cde5486db40ccdef43cca6d36179d2c

8 years agoRevert "Disable test while investigating."
Shubham Ajmera [Sun, 10 Jan 2016 00:00:25 +0000 (00:00 +0000)]
Revert "Disable test while investigating."

Change #195560 fixes the test.
This reverts commit 1c58d6980541eb469f4860f00a77ba8c729efef9.

Change-Id: Idbfb0c5d2fbc1796f7dd1056181b5fc912a065a3

8 years agoMerge "Suppress jsr166.LinkedTransferQueueTest#testWaitingConsumer."
Hiroshi Yamauchi [Sat, 9 Jan 2016 01:28:37 +0000 (01:28 +0000)]
Merge "Suppress jsr166.LinkedTransferQueueTest#testWaitingConsumer."

8 years agoSuppress jsr166.LinkedTransferQueueTest#testWaitingConsumer.
Hiroshi Yamauchi [Sat, 9 Jan 2016 01:22:23 +0000 (17:22 -0800)]
Suppress jsr166.LinkedTransferQueueTest#testWaitingConsumer.

To make the buildbot read barrier config greener for now.

Bug: 25883050
Change-Id: I5ce837e7783dd2c32825993d8dd754741839261d

8 years agoMerge "Revert "Revert "Reduce sleep duration in SuspendAllDaemonThreads"""
Mathieu Chartier [Sat, 9 Jan 2016 00:29:20 +0000 (00:29 +0000)]
Merge "Revert "Revert "Reduce sleep duration in SuspendAllDaemonThreads"""

8 years agoRevert "Revert "Reduce sleep duration in SuspendAllDaemonThreads""
Mathieu Chartier [Thu, 7 Jan 2016 17:31:33 +0000 (09:31 -0800)]
Revert "Revert "Reduce sleep duration in SuspendAllDaemonThreads""

Fixed the error where I reduced the time until the warning by 10x.

Bug: 26351700

This reverts commit bc34a7ed232cb3d384c250578e2b4ede45f2b167.

Change-Id: I6b30a0711fe077421665b78c39ded88899407700

8 years agoMerge "Improve handling of daemon threads after runtime shutdown"
Mathieu Chartier [Sat, 9 Jan 2016 00:23:00 +0000 (00:23 +0000)]
Merge "Improve handling of daemon threads after runtime shutdown"

8 years agoImprove handling of daemon threads after runtime shutdown
Mathieu Chartier [Thu, 7 Jan 2016 23:14:19 +0000 (15:14 -0800)]
Improve handling of daemon threads after runtime shutdown

The main issue comes from the fact that user daemon threads are
allowed to continue running after the runtime has shutdown. They may
still have a JNI env pointer. To prevent crashing if they call into
the env, we replace the function pointers with functions that sleep
forever.

The other issue is that user daemon threads that are blocked in an
ART condition variable may get woken up by another user daemon inside
of Monitor::Notify or by a spurious wakeup (i.e. SIGQUIT). To deal
with this issue, we check the JNI env for shutdown runtime when we
are woken up from a condition variable wait. This check fixes test
132 with --host --gdb --interpreter. Previously this test crashed
since dlclose was somehow causing a spurious futex wakeup.

TODO: Investigate adding a unit test.

Bug: 18577101
Change-Id: I479b38968ee9fbc4ee4b252ee2528787279972cc

8 years agoMerge "Fix general multi-image TODOs."
Jeff Hao [Fri, 8 Jan 2016 22:45:29 +0000 (22:45 +0000)]
Merge "Fix general multi-image TODOs."

8 years agoFix general multi-image TODOs.
Jeff Hao [Fri, 8 Jan 2016 18:44:20 +0000 (10:44 -0800)]
Fix general multi-image TODOs.

- Removed some unnecessary comments.

Bug: 26317072

(cherry-picked from commit 509f2ab308032534f14d8f4f374f60da8a615fa2)

Change-Id: Id542262ca1182fb77f029f2136266e470bde9473

8 years agoMerge "Fix image writer for generation of app images"
Mathieu Chartier [Fri, 8 Jan 2016 18:07:23 +0000 (18:07 +0000)]
Merge "Fix image writer for generation of app images"

8 years agoFix image writer for generation of app images
Mathieu Chartier [Fri, 8 Jan 2016 02:36:19 +0000 (18:36 -0800)]
Fix image writer for generation of app images

Fixed IsInBootImage and IsInBootOatFile. Also re-enabled generation
of app images for tests.

Bug: 26317072
Bug: 22858531
Change-Id: I19cbe7a8143b5ff7582eb27dfd9d2d8121c67b3c

8 years agoART: Use libopenjdkd
Andreas Gampe [Thu, 7 Jan 2016 01:59:49 +0000 (17:59 -0800)]
ART: Use libopenjdkd

Load libopenjdkd in debug mode. Add dependencies for libopenjdkd
in the Makefiles.

Bug: 26421792
Change-Id: Ie64cd56f73901b9c7645e46384d753752bbd5351

8 years agoMerge "Disable test while investigating."
Nicolas Geoffray [Fri, 8 Jan 2016 17:10:13 +0000 (17:10 +0000)]
Merge "Disable test while investigating."

8 years agoDisable test while investigating.
Nicolas Geoffray [Fri, 8 Jan 2016 17:09:22 +0000 (17:09 +0000)]
Disable test while investigating.

Change-Id: Ide7fd1251e10fe93525fe3fccd9240318585f9e6

8 years agoMerge "Add a missing implicit null check in the ARM codegen."
Roland Levillain [Fri, 8 Jan 2016 16:50:53 +0000 (16:50 +0000)]
Merge "Add a missing implicit null check in the ARM codegen."

8 years agoMerge "Small implicit null checks refactoring in the ARM codegen."
Roland Levillain [Fri, 8 Jan 2016 16:09:13 +0000 (16:09 +0000)]
Merge "Small implicit null checks refactoring in the ARM codegen."

8 years agoSmall implicit null checks refactoring in the ARM codegen.
Roland Levillain [Fri, 8 Jan 2016 16:04:55 +0000 (16:04 +0000)]
Small implicit null checks refactoring in the ARM codegen.

Change-Id: I7dccb02cf7ac2f7d8fd1676b03e0b394701fbe3f

8 years agoAdd a missing implicit null check in the ARM codegen.
Roland Levillain [Fri, 8 Jan 2016 15:56:19 +0000 (15:56 +0000)]
Add a missing implicit null check in the ARM codegen.

The code generated for object ArraySet on ARM used to
miss an implicit null check for the array when the assigned
value is `null`.  This has not been an actual issue so far,
as ArraySet instructions have never been using implicit null
checks.

Note: This CL comes without a regression test, as the code
path in question is not used (yet).

Change-Id: If3bc85e32802595e635513dfb83ccfcfd8f00d3d

8 years agoMerge "ARM Baker's read barrier fast path implementation."
Roland Levillain [Fri, 8 Jan 2016 15:05:16 +0000 (15:05 +0000)]
Merge "ARM Baker's read barrier fast path implementation."

8 years agoARM Baker's read barrier fast path implementation.
Roland Levillain [Fri, 18 Dec 2015 10:38:42 +0000 (10:38 +0000)]
ARM Baker's read barrier fast path implementation.

Introduce an ARM fast path implementation in Optimizing for
Baker's read barriers (for both heap reference loads and GC
root loads).  The marking phase of the read barrier is
performed by a slow path, invoking the runtime entry point
artReadBarrierMark.

Other read barrier algorithms continue to use the original
slow path based implementation, which has been renamed as
GenerateReadBarrierSlow/GenerateReadBarrierForRootSlow.

Bug: 12687968
Change-Id: Ie7ee85b1b4c0564148270cebdd3cbd4c3da51b3a

8 years agoMerge "Add libstdc++ as a target for buildbot builds."
Nicolas Geoffray [Fri, 8 Jan 2016 10:21:59 +0000 (10:21 +0000)]
Merge "Add libstdc++ as a target for buildbot builds."

8 years agoMerge "Re-enable class table for image writer"
Mathieu Chartier [Fri, 8 Jan 2016 02:34:03 +0000 (02:34 +0000)]
Merge "Re-enable class table for image writer"

8 years agoRe-enable class table for image writer
Mathieu Chartier [Fri, 8 Jan 2016 00:29:01 +0000 (16:29 -0800)]
Re-enable class table for image writer

Changes, create one temporary class table per ImageInfo. Don't keep
track of class loaders.

Bug: 26317072

Change-Id: I4f9121194f39031fb8629d60b6feeb2747a77870

8 years agoAdd libstdc++ as a target for buildbot builds.
Nicolas Geoffray [Thu, 7 Jan 2016 18:13:33 +0000 (18:13 +0000)]
Add libstdc++ as a target for buildbot builds.

It's a hidden dependency of libjavacore.

Change-Id: I7eca051502897c37293e22fbdda8a5924694ee76

8 years agoMerge "Perform profile file analysis in dex2oat"
Calin Juravle [Thu, 7 Jan 2016 16:32:01 +0000 (16:32 +0000)]
Merge "Perform profile file analysis in dex2oat"

8 years agoPerform profile file analysis in dex2oat
Calin Juravle [Mon, 21 Dec 2015 13:39:33 +0000 (15:39 +0200)]
Perform profile file analysis in dex2oat

Dex2oat can accept now multiple profile files to drive a profile based
compilation. --profile-file and --reference-profile-file speficy a pair
of profile files which will be evaluated for significant differences
before starting the compilation. If the difference is insignificant
(according to some internal metric) the compilation is skipped and a
message is logged.

Multiple pairs of --profile-file and --reference-profile-file can be
specified. This effectively enables multi user support since profiles
for different users will be kept separately.

--reference-profile-file can be left out, case in which the decision is
solely based on --profile-file. If both flags are present, then their
repetition should form unique pairs.

If the compilation is performed and --reference-profile-file is given
then its data is merged with the data from the corresponding --profile-
file and saved back to the file.

If no profile flags are given, dex2oat proceeds as before and compiles
the dex files unconditionally.

As part of this change
- merge ProfileCompilationInfo and OfflineProfilingInfo under the same
object. There was no use to keep them separate anymore.
- SaveProfilingInfo now merges the data with what was in
the file before instead of overwriting it.

Bug: 26080105

Change-Id: Ia8c8b55587d468bca5179f78941854285426234d

8 years agoMerge "Force Jack to consider multidex annotations"
Yohann Roussel [Thu, 7 Jan 2016 15:44:26 +0000 (15:44 +0000)]
Merge "Force Jack to consider multidex annotations"

8 years agoForce Jack to consider multidex annotations
Yohann Roussel [Thu, 7 Jan 2016 15:15:41 +0000 (16:15 +0100)]
Force Jack to consider multidex annotations

This is a workaround and should not be necessary.

Bug: 26441710
Change-Id: Ife879e46deb872ed48cff9abbe1088e2f1c86bee

8 years agoMerge "The ArtMethod is a long on 64bits."
Nicolas Geoffray [Thu, 7 Jan 2016 14:54:18 +0000 (14:54 +0000)]
Merge "The ArtMethod is a long on 64bits."

8 years agoThe ArtMethod is a long on 64bits.
Nicolas Geoffray [Thu, 7 Jan 2016 14:53:08 +0000 (14:53 +0000)]
The ArtMethod is a long on 64bits.

Change-Id: I8719d7061def3968d8f933e7649ec7bbdabbcf67

8 years agoEmit an error message when looking for String#offset.
Nicolas Geoffray [Thu, 7 Jan 2016 10:55:14 +0000 (10:55 +0000)]
Emit an error message when looking for String#offset.

Debugging two different apps relying on it and swallowing
the getDeclaredField exception took too much of my lifetime.
Adding a LOG(ERROR) can help diagnose quicker.

Also remove unused method getDeclaredFieldInternal.

Change-Id: I0923556a4fdbad2b06c1811ed741d23dbd4aa0a0

8 years agoMerge "Fix a crash with unresolved classes."
Nicolas Geoffray [Thu, 7 Jan 2016 12:05:23 +0000 (12:05 +0000)]
Merge "Fix a crash with unresolved classes."

8 years agoMerge "Assume the profile file was created before saving."
Calin Juravle [Thu, 7 Jan 2016 11:45:11 +0000 (11:45 +0000)]
Merge "Assume the profile file was created before saving."

8 years agoFix a crash with unresolved classes.
Nicolas Geoffray [Wed, 6 Jan 2016 17:40:20 +0000 (17:40 +0000)]
Fix a crash with unresolved classes.

We cannot pass the initialization duty to a HLoadClass that needs
access checks. The optimization was assuming the graph structure
could not lead to such a situation, but turns out with licm, it can.

Change-Id: I6c5299955e1f9221a2dd70976a55e0dea06882eb

8 years agoMerge "Revert "Reduce sleep duration in SuspendAllDaemonThreads""
Nicolas Geoffray [Thu, 7 Jan 2016 09:13:42 +0000 (09:13 +0000)]
Merge "Revert "Reduce sleep duration in SuspendAllDaemonThreads""

8 years agoRevert "Reduce sleep duration in SuspendAllDaemonThreads"
Nicolas Geoffray [Thu, 7 Jan 2016 09:13:24 +0000 (09:13 +0000)]
Revert "Reduce sleep duration in SuspendAllDaemonThreads"

run-test 132 randomly chokes due to this change.

Bug: 26351700

This reverts commit adef5bde6c3392dca3dafa0f8d2c9428b59af3ef.

Change-Id: I18e007264e1e8b9027d7d241cb9f0053ad8d112a

8 years agoMerge "Reduce sleep duration in SuspendAllDaemonThreads"
Mathieu Chartier [Thu, 7 Jan 2016 02:55:46 +0000 (02:55 +0000)]
Merge "Reduce sleep duration in SuspendAllDaemonThreads"

8 years agoReduce sleep duration in SuspendAllDaemonThreads
Mathieu Chartier [Thu, 7 Jan 2016 02:28:21 +0000 (18:28 -0800)]
Reduce sleep duration in SuspendAllDaemonThreads

Previously we unconditionally slept for 200ms which caused runtime
shutdown to take 200ms longer than required.

Reduces runtime shutdown time for "am" from ~200ms to ~10ms.

Bug: 26351700
Change-Id: I7fd0059cb3b04dba0acc4a1754e76c89ec867f85

8 years agoMerge "Add systrace output to runtime shutdown"
Mathieu Chartier [Thu, 7 Jan 2016 02:21:52 +0000 (02:21 +0000)]
Merge "Add systrace output to runtime shutdown"

8 years agoAdd systrace output to runtime shutdown
Mathieu Chartier [Thu, 7 Jan 2016 01:23:25 +0000 (17:23 -0800)]
Add systrace output to runtime shutdown

Help debug why am command shutdown is slow.

Findings:
~200ms spent in deleting thread list on N5.

Bug: 26351700
Change-Id: Icb59390a5267ae8bade4ced12252743c48206bb1

8 years agoMerge "Address some intern table comments"
Mathieu Chartier [Thu, 7 Jan 2016 00:23:17 +0000 (00:23 +0000)]
Merge "Address some intern table comments"

8 years agoAddress some intern table comments
Mathieu Chartier [Wed, 6 Jan 2016 23:47:09 +0000 (15:47 -0800)]
Address some intern table comments

Change-Id: I7ffaa463272015c2924ba03e006041daee498ad4

8 years agoMerge "Remove gaps between images"
Mathieu Chartier [Wed, 6 Jan 2016 23:26:01 +0000 (23:26 +0000)]
Merge "Remove gaps between images"

8 years agoRemove gaps between images
Mathieu Chartier [Wed, 6 Jan 2016 21:51:52 +0000 (13:51 -0800)]
Remove gaps between images

We now use the same logic to calculate the size as we use to create
the image header. This should mean that it always lines up correctly.
Previously the alignment rounding could have caused page off by one
errors in some cases.

Re-enable no gap check in heap.cc.

Bug: 26317072
Change-Id: I558a4e60197ca4613fc4ec4c3a618c64a83d006a

8 years agoMerge "Re-enable adding intern table to image"
Mathieu Chartier [Wed, 6 Jan 2016 19:42:41 +0000 (19:42 +0000)]
Merge "Re-enable adding intern table to image"

8 years agoMerge "Get rid of shadow maps for images"
Mathieu Chartier [Wed, 6 Jan 2016 19:19:22 +0000 (19:19 +0000)]
Merge "Get rid of shadow maps for images"

8 years agoGet rid of shadow maps for images
Mathieu Chartier [Wed, 6 Jan 2016 02:03:15 +0000 (18:03 -0800)]
Get rid of shadow maps for images

Fixed the image bitmap creation to use the End of the object section
instead of using the map size. This means that the bitmap covers at
most one word of bits past the end of the object section.

Reverts shadow map logic introduced by multi image CL:
(commit dcdc85bbd569f0ee66c331b4219c19304a616214)

Bug: 26317072
Change-Id: I181cf3490a5b292c00c6b0f97536f3206adcd091

8 years agoRe-enable adding intern table to image
Mathieu Chartier [Tue, 29 Dec 2015 21:17:37 +0000 (13:17 -0800)]
Re-enable adding intern table to image

Changed intern table to have a stack of tables similarily to
ClassTable. Adding an image intern table adds to the front of the
intern table stack. Also some cleanup.

Bug: 26317072

Change-Id: I7bbf9485b5dbbbf3707fed21e29de3beccfb8705

8 years agoMerge "Disable tests while investigating."
Nicolas Geoffray [Wed, 6 Jan 2016 16:34:44 +0000 (16:34 +0000)]
Merge "Disable tests while investigating."

8 years agoDisable tests while investigating.
Nicolas Geoffray [Wed, 6 Jan 2016 16:33:41 +0000 (16:33 +0000)]
Disable tests while investigating.

Change-Id: I3f1e46a8bf27c962c96315d125ddd8430b7f9f0b

8 years agoMerge "ART: Don't set initial RTI for BoundType if input untyped"
David Brazdil [Wed, 6 Jan 2016 12:47:07 +0000 (12:47 +0000)]
Merge "ART: Don't set initial RTI for BoundType if input untyped"

8 years agoMerge "ART: Resolve ambiguous ArraySets"
David Brazdil [Wed, 6 Jan 2016 12:45:54 +0000 (12:45 +0000)]
Merge "ART: Resolve ambiguous ArraySets"

8 years agoART: Don't set initial RTI for BoundType if input untyped
David Brazdil [Mon, 28 Dec 2015 10:53:34 +0000 (10:53 +0000)]
ART: Don't set initial RTI for BoundType if input untyped

ReferenceTypePropagation will create a BoundType with upper bound
[Object, inexact, not null] for each if-not-null branch. The logic
setting its initial RTI will, however, set it straight to Object if
the input is untyped (loop phi or its derivate). This patch changes
the logic to leave the BoundType untyped and set it during fix-point
iteration.

Bug: 26330326
Change-Id: Ic492e2179a4c51f577908e60fbcf70d728b98a6f

8 years agoART: Resolve ambiguous ArraySets
David Brazdil [Wed, 16 Dec 2015 10:30:45 +0000 (10:30 +0000)]
ART: Resolve ambiguous ArraySets

Just like aget(-wide), the value operand of aput(-wide) bytecode
instructions can be both int/long and float/double. This patch builds
on the previous mechanism for resolving type of ArrayGets to type the
values of ArraySets based on the reference type of the array.

Bug: 22538329

Change-Id: Ic86abbb58de146692de04476b555010b6fcdd8b6