OSDN Git Service

android-x86/art.git
7 years agoFix merging HLoadClass with HNewInstance.
Vladimir Marko [Wed, 29 Jun 2016 19:10:20 +0000 (19:10 +0000)]
Fix merging HLoadClass with HNewInstance.
am: 2b8b6040d0

Change-Id: I31021cee60cd328e952f33bf8d98c6f26319c779

7 years agoFix merging HLoadClass with HNewInstance.
Vladimir Marko [Wed, 29 Jun 2016 13:59:07 +0000 (14:59 +0100)]
Fix merging HLoadClass with HNewInstance.

Do not merge HLoadClass with HNewInstance if they do not
come from the same dex instruction. This is the same check
as for moving the clinit check responsibility around.

Test: Added a regression test, run standard ART test suite
plus gcstress and ndebug modes on host and Nexus 9.

Bug: 29570861
Bug: 29321958

(cherry picked from commit c7591b4c0dd405a766f4d701deea6c3750101978)

Change-Id: I0f019c36dd991889caad2666e61bbcc6d9d9c91f

7 years agoMerge changes I2814a0b8,I05a7961f into nyc-mr1-dev
TreeHugger Robot [Wed, 29 Jun 2016 16:01:21 +0000 (16:01 +0000)]
Merge changes I2814a0b8,I05a7961f into nyc-mr1-dev

* changes:
  ART: Add dex2oat swap-usage parameters
  OatFileAssistantTest: do not relocate image randomly.

7 years agoART: Add dex2oat swap-usage parameters
Andreas Gampe [Fri, 24 Jun 2016 21:55:38 +0000 (14:55 -0700)]
ART: Add dex2oat swap-usage parameters

Make the dex2oat swap usage decision dependent on parameters that
can be changed on the command line. Both the dex file size and dex
file count can be modified through the following to new parameters:

  --swap-dex-size-threshold
  --swap-dex-count-threshold

The defaults remain the same (20MB and 2).

Factor out some dex2oat setup code from oat_file_assistant_test
and use it in a new dex2oat test.

Bug: 29557002
Test: m test-art-host-gtest-dex2oat_test
Test: m test-art-host-gtest-oat_file_assistant_test
Test: m test-art-host
Change-Id: I2814a0b895d960416d20b31c4b0052f98c9cb5e6

7 years agoRevert "Optimize IMT"
Jeff Hao [Tue, 28 Jun 2016 23:47:09 +0000 (23:47 +0000)]
Revert "Optimize IMT"

This reverts commit 0790af1391b316c5c12b4e135be357008c060696.

Bug: 29188168 (for initial CL)
Bug: 29778499 (reason for revert)

Change-Id: I2c3e4ec2cebdd40faec67ddb721b7acdc8e90061

7 years agoART: Disable no-prebuild test for run-test 608
Andreas Gampe [Mon, 27 Jun 2016 23:04:02 +0000 (23:04 +0000)]
ART: Disable no-prebuild test for run-test 608
am: 0748ed9fcf

Change-Id: I24f3f299b9f7159b17857a503559436905667b65

7 years agoDo not remove loads/store with unresolved accesses.
Nicolas Geoffray [Mon, 27 Jun 2016 22:58:49 +0000 (22:58 +0000)]
Do not remove loads/store with unresolved accesses.
am: c2f1735e04

Change-Id: I83f86184e8ab5bd1143b8f66d35bd4c752995ea4

7 years agoART: Disable no-prebuild test for run-test 608
Andreas Gampe [Mon, 27 Jun 2016 21:55:02 +0000 (14:55 -0700)]
ART: Disable no-prebuild test for run-test 608

This test relies on unresolved types, which is not the case in a
no-prebuild setting (as all parts will be on the classpath).

Bug: 29433999
Change-Id: I11b1c6b446905aacd7a520796d0b2217319cefc7
Test: m ART_TEST_RUN_TEST_NO_PREBUILD=true test-art-host-run-test
(cherry picked from commit 06b7c4de44979f1cb51707d2236142bc733ebf75)

7 years agoDo not remove loads/store with unresolved accesses.
Nicolas Geoffray [Mon, 27 Jun 2016 09:03:29 +0000 (10:03 +0100)]
Do not remove loads/store with unresolved accesses.

Due to AOT and compiling classes that are not ready yet
(eg missing a super class), we need to be conservative when
accessing fields and can end up in a situation where the same
field can be resolved and unresolved within the same method
(because of inlining). Therefore, disable removing loads and
stores in a method when there are unresolved accesses.

bug:29433999

(cherry picked from commit b93a16517dce12b83e9d5d3b599446e25fcc157a)

Change-Id: I8fcfb52c584222474a8220eb16c6581350b702e0

7 years agoOatFileAssistantTest: do not relocate image randomly.
Richard Uhler [Tue, 26 Apr 2016 17:24:38 +0000 (10:24 -0700)]
OatFileAssistantTest: do not relocate image randomly.

Manually relocate the boot image to a known location before starting
the runtime so that the image won't be randomly relocated. This fixes
flaky test failures due to the image randomly being relocated by 0.

Bug: 28294887
Bug: 29557002

(cherry picked from commit a48403eb54494ac52f81c9ecc9da723075ac65da)

Change-Id: I05a7961f1237a05e89d3f631c959e260ccfe0b70

7 years agoMerge \"Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable.\" into...
Oleksiy Vyalov [Wed, 22 Jun 2016 22:56:10 +0000 (22:56 +0000)]
Merge \"Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable.\" into nyc-dev
am: f7a0543d88

