OSDN Git Service

android-x86/art.git
8 years agoMerge "Add contender method for lock contention" into nyc-dev
Mathieu Chartier [Fri, 29 Apr 2016 17:29:00 +0000 (17:29 +0000)]
Merge "Add contender method for lock contention" into nyc-dev
am: 0e7316828d

* commit '0e7316828d5a92f7a0771886a131b96f4dd6c117':
  Add contender method for lock contention

Change-Id: I2e65f579ae94cfbab4e85443d7497e40f82c5492

8 years agoMerge "Add contender method for lock contention" into nyc-dev
Mathieu Chartier [Fri, 29 Apr 2016 17:24:42 +0000 (17:24 +0000)]
Merge "Add contender method for lock contention" into nyc-dev

8 years agoAdd contender method for lock contention
Mathieu Chartier [Fri, 29 Apr 2016 00:21:08 +0000 (17:21 -0700)]
Add contender method for lock contention

Now prints the method that is attempting to acquire the lock.

Bug: 28223501
Change-Id: I47c4261d14d8767a873594594b7675a176b71d70

8 years agoRemove invoke after inlining.
Nicolas Geoffray [Fri, 29 Apr 2016 15:36:38 +0000 (15:36 +0000)]
Remove invoke after inlining.
am: 366728f70c

* commit '366728f70c3bf3598cea3c37fa57c7c9428706fa':
  Remove invoke after inlining.

Change-Id: Ie519b75dafd66baeecfd6d2a2e60396e17ff771a

8 years agoRemove invoke after inlining.
Nicolas Geoffray [Fri, 29 Apr 2016 12:56:01 +0000 (13:56 +0100)]
Remove invoke after inlining.

bug:28460178

(cherry picked from commit 1be7cbd532a41981019f1e89c8ecf404bc9af809)

Change-Id: I9a84af048600a4653af284a9b171c2ba4c4dcca5

8 years agoMerge "Fix how the ProfileSaver thread attaches to the runtime." into nyc-dev
Calin Juravle [Fri, 29 Apr 2016 11:19:58 +0000 (11:19 +0000)]
Merge "Fix how the ProfileSaver thread attaches to the runtime." into nyc-dev
am: f59a7fc673

* commit 'f59a7fc673abf8d4cbeb3910b8e99621da726dff':
  Fix how the ProfileSaver thread attaches to the runtime.

Change-Id: I394458e51e21063fd78965ba7ed15afabdd21470

8 years agoMerge "Fix how the ProfileSaver thread attaches to the runtime." into nyc-dev
Calin Juravle [Fri, 29 Apr 2016 11:15:33 +0000 (11:15 +0000)]
Merge "Fix how the ProfileSaver thread attaches to the runtime." into nyc-dev

8 years agoFix how the ProfileSaver thread attaches to the runtime.
Calin Juravle [Thu, 28 Apr 2016 11:59:33 +0000 (12:59 +0100)]
Fix how the ProfileSaver thread attaches to the runtime.

If the runtime is shutting down we can't attach new threads. In this
case it is expected that Runtime::Attach returns nullptr.

Also, lower the serverity of the log to warning so that it does not
show up in the run-tests.

Bug: 28435649
Change-Id: I208bcd6f0f7e35ae6471e263dee00d3ab68b3b8f

8 years agoRevert "Revert "Write conflict tables in image""
Mathieu Chartier [Thu, 28 Apr 2016 22:35:40 +0000 (22:35 +0000)]
Revert "Revert "Write conflict tables in image""
am: cdca476bf3

* commit 'cdca476bf3394ce9d97a369e84e701b427009318':
  Revert "Revert "Write conflict tables in image""

Change-Id: I77c230734995ba099c2ef6b95893df7fb796fa71

8 years agoRevert "Revert "Write conflict tables in image""
Mathieu Chartier [Thu, 28 Apr 2016 16:44:54 +0000 (09:44 -0700)]
Revert "Revert "Write conflict tables in image""

Added test.

Bug: 27906566

This reverts commit 8e2478d23e89a7022c93ddc608dcbba7b29b91e6.

Change-Id: I0894f5f7cd11af29ed9d0345b51f527fc8a41d19

8 years agoMerge "Fix -Xint and -Xusejit interaction" into nyc-dev
Calin Juravle [Thu, 28 Apr 2016 15:37:55 +0000 (15:37 +0000)]
Merge "Fix -Xint and -Xusejit interaction" into nyc-dev
am: ba20abc

* commit 'ba20abcd1bf567bac34b82794c3630a0ca81be3d':
  Fix -Xint and -Xusejit interaction

Change-Id: I5f78ca2eae24dde874621ef750e864a7e6da3681

8 years agoMerge "ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list" into nyc-dev
Junmo Park [Thu, 28 Apr 2016 15:37:55 +0000 (15:37 +0000)]
Merge "ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list" into nyc-dev
am: 8189ef7

* commit '8189ef738f3bec5f0feb382b075956a6b337c5d7':
  ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list

Change-Id: Ice62dbc83ab1f2a332bb83be97e26a63b3853554

8 years agoMerge "Fix -Xint and -Xusejit interaction" into nyc-dev
Calin Juravle [Thu, 28 Apr 2016 15:32:33 +0000 (15:32 +0000)]
Merge "Fix -Xint and -Xusejit interaction" into nyc-dev

8 years agoMerge "ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list" into nyc-dev
Vladimir Marko [Thu, 28 Apr 2016 15:20:32 +0000 (15:20 +0000)]
Merge "ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list" into nyc-dev

