OSDN Git Service

android-x86/art.git
7 years agoMerge "Hash-based DexCache field array."
Treehugger Robot [Fri, 10 Mar 2017 15:13:31 +0000 (15:13 +0000)]
Merge "Hash-based DexCache field array."

7 years agoHash-based DexCache field array.
Vladimir Marko [Thu, 8 Dec 2016 11:39:42 +0000 (11:39 +0000)]
Hash-based DexCache field array.

Test: m test-art-host, both AOT and interpreter
Test: m test-art-target, both AOT and interpreter
Test: m valgrind-test-art-host
Bug: 30627598
Change-Id: If992f091aadd862d17b09928d21659573dd285a0

7 years agoMerge "When profiles are requested, also generate then for non-prebuild."
Nicolas Geoffray [Fri, 10 Mar 2017 09:45:35 +0000 (09:45 +0000)]
Merge "When profiles are requested, also generate then for non-prebuild."

7 years agoWhen profiles are requested, also generate then for non-prebuild.
Nicolas Geoffray [Fri, 10 Mar 2017 09:38:35 +0000 (09:38 +0000)]
When profiles are requested, also generate then for non-prebuild.

Test: test-art-host-run-test-debug-no-prebuild-optimizing-no-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-638-checker-inline-caches
Change-Id: Ib9243d453b723eda894f98a0fd25cea155251003

7 years agoMerge "Add dex file verification check for dexlayout output file."
Treehugger Robot [Fri, 10 Mar 2017 04:15:03 +0000 (04:15 +0000)]
Merge "Add dex file verification check for dexlayout output file."

7 years agoMerge "Catch signals that happen inside a fault handler."
Treehugger Robot [Fri, 10 Mar 2017 02:49:48 +0000 (02:49 +0000)]
Merge "Catch signals that happen inside a fault handler."

7 years agoMerge "ART: Make test 924 more robust"
Treehugger Robot [Fri, 10 Mar 2017 02:35:01 +0000 (02:35 +0000)]
Merge "ART: Make test 924 more robust"

7 years agoAdd dex file verification check for dexlayout output file.
Jeff Hao [Fri, 10 Mar 2017 02:14:48 +0000 (18:14 -0800)]
Add dex file verification check for dexlayout output file.

For debug builds, run the output dex file of dexlayout through the dex
file verifier as a sanity check.

Bug: 36107940
Test: mm test-art-host
Change-Id: I2b556db32cfd360cc4fe8d1d080508deebd27aa0

7 years agoMerge "Use offline inline caches during AOT compilation"
Calin Juravle [Fri, 10 Mar 2017 01:15:19 +0000 (01:15 +0000)]
Merge "Use offline inline caches during AOT compilation"

7 years agoUse offline inline caches during AOT compilation
Calin Juravle [Tue, 21 Feb 2017 09:17:21 +0000 (01:17 -0800)]
Use offline inline caches during AOT compilation

Also:
- extend the testing script to understand profile when --profile is
passed
- filter inline cache types which are not loaded by the caller class
loader

Test: m test-art-host-run-test-638-checker-inline-caches
Bug: 32434870
Change-Id: Ifcc27b3cebc79b84617412aaae64a73324151b55

7 years agoMerge "Do not allow input-vdex with dexlayout."
Nicolas Geoffray [Thu, 9 Mar 2017 20:56:53 +0000 (20:56 +0000)]
Merge "Do not allow input-vdex with dexlayout."

7 years agoDo not allow input-vdex with dexlayout.
Nicolas Geoffray [Thu, 9 Mar 2017 13:13:25 +0000 (13:13 +0000)]
Do not allow input-vdex with dexlayout.

input-vdex and dexlayout are incompatible with each other.

bug: 36084905
bug: 36076104
bug: 36059948
bug: 35872504

Test: device boots, vdex works on OTA, input-vdex is not passed
      for speed-profile.

Change-Id: I630c90acf0a8f49f50b7909e2dec995dd4a4d13f

7 years agoART: Make test 924 more robust
Andreas Gampe [Thu, 9 Mar 2017 18:21:58 +0000 (10:21 -0800)]
ART: Make test 924 more robust

To avoid rare scheduling issues, add a loop checking the Java-side
Thread state.

Bug: 35987799
Test: m test-art-host-run-test-924-threads
Change-Id: I0433d6f09684579ca1c03d335674a8013da05034

7 years agoMerge "Update UnstartedRuntime for System.identityHashCode."
Nicolas Geoffray [Thu, 9 Mar 2017 16:33:23 +0000 (16:33 +0000)]
Merge "Update UnstartedRuntime for System.identityHashCode."

7 years agoMerge "ARM(64): Improve the code generated for HSelect"
Treehugger Robot [Thu, 9 Mar 2017 15:11:23 +0000 (15:11 +0000)]
Merge "ARM(64): Improve the code generated for HSelect"