Change-Id: Ifd8495cb08cf25f94ac0b87dc844f95c41ccda25

7 years agoMerge "Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable." into...
Oleksiy Vyalov [Wed, 22 Jun 2016 22:43:47 +0000 (22:43 +0000)]
Merge "Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable." into nyc-dev

7 years agoCall prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable.
Oleksiy Vyalov [Tue, 21 Jun 2016 23:21:37 +0000 (16:21 -0700)]
Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable.

Enabled Yama security may prevent non-privileged debugger from
attaching to the app. However, if app is marked is debuggable
then it should acceptable to allow debugger with arbitrary pid
to connect the app.

Bug: 29549463

Change-Id: I50c79dbca272dc473e489cc61471628e2fdc4a03

7 years agoFix braino in the test to make it work on target.
Nicolas Geoffray [Wed, 22 Jun 2016 08:55:00 +0000 (08:55 +0000)]
Fix braino in the test to make it work on target.
am: af17a5e38a

Change-Id: I900bac835a6380a770d56b41c1749b276f79577a

7 years agoPropagate flags to ShouldHaveEmbeddedVTable
Mathieu Chartier [Wed, 15 Jun 2016 22:07:03 +0000 (15:07 -0700)]
Propagate flags to ShouldHaveEmbeddedVTable

Pass kVerifyFlags and kReadBarrierrOption to ShouldHaveEmbeddedVTable
from ShouldHaveImt.

Bug: 29188168

(cherry picked from commit efeb9f01308c5c4b723ff905cf5bea1636f7a549)

Change-Id: Ia76d8cd340fbb0527955f4ef611d6e14bebf8dd9

7 years agoOptimize IMT
Nelli Kim [Fri, 13 May 2016 10:08:53 +0000 (13:08 +0300)]
Optimize IMT

* Remove IMT for classes which do not implement interfaces
* Remove IMT for array classes
* Share same IMT

Saved memory (measured on hammerhead):
boot.art:
Total number of classes: 3854
Number of affected classes: 1637
Saved memory: 409kB

Chrome (excluding classes in boot.art):
Total number of classes: 2409
Number of affected classes: 1259
Saved memory: 314kB

Google Maps (excluding classes in boot.art):
Total number of classes: 6988
Number of affected classes: 2574
Saved memory: 643kB

Performance regression on benchmarks/InvokeInterface.java benchmark
(measured timeCall10Interface)
1st launch: 9.6%
2nd launch: 6.8%

Bug: 29188168

(cherry picked from commit badee9820fcf5dca5f8c46c3215ae1779ee7736e)

Change-Id: If8db765e3333cb78eb9ef0d66c2fc78a5f17f497

7 years agoFix braino in the test to make it work on target.
Nicolas Geoffray [Tue, 21 Jun 2016 12:05:24 +0000 (13:05 +0100)]
Fix braino in the test to make it work on target.

bug:29449194

(cherry picked from commit d8aa513eba9c6100a829168d31938610a99eecbb)

Change-Id: I58bd94a6c8cef7b6ac52dfb375a1df1937510767

7 years agoMerge changes from topic 'PHENOMENAL_CHANGE' into nyc-mr1-dev
Mathieu Chartier [Tue, 21 Jun 2016 01:05:30 +0000 (01:05 +0000)]
Merge changes from topic 'PHENOMENAL_CHANGE' into nyc-mr1-dev

* changes:
  Use collector specific helper classes
  Avoid duplicate class for mark compact

7 years agoART: Use null for the BootClassLoader in LoadLibrary
Andreas Gampe [Sat, 18 Jun 2016 02:31:06 +0000 (02:31 +0000)]
ART: Use null for the BootClassLoader in LoadLibrary
am: f7e0db0ce1

Change-Id: Ibd9858ffa97d23d896efbf6d55da1c0a44db5e9a

7 years agoUse collector specific helper classes
Mathieu Chartier [Thu, 16 Jun 2016 18:44:28 +0000 (11:44 -0700)]
Use collector specific helper classes

Changed to use inner classes. Also changed some visitors to lambdas.

Bug: 29413717
Bug: 19534862

(cherry picked from commit a07f55913824ab4215a9a4f827fa9c043c0d44d9)

Change-Id: I631c8bfe5f795eda4623c5bb4f357f2dd12358e2

7 years agoAvoid duplicate class for mark compact
Mathieu Chartier [Thu, 16 Jun 2016 17:28:43 +0000 (10:28 -0700)]
Avoid duplicate class for mark compact

Renamed BitmapSetSlowPathVisitor to MCBitmapSetSlowPathVisitor for
the mark compact case.

Bug: 29413717

(cherry picked from commit d528f6819571ce5276cb71134044c55408a901a1)

Change-Id: Id5a7040c0c22a7a66309b8cbd7f874819852b10e

7 years agoART: Use null for the BootClassLoader in LoadLibrary
Andreas Gampe [Fri, 17 Jun 2016 19:46:14 +0000 (12:46 -0700)]
ART: Use null for the BootClassLoader in LoadLibrary

We must translate the fake BootClassLoader object to the internally
used null when loading libraries.

Bug: 29449194
Change-Id: I823d34e209149b5b96529a423c60a1d77bf8e9d1

7 years agoUse ScopedObjectAccess in ThreadList::Dump
Mathieu Chartier [Sat, 11 Jun 2016 00:04:20 +0000 (17:04 -0700)]
Use ScopedObjectAccess in ThreadList::Dump

Prevent deadlocks if two different threads are calling Dump at the
same time:

Thread 1: Requests thread 2 to suspend
Thread 2: Requests thread 1 to suspend
Both threads are suspended and blocked on ScopedObjectAccess in
thread dumping.

Added to suspend all stress, reduced thread count to 4 temporarily
since this is the maximum number of simultaneous checkpoints.

Bug: 28988206
Bug: 26118154

(cherry picked from commit e99f53203904c23a26e53ca1bf6a4e45814146fe)

Change-Id: I9e4b8391ebad0bca0e42a03819c58c99ddba6b35

7 years agoRevert "Skip DumpForSigQuit if debugger is active"
Mathieu Chartier [Fri, 17 Jun 2016 00:02:52 +0000 (17:02 -0700)]
Revert "Skip DumpForSigQuit if debugger is active"

Bug: 26118154

This reverts commit 0b8f1bfdfc721a41d98d13e12c4c67f62f698dfc.

Change-Id: I03c743c1385e2488be1e21ee2ce34a74e6f22546

7 years agoART: Turn off unattached thread dumping
Andreas Gampe [Tue, 14 Jun 2016 00:56:06 +0000 (00:56 +0000)]
ART: Turn off unattached thread dumping
am: a3e8fc3aab

Change-Id: If0995694634388a42bde1e527f07ff8f16335776

7 years agoART: Turn off unattached thread dumping
Andreas Gampe [Mon, 13 Jun 2016 23:15:33 +0000 (16:15 -0700)]
ART: Turn off unattached thread dumping

May be responsible for lack of ANR dumps in some situations.

Bug: 29248079
Change-Id: Ib742c063b1d77216eddfbf4392d17d024e028bf8

7 years agoRemove too aggressive DCHECKs.
Nicolas Geoffray [Mon, 13 Jun 2016 12:49:44 +0000 (12:49 +0000)]
Remove too aggressive DCHECKs.
am: f7d994622a

Change-Id: I4ea0b0a4b1d72168e517b3ccc81ec9c9ed5bdbf0

7 years agoRemove too aggressive DCHECKs.
Nicolas Geoffray [Fri, 10 Jun 2016 15:06:34 +0000 (16:06 +0100)]
Remove too aggressive DCHECKs.

A class can move from a state greater or equal than resolved
to erroneous concurrently to the verifier or the compiler.

bug:29239283
Change-Id: I89f3fe1c1d9556c6c99b8e005b3ec02de7f01b85

7 years agoMerge \"Fix dex file leak in oat file manager\" into nyc-dev
Mathieu Chartier [Fri, 10 Jun 2016 16:44:27 +0000 (16:44 +0000)]
Merge \"Fix dex file leak in oat file manager\" into nyc-dev
am: 28ea938d90

Change-Id: Icd02f322782eefaac6559425ddec5989ed13a2c2

7 years agoMerge "Fix dex file leak in oat file manager" into nyc-dev
Mathieu Chartier [Fri, 10 Jun 2016 16:38:49 +0000 (16:38 +0000)]
Merge "Fix dex file leak in oat file manager" into nyc-dev

7 years agoMerge \"ART: Fix swap usage determination in dex2oat\" into nyc-dev
Andreas Gampe [Fri, 10 Jun 2016 01:46:26 +0000 (01:46 +0000)]
Merge \"ART: Fix swap usage determination in dex2oat\" into nyc-dev
am: 6822c26c81

Change-Id: I396c40f75164b90999f91283771bdd71ceaae3be

7 years agoMerge "ART: Fix swap usage determination in dex2oat" into nyc-dev
TreeHugger Robot [Fri, 10 Jun 2016 01:41:13 +0000 (01:41 +0000)]
Merge "ART: Fix swap usage determination in dex2oat" into nyc-dev

7 years agoFix dex file leak in oat file manager
Mathieu Chartier [Thu, 9 Jun 2016 23:18:04 +0000 (16:18 -0700)]
Fix dex file leak in oat file manager

Simplified ownership by having a vector of unique pointers own
all newly opened dex files.

Bug: 29246280
Change-Id: I1ffcfef35c14c732e15e83ce4674034eddfc136b

7 years agoART: Fix swap usage determination in dex2oat
Andreas Gampe [Thu, 9 Jun 2016 01:18:47 +0000 (18:18 -0700)]
ART: Fix swap usage determination in dex2oat

The decision needs to be postponed until we have access to the
dex files.

Bug: 27878043
Change-Id: I55833c6ea827ec7a322711bd182fc723d1727f08

7 years agoMerge \"Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.\" into nyc-dev
Nicolas Geoffray [Thu, 9 Jun 2016 12:20:08 +0000 (12:20 +0000)]
Merge \"Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.\" into nyc-dev
am: 08e5c07d2c

Change-Id: I6f2687374291c9a3be757551b222f6386fb4ac4e

7 years agoMerge "Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86." into nyc-dev
Nicolas Geoffray [Thu, 9 Jun 2016 12:11:27 +0000 (12:11 +0000)]
Merge "Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86." into nyc-dev

7 years agoFix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.
Nicolas Geoffray [Wed, 8 Jun 2016 17:01:22 +0000 (18:01 +0100)]
Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.

They were creating a stack that the runtime did not understand.

bug:28348339

(cherry picked from commit 0f838aa279a296b5f14c231065bb2f96b02d9caf)

Change-Id: Iecaa274512b42ad76fccb48c11a0076d0292c240