8 years agoMerge "Decrease transition weight." into nyc-dev
Nicolas Geoffray [Thu, 28 Apr 2016 14:27:20 +0000 (14:27 +0000)]
Merge "Decrease transition weight." into nyc-dev
am: 2bbd98c

* commit '2bbd98c8472b76c4f140035eb2392c12ef073ee4':
  Decrease transition weight.

Change-Id: Ieb6f01612484e766b6d925e0aa4641f88d2fe8c5

8 years agoMerge "Decrease transition weight." into nyc-dev
TreeHugger Robot [Thu, 28 Apr 2016 14:20:59 +0000 (14:20 +0000)]
Merge "Decrease transition weight." into nyc-dev

8 years agoFix -Xint and -Xusejit interaction
Calin Juravle [Wed, 27 Apr 2016 17:50:45 +0000 (18:50 +0100)]
Fix -Xint and -Xusejit interaction

- don't allow interpret and jit compilation at the same time
- make sure we -Xsaveprofileinfo works with -Xint.

Bug: 27916886
Change-Id: Icab85e5b6f576f82374d5f88145cc81595afce37

8 years agoART: add exynos-m1 to a53 #835769 & #843419 erratum exception list
Junmo Park [Wed, 27 Apr 2016 07:51:50 +0000 (16:51 +0900)]
ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list

Exynos-M1 is custom-designed 64-bit ARM CPU and does not need this A53
erratum handling.

Bug: 28412250
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
(cherry picked from commit 2bd7d2d6d92daa796ee33e70bb788d3dae1f2fc9)

Change-Id: Id460e4e98baafeed1cf3540cec754b30044cda11

8 years agoDecrease transition weight.
Nicolas Geoffray [Thu, 28 Apr 2016 12:56:04 +0000 (13:56 +0100)]
Decrease transition weight.

bug:27865109
Change-Id: I551040e61f36fc675c0f5d1c3907c690112a84be

8 years agoForbid HDeoptimize instructions in OSR methods.
Nicolas Geoffray [Thu, 28 Apr 2016 11:11:28 +0000 (11:11 +0000)]
Forbid HDeoptimize instructions in OSR methods.
am: 19b5021

* commit '19b5021a49285627485675ef31276b8194269600':
  Forbid HDeoptimize instructions in OSR methods.

Change-Id: If21cd185afb9a86e2fe2c4e10decbf9a43d81e5d

8 years agoForbid HDeoptimize instructions in OSR methods.
Nicolas Geoffray [Fri, 22 Apr 2016 12:16:14 +0000 (13:16 +0100)]
Forbid HDeoptimize instructions in OSR methods.

Otherwise dominated instructions will assume something that
isn't necessarily correct if coming from the interpreter.

bug:28335959
bug:28249238
bug:28348878
bug:28080135

Contains fix from https://android-review.googlesource.com/#/c/220661/.

(cherry picked from commit 93a18c5d4160f632ecdb92af099574e9c7098c49)

Change-Id: I86c3f9340077caa0a3e3db896e0519e7d38d91a0

8 years agoMerge "ART: Disable back edge uses for irreducible loops" into nyc-dev
David Brazdil [Thu, 28 Apr 2016 08:29:31 +0000 (08:29 +0000)]
Merge "ART: Disable back edge uses for irreducible loops" into nyc-dev
am: d1a2b02

* commit 'd1a2b026f8379f47151b3bba147c11dc10d77a4d':
  ART: Disable back edge uses for irreducible loops

Change-Id: I018d38d35fb4a4f63cff9b9232a377e1afe8eccd

8 years agoMerge "ART: Disable back edge uses for irreducible loops" into nyc-dev
David Brazdil [Thu, 28 Apr 2016 08:23:15 +0000 (08:23 +0000)]
Merge "ART: Disable back edge uses for irreducible loops" into nyc-dev

8 years agoMerge "Initialize native loader on JNI_CreateJavaVM" into nyc-dev
Dimitry Ivanov [Wed, 27 Apr 2016 23:55:32 +0000 (23:55 +0000)]
Merge "Initialize native loader on JNI_CreateJavaVM" into nyc-dev
am: 38fb644

* commit '38fb6446e195f1ab8dfd8277fdffd83dc4965890':
  Initialize native loader on JNI_CreateJavaVM

Change-Id: If374dcacf4e60fbbd8243056e1cf4ad8a5467419

8 years agoMerge "Initialize native loader on JNI_CreateJavaVM" into nyc-dev
Dimitry Ivanov [Wed, 27 Apr 2016 23:37:10 +0000 (23:37 +0000)]
Merge "Initialize native loader on JNI_CreateJavaVM" into nyc-dev

8 years agoMerge "Revert "Write conflict tables in image"" into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 21:31:30 +0000 (21:31 +0000)]
Merge "Revert "Write conflict tables in image"" into nyc-dev
am: 2b23735

* commit '2b23735e23e18e1c96f02b1937068c6e6baefa6a':
  Revert "Write conflict tables in image"

Change-Id: I53aae313185812ddedcbfd5480776bf6de1644a5

8 years agoMerge "Revert "Write conflict tables in image"" into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 21:20:06 +0000 (21:20 +0000)]
Merge "Revert "Write conflict tables in image"" into nyc-dev

8 years agoRevert "Write conflict tables in image"
Mathieu Chartier [Wed, 27 Apr 2016 21:03:42 +0000 (21:03 +0000)]
Revert "Write conflict tables in image"

Some strange issues on angler.

This reverts commit cda9386add68d94697449c6cb08b356747e55c21.

Change-Id: Iba3a8bac6ce40ee16d83163823356951fecb6787