7 years agoMerge changes Ia26b07f0,Id3d2758c
Roland Levillain [Thu, 9 Mar 2017 13:02:12 +0000 (13:02 +0000)]
Merge changes Ia26b07f0,Id3d2758c

* changes:
  Revert "Revert "Use the holder's gray bit in Baker read barrier slow paths (ARM, ARM64).""
  Revert "Revert "Use the "GC is marking" information in compiler read barriers (ARM, ARM64).""

7 years agoARM(64): Improve the code generated for HSelect
Donghui Bai [Tue, 8 Nov 2016 06:55:38 +0000 (14:55 +0800)]
ARM(64): Improve the code generated for HSelect

Test: m test-art-target-run-test-566-checker-codegen-select
Test: m test-art-target-run-test-570-checker-select
Change-Id: If0140892303490701782df9a818e6d8346bf3d6c
Signed-off-by: Anton Kirilov <anton.kirilov@linaro.org>
7 years agoMerge "Track libcore change 2c0c8889ff415431e3c2d6d5ac95748f8b284384."
Narayan Kamath [Thu, 9 Mar 2017 12:57:08 +0000 (12:57 +0000)]
Merge "Track libcore change 2c0c8889ff415431e3c2d6d5ac95748f8b284384."

7 years agoMerge "Don't inline methods that throw in graph with irreducible loops."
Nicolas Geoffray [Thu, 9 Mar 2017 11:15:34 +0000 (11:15 +0000)]
Merge "Don't inline methods that throw in graph with irreducible loops."

7 years agoMerge "codegen_test: Add missing dependency."
Narayan Kamath [Thu, 9 Mar 2017 10:49:56 +0000 (10:49 +0000)]
Merge "codegen_test: Add missing dependency."

7 years agoMerge "Revert "Stop interpreter from accessing code items of compiled code.""
Nicolas Geoffray [Thu, 9 Mar 2017 09:03:51 +0000 (09:03 +0000)]
Merge "Revert "Stop interpreter from accessing code items of compiled code.""

7 years agoRevert "Stop interpreter from accessing code items of compiled code."
Nicolas Geoffray [Thu, 9 Mar 2017 09:03:19 +0000 (09:03 +0000)]
Revert "Stop interpreter from accessing code items of compiled code."

Bug: 35800981

This reverts commit df79ddb545f0d6e71d6eebb9cb94aa6916351ee9.

Change-Id: I04b1cb8d002ca330c0aa6e68b431c7f80c2779d6

7 years agoMerge "Remove --include-patch-information option from dex2oat."
Richard Uhler [Thu, 9 Mar 2017 08:33:03 +0000 (08:33 +0000)]
Merge "Remove --include-patch-information option from dex2oat."

7 years agoMerge "Stop interpreter from accessing code items of compiled code."
Treehugger Robot [Thu, 9 Mar 2017 03:53:34 +0000 (03:53 +0000)]
Merge "Stop interpreter from accessing code items of compiled code."

7 years agoMerge "ART: Add field offset caching"
Treehugger Robot [Thu, 9 Mar 2017 02:50:27 +0000 (02:50 +0000)]
Merge "ART: Add field offset caching"

7 years agoMerge "Fix duplicate classes check to iterate over classes properly."
Treehugger Robot [Thu, 9 Mar 2017 02:37:40 +0000 (02:37 +0000)]
Merge "Fix duplicate classes check to iterate over classes properly."

7 years agoMerge "Modify invoke interface trampoline to pass interface method."
Treehugger Robot [Thu, 9 Mar 2017 02:26:44 +0000 (02:26 +0000)]
Merge "Modify invoke interface trampoline to pass interface method."

7 years agoModify invoke interface trampoline to pass interface method.
Jeff Hao [Tue, 28 Feb 2017 03:32:01 +0000 (19:32 -0800)]
Modify invoke interface trampoline to pass interface method.

This avoids touching the code item in the case that the interface method
is resolved and in the dex cache. If it's not, the trampoline will still
have to go to the code item to try to resolve it.

Bug: 35800981
Test: mm test-art-host
Change-Id: Ia0e1d23429b3b928bcec727f4f2f16b7834408e5

7 years agoStop interpreter from accessing code items of compiled code.
Jeff Hao [Mon, 27 Feb 2017 22:47:06 +0000 (14:47 -0800)]
Stop interpreter from accessing code items of compiled code.

The ArtInterpreterToCompiledCodeBridge accesses the code item in a
number of places to handle argument marshalling. However, the code item
of a compiled method should have no need to be accessed by the runtime
at all, since the code has been compiled. By removing these accesses,
there is a drop in the memory footprint of the dex file, since these
code items remain untouched by the runtime.