7 years agoMerge \"Revert \"Revert \"Fix ArtMethod::GetInvokeType for static methods on interfac...
Nicolas Geoffray [Wed, 8 Jun 2016 07:50:14 +0000 (07:50 +0000)]
Merge \"Revert \"Revert \"Fix ArtMethod::GetInvokeType for static methods on interfaces.\"\"\" into nyc-dev
am: 355d93caa7

Change-Id: Iacaa5c1bb3cba4e2acf63f4e7a489d44baf03613

7 years agoMerge "Revert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces...
Nicolas Geoffray [Wed, 8 Jun 2016 07:44:14 +0000 (07:44 +0000)]
Merge "Revert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces.""" into nyc-dev

7 years agoWrap certain exception types when loading an erroneous class.
Jeff Hao [Wed, 8 Jun 2016 02:29:40 +0000 (02:29 +0000)]
Wrap certain exception types when loading an erroneous class.
am: 7c8aa83571

Change-Id: I09900135d574d750aed5f84a669d3b748e80b4b6

7 years agoWrap certain exception types when loading an erroneous class.
Jeff Hao [Mon, 6 Jun 2016 18:09:20 +0000 (11:09 -0700)]
Wrap certain exception types when loading an erroneous class.

Bug: 28787733
Change-Id: I22e1e4339a95706a0fb9c1474b360e9bde232539

7 years agoRevert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces.""
Nicolas Geoffray [Tue, 7 Jun 2016 14:14:37 +0000 (14:14 +0000)]
Revert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces.""

bug:29089267
bug:27521545

We were hitting a compiler DCHECK that a class would never require to
do access checks on itself. The reason was that the compiler driver
was not trying to resolve a type, but instead relied on the verifier
for pre-populating the dex cache. However, the verifier doesn't
necessarily run in JIT mode.

This reverts commit 12abcbd950bd0ff4528e2e0d27ca5e881c7b0467.

(cherry picked from commit 3aaf9645639ff56fbfe49a981242cbda01d6796e)

Change-Id: I2f0de6e4f00f336dc61b2378054fb6d27a7298d0

7 years agoART: ArrayGet hoisting restriction added.
Anton Shamin [Tue, 7 Jun 2016 16:15:27 +0000 (16:15 +0000)]
ART: ArrayGet hoisting restriction added.
am: f479d7758d

* commit 'f479d7758dbe7e8740386fbf1d73e05b0277c5e3':
  ART: ArrayGet hoisting restriction added.

Change-Id: Iaaa64f583b06d6f7edf5b4e65246df382574d72d

7 years agoART: ArrayGet hoisting restriction added.
Anton Shamin [Mon, 16 May 2016 10:44:13 +0000 (16:44 +0600)]
ART: ArrayGet hoisting restriction added.

Currently if we hoist ArrayGet from loop there is no guarantee
that insn will be executed at runtime. Because of that we could
face issues like crashes in generated code.

This patch introduces restriction for ArrayGet hoisting. We say
that ArrayGet execution is guaranteed at least one time if its bb
dominates all exit blocks.

Signed-off-by: Anton Shamin <anton.shamin@intel.com>
(cherry picked from commit f89381fed12faf96c45a83a989ae2fff82c05f3b)

BUG=29145171

Change-Id: Ia5664dedb1543d78a7b4038801b8372572f069f6

7 years agoMerge "Enable profman pretty printing" into nyc-dev
David Sehr [Mon, 6 Jun 2016 20:21:09 +0000 (20:21 +0000)]
Merge "Enable profman pretty printing" into nyc-dev
am: 841f999d9d

* commit '841f999d9d487f42ac38bc62ddd8cf1c93ec0503':
  Enable profman pretty printing

Change-Id: I6a48e8c23b0daddc0eb32d23f7673c92817e5f09

7 years agoMerge "Enable profman pretty printing" into nyc-dev
David Sehr [Mon, 6 Jun 2016 20:16:10 +0000 (20:16 +0000)]
Merge "Enable profman pretty printing" into nyc-dev

7 years agoRevert "Revert "Hold dex caches live in class table""
Mathieu Chartier [Mon, 6 Jun 2016 20:13:28 +0000 (20:13 +0000)]
Revert "Revert "Hold dex caches live in class table""
am: c9dbb1df3b

* commit 'c9dbb1df3b5c06ba122cacaf35b17cb53c6be3c6':
  Revert "Revert "Hold dex caches live in class table""

Change-Id: Ib4ff1862aa38615901caddd3ad54aabadde55b5a

7 years agoRevert "Revert "Hold dex caches live in class table""
Mathieu Chartier [Sat, 4 Jun 2016 00:47:32 +0000 (17:47 -0700)]
Revert "Revert "Hold dex caches live in class table""

Bug: 29083330

This reverts commit f102faf1bcbdb2149e3e7bf27b1819f621b7894b.

Change-Id: Ibc6d260247b3113beec7d33552061512a36c9ce8

7 years agoEnable profman pretty printing
David Sehr [Thu, 2 Jun 2016 17:46:19 +0000 (10:46 -0700)]
Enable profman pretty printing

Bug: 28748264
Change-Id: I4dc366aa710c9ef05aa5d1b164d558232fe57a3d

7 years agoRevert "Hold dex caches live in class table"
Brian Carlstrom [Sat, 4 Jun 2016 00:46:17 +0000 (00:46 +0000)]
Revert "Hold dex caches live in class table"
am: f102faf1bc

* commit 'f102faf1bcbdb2149e3e7bf27b1819f621b7894b':
  Revert "Hold dex caches live in class table"

Change-Id: I048421781af100212e6e8826c5dbbc5d8ca2877c