8 years agoInitialize native loader on JNI_CreateJavaVM
Dimitry Ivanov [Thu, 21 Apr 2016 23:01:24 +0000 (16:01 -0700)]
Initialize native loader on JNI_CreateJavaVM

We need to initialize native loader in order to
be able to use JNI from any VM, be it dalvikvm
or VM started by zygote.

Bug: http://b/28082914
Bug: http://b/28320913
Change-Id: Ice9a33a736d7c6ec3af9a5a0fb25a378ad9d2c59
(cherry picked from commit 041169f7ca703d560a819e7a568170731d4ecdd6)

8 years agoMerge "Support to pass <uses-library> option through to dex2oat." into nyc-dev
Jeff Hao [Wed, 27 Apr 2016 20:10:05 +0000 (20:10 +0000)]
Merge "Support to pass <uses-library> option through to dex2oat." into nyc-dev
am: 9135aa0

* commit '9135aa0f1ee8e3c6693484e4bd5e0c6d6c7d4050':
  Support to pass <uses-library> option through to dex2oat.

Change-Id: I09fe9117b8c09ee2959a5dac229387c959e29609

8 years agoMerge "Support to pass <uses-library> option through to dex2oat." into nyc-dev
Jeff Hao [Wed, 27 Apr 2016 19:54:02 +0000 (19:54 +0000)]
Merge "Support to pass <uses-library> option through to dex2oat." into nyc-dev

8 years agoMerge "Write conflict tables in image" into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 18:37:25 +0000 (18:37 +0000)]
Merge "Write conflict tables in image" into nyc-dev
am: b125eaf

* commit 'b125eaf5edf7587f50bab97b7baa480947904496':
  Write conflict tables in image

Change-Id: I7cebdfc1af360cf22eefabbd6007cef24b691ae5

8 years agoMerge "Write conflict tables in image" into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 18:29:20 +0000 (18:29 +0000)]
Merge "Write conflict tables in image" into nyc-dev

8 years agoSupport to pass <uses-library> option through to dex2oat.
Jeff Hao [Wed, 27 Apr 2016 18:07:41 +0000 (11:07 -0700)]
Support to pass <uses-library> option through to dex2oat.

This change takes an app's shared libraries specified by <uses-library>
and passes it through to dex2oat to be used during compilation.

Part of a multi-project change.

Includes fix from a6d46161aea07ebd1cbd6ab78b2b323f940e9c1e

Bug: 26880306

(cherry-picked from commit 26e8a2f150cd7f7195a10650ab8a5b6fa5014bc8)

Change-Id: I6bfc13693dbb835ca52fed2d03ec5346d43ec5d9

8 years agoAdd command line option for jit invoke transition weight
Calin Juravle [Wed, 27 Apr 2016 17:16:20 +0000 (17:16 +0000)]
Add command line option for jit invoke transition weight
am: 2a894f4

* commit '2a894f433d126d6e8694c6235e29e66ef45a31d9':
  Add command line option for jit invoke transition weight

Change-Id: I7e51b636338d979ca000cb400d7196cdeade0846

8 years agoWrite conflict tables in image
Mathieu Chartier [Thu, 14 Apr 2016 17:49:19 +0000 (10:49 -0700)]
Write conflict tables in image

Add image sections for runtime methods and conflict tables. This
makes it that we do not need to fake up a length prefixed array
for runtime methods.

Reduces .art private dirty and PSS.

System wide .art PSS goes from 32.5MB to 30.5MB after system boot.

Business card .art private dirty goes from 588K to 504K.

Increases image size by ~100K.

Bug: 27906566

Change-Id: I38cbe3150c3eeb385b8cad7cf93614e3980f4162

8 years agoART: Disable back edge uses for irreducible loops
David Brazdil [Wed, 27 Apr 2016 14:33:22 +0000 (15:33 +0100)]
ART: Disable back edge uses for irreducible loops

Algorithm adding back edge uses in liveness analysis makes assumptions
about the linear order which are not met in the presence of irreducible
loops. Disable back edges uses when the graph contains them.

This partially reverts CL I63632e8819ea3644d5c6fdfea00b66128bf22c24.

Bug: 28252747
Bug: 27615840
Bug: 27624868
Change-Id: I7ecdde0ed8a8831f7513b8e43cf7d84599b830a7
(cherry picked from commit 07b35109c64fc449a14723b259df17806fd0b16e)

8 years agoSplit profile recording from jit compilation
Calin Juravle [Wed, 27 Apr 2016 15:33:06 +0000 (15:33 +0000)]
Split profile recording from jit compilation
am: e5de54c

* commit 'e5de54cfab5f14ba0b8ff25d8d60901c7021943f':
  Split profile recording from jit compilation

Change-Id: I50f974ab52c5bc27ddb3a72aae23e260a7877d24

8 years agoAdd command line option for jit invoke transition weight
Calin Juravle [Wed, 27 Apr 2016 13:14:58 +0000 (14:14 +0100)]
Add command line option for jit invoke transition weight

Bug: 27865109
Change-Id: If5eb53714e2c92397ad3e45bc0b4facb84329bc2

8 years agoSplit profile recording from jit compilation
Calin Juravle [Wed, 20 Apr 2016 13:22:09 +0000 (14:22 +0100)]
Split profile recording from jit compilation

We still use ProfileInfo objects to record profile information. That
gives us the flexibility to add the inline caches in the future and the
convenience of the already implemented GC.

If UseJIT is false and SaveProfilingInfo true, we will only record the
ProfileInfo and never launch compilation tasks.

Bug: 27916886
Change-Id: I6e4768dc5d58f2f85f947b276b4244aa11ce3fca