Bug: 35800981
Test: mm test-art-host
Change-Id: Ib7d29c17e80b1690aa819d083f5b12739492ebd6

7 years agoMerge "ART: Refactor ObjectTagTable"
Treehugger Robot [Thu, 9 Mar 2017 00:07:31 +0000 (00:07 +0000)]
Merge "ART: Refactor ObjectTagTable"

7 years agoMerge "MIPS: Optimize code generation of check-cast and instance-of."
Treehugger Robot [Wed, 8 Mar 2017 23:58:25 +0000 (23:58 +0000)]
Merge "MIPS: Optimize code generation of check-cast and instance-of."

7 years agoCatch signals that happen inside a fault handler.
Josh Gao [Wed, 1 Mar 2017 00:53:59 +0000 (16:53 -0800)]
Catch signals that happen inside a fault handler.

Unblock some signals (SIGABRT, SIGBUS, SIGSEGV) that could happen
inside of the ART internal fault handlers, to report crashes inside of
the signal handler. Because we can't use sigaction to change the
handler when this happens, because it modifies global state, add a new
member variable in Thread to track whether a call to the fault handler
is reentrant or not.

Remove the old nested signal implementation that attempted to do this.

Bug: http://b/35853436
Test: changed the #if 0 to #if 1, ran a dummy process that
      threw a NullPointerException, inspected logcat
Change-Id: I04bb4a09433c6817933d64ec681ec433b528f2a5

7 years agoMerge "Allow store elimination for singleton that's returned"
Mingyao Yang [Wed, 8 Mar 2017 22:48:24 +0000 (22:48 +0000)]
Merge "Allow store elimination for singleton that's returned"

7 years agoMerge changes I2f8edd95,I17d67431
Shubham Ajmera [Wed, 8 Mar 2017 22:22:42 +0000 (22:22 +0000)]
Merge changes I2f8edd95,I17d67431

* changes:
  Allow building Android builds locally
  Allow test runner to build master-art-host targets

7 years agoAllow building Android builds locally
Shubham Ajmera [Wed, 8 Mar 2017 19:03:22 +0000 (11:03 -0800)]
Allow building Android builds locally

Test: manual
Change-Id: I2f8edd952287b5e4b6bc9f87df91d322af5c4a5a

7 years agoAllow store elimination for singleton that's returned
Mingyao Yang [Thu, 2 Mar 2017 21:26:17 +0000 (13:26 -0800)]
Allow store elimination for singleton that's returned

Allow store elimination for singleton that's visible after method return
or deoptimization. Add additional detection for keeping stores for such
singletons at block merge/deoptimization point.

Bug: 35745320
Test: m test-art-host
Change-Id: I8a75a304491dafaeb689787402afa3d7468e3789

7 years agoMerge "Inlining a few small methods based on profiling dex2oat with perf."
Mingyao Yang [Wed, 8 Mar 2017 20:29:49 +0000 (20:29 +0000)]
Merge "Inlining a few small methods based on profiling dex2oat with perf."

7 years agoMerge "Interpreter intrinsics"
Bill Buzbee [Wed, 8 Mar 2017 19:25:22 +0000 (19:25 +0000)]
Merge "Interpreter intrinsics"

7 years agoFix duplicate classes check to iterate over classes properly.
Jeff Hao [Wed, 8 Mar 2017 05:56:31 +0000 (21:56 -0800)]
Fix duplicate classes check to iterate over classes properly.

Previously would iterate in class index order, but classes are not
organized alphabetically. This changes the check to iterate over the
classes's type indexes, which are in alphabetical order.

Unit test to come.

Bug: 35477728
Test: mm test-art-host
Change-Id: Iddaad84c30be042d09dde56c998221fd07f04ab6

7 years agoInlining a few small methods based on profiling dex2oat with perf.
Mingyao Yang [Fri, 3 Feb 2017 20:09:57 +0000 (12:09 -0800)]
Inlining a few small methods based on profiling dex2oat with perf.

Test: m test-art-host
Change-Id: I6313158e59592d8d132154523be9c82dda3c7eb8

7 years agoMerge changes I16000c0c,I325003cb
Hiroshi Yamauchi [Wed, 8 Mar 2017 18:02:53 +0000 (18:02 +0000)]
Merge changes I16000c0c,I325003cb

* changes:
  Add two locks to expected_mutexes_on_weak_ref_access_.
  Revert "Add jdwp event_list_lock_ to expected_mutexes_on_weak_ref_access_."

7 years agoInterpreter intrinsics
buzbee [Wed, 1 Mar 2017 18:55:57 +0000 (10:55 -0800)]
Interpreter intrinsics

First of several intrinsic CLs.  This one provides the basic
mechanism plus a handful of the most simple examples.  Note that
Intrinsic support is limited to Mterp both to keep the switch
interpreter as a pure reference, and to avoid mixing debugging
and intrinsics.