7 years agoRevert "Hold dex caches live in class table"
Brian Carlstrom [Sat, 4 Jun 2016 00:22:32 +0000 (00:22 +0000)]
Revert "Hold dex caches live in class table"

This reverts commit d6d49e56c2b7b11f474acb80cb02bb1fe9b7861e.

Bug: 29083330
Change-Id: Ie209b27897b8079f2d13fd0837fe5f83a7e61afc

7 years agoHold dex caches live in class table
Mathieu Chartier [Fri, 3 Jun 2016 20:50:41 +0000 (20:50 +0000)]
Hold dex caches live in class table
am: d6d49e56c2

* commit 'd6d49e56c2b7b11f474acb80cb02bb1fe9b7861e':
  Hold dex caches live in class table

Change-Id: I81bb893896d8c16762a78f2e3735e4ed26a27f69

7 years agoHold dex caches live in class table
Mathieu Chartier [Thu, 2 Jun 2016 18:48:30 +0000 (11:48 -0700)]
Hold dex caches live in class table

Prevents temporary dex caches being unloaded for the same dex file.
Usually this is OK, but if someone resolved a string in that dex
cache, it could leave stale pointers in BSS. Also it can use extra
memory in linear alloc if we allocate dex cache arrays multiple
times.

Bug: 29083330

(cherry picked from commit f284d448e3edd428b6ade473d0993028638b2064)

Change-Id: Ie1b0b0cf835a998e19227cbb90014011a6cd40c4

7 years agoDelay dex-to-dex compilation until Optimizing is done.
Vladimir Marko [Fri, 3 Jun 2016 14:27:22 +0000 (14:27 +0000)]
Delay dex-to-dex compilation until Optimizing is done.
am: b089eccf50

* commit 'b089eccf503646e6ed2d5bb20d973d9131166655':
  Delay dex-to-dex compilation until Optimizing is done.

Change-Id: I33105e36ec363b43e561ee60d31d31d7b2929a25

7 years agoFix ArtMethod::GetInvokeType for static methods on interfaces.
Nicolas Geoffray [Fri, 3 Jun 2016 12:51:03 +0000 (12:51 +0000)]
Fix ArtMethod::GetInvokeType for static methods on interfaces.
am: 2dc77ecf37

* commit '2dc77ecf375882f51ff7c09712c05b80e58abb6b':
  Fix ArtMethod::GetInvokeType for static methods on interfaces.

Change-Id: I41fc36cf86e2b3f2961b41206e6e85b0f3ea418c

7 years agoDelay dex-to-dex compilation until Optimizing is done.
Vladimir Marko [Wed, 1 Jun 2016 17:38:43 +0000 (18:38 +0100)]
Delay dex-to-dex compilation until Optimizing is done.

This fixes a race between inlining in the Optimizing
backend and dex-to-dex quickening where the Optimizing can
read the non-quickened opcode and then the quickened field
index or vtable index and look up the wrong field or method.
Even if we such tearing of the dex instruction does not
happen, the possible reordering of dex-to-dex and Optimizing
compilation makes the final oat file non-deterministic.

Also, remove VerificationResults::RemoveVerifiedMethod() as
we have only the Optimizing backend now and as such it was
dead code and would have interfered with this change.

Bug: 29043547
Bug: 29089975

(cherry picked from commit 492a7fa6df3b197a24099a50f5abf624164f3842)

Change-Id: I1337b772dc69318393845a790e5f6d38aa3de60f

7 years agoFix ArtMethod::GetInvokeType for static methods on interfaces.
Nicolas Geoffray [Thu, 2 Jun 2016 14:55:48 +0000 (15:55 +0100)]
Fix ArtMethod::GetInvokeType for static methods on interfaces.

And avoid calling ResolveMethod in the JIT, since it already
knows that method.

bug:29089267
bug:27521545

Change-Id: I5c5dae385804f1d2062defca459f69c26cdb4fef

7 years agoFix a bug in reference type propagation.
Nicolas Geoffray [Thu, 2 Jun 2016 14:51:40 +0000 (14:51 +0000)]
Fix a bug in reference type propagation.
am: e1dfa0c120

* commit 'e1dfa0c120c8aaa3794d9712e37231b4295d7c46':
  Fix a bug in reference type propagation.

Change-Id: Ib207828aa82c43ef1b56914f4bbf68a866647609

7 years agoFix a bug in reference type propagation.
Nicolas Geoffray [Wed, 1 Jun 2016 15:30:20 +0000 (16:30 +0100)]
Fix a bug in reference type propagation.

The upper bound of a bound type is always exact, so we should
not use it for setting the type of the bound type.

bug:28730986

(cherry picked from commit a90d489ab101891bbac7276b8748125e6b4fa0c2)

Change-Id: Ia3e9f88a274730be39e5c9b147204eec2a145de2

7 years agoMerge "Don\'t do any I/O when starting the profile saver" into nyc-dev
Calin Juravle [Thu, 2 Jun 2016 10:18:15 +0000 (10:18 +0000)]
Merge "Don\'t do any I/O when starting the profile saver" into nyc-dev
am: a833974c69

* commit 'a833974c6991fab4aa06c622454fe41001bc620f':
  Don't do any I/O when starting the profile saver

Change-Id: I451095eddf40890a778dc0d03eb4303f724f027a

7 years agoMerge "Don't do any I/O when starting the profile saver" into nyc-dev
Calin Juravle [Thu, 2 Jun 2016 10:10:35 +0000 (10:10 +0000)]
Merge "Don't do any I/O when starting the profile saver" into nyc-dev