8 years agoMerge "Thumb2: Reduce memory used for fixup dependencies." into nyc-dev
Vladimir Marko [Wed, 27 Apr 2016 09:13:16 +0000 (09:13 +0000)]
Merge "Thumb2: Reduce memory used for fixup dependencies." into nyc-dev
am: 43c8e87

* commit '43c8e872578cf27efcc0edce70119164e313f648':
  Thumb2: Reduce memory used for fixup dependencies.

Change-Id: Iee0405a346b4bac27ee1bbae0ce5d5ff52ea7fdd

8 years agoMerge "Thumb2: Reduce memory used for fixup dependencies." into nyc-dev
Vladimir Marko [Wed, 27 Apr 2016 09:04:21 +0000 (09:04 +0000)]
Merge "Thumb2: Reduce memory used for fixup dependencies." into nyc-dev

8 years agoMerge "Test component type for errors too. With regression test." into nyc-dev
Aart Bik [Tue, 26 Apr 2016 19:59:11 +0000 (19:59 +0000)]
Merge "Test component type for errors too. With regression test." into nyc-dev
am: 5a13993

* commit '5a139938b115844fa2b81625d9a93927080f068a':
  Test component type for errors too. With regression test.

Change-Id: I90389e3612b6f2799809ad64f021cae44bc8203a

8 years agoMerge "Test component type for errors too. With regression test." into nyc-dev
Aart Bik [Tue, 26 Apr 2016 19:55:48 +0000 (19:55 +0000)]
Merge "Test component type for errors too. With regression test." into nyc-dev

8 years agoReduce memory lost by ArenaAllocator for large allocations.
Vladimir Marko [Tue, 26 Apr 2016 17:58:35 +0000 (17:58 +0000)]
Reduce memory lost by ArenaAllocator for large allocations.
am: 46ea014

* commit '46ea0147b49e3539492be160e1631e73f58d2c3c':
  Reduce memory lost by ArenaAllocator for large allocations.

Change-Id: Id16f26be313f06b7b0dac459019d889bf60b704e

8 years agoTest component type for errors too.
Aart Bik [Mon, 25 Apr 2016 19:51:37 +0000 (12:51 -0700)]
Test component type for errors too.
With regression test.

Rationale:
Moved erroneous check in convenience method, so we
put all the same logic in one place. When testing
for erroneous T[], check both the array type
as well at the component type T for errors
(it is possible T[] is not marked erroneous
even though T is eventually).

BUG=28358598

(cherry picked from commit f417ff44d1eb111854d7a213f106912b3dd9e3d4)

Change-Id: Ieba66aa4b55d8e7ebddf200239c7e4095dfd4678

8 years agoThumb2: Reduce memory used for fixup dependencies.
Vladimir Marko [Mon, 25 Apr 2016 12:43:50 +0000 (12:43 +0000)]
Thumb2: Reduce memory used for fixup dependencies.

Mark fixups for far backward branches as 32-bit from the
beginning and ignore their dependencies since they cannot
be expanded anymore. This reduces the memory used by the
fixup_dependents_ when compiling methods with a lot of
slow paths.

Bug: 28256882

This is a cherry-pick of the fixed revert-revert
    Revert "Revert "Thumb2: Reduce memory used for fixup dependencies.""
    (cherry picked from commit a64f249add4a0a9e93aa6f246045ca79f5916dcd)

Change-Id: I9ca766b73d9f5a1da5dc10ad070145ac88fbcd53

8 years agoReduce memory lost by ArenaAllocator for large allocations.
Vladimir Marko [Fri, 22 Apr 2016 17:07:13 +0000 (18:07 +0100)]
Reduce memory lost by ArenaAllocator for large allocations.

When allocating from a new arena, check if the old arena has
more remaining space than the new one after the current
allocation. If so, keep using the old arena to reduce the
amount of "lost" arena memory. This can happen when we try
to allocate more than half the default arena size. If the
allocation exceeds the default arena size, it's very likely
to happen even though the ArenaPool could still provide some
much larger previously allocated arena.

Also avoid artithmetic overflow when checking if the
request can be satisfied from the current arena.
And abort immediately if calloc() fails.

Bug: 28173563
Bug: 28256882

In addition to the initial CL
    (cherry picked from commit 3e0e7173c0cdfc57dba39fe781e30d187d50fa9c)
this contains a squashed subsequent fix
    Fix valgrind tests: mark allocated space as defined.
    (cherry picked from commit 3f84f2cb3cadc25d75e1e3e2c1bc26c1a671f336)

Change-Id: Id80d5601874e8e28d930c0dd47a51c73c4810094

8 years agoMerge "ART: Change x86 from modify_ldt to set_thread_data" into nyc-dev
Andreas Gampe [Tue, 26 Apr 2016 00:36:51 +0000 (00:36 +0000)]
Merge "ART: Change x86 from modify_ldt to set_thread_data" into nyc-dev
am: ff2d53a

* commit 'ff2d53a16d844054874e41a98e2984e2818ee210':
  ART: Change x86 from modify_ldt to set_thread_data

Change-Id: I2b4b14d890e39577094960e02111c9a79e1e1a4a

8 years agoMerge "ART: Change x86 from modify_ldt to set_thread_data" into nyc-dev
Andreas Gampe [Tue, 26 Apr 2016 00:32:38 +0000 (00:32 +0000)]
Merge "ART: Change x86 from modify_ldt to set_thread_data" into nyc-dev