Bug: 30933338

Test: ART_TEST_INTERPRETER m test-art-host
Test: Note: existing 082-inline-execute, 123-inline-execute2
Test:   cover intrinsics enabled by this CL.

Change-Id: I9d79e23a84bf00cadb54e1db52d8ed193bbf8887

7 years agoUpdate UnstartedRuntime for System.identityHashCode.
Nicolas Geoffray [Wed, 8 Mar 2017 16:11:23 +0000 (16:11 +0000)]
Update UnstartedRuntime for System.identityHashCode.

The method is not native anymore.

Test: unstarted_runtime_test
Change-Id: Ib5cc378f05e9b6ee50168129e855803773a9c5e6

7 years agoMerge "Improve isunit computation, some tests edits needed for SIMD."
Aart Bik [Wed, 8 Mar 2017 16:56:07 +0000 (16:56 +0000)]
Merge "Improve isunit computation, some tests edits needed for SIMD."

7 years agoMerge "Improve debugging output for a crash."
Vladimir Marko [Wed, 8 Mar 2017 16:12:00 +0000 (16:12 +0000)]
Merge "Improve debugging output for a crash."

7 years agoMerge "Forgot this line for blacklisting."
Nicolas Geoffray [Wed, 8 Mar 2017 14:52:24 +0000 (14:52 +0000)]
Merge "Forgot this line for blacklisting."

7 years agoForgot this line for blacklisting.
Nicolas Geoffray [Wed, 8 Mar 2017 14:51:43 +0000 (14:51 +0000)]
Forgot this line for blacklisting.

Test: test-art-host
Change-Id: I97d330b1898561c69d7cd02c64ea574f5dcaeffa

7 years agoImprove debugging output for a crash.
Vladimir Marko [Wed, 8 Mar 2017 14:40:47 +0000 (14:40 +0000)]
Improve debugging output for a crash.

Bug: 34839984
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: I7cf1e33c42cfae75d7a132d66a4d293173ed9b6c

7 years agocodegen_test: Add missing dependency.
Narayan Kamath [Wed, 8 Mar 2017 14:14:58 +0000 (14:14 +0000)]
codegen_test: Add missing dependency.