7 years agoMerge "Fix race with host_dlopen_handles_" into nyc-dev
Mathieu Chartier [Wed, 1 Jun 2016 23:08:44 +0000 (23:08 +0000)]
Merge "Fix race with host_dlopen_handles_" into nyc-dev
am: c87c9bf620

* commit 'c87c9bf620467169fd12507a7b1f6f3dc1b34f77':
  Fix race with host_dlopen_handles_

Change-Id: I6e9de7430b623314d1c7ab7dfaed79f0024bc348

7 years agoInitial profman support for verbose dump
David Sehr [Wed, 1 Jun 2016 23:08:42 +0000 (23:08 +0000)]
Initial profman support for verbose dump
am: 07f468f117

* commit '07f468f117c4c30a032b7884c08cb1dd2964444e':
  Initial profman support for verbose dump

Change-Id: I9decde424c8cbb3fee06d5e3043019cf656025ae

7 years agoMerge "Fix race with host_dlopen_handles_" into nyc-dev
Mathieu Chartier [Wed, 1 Jun 2016 22:38:10 +0000 (22:38 +0000)]
Merge "Fix race with host_dlopen_handles_" into nyc-dev

7 years agoFix race with host_dlopen_handles_
Mathieu Chartier [Wed, 1 Jun 2016 17:48:19 +0000 (10:48 -0700)]
Fix race with host_dlopen_handles_

Thread 1 opens an already opened oat file.
Thread 2 dlcloses the oat file and removes it from
host_dlopen_handles_.
Thread 1 checks that it is not already in host_dlopen_handles_ and
proceeds to return the oat file. The problem now is that the BSS is
not cleared since it is the same oat file that was opened earlier.

The fix is to just hold the lock for dlopen / dlclose. This only
affects contention on host.

Bug: 28992179
Bug: 28990799
Bug: 28826195

(cherry picked from commit c7d3f4b8c294f36209ea2c129f9714a36ae1ec6b)

Change-Id: Ib462720fab26427d8ca0c6323080604878edb8b5

7 years agoInitial profman support for verbose dump
David Sehr [Tue, 24 May 2016 21:52:31 +0000 (14:52 -0700)]
Initial profman support for verbose dump

Bug: 28748264
Change-Id: Ibc59e7f31afa4646fcf048eececb87437dd83de9

7 years agoMerge "Relax annotation visibility so runtime includes build." into nyc-dev
Jeff Hao [Sat, 28 May 2016 01:18:54 +0000 (01:18 +0000)]
Merge "Relax annotation visibility so runtime includes build." into nyc-dev
am: aec92c397e

* commit 'aec92c397e73b74187c8d517f6cf439ba6147f4d':
  Relax annotation visibility so runtime includes build.

Change-Id: Ifbc56bc5413780813d83377818f396663f75c270

7 years agoMerge "Relax annotation visibility so runtime includes build." into nyc-dev
TreeHugger Robot [Sat, 28 May 2016 01:15:50 +0000 (01:15 +0000)]
Merge "Relax annotation visibility so runtime includes build." into nyc-dev

7 years agoRelax annotation visibility so runtime includes build.
Jeff Hao [Fri, 27 May 2016 01:39:17 +0000 (18:39 -0700)]
Relax annotation visibility so runtime includes build.

Previous behavior in M and earlier would allow annotations marked
VISIBILITY_BUILD to be visible to the runtime when they should not
have been. When targeting older sdks, revert to this behavior.

Bug: 28826610
Change-Id: I95e10da899ed11107ca78c62dd2e263808008310

7 years agoMerge "Don\'t use dlopen on host for already loaded oat files." into nyc-dev
Richard Uhler [Fri, 27 May 2016 21:03:23 +0000 (21:03 +0000)]
Merge "Don\'t use dlopen on host for already loaded oat files." into nyc-dev
am: a26e5d0cb0

* commit 'a26e5d0cb095c6ec88ae4ee517a3cd805edb50e2':
  Don't use dlopen on host for already loaded oat files.

Change-Id: I9a6e97bcb066b5abfa3b009ada58439772c6e957

7 years agoMerge "Don't use dlopen on host for already loaded oat files." into nyc-dev
Richard Uhler [Fri, 27 May 2016 20:50:15 +0000 (20:50 +0000)]
Merge "Don't use dlopen on host for already loaded oat files." into nyc-dev

7 years agoDon't use dlopen on host for already loaded oat files.
Richard Uhler [Tue, 24 May 2016 22:04:22 +0000 (15:04 -0700)]
Don't use dlopen on host for already loaded oat files.

Because the behavior of dlopen on the host is different then the
target in that case, and it causes tests to fail.

Bug: 28826195

(cherry picked from commit a206c745dbb64b14f05c87891d425475c2f6d63a)

Change-Id: I29b04be07b4d26dc1ac5e6f35550745eb15e6728

7 years agoMerge "Remove duplicate libcore failures expectations." into nyc-dev
Roland Levillain [Fri, 27 May 2016 11:24:11 +0000 (11:24 +0000)]
Merge "Remove duplicate libcore failures expectations." into nyc-dev
am: 5eda8d2a60

* commit '5eda8d2a60e8da89336e2a1eba5fd2f7edaf2e1b':
  Remove duplicate libcore failures expectations.

Change-Id: I5b03108e70bc7a2ecc53d1d998d019c0f3aff553