8 years agoMerge "Make a fake libart for misbehaving apps." into nyc-dev
Alex Light [Mon, 25 Apr 2016 22:02:40 +0000 (22:02 +0000)]
Merge "Make a fake libart for misbehaving apps." into nyc-dev
am: 4825dfa

* commit '4825dfab942a92c05519475d4abb77734e26c47c':
  Make a fake libart for misbehaving apps.

Change-Id: I2504d1c0c9682fbc779aaec56d6d6a4197c01ec3

8 years agoMerge "Make a fake libart for misbehaving apps." into nyc-dev
TreeHugger Robot [Mon, 25 Apr 2016 21:53:29 +0000 (21:53 +0000)]
Merge "Make a fake libart for misbehaving apps." into nyc-dev

8 years agoMake sure the referring class is in the dex cache.
Nicolas Geoffray [Mon, 25 Apr 2016 21:14:20 +0000 (21:14 +0000)]
Make sure the referring class is in the dex cache.
am: 21aa4d4

* commit '21aa4d405cbe3d4612e3f50ebb7610cc0b3503a2':
  Make sure the referring class is in the dex cache.

Change-Id: Ie0edf6d76bbb43b7b02aabd8283f441135343c2c

8 years agoMake sure the referring class is in the dex cache.
Nicolas Geoffray [Mon, 25 Apr 2016 13:58:06 +0000 (14:58 +0100)]
Make sure the referring class is in the dex cache.

The method CanAccessResolvedMethod expects the referring class
in the dex file is already in the dex cache, which is true during AOT,
but not necessarilly during JIT.

bug:28295348

(cherry picked from commit 393fdb8b4822d80bbbd6347b088e28c03a72289e)

Change-Id: I9665d377070278639eb4b5a6eeced85d656e6cb6

8 years agoART: Fix ROR Checker test
David Brazdil [Mon, 25 Apr 2016 18:40:45 +0000 (18:40 +0000)]
ART: Fix ROR Checker test
am: 885c684

* commit '885c68457dbd3a4b244aa4a51d319a759e6a3587':
  ART: Fix ROR Checker test

Change-Id: I16e8876148f375a7ec678d5f14ecaf176164442a

8 years agoART: Fix ROR Checker test
David Brazdil [Mon, 25 Apr 2016 16:47:43 +0000 (17:47 +0100)]
ART: Fix ROR Checker test

Recent update of Jack started encoding "x << -2" as "x << 30". Update
the corresponding Checker test to accept both values.

Bug: 28244190
Change-Id: I65833afa416a7eb8fa05d381cff547a58dcc0bea
(cherry picked from commit 22c1f543ed75114d8ee5219598ba766e7dc674c0)

8 years agoAdd flag to ArtMethod to skip compilation.
Nicolas Geoffray [Mon, 25 Apr 2016 15:52:28 +0000 (15:52 +0000)]
Add flag to ArtMethod to skip compilation.
am: 62e631a

* commit '62e631a678ef18c80f37862a2dc74004954a8502':
  Add flag to ArtMethod to skip compilation.

Change-Id: Ia591fb85f788b21c30d6dad81d84d47b0aabc527

8 years agoART: Change x86 from modify_ldt to set_thread_data
Andreas Gampe [Tue, 16 Feb 2016 23:58:20 +0000 (15:58 -0800)]
ART: Change x86 from modify_ldt to set_thread_data

Do not use modify_ldt, so it can be deprecated.

Bug: 27199066
Change-Id: Ib5fb40d4f720b697d786c5c971638fd57681d308
(cherry picked from commit 8a2c62c62b3398afbac00b1cb8772ae5b53b62a3)

8 years agoAdd flag to ArtMethod to skip compilation.
Nicolas Geoffray [Wed, 20 Apr 2016 15:27:53 +0000 (16:27 +0100)]
Add flag to ArtMethod to skip compilation.

To ensure even the JIT will not try to compile methods with
soft failures a runtime_throw.

bug:28293819
bug:28313047

(cherry picked from commit 250a378d5a2152662e0fa820f2b38f794ddd3596)

Change-Id: Ic6d019bc2dd24e35e1377a6c3f8530348c1049df

8 years agoMerge "ART: Naive NullCheck elimination in InstructionBuilder" into nyc-dev
David Brazdil [Mon, 25 Apr 2016 08:28:02 +0000 (08:28 +0000)]
Merge "ART: Naive NullCheck elimination in InstructionBuilder" into nyc-dev
am: ac4d518

* commit 'ac4d51883f2a87c31945b79e09762937c4d12331':
  ART: Naive NullCheck elimination in InstructionBuilder

Change-Id: Ie1274c6af9dd54928f31f343fc50479d35672088

8 years agoMerge "ART: Naive NullCheck elimination in InstructionBuilder" into nyc-dev
David Brazdil [Mon, 25 Apr 2016 08:22:00 +0000 (08:22 +0000)]
Merge "ART: Naive NullCheck elimination in InstructionBuilder" into nyc-dev

8 years agoMerge "Add support for eagerly calculating conflict tables" into nyc-dev
Mathieu Chartier [Fri, 22 Apr 2016 20:41:59 +0000 (20:41 +0000)]
Merge "Add support for eagerly calculating conflict tables" into nyc-dev
am: 257670e

* commit '257670ee2c2f2e39d75dd65e00e27dcccd4e6e9b':
  Add support for eagerly calculating conflict tables

Change-Id: I53c88dbaa0639620ce52481c3433eb40a9da6764

8 years agoMerge "Add support for eagerly calculating conflict tables" into nyc-dev
Mathieu Chartier [Fri, 22 Apr 2016 20:34:17 +0000 (20:34 +0000)]
Merge "Add support for eagerly calculating conflict tables" into nyc-dev