The lack of this dependency causes two categories of errors :
- Running without the simulator on clean builds, since the dlopen
  in code_simulator_container.cc fails (and that isn't fatal).
- Spurious crashes whilst running against an old version of
  libartd-simulator, coupled with the fact that the new / free
  pair are in different shared libs.

Test: make -j32 test-art-host-gtest-codegen_test64
Change-Id: Ifd59688e62e248fcaf06ef14350eec989b853a61

7 years agoMerge "Blacklist test for NON_BAKER_READ_BARRIER."
Nicolas Geoffray [Wed, 8 Mar 2017 13:41:44 +0000 (13:41 +0000)]
Merge "Blacklist test for NON_BAKER_READ_BARRIER."

7 years agoBlacklist test for NON_BAKER_READ_BARRIER.
Nicolas Geoffray [Wed, 8 Mar 2017 13:40:23 +0000 (13:40 +0000)]
Blacklist test for NON_BAKER_READ_BARRIER.

Test: test-art-host
Change-Id: Ia1e82d8a951ab44e47c20345bf08f241893894d0

7 years agoMerge "Experiment with ulimit settings to see if it fixes test failure."
Richard Uhler [Wed, 8 Mar 2017 13:25:43 +0000 (13:25 +0000)]
Merge "Experiment with ulimit settings to see if it fixes test failure."

7 years agoTrack libcore change 2c0c8889ff415431e3c2d6d5ac95748f8b284384.
Narayan Kamath [Wed, 8 Mar 2017 12:43:30 +0000 (12:43 +0000)]
Track libcore change 2c0c8889ff415431e3c2d6d5ac95748f8b284384.

Update the size of Class' vtable.

Test: make test-art-host
Change-Id: I6613a3f1924a2347e0e4f9c4db31d126ab4deacc

7 years agoRemove --include-patch-information option from dex2oat.
Richard Uhler [Thu, 2 Mar 2017 13:45:45 +0000 (13:45 +0000)]
Remove --include-patch-information option from dex2oat.

Because we no longer support running patchoat on npic oat files, which
means the included patch information is unused .

Bug: 33192586
Test: m test-art-host

Change-Id: I9e100c4e47dc24d91cd74226c84025e961d30f67

7 years agoDon't inline methods that throw in graph with irreducible loops.
Nicolas Geoffray [Thu, 2 Mar 2017 16:14:53 +0000 (16:14 +0000)]
Don't inline methods that throw in graph with irreducible loops.

Re-computing the loop information is not supported in graphs
with irreducible loops, as it is not deterministic, and the
loop header of a loop could change. That would lead to having the
suspend check in the wrong block.

Test: test-art-host
Test: 641-irreducible-inline
bug: 35757766
Change-Id: I6a435885461fbeca035e4f5d94f055fc3262adca

7 years agoMerge "Invoke typed arraycopy for primitive arrays."
Nicolas Geoffray [Wed, 8 Mar 2017 10:14:54 +0000 (10:14 +0000)]
Merge "Invoke typed arraycopy for primitive arrays."

7 years agoMerge "Return the right value in VerifyClass."
Nicolas Geoffray [Wed, 8 Mar 2017 10:07:42 +0000 (10:07 +0000)]
Merge "Return the right value in VerifyClass."

7 years agoExperiment with ulimit settings to see if it fixes test failure.
Richard Uhler [Tue, 7 Mar 2017 13:53:32 +0000 (13:53 +0000)]
Experiment with ulimit settings to see if it fixes test failure.

RELOCATE test is failing on a build bot with file size limit exceeded.
The suspicion is ANDROID_HOST_OUT is being set oddly on the build bot so
we don't find the right directory to use as the basis for setting the
ulimit on RELOCATE and end up with much too small a limit.

Test: test-art-host
Change-Id: I18bc6cf1888a4831a313aaaba6fab4f689825284

7 years agoMerge "ART: Update LZ4 library to v1.7.5"
Treehugger Robot [Wed, 8 Mar 2017 01:41:10 +0000 (01:41 +0000)]
Merge "ART: Update LZ4 library to v1.7.5"

7 years agoART: Add field offset caching
Andreas Gampe [Mon, 6 Mar 2017 16:19:26 +0000 (08:19 -0800)]
ART: Add field offset caching

Add caching to reduce the computational complexity of deriving
field indices. Currently cache the number of interface fields.
In the future, we may also consider the superclass count to
accelerate class visiting.

Bug: 31385354
Test: m test-art-host
Test: m test-art-host-run-test-906-iterate-heap
Test: m test-art-host-run-test-913-heaps
Change-Id: I19da243d1678f9a4a047d849193fb8bac01ed53c

7 years agoMerge "Encode inline caches with missing types in the profile"
Calin Juravle [Tue, 7 Mar 2017 23:27:22 +0000 (23:27 +0000)]
Merge "Encode inline caches with missing types in the profile"

7 years agoAdd two locks to expected_mutexes_on_weak_ref_access_.
Hiroshi Yamauchi [Tue, 7 Mar 2017 22:39:22 +0000 (14:39 -0800)]
Add two locks to expected_mutexes_on_weak_ref_access_.

The ObjectRegistry lock and the jdwp event list lock to avoid DCHECK
failures.

Some cleanup.

Bug: 35360959
Bug: 35745310
Test: test-art-host
Test: jdwp test.
Test: angler boot.
Change-Id: I16000c0c7624b1271d40c4c1a01a4e249271b67e

7 years agoRevert "Add jdwp event_list_lock_ to expected_mutexes_on_weak_ref_access_."
Hiroshi Yamauchi [Tue, 28 Feb 2017 23:01:23 +0000 (15:01 -0800)]
Revert "Add jdwp event_list_lock_ to expected_mutexes_on_weak_ref_access_."

This reverts commit 35b456a05af864da6580dd01c033efb0ed3e3e44.

Will be superceded by aog/346324.

Bug: 35360959
Test: test-art-host.
Test: jdwp test.

Change-Id: I325003cb85b29c0245de6ba86b719b51201a840c

7 years agoMerge "Change "could not find class" to warning"
Mathieu Chartier [Tue, 7 Mar 2017 21:32:30 +0000 (21:32 +0000)]
Merge "Change "could not find class" to warning"

7 years agoImprove isunit computation, some tests edits needed for SIMD.
Aart Bik [Tue, 7 Mar 2017 21:28:51 +0000 (13:28 -0800)]
Improve isunit computation, some tests edits needed for SIMD.

Rationale:
Break-out CL of ART Vectorizer: number 4.
The purpose is making the original CL smaller
and easier to review.

Bug: 34083438
Test: test-art-host
Change-Id: I62a174944bbbe1e08f631f322c513eeaea14de26

7 years agoMerge "Bug fix in overflow detection on pow. With regression test."
Aart Bik [Tue, 7 Mar 2017 21:22:58 +0000 (21:22 +0000)]
Merge "Bug fix in overflow detection on pow. With regression test."

7 years agoMerge "ART: Clean up code related to foreign dex use"
Calin Juravle [Tue, 7 Mar 2017 21:13:14 +0000 (21:13 +0000)]
Merge "ART: Clean up code related to foreign dex use"

7 years agoART: Clean up code related to foreign dex use
Calin Juravle [Sat, 4 Mar 2017 02:04:02 +0000 (18:04 -0800)]
ART: Clean up code related to foreign dex use

We simplified the way we track whether or not a dex file is used by
other apps. DexManager in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170

(cherry picked from commit 868515e2606820ea96f8b9022b442f5bcc770867)

Change-Id: If51b3301c845a8c3bbaf87d0e35a12c700e1d0aa
Merged-In: I5a04d3bba29581dedf05e21b8b20d79afa9b405a

7 years agoART: Refactor ObjectTagTable
Andreas Gampe [Fri, 3 Mar 2017 21:28:58 +0000 (13:28 -0800)]
ART: Refactor ObjectTagTable

Factor out the plain holder from the event handling.

Bug: 31385354
Bug: 31385027
Test: m test-art-host
Change-Id: If6af36e5275f8f1b924ab7dba1fb14f1ce2de8fe

7 years agoAllow test runner to build master-art-host targets
Shubham Ajmera [Tue, 7 Mar 2017 18:45:05 +0000 (10:45 -0800)]
Allow test runner to build master-art-host targets

With --build-target <target-name>, where target-name is a run-test
target on master-art-host, testrunner setup environment and runs the
tests for the target.

Test: manual
Change-Id: I17d674319283f2c455742df63e8fddb277d9bb31

7 years agoReturn the right value in VerifyClass.
Nicolas Geoffray [Tue, 7 Mar 2017 14:33:37 +0000 (14:33 +0000)]
Return the right value in VerifyClass.

We used to return kNoFailure when a class was already processed.
But it could have had soft failures.

Also remove IsCompileTimeVerified to avoid future confusions and
introduce ShouldVerifyAtRuntime.

Add some more checks to make sure we record the right things in
the vdex file.

bug: 33845394
test: verifier_deps_test test-art-host
Change-Id: Iff11a96e825c85db416083413761981515f405b7

7 years agoBug fix in overflow detection on pow. With regression test.
Aart Bik [Tue, 7 Mar 2017 02:29:39 +0000 (18:29 -0800)]
Bug fix in overflow detection on pow. With regression test.

Rationale:
Missed potential overflow in base update.

Test: test-art-host
Bug: 35706963
Change-Id: I117d96c1fa95dde37f5676f9dc750f0a71becafa

7 years agoInvoke typed arraycopy for primitive arrays.
Nicolas Geoffray [Mon, 6 Mar 2017 14:38:52 +0000 (14:38 +0000)]
Invoke typed arraycopy for primitive arrays.

Apps will always call the Object version of arraycopy. When
we can infer the types of the passed arrays, replace the method
being called to be the typed System.arraycopy one.

10% improvement on ExoPlayerBench.

Test: 641-checker-arraycopy
bug: 7103825
Change-Id: I872d7a6e163a4614510ef04ae582eb90ec48b5fa

7 years agoMerge "MIPS64: Removal of unnecessary null check"
Treehugger Robot [Tue, 7 Mar 2017 11:59:31 +0000 (11:59 +0000)]
Merge "MIPS64: Removal of unnecessary null check"

7 years agoMerge "Add the test name that is too long for diagnosing issues."
Nicolas Geoffray [Tue, 7 Mar 2017 10:22:19 +0000 (10:22 +0000)]
Merge "Add the test name that is too long for diagnosing issues."

7 years agoAdd the test name that is too long for diagnosing issues.
Nicolas Geoffray [Tue, 7 Mar 2017 09:59:05 +0000 (09:59 +0000)]
Add the test name that is too long for diagnosing issues.

Test: test-art-host
Change-Id: Id9256536ab665fbab1f9788f84cc5c805dfb40a0

7 years agoMIPS64: Removal of unnecessary null check
Tijana Jakovljevic [Tue, 7 Mar 2017 08:43:31 +0000 (09:43 +0100)]
MIPS64: Removal of unnecessary null check

Unintentionally left in https://android-review.googlesource.com/#/c/321427/.

Test: booted MIPS64 in QEMU
Change-Id: Idf9c7301f1881ca4cd427a3ef4beffae6022f339

7 years agoMerge "Fix dexlayout calculation of code item size."
Treehugger Robot [Tue, 7 Mar 2017 02:02:52 +0000 (02:02 +0000)]
Merge "Fix dexlayout calculation of code item size."

7 years agoMerge "Check IsModifiableClass earlier in redefineClasses and retransformClasses"
Treehugger Robot [Tue, 7 Mar 2017 01:49:58 +0000 (01:49 +0000)]
Merge "Check IsModifiableClass earlier in redefineClasses and retransformClasses"

7 years agoMerge "Pass driver to loop opt. Add new side_effects phase."
Treehugger Robot [Tue, 7 Mar 2017 01:01:43 +0000 (01:01 +0000)]
Merge "Pass driver to loop opt. Add new side_effects phase."

7 years agoFix dexlayout calculation of code item size.
Jeff Hao [Mon, 6 Mar 2017 23:05:38 +0000 (15:05 -0800)]
Fix dexlayout calculation of code item size.

Calculation of code item size was based on looking for the latest catch
handler referenced by a try block, but there can be handlers that aren't
referenced by any try blocks. This fix manually reads all handlers to
ensure the end is actually reached.

Bug: 35978524
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: I33b30087845f806cd34b888f1ec457ee692f2af4

7 years agoCheck IsModifiableClass earlier in redefineClasses and retransformClasses
Alex Light [Mon, 6 Mar 2017 23:46:43 +0000 (15:46 -0800)]
Check IsModifiableClass earlier in redefineClasses and retransformClasses

We were not checking this until we actually tried to install the
definition. This meant that we could send dex file data to agents even
if there is no chance of it being used. We would also try to get the
dex file name for non-existant dex files causing crashes.

Bug: 31455788
Test: ./test/testrunner/testrunner.py --host -t 921-hello-failure
Change-Id: I647a057fe916861d555ae142a2961f449f1bc3a5

7 years agoPass driver to loop opt. Add new side_effects phase.
Aart Bik [Mon, 6 Mar 2017 19:13:43 +0000 (11:13 -0800)]
Pass driver to loop opt. Add new side_effects phase.

Rationale:
Break-out CL of ART Vectorizer: number 3.
The purpose is making the original CL smaller
and easier to review.

Bug: 34083438
Test: test-art-host
Change-Id: I7cece807ee4f5fcaeae41f1deed33ac263447b77

7 years agoMerge "Disable test 154 for JIT"
Treehugger Robot [Mon, 6 Mar 2017 20:58:09 +0000 (20:58 +0000)]
Merge "Disable test 154 for JIT"

7 years agoEncode inline caches with missing types in the profile
Calin Juravle [Sat, 4 Mar 2017 00:05:05 +0000 (16:05 -0800)]
Encode inline caches with missing types in the profile

Not all runtime types can be encoded in the profile. For example if the
receiver type is in a dex file which is not tracked for profiling its
type cannot be encoded.

Previously we would just skip over these types but that can lead to
encode a polymorphic inline cache when in fact it should be megamorphic.

With this CL, inline caches for which types are missing are marked in
the profile with a special bit, kIsMissingTypesEncoding.

Also, extend profman to understand text lines which specify an inline
cache with missing types.

Test: test-art-host

Bug: 35927981
Bug: 32434870
Change-Id: I34528a39c227f3133771fd4454701c1ddc234f40

7 years agoMerge "Array store/allocation elimination"
Mingyao Yang [Mon, 6 Mar 2017 20:05:03 +0000 (20:05 +0000)]
Merge "Array store/allocation elimination"

7 years agoChange "could not find class" to warning
Mathieu Chartier [Mon, 6 Mar 2017 19:16:20 +0000 (11:16 -0800)]
Change "could not find class" to warning

Otherwise its too spammy during build.

Bug: 34929159
Bug: 34927277
Test: test-art-host

Change-Id: I94ab0ad4e3d4b8f4817c6ddadafa2576b415c746

7 years agoDisable test 154 for JIT
Mathieu Chartier [Mon, 6 Mar 2017 18:07:59 +0000 (10:07 -0800)]
Disable test 154 for JIT

The compiler may cause too many GCs to occur.

Bug: 35917229

Test: test-art-host ART_TEST_JIT
Test: test/testrunner/testrunner.py  --host --jit

Change-Id: I1c1fbd01e815b1f9117b45ab9a419c5824c17dad

7 years agoArray store/allocation elimination
Mingyao Yang [Wed, 1 Mar 2017 22:03:51 +0000 (14:03 -0800)]
Array store/allocation elimination

Allow array store/allocation elimination if it's only accessed
by constant index, so that there is no index-aliasing.

Bug: 35634932
Test: m -j20 test-art-host-run-test
Change-Id: Ief6e27f5bdbb30988ff4f318a34b4251c93865fa

7 years agoMerge "MIPS64: Refactor implicit null checks in array/field get/set"
Treehugger Robot [Mon, 6 Mar 2017 17:33:34 +0000 (17:33 +0000)]
Merge "MIPS64: Refactor implicit null checks in array/field get/set"

7 years agoRevert "Revert "Use the holder's gray bit in Baker read barrier slow paths (ARM,...
Roland Levillain [Mon, 6 Mar 2017 13:54:11 +0000 (13:54 +0000)]
Revert "Revert "Use the holder's gray bit in Baker read barrier slow paths (ARM, ARM64).""

This reverts commit 47b3ab2fd83aaa530b7d2c62bfc024209b8b6923.

In compiler-generated code, when deciding whether to mark
a heap reference or not in a read barrier, after checking
whether the GC is currently marking, also check (in the
slow path) whether the lock word of the reference's holder
is gray, before actually marking the reference.

This change is only for ARM and ARM64, as it does not
benefit x86 nor x86-64.

Change-Id: Ia26b07f0485e23589bfc0e65f83852f2795688c0
Test: Run ART tests in Baker read barrier configuration.
Test: Boot a device in Baker read barrier configuration.
Bug: 35780827
Bug: 29516974

7 years agoRevert "Revert "Use the "GC is marking" information in compiler read barriers (ARM...
Roland Levillain [Mon, 6 Mar 2017 13:52:32 +0000 (13:52 +0000)]
Revert "Revert "Use the "GC is marking" information in compiler read barriers (ARM, ARM64).""

This reverts commit 35345a555bd7928582a7ffa6369b374b3ddc379d.

In compiler-generated code, when deciding whether to mark
a heap reference or not in a read barrier, check whether
the GC is currently marking, instead of checking the gray
bit in the reference's holder's lock word.

This change is only for ARM and ARM64, as it does not
benefit x86 nor x86-64.

Change-Id: Id3d2758c600115b2f07d345442cfa87edfc2792c
Test: Run ART tests in Baker read barrier configuration.
Test: Boot a device in Baker read barrier configuration.
Bug: 35780827
Bug: 29516974

7 years agoMerge "Disable 115-native-bridge in Makefile."
Nicolas Geoffray [Mon, 6 Mar 2017 10:16:30 +0000 (10:16 +0000)]
Merge "Disable 115-native-bridge in Makefile."

7 years agoDisable 115-native-bridge in Makefile.
Nicolas Geoffray [Mon, 6 Mar 2017 10:13:39 +0000 (10:13 +0000)]
Disable 115-native-bridge in Makefile.

bug:35984597
Change-Id: I26fc9db839ae5229c7f2d82603e1172bddd07470

7 years agoMerge "Add GC critical section to GetObjectsAllocated"
Treehugger Robot [Sat, 4 Mar 2017 03:41:54 +0000 (03:41 +0000)]
Merge "Add GC critical section to GetObjectsAllocated"

7 years agoAdd GC critical section to GetObjectsAllocated
Mathieu Chartier [Sat, 4 Mar 2017 02:02:18 +0000 (18:02 -0800)]
Add GC critical section to GetObjectsAllocated

Prevent GC running during GetObjectsAllocated since we may get a
checkpoint request that tells us to suspend while we are doing
SuspendAll. This can cause a deadlock.

Bug: 35232978

Test: test-art-host

Change-Id: I9c02415df0a0b9fa787d7ce449ec06a40dfaf624

7 years agoMerge "Extend profman to generate profiles with inline caches"
Treehugger Robot [Fri, 3 Mar 2017 22:47:20 +0000 (22:47 +0000)]
Merge "Extend profman to generate profiles with inline caches"

7 years agoMerge "Fix OUT_DIR usage"
Treehugger Robot [Fri, 3 Mar 2017 22:33:18 +0000 (22:33 +0000)]
Merge "Fix OUT_DIR usage"

7 years agoExtend profman to generate profiles with inline caches
Calin Juravle [Tue, 14 Feb 2017 03:03:47 +0000 (19:03 -0800)]
Extend profman to generate profiles with inline caches

Extend profman logic to generate profiles based on a simple textual
respresentation. This will help writing tests for profile guided
compilation.

Before this CL, profman was able to generate profiles based on a list of
classes like:
java.lang.Comparable
java.lang.Math
java.lang.Object

This CL, enables profman to understand methods and classes alike. The
new format is:

# Classes
Ljava/lang/Comparable;
Ljava/lang/Math;
# Methods with inline caches
LTestInline;->inlinePolymorhic(LSuper;)I+LSubA;,LSubB;,LSubC;
LTestInline;->noInlineCache(LSuper;)I

"LTestInline;->inlinePolymorhic(LSuper;)I+LSubA;,LSubB;,LSubC;"
means that method `int inlineMonomorphicSubA(Super)` from class Main
will be added to the profile with the inline cache (SubA,SubB) for its
one and only invoke virtual.

@Main#noInlineCache:(LSuper;)I+;
meaning that method `int noInlineCache' from class Main will be added
to the profile with no inline cache.

Note that the methods are allowed to have a single invoke virtual in
their dex bytecode. That is to keep the parsing the file format
simple and easy to use.

Also, add a few more tests for profiles and fix an issue caused by
writing the dex files in a possibly wrong order.

Test: m run-test-host-gtest-profile_assistant_test
Bug: 32434870
Change-Id: I6b7340cf613007117d9818be206ccb3a27b815bf

7 years agoMerge "Fix dex location filtering in dex2oat"
Mathieu Chartier [Fri, 3 Mar 2017 20:52:33 +0000 (20:52 +0000)]
Merge "Fix dex location filtering in dex2oat"