7 years agoMerge "Remove duplicate libcore failures expectations." into nyc-dev
Narayan Kamath [Fri, 27 May 2016 11:14:56 +0000 (11:14 +0000)]
Merge "Remove duplicate libcore failures expectations." into nyc-dev

7 years agoDon\'t use JACK alpha anymore.
Nicolas Geoffray [Fri, 27 May 2016 10:21:23 +0000 (10:21 +0000)]
Don\'t use JACK alpha anymore.
am: 1c23f83ba6

* commit '1c23f83ba672611428f8993cb2a7770bee06e4a1':
  Don't use JACK alpha anymore.

Change-Id: If451f4e2ed0399831ea7afe6989fa12e7cb63c0b

7 years agoDon't use JACK alpha anymore.
Nicolas Geoffray [Thu, 14 Apr 2016 12:32:01 +0000 (13:32 +0100)]
Don't use JACK alpha anymore.

(cherry picked from commit 99e6d2d9b2585f605e02041f351b494f82f82121)

Bug: 28977632
Change-Id: Id37d90446be5d63cb0cf0131e34b562147e88335

7 years agoRemove duplicate libcore failures expectations.
Roland Levillain [Thu, 26 May 2016 16:38:46 +0000 (17:38 +0100)]
Remove duplicate libcore failures expectations.

Some jsr166 entries were already listed in
libcore/expectations/knownfailures.txt.

Bug: 28977632
Change-Id: I35788008262bac6f10d96f53e8e8f21e2364f091

7 years agoDon't do any I/O when starting the profile saver
Calin Juravle [Wed, 25 May 2016 15:45:16 +0000 (16:45 +0100)]
Don't do any I/O when starting the profile saver

The profile saver is started when the application is launched. During
the start we used to prepare the paths and transform them to canonical
paths to make sure we do the foreign dex checks on the actual paths.

Postpone the canonical path transformation to a later point to make sure
the impact is minimal.

Bug: 28785119
Bug: 28625993
Change-Id: I1aa378cdefde6ed6dc708762392db0f3a3158812

7 years agoMerge "Fix OatWriter to update the header checksum correctly." into nyc-dev
Vladimir Marko [Thu, 26 May 2016 11:44:26 +0000 (11:44 +0000)]
Merge "Fix OatWriter to update the header checksum correctly." into nyc-dev
am: 6c5b9b9113

* commit '6c5b9b91136aa4939d0252eb719c86289c72780e':
  Fix OatWriter to update the header checksum correctly.

Change-Id: Iff4c0b48f9314ed903d8396f83b30995bca0313d

7 years agoMerge "Fix OatWriter to update the header checksum correctly." into nyc-dev
Vladimir Marko [Thu, 26 May 2016 11:35:24 +0000 (11:35 +0000)]
Merge "Fix OatWriter to update the header checksum correctly." into nyc-dev

7 years agoMerge "Prune class path classes from profile" into nyc-dev
Mathieu Chartier [Thu, 26 May 2016 02:10:27 +0000 (02:10 +0000)]
Merge "Prune class path classes from profile" into nyc-dev
am: f498cd2a5e

* commit 'f498cd2a5e308ec4b66a1a0e363fe1c387bf1307':
  Prune class path classes from profile

Change-Id: Ibd4f400ea5dfee7a0536fd4a2923d74e74029416

7 years agoMerge "Prune class path classes from profile" into nyc-dev
Mathieu Chartier [Thu, 26 May 2016 01:38:14 +0000 (01:38 +0000)]
Merge "Prune class path classes from profile" into nyc-dev

7 years agoPrune class path classes from profile
Mathieu Chartier [Wed, 25 May 2016 22:05:59 +0000 (15:05 -0700)]
Prune class path classes from profile

Fixes a theoretical case where classes not in the app, but in the in
the class path could have been included in the image. The dex caches
for these classes are not properly handled and need to be pruned.
Not including the classes in the image classes makes sure the that
class linker automatically prunes them and frees the dex cache with
the explicit garbage collection.

Bug: 28452385
Change-Id: Ia44813863b5f1c79367049838021a64cc3842fc9

7 years agoMerge "Fix profile saver reference point when calculating the sleep time" into nyc-dev
Calin Juravle [Wed, 25 May 2016 21:47:45 +0000 (21:47 +0000)]
Merge "Fix profile saver reference point when calculating the sleep time" into nyc-dev
am: 38a68c7c05

* commit '38a68c7c05682e5489831de0b5894d4558f7246c':
  Fix profile saver reference point when calculating the sleep time

Change-Id: I49de08641419ccdb7ef654b14c9cbaecf9fc1cc4

7 years agoMerge "Fix profile saver reference point when calculating the sleep time" into nyc-dev
TreeHugger Robot [Wed, 25 May 2016 21:35:45 +0000 (21:35 +0000)]
Merge "Fix profile saver reference point when calculating the sleep time" into nyc-dev

7 years agoMerge changes Idf64b96b,Ie717089d into nyc-dev
Richard Uhler [Wed, 25 May 2016 19:29:16 +0000 (19:29 +0000)]
Merge changes Idf64b96b,Ie717089d into nyc-dev
am: c52269542a

* commit 'c52269542a652250c011018f602d1db346f6cd68':
  Base isDexOptNeeded result on OatFileAssistant::IsUpToDate.
  Only compile dex files if they are not up to date.

Change-Id: Ie20c820d8339bdd2c79d2a6dbe9e5b3ef7192f3b

7 years agoMerge changes Idf64b96b,Ie717089d into nyc-dev
Richard Uhler [Wed, 25 May 2016 19:18:07 +0000 (19:18 +0000)]
Merge changes Idf64b96b,Ie717089d into nyc-dev