8 years agoAdd support for eagerly calculating conflict tables
Mathieu Chartier [Thu, 14 Apr 2016 17:49:19 +0000 (10:49 -0700)]
Add support for eagerly calculating conflict tables

Will be used to put them in the image by having the compiler eagerly
calculate them.

Enabled for debug builds (non compiler). Support for having conflict
tables written in the image will come in the next CL.

Bug: 27906566

Change-Id: I03d1671a4b49317aaab5a741bbeaed7957cd6229

8 years agoMerge "ART: Disable unstarted runtime pow test for valgrind" into nyc-dev
Andreas Gampe [Fri, 22 Apr 2016 19:35:49 +0000 (19:35 +0000)]
Merge "ART: Disable unstarted runtime pow test for valgrind" into nyc-dev
am: 89b8f47

* commit '89b8f477aed340d13c7d935aaa01b6db13dfaeb7':
  ART: Disable unstarted runtime pow test for valgrind

Change-Id: Ie3eb51903f5bd0354419d468612b54ff1719d799

8 years agoMerge "ART: Disable unstarted runtime pow test for valgrind" into nyc-dev
TreeHugger Robot [Fri, 22 Apr 2016 19:32:44 +0000 (19:32 +0000)]
Merge "ART: Disable unstarted runtime pow test for valgrind" into nyc-dev

8 years agoMerge "ART: Slightly change InitializeClass flow" into nyc-dev
Andreas Gampe [Fri, 22 Apr 2016 18:48:36 +0000 (18:48 +0000)]
Merge "ART: Slightly change InitializeClass flow" into nyc-dev
am: e576766

* commit 'e5767666108eab8bf428068dcfae30473e4f123c':
  ART: Slightly change InitializeClass flow

Change-Id: I531264f10d098441624a9b640abd7db649ecb577

8 years agoMerge "ART: Slightly change InitializeClass flow" into nyc-dev
TreeHugger Robot [Fri, 22 Apr 2016 18:36:16 +0000 (18:36 +0000)]
Merge "ART: Slightly change InitializeClass flow" into nyc-dev

8 years agoART: Disable unstarted runtime pow test for valgrind
Andreas Gampe [Fri, 22 Apr 2016 00:23:31 +0000 (17:23 -0700)]
ART: Disable unstarted runtime pow test for valgrind

Valgrind seems to give the wrong result. Disable test for now.

Bug: 27265238

(cherry picked from commit b6795157fd010375ca646ea95e972b616b4aeeaf)

Change-Id: I2b136abc107b53d89b70ccb20dd378a7b704d077

8 years agoART: Naive NullCheck elimination in InstructionBuilder
David Brazdil [Fri, 22 Apr 2016 15:57:00 +0000 (16:57 +0100)]
ART: Naive NullCheck elimination in InstructionBuilder

Save a little bit of memory by not generating trivially redundant
HNullCheck instructions. This patch builds on the fact that the
InstructionBuilder now directly generates SSA form and looks at the
input of the NullCheck. For obvious cases, such as NewInstance/Array
or `this`, the NullCheck generation is completely avoided.

Bug: 28173563
Change-Id: I1fdf3b096c7a939f7b8586c02a2a6b44dfa43443
(cherry picked from commit c120bbe26fe116d3c9d8322f44bb9e330e07f745)

8 years agoART: Slightly change InitializeClass flow
Andreas Gampe [Thu, 21 Apr 2016 19:21:55 +0000 (12:21 -0700)]
ART: Slightly change InitializeClass flow

Since 884f3b83ed6b2a378535ac6b2be57d6b2e22de09, verification isn't
run completely under a class' lock. This means it is possible to
race from unverified to initialized in InitializeClass. So check
the class state after VerifyClass, and handle new success and
failure cases.

Bug: 28254258
Change-Id: I22a6121477e409987281bc81c28b6c942f1bd319

8 years agoMerge "Make dex file loading failure more explicit about failure." into nyc-dev
Alex Light [Thu, 21 Apr 2016 23:32:12 +0000 (23:32 +0000)]
Merge "Make dex file loading failure more explicit about failure." into nyc-dev
am: 8da7f84709

* commit '8da7f84709f7640205ac084b402f7424857ef729':
  Make dex file loading failure more explicit about failure.

Change-Id: I573a9f33aa2106fec43ee3a5fc638533a53f41c0

8 years agoMerge "Make dex file loading failure more explicit about failure." into nyc-dev
TreeHugger Robot [Thu, 21 Apr 2016 23:14:05 +0000 (23:14 +0000)]
Merge "Make dex file loading failure more explicit about failure." into nyc-dev

8 years agoMerge "Fix interaction between instrumentation and jit lock." into nyc-dev
Nicolas Geoffray [Thu, 21 Apr 2016 22:21:51 +0000 (22:21 +0000)]
Merge "Fix interaction between instrumentation and jit lock." into nyc-dev
am: 0a27a8b43f

* commit '0a27a8b43f083627da2bd2a27a16e00b0b504b8b':
  Fix interaction between instrumentation and jit lock.

Change-Id: Icd0bcbac6778f4d931f39a857bea1d31a0985acf

8 years agoMerge "Fix interaction between instrumentation and jit lock." into nyc-dev
TreeHugger Robot [Thu, 21 Apr 2016 22:16:57 +0000 (22:16 +0000)]
Merge "Fix interaction between instrumentation and jit lock." into nyc-dev

8 years agoMake dex file loading failure more explicit about failure.
Alex Light [Wed, 20 Apr 2016 21:26:34 +0000 (14:26 -0700)]
Make dex file loading failure more explicit about failure.

We make sure that if we fail to load a dex file due to having an
unsupported dex version number we will say so explicitly in the
exceptions.

Bug: 28269864
Change-Id: I3c61d088cd0d04cf2a02246e69a4161180e3f2d8
(cherry picked from commit 3045b66613404fa973aafc8c2aae3728e9c12d9a)

8 years agoFix interaction between instrumentation and jit lock.
Nicolas Geoffray [Mon, 18 Apr 2016 11:09:30 +0000 (12:09 +0100)]
Fix interaction between instrumentation and jit lock.

The jit lock needs to have higher priority than the
deoptimized methods lock.

bug:28236735

(cherry picked from commit 480d5108fa62f28cbc2e7072610f974953ff73a8)

Change-Id: I6e5f8597c4ab88993f6a32a204383b766ff03e33

8 years agoMerge "Fix heap check." into nyc-dev
Mathieu Chartier [Thu, 21 Apr 2016 19:22:19 +0000 (19:22 +0000)]
Merge "Fix heap check." into nyc-dev
am: 25e6bb4b9f

* commit '25e6bb4b9f80a0b1d5bb2962bd7d0ac3c545efaf':
  Fix heap check.

Change-Id: Ia49a3d617789c3b3bbd802b7029c561a82fb54a3

8 years agoMerge "Fix heap check." into nyc-dev
Mathieu Chartier [Thu, 21 Apr 2016 19:01:32 +0000 (19:01 +0000)]
Merge "Fix heap check." into nyc-dev

8 years agoFix heap check.
Mathieu Chartier [Thu, 21 Apr 2016 17:23:16 +0000 (10:23 -0700)]
Fix heap check.

Previously, we only checked the image we were patching. This did not
work if the referent was in another image. Fixed the DCHECK to check
all the boot images.

Bug: 28286961
Change-Id: I7195314e531d0a950d495296d1e2f953e7b66659

8 years agoMerge "Use dex cache from compilation unit in RTP." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 16:55:58 +0000 (16:55 +0000)]
Merge "Use dex cache from compilation unit in RTP." into nyc-dev
am: be72dc97fe

* commit 'be72dc97fe1b70e4c1efeba1b0a6716d612dadde':
  Use dex cache from compilation unit in RTP.

Change-Id: I89380d6e1b7dd10d84f7342564cb8bbe141b47bd

8 years agoMerge "Thumb2: Fix disassembly of the b.w offset." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 16:55:58 +0000 (16:55 +0000)]
Merge "Thumb2: Fix disassembly of the b.w offset." into nyc-dev
am: 55d20ff013

* commit '55d20ff0135f1f41f09b7ad27485e34a876da8ef':
  Thumb2: Fix disassembly of the b.w offset.

Change-Id: I86243127718cc69196720193bc5dd8c107ac2694

8 years agoMerge "Use dex cache from compilation unit in RTP." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 16:52:32 +0000 (16:52 +0000)]
Merge "Use dex cache from compilation unit in RTP." into nyc-dev

8 years agoMerge "Thumb2: Fix disassembly of the b.w offset." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 16:52:08 +0000 (16:52 +0000)]
Merge "Thumb2: Fix disassembly of the b.w offset." into nyc-dev

8 years agoART: Address late comments on a GVN memory-saving CL
David Brazdil [Thu, 21 Apr 2016 16:33:47 +0000 (16:33 +0000)]
ART: Address late comments on a GVN memory-saving CL
am: d9743790f6

* commit 'd9743790f64d7f37eb549a45c724331182369a98':
  ART: Address late comments on a GVN memory-saving CL

Change-Id: Iea09724a8579b813249f527e1f92022bbd2f0438

8 years agoReduce memory usage in GVN
David Brazdil [Thu, 21 Apr 2016 16:33:47 +0000 (16:33 +0000)]
Reduce memory usage in GVN
am: 4283aa9fd0

* commit '4283aa9fd085d7d9a46e016cd68018d10135841f':
  Reduce memory usage in GVN

Change-Id: Ie766cbeb4da5521eb6a2cb0318407a40ec11183b

8 years agoART: Address late comments on a GVN memory-saving CL
David Brazdil [Thu, 21 Apr 2016 13:00:15 +0000 (14:00 +0100)]
ART: Address late comments on a GVN memory-saving CL

Added extra comments and removed redundant code as requested.

Bug: 28173563
Bug: 28287086

Change-Id: If6aff68c4c30427a86a27ffba5df1ae135edd294
(cherry picked from commit 94408d3144061bd6efc74b3d884d38169969c63f)

8 years agoThumb2: Fix disassembly of the b.w offset.
Vladimir Marko [Thu, 21 Apr 2016 13:52:03 +0000 (14:52 +0100)]
Thumb2: Fix disassembly of the b.w offset.

Bug: 28311085

(cherry picked from commit cb55b29e466939d222b83f0593a1141221f2425c)

Change-Id: I36ec3ef951ef9d2e5a9e60c0709cfeaf1210ddd0

8 years agoUse dex cache from compilation unit in RTP.
Vladimir Marko [Tue, 19 Apr 2016 14:12:13 +0000 (14:12 +0000)]
Use dex cache from compilation unit in RTP.

Avoid calling the costly ClassLinker::FindDexCache() from
reference type propagation when the dex cache from the
compilation unit will do, i.e. almost always. Compiling
the Nexus 5 boot image on host under perf(1) shows that
the FindDexCache() hits drop from about 0.2% to almost
nothing, though enabling inlining for the boot image will
increase it a bit to 0.03% due to unavoidable calls from
the inliner.