* changes:
  Base isDexOptNeeded result on OatFileAssistant::IsUpToDate.
  Only compile dex files if they are not up to date.

7 years agoFix profile saver reference point when calculating the sleep time
Calin Juravle [Wed, 25 May 2016 17:09:53 +0000 (18:09 +0100)]
Fix profile saver reference point when calculating the sleep time

It is wrong to use last_time_ns_saver_woke_up_ as a reference. We should
use sleep_start.

Bug: 28953776
Change-Id: I88ab36c18b3b7b6e310bcdc6c59cadedc4cc9260

7 years agoFix OatWriter to update the header checksum correctly.
Vladimir Marko [Wed, 25 May 2016 11:49:49 +0000 (12:49 +0100)]
Fix OatWriter to update the header checksum correctly.

Make sure we update the checksum with dex file data, type
lookup tables and thunks produced by the relative patcher.

Bug: 28874264
Change-Id: I5b83237132ccb784acea6c195d0ed909ee33b99a

7 years agoMerge "Remove bogus DCHECK." into nyc-dev
Nicolas Geoffray [Wed, 25 May 2016 16:56:33 +0000 (16:56 +0000)]
Merge "Remove bogus DCHECK." into nyc-dev
am: 26da99595f

* commit '26da99595fd9b4298af68937c1c6302faec4e4da':
  Remove bogus DCHECK.

Change-Id: I0590bd737d54d3cecaa89c4ae0500160ab48d3a9

7 years agoMerge "Remove bogus DCHECK." into nyc-dev
TreeHugger Robot [Wed, 25 May 2016 16:51:24 +0000 (16:51 +0000)]
Merge "Remove bogus DCHECK." into nyc-dev

7 years agoAvoid long sleep in ProfileSaver
Brian Carlstrom [Wed, 25 May 2016 15:41:56 +0000 (15:41 +0000)]
Avoid long sleep in ProfileSaver
am: 8f15335d96

* commit '8f15335d96eef7a3bcdd4f2b309a727791b67e68':
  Avoid long sleep in ProfileSaver

Change-Id: I7c1f68449cfec3fa4cc8578515f31e4182e383df

7 years agoRemove bogus DCHECK.
Nicolas Geoffray [Wed, 25 May 2016 13:52:37 +0000 (14:52 +0100)]
Remove bogus DCHECK.

bug:28771056

(cherry picked from commit 0950abe82f86a9943feb7719876ec291c6581037)

Change-Id: I8c5b737c0882ecb8d67d8f799356f30afe3dd87b

7 years agoAvoid long sleep in ProfileSaver
Brian Carlstrom [Wed, 25 May 2016 02:45:30 +0000 (19:45 -0700)]
Avoid long sleep in ProfileSaver

This was due to subtracting a >20s number of nanos from the constant for 20s.

Bug: 28880120
Change-Id: Ia30b80661f869843484cbac029008530128bd300

7 years agoFix broken DCHECK
Mathieu Chartier [Wed, 25 May 2016 01:27:16 +0000 (01:27 +0000)]
Fix broken DCHECK
am: 55accd5725

* commit '55accd5725442026c8c32dc773b1cd12a65f90f6':
  Fix broken DCHECK

Change-Id: I015af6d4e11db54c8784a76085e1c2607a7c8123

7 years agoFix broken DCHECK
Mathieu Chartier [Wed, 25 May 2016 00:41:21 +0000 (17:41 -0700)]
Fix broken DCHECK

Dex cache may now contain references into boot image. Only check
classes that are actually in the application image.

Bug: 28295348

Change-Id: I9d92137c99a53924b13182ded6afabdeb441437d

7 years agoMerge "Add methods with samples during launch to profile" into nyc-dev
Mathieu Chartier [Wed, 25 May 2016 00:22:55 +0000 (00:22 +0000)]
Merge "Add methods with samples during launch to profile" into nyc-dev
am: db6a864ed4

* commit 'db6a864ed402c2c7028e9b545d43182391d6bab6':
  Add methods with samples during launch to profile

Change-Id: Ic1a4cf1475071c2dc3e3f8c7f837c68881d36d1b

7 years agoMerge "Add methods with samples during launch to profile" into nyc-dev
Mathieu Chartier [Tue, 24 May 2016 23:30:03 +0000 (23:30 +0000)]
Merge "Add methods with samples during launch to profile" into nyc-dev

7 years agoMerge "Fix an assert during jdwp debugging." into nyc-dev
Mingyao Yang [Tue, 24 May 2016 23:16:22 +0000 (23:16 +0000)]
Merge "Fix an assert during jdwp debugging." into nyc-dev
am: 988df5652d

* commit '988df5652dad6bea8f7395b86d0ff0bc9364d0b0':
  Fix an assert during jdwp debugging.

Change-Id: I5247545c6f5d836321267c4406150ca6babcd8e7

7 years agoMerge "Revert "Revert "Move rewritten StringFactory call results into dex registers...
Mingyao Yang [Tue, 24 May 2016 23:16:21 +0000 (23:16 +0000)]
Merge "Revert "Revert "Move rewritten StringFactory call results into dex registers for deopt""" into nyc-dev
am: 3176415348

* commit '31764153483a77124c8c52d512fa7ef6dcc16fa6':
  Revert "Revert "Move rewritten StringFactory call results into dex registers for deopt""

Change-Id: If69888d6d11ab3bbedbdc2902ab1cbde9d4873c0