Also clean up the ScopedObjectAccess usage a bit.

Bug: 28173563

Cherry-picked the "revert-revert"
    (cherry picked from commit 456307a47336e3d6576ed6d8563b67573a4238d3)
and squashed two subsequent fixes
    Fix RTP to hold mutator lock while using raw mirror pointers.
    (cherry picked from commit 62977ff198deb673a6990202a2fb8b993217c57c)
    Fix reference_type_propagation_test.
    (cherry picked from commit 5eed0c5d27f091c952704f652cd77c4e3833ad88)

Change-Id: Ia944452d7ab26aed963832a9346df363743a419f

8 years agoReduce memory usage in GVN
David Brazdil [Wed, 20 Apr 2016 13:24:12 +0000 (14:24 +0100)]
Reduce memory usage in GVN

Implement recycling of ValueSet data structures which the GVN
algorithm will not access any more.

Savings depend on the shape of the graph, but can be as high as 93%.
Peak memory usage for GSA drops from 32MB to 26MB, compile times seem
unaffected.

Bug: 28173563
Bug: 28287086

Change-Id: If227177449bc90ad24fa68c37b0c2615924af1ed
(cherry picked from commit cc857cfbe4a179dfa7935b7334f1efbb21f2ac76)

8 years agoMerge "Thumb2: Fix EmitJumpTables() to extend buffer only if needed." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 08:11:20 +0000 (08:11 +0000)]
Merge "Thumb2: Fix EmitJumpTables() to extend buffer only if needed." into nyc-dev
am: 89a48396e0

* commit '89a48396e0f0482e0ab446a1b2bd3217a51746b1':
  Thumb2: Fix EmitJumpTables() to extend buffer only if needed.

Change-Id: I44b0b77521bbf136863ce177737041a9fd304f83

8 years agoMerge "Fix HInstruction::ReplaceInput(), allow no-op." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 08:11:19 +0000 (08:11 +0000)]
Merge "Fix HInstruction::ReplaceInput(), allow no-op." into nyc-dev
am: a86d664bf4

* commit 'a86d664bf476b094aa25c2d72c72e8e1f59a1591':
  Fix HInstruction::ReplaceInput(), allow no-op.

Change-Id: Ie4a7f825ff2e0aa0a206cba2b9e6421d8a180bfd

8 years agoMerge "Thumb2: Fix EmitJumpTables() to extend buffer only if needed." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 07:54:30 +0000 (07:54 +0000)]
Merge "Thumb2: Fix EmitJumpTables() to extend buffer only if needed." into nyc-dev

8 years agoMerge "Fix HInstruction::ReplaceInput(), allow no-op." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 07:53:47 +0000 (07:53 +0000)]
Merge "Fix HInstruction::ReplaceInput(), allow no-op." into nyc-dev

8 years agoMake a fake libart for misbehaving apps.
Alex Light [Fri, 15 Apr 2016 19:41:09 +0000 (12:41 -0700)]
Make a fake libart for misbehaving apps.

Bug: 27775991
Change-Id: I22864aa22d4864d85e055a5b1d3ff1faf122011b

8 years agoMerge "ART: Add logging for CHECK failure" into nyc-dev
Andreas Gampe [Wed, 20 Apr 2016 19:13:39 +0000 (19:13 +0000)]
Merge "ART: Add logging for CHECK failure" into nyc-dev
am: b7ec9f8

* commit 'b7ec9f8201bf3a4915b66adf2678dfc4fe55c8f2':
  ART: Add logging for CHECK failure

Change-Id: I8c1c23ed2d0a43c793f345be235f5cbfb1b9b650

8 years agoMerge "ART: Add logging for CHECK failure" into nyc-dev
TreeHugger Robot [Wed, 20 Apr 2016 19:03:49 +0000 (19:03 +0000)]
Merge "ART: Add logging for CHECK failure" into nyc-dev

8 years agoFix HInstruction::ReplaceInput(), allow no-op.
Vladimir Marko [Wed, 20 Apr 2016 17:45:25 +0000 (18:45 +0100)]
Fix HInstruction::ReplaceInput(), allow no-op.

Allow HInstruction::ReplaceInput() to be called with
a `replacement` being the same as the old input and
do nothing in that case.

This is a follow-up to
    https://android-review.googlesource.com/216923
where I erroneously assumed that it never happens.

Also adhere to the standard C++ std::forward_list<>
semantics in the single-element overload of
`IntrusiveForwardList<>::splice_after()`.

Bug: 28173563

(cherry picked from commit c6b5627c25ff5653e97ccff8c5ccf6ac967b6f83)

Change-Id: I66b7d4b48f629284d0bcb1d31100519e02a872e5

8 years agoMerge changes I0360a078,I3e267519 into nyc-dev
Andreas Gampe [Wed, 20 Apr 2016 17:15:12 +0000 (17:15 +0000)]
Merge changes I0360a078,I3e267519 into nyc-dev
am: ccfc77e

* commit 'ccfc77e63b0bdc288f217d3b5e2657e911fa350b':
  ART: Add Math cutouts
  ART: Add some reflection cutouts

Change-Id: I6e2d75b4b7a9192079420a7f61c7220b3c4f40c9

8 years agoMerge changes I0360a078,I3e267519 into nyc-dev
Andreas Gampe [Wed, 20 Apr 2016 17:09:24 +0000 (17:09 +0000)]
Merge changes I0360a078,I3e267519 into nyc-dev

* changes:
  ART: Add Math cutouts
  ART: Add some reflection cutouts