OSDN Git Service

android-x86/art.git
7 years agoMerge "Revert "ART: Compiler support for invoke-polymorphic.""
Orion Hodson [Wed, 11 Jan 2017 19:25:27 +0000 (19:25 +0000)]
Merge "Revert "ART: Compiler support for invoke-polymorphic.""
am: dcf52765ab

Change-Id: I2d750b551314c5439f43a74d673d03d45e5b312c

7 years agoMerge "Revert "ART: Compiler support for invoke-polymorphic.""
Orion Hodson [Wed, 11 Jan 2017 19:18:51 +0000 (19:18 +0000)]
Merge "Revert "ART: Compiler support for invoke-polymorphic.""

7 years agoRevert "ART: Compiler support for invoke-polymorphic."
Orion Hodson [Wed, 11 Jan 2017 18:58:15 +0000 (18:58 +0000)]
Revert "ART: Compiler support for invoke-polymorphic."

This reverts commit 02e3092f8d98f339588e48691db77f227b48ac1e.

Reasons for revert:

- Breaks MIPS/MIPS64 build.
- Fails under GCStress test on x64.
- Different x64 build configuration doesn't like relocation.

Change-Id: I512555b38165d05f8a07e8aed528f00302061001

7 years agoMerge "liblog: use log/log.h to access ALOG macros"
Mark Salyzyn [Wed, 11 Jan 2017 18:37:22 +0000 (18:37 +0000)]
Merge "liblog: use log/log.h to access ALOG macros"
am: a28ddf5140

Change-Id: Id82c407d8039d14fd7481c6e299cfcd5a0ef8846

7 years agoMerge "liblog: use log/log.h to access ALOG macros"
Treehugger Robot [Wed, 11 Jan 2017 18:30:04 +0000 (18:30 +0000)]
Merge "liblog: use log/log.h to access ALOG macros"

7 years agoMerge "ART: Compiler support for invoke-polymorphic."
Orion Hodson [Wed, 11 Jan 2017 18:15:51 +0000 (18:15 +0000)]
Merge "ART: Compiler support for invoke-polymorphic."
am: 79f9928fc9

Change-Id: Ib635e002d54734e9df140ff14802ab0e3d47447c

7 years agoMerge "Move most of art::Thread to ObjPtr"
Mathieu Chartier [Wed, 11 Jan 2017 18:10:22 +0000 (18:10 +0000)]
Merge "Move most of art::Thread to ObjPtr"
am: 716eb25353

Change-Id: I19d0a5cf4e92974be4c963a3427487afd4f067ae

7 years agoMerge "ART: Compiler support for invoke-polymorphic."
Treehugger Robot [Wed, 11 Jan 2017 18:08:03 +0000 (18:08 +0000)]
Merge "ART: Compiler support for invoke-polymorphic."

7 years agoMerge "Move most of art::Thread to ObjPtr"
Mathieu Chartier [Wed, 11 Jan 2017 17:59:34 +0000 (17:59 +0000)]
Merge "Move most of art::Thread to ObjPtr"

7 years agoMerge "Fix possible deadlock in AddAccessFlags and ClearAccessFlags"
Mathieu Chartier [Wed, 11 Jan 2017 17:54:48 +0000 (17:54 +0000)]
Merge "Fix possible deadlock in AddAccessFlags and ClearAccessFlags"
am: 07d2e7a760

Change-Id: I44d2446d606ae3ff225a595a20d794182b71a7a9

7 years agoMerge "Fix possible deadlock in AddAccessFlags and ClearAccessFlags"
Mathieu Chartier [Wed, 11 Jan 2017 17:47:30 +0000 (17:47 +0000)]
Merge "Fix possible deadlock in AddAccessFlags and ClearAccessFlags"

7 years agoART: Compiler support for invoke-polymorphic.
Orion Hodson [Thu, 1 Dec 2016 10:33:51 +0000 (10:33 +0000)]
ART: Compiler support for invoke-polymorphic.

Adds basic support to invoke method handles in compiled code.

Enables method verification for methods containing invoke-polymorphic.

Adds k45cc/k45rc output to Instruction::DumpString() which
was found to be missing when enabling verification.

Include stack traces in test 957-methodhandle-transforms for
failures so they can be easily identified.

Bug: 30550796,33191393
Test: art/test/run-test 953
Test: m test-art-run-test
Change-Id: Ic9a96ea24906087597d96ad8159a5bc349d06950

7 years agoliblog: use log/log.h to access ALOG macros
Mark Salyzyn [Tue, 10 Jan 2017 23:12:38 +0000 (15:12 -0800)]
liblog: use log/log.h to access ALOG macros

Test: compile
Bug: 30465923
Change-Id: Ia2699768da1af6d508472360baa08c77c07fca01

7 years agoMerge "Keep resolved String in HLoadString."
Nicolas Geoffray [Wed, 11 Jan 2017 14:08:36 +0000 (14:08 +0000)]
Merge "Keep resolved String in HLoadString."
am: db47a144d8

Change-Id: I232a6ac98c9d310c726d77fde99e15be567fca42

7 years agoMerge "Keep resolved String in HLoadString."
Nicolas Geoffray [Wed, 11 Jan 2017 14:05:08 +0000 (14:05 +0000)]
Merge "Keep resolved String in HLoadString."

7 years agoMerge "ARM: Instruction set features clean-up."
Serban Constantinescu [Wed, 11 Jan 2017 13:08:32 +0000 (13:08 +0000)]
Merge "ARM: Instruction set features clean-up."
am: f62455a422

Change-Id: I7f3977589d9da93eba52f8cb14d3546153f81e17

7 years agoMerge "ARM: Instruction set features clean-up."
Treehugger Robot [Wed, 11 Jan 2017 12:58:15 +0000 (12:58 +0000)]
Merge "ARM: Instruction set features clean-up."

7 years agoMerge "Remove the unused SMP instruction set feature option."
Vladimir Marko [Wed, 11 Jan 2017 11:34:26 +0000 (11:34 +0000)]
Merge "Remove the unused SMP instruction set feature option."
am: bc7d0deda4

Change-Id: I719f43019f2b76f18cc8de65ad504ab82b1f785b

7 years agoMerge "Remove the unused SMP instruction set feature option."
Vladimir Marko [Wed, 11 Jan 2017 11:25:38 +0000 (11:25 +0000)]
Merge "Remove the unused SMP instruction set feature option."

7 years agoMerge "Make object allocation entrypoints only take a class."
Nicolas Geoffray [Wed, 11 Jan 2017 10:46:25 +0000 (10:46 +0000)]
Merge "Make object allocation entrypoints only take a class."
am: 816988efb8

Change-Id: Ib5c1b8db34d5b2388a8f10daae92112b8bf82fec

7 years agoMerge "Make object allocation entrypoints only take a class."
Nicolas Geoffray [Wed, 11 Jan 2017 10:37:54 +0000 (10:37 +0000)]
Merge "Make object allocation entrypoints only take a class."

7 years agoMerge "Do not return patchoat for dexopt needed."
Richard Uhler [Wed, 11 Jan 2017 10:36:42 +0000 (10:36 +0000)]
Merge "Do not return patchoat for dexopt needed."
am: c9a060f268

Change-Id: I932952dc273aa023a611406fb45219015ef40409

7 years agoMake object allocation entrypoints only take a class.
Nicolas Geoffray [Fri, 6 Jan 2017 14:40:07 +0000 (14:40 +0000)]
Make object allocation entrypoints only take a class.

Change motivated by:
- Dex cache compression: having the allocation fast path do a
  dex cache lookup will be too expensive. So instead, rely on the
  compiler having direct access to the class (either through BSS for
  AOT, or JIT tables for JIT).
- Inlining: the entrypoints relied on the caller of the allocation to
  have the same dex cache as the outer method (stored at the bottom of
  the stack). This meant we could not inline methods from a different
  dex file that do allocations. By avoiding the dex cache lookup in
  the entrypoint, we can now remove this restriction.

Code expansion on average for Docs/Gms/FB/Framework (go/lem numbers):
- Around 0.8% on arm64
- Around 1% for x64, arm
- Around 1.5% on x86

Test: test-art-host, test-art-target, ART_USE_READ_BARRIER=true/false
Test: test-art-host, test-art-target,  ART_DEFAULT_GC_TYPE=SS ART_USE_TLAB=true

Change-Id: I41f3748bb4d251996aaf6a90fae4c50176f9295f

7 years agoMerge "Do not return patchoat for dexopt needed."
Treehugger Robot [Wed, 11 Jan 2017 10:28:16 +0000 (10:28 +0000)]
Merge "Do not return patchoat for dexopt needed."

7 years agoMerge "Track libcore java.lang.reflect.Proxy update"
Przemyslaw Szczepaniak [Wed, 11 Jan 2017 10:18:56 +0000 (10:18 +0000)]
Merge "Track libcore java.lang.reflect.Proxy update"
am: 198b5dbf34

Change-Id: I317a57a5793a99dcd4ccf96c99c68776f5643106

7 years agoMerge "Track libcore java.lang.reflect.Proxy update"
Przemyslaw Szczepaniak [Wed, 11 Jan 2017 10:15:43 +0000 (10:15 +0000)]
Merge "Track libcore java.lang.reflect.Proxy update"

7 years agoMerge "Recognize getClass() in RTP."
Nicolas Geoffray [Wed, 11 Jan 2017 09:16:20 +0000 (09:16 +0000)]
Merge "Recognize getClass() in RTP."
am: 5e83eb74e8

Change-Id: I0173910c704387c60a680a35ecc15df56adaff4e

7 years agoMerge "Recognize getClass() in RTP."
Nicolas Geoffray [Wed, 11 Jan 2017 09:08:09 +0000 (09:08 +0000)]
Merge "Recognize getClass() in RTP."

7 years agoFix possible deadlock in AddAccessFlags and ClearAccessFlags
Mathieu Chartier [Wed, 11 Jan 2017 00:48:11 +0000 (16:48 -0800)]
Fix possible deadlock in AddAccessFlags and ClearAccessFlags

Reload the value each loop iteration or else it will spin forever
if the CAS fails due to another thread adding a different flag.

Test: mm

Change-Id: Idc320921597acc20d56301899b398756563029f2

7 years agoMerge "Make all class redefinition operations after suspend_all infallible"
Alex Light [Wed, 11 Jan 2017 00:50:18 +0000 (00:50 +0000)]
Merge "Make all class redefinition operations after suspend_all infallible"
am: 4cd5155218

Change-Id: I1edac3e24aedc552328d2b2129edd53cf1f7acbb

7 years agoMerge "Make all class redefinition operations after suspend_all infallible"
Treehugger Robot [Wed, 11 Jan 2017 00:42:14 +0000 (00:42 +0000)]
Merge "Make all class redefinition operations after suspend_all infallible"

7 years agoMerge "ART: Add system properties support"
Andreas Gampe [Wed, 11 Jan 2017 00:33:47 +0000 (00:33 +0000)]
Merge "ART: Add system properties support"
am: 2ef87a523a

Change-Id: I1718cd897c9d66007c8dcac58414a46551f60962

7 years agoMerge "ART: Add system properties support"
Treehugger Robot [Wed, 11 Jan 2017 00:26:10 +0000 (00:26 +0000)]
Merge "ART: Add system properties support"

7 years agoMove most of art::Thread to ObjPtr
Mathieu Chartier [Tue, 10 Jan 2017 23:54:41 +0000 (15:54 -0800)]
Move most of art::Thread to ObjPtr

Bug: 31113334

Test: test-art-host

Change-Id: I73d0de3c875d3ec3d732034fdc961dae79ef4070

7 years agoMake all class redefinition operations after suspend_all infallible
Alex Light [Tue, 10 Jan 2017 21:33:56 +0000 (13:33 -0800)]
Make all class redefinition operations after suspend_all infallible

We can guarantee that the mutations to the class, classloader, method
& stack data-structures which occur after the suspend_all can never
fail. This will simplify implementing the required semantics of class
redefinition with respect to atomically updating multiple classes at
once.

Test: mma -j40 test-art-host
Change-Id: Iab95c66afbdcfe161a9486f5fb7193c53642c060

7 years agoKeep resolved String in HLoadString.
Nicolas Geoffray [Mon, 9 Jan 2017 20:54:52 +0000 (20:54 +0000)]
Keep resolved String in HLoadString.

For the following reasons:
- Avoids needing to do a lookup again in CodeGenerator::EmitJitRoots.
- Fixes races where we the string was GC'ed before CodeGenerator::EmitJitRoots.
- Makes it possible to do GVN on the same string but defined in different
  dex files.

Test: test-art-host, test-art-target
Change-Id: If2b5d3079f7555427b1b96ab04546b3373fcf921

7 years agoART: Add system properties support
Andreas Gampe [Tue, 10 Jan 2017 03:21:06 +0000 (19:21 -0800)]
ART: Add system properties support

Add simple support for GetSystemProperties, GetSystemProperty and
SetSystemProperty. Add a test.

Bug: 31455788
Test: m test-art-host-run-test-922-properties
Change-Id: I02914f04643f0f8fab96f1b372925c2c5306fc9b

7 years agoMerge "Fix some issues reported by Valgrind"
Mathieu Chartier [Tue, 10 Jan 2017 18:46:56 +0000 (18:46 +0000)]
Merge "Fix some issues reported by Valgrind"
am: 2e17788df0

Change-Id: I62227ec60741d42f9b1a246840fe0c70c0ab8ed7

7 years agoMerge "Fix some issues reported by Valgrind"
Mathieu Chartier [Tue, 10 Jan 2017 18:40:25 +0000 (18:40 +0000)]
Merge "Fix some issues reported by Valgrind"

7 years agoMerge "Delete extra arm64/mips64 MterpReturn suspend check"
Mathieu Chartier [Tue, 10 Jan 2017 18:16:53 +0000 (18:16 +0000)]
Merge "Delete extra arm64/mips64 MterpReturn suspend check"
am: 26baea602e

Change-Id: I727de568787f6cc651017a213fd1c542023032aa

7 years agoMerge "Delete extra arm64/mips64 MterpReturn suspend check"
Mathieu Chartier [Tue, 10 Jan 2017 18:09:21 +0000 (18:09 +0000)]
Merge "Delete extra arm64/mips64 MterpReturn suspend check"

7 years agoMerge "Revert "Revert "Add basic implementation of IsModifiableClass"""
Alex Light [Tue, 10 Jan 2017 17:07:42 +0000 (17:07 +0000)]
Merge "Revert "Revert "Add basic implementation of IsModifiableClass"""
am: 4814f5e756

Change-Id: Ib24bf13f95c362cbf5d9d8c28c39383608057aba

7 years agoMerge "Revert "Revert "Add basic checks for redefinition."""
Alex Light [Tue, 10 Jan 2017 17:07:19 +0000 (17:07 +0000)]
Merge "Revert "Revert "Add basic checks for redefinition."""
am: 6c71cf9faf

Change-Id: Ib79a51ba61950dc702727d868cb83859f03d1798

7 years agoMerge "Revert "Revert "Add basic implementation of IsModifiableClass"""
Treehugger Robot [Tue, 10 Jan 2017 17:04:13 +0000 (17:04 +0000)]
Merge "Revert "Revert "Add basic implementation of IsModifiableClass"""

7 years agoMerge "Revert "Revert "Add basic checks for redefinition."""
Treehugger Robot [Tue, 10 Jan 2017 17:01:12 +0000 (17:01 +0000)]
Merge "Revert "Revert "Add basic checks for redefinition."""

7 years agoTrack libcore java.lang.reflect.Proxy update
Przemyslaw Szczepaniak [Wed, 17 Aug 2016 16:46:38 +0000 (17:46 +0100)]
Track libcore java.lang.reflect.Proxy update

Test: make -j 32 & booted device & m test-art-host
Bug: 28666126
Change-Id: I6e7d75fd904e9b130925756ef1ff1122c25ab245

7 years agoDelete extra arm64/mips64 MterpReturn suspend check
Mathieu Chartier [Tue, 10 Jan 2017 02:48:11 +0000 (18:48 -0800)]
Delete extra arm64/mips64 MterpReturn suspend check

Doing a suspend check after moving the result into the shadow frame
result_register_ is not safe since result_register_ is not a GC
root. The suspend check is unnecessary since the opcodes that branch
to MterpReturn already do a suspend check.

This could maybe explain one crash for CC that was seen after calling
a getter that had no compiled code.

The extra suspend check appears to only be present on arm64 amd mips64.

Test: test-art-target ART_TEST_INTERPRETER=true

Bug: 33211261
Change-Id: I70b8863f40a25a26f278ac8ef0d57e083b663e0f

7 years agoRevert "Revert "Add basic implementation of IsModifiableClass""
Alex Light [Tue, 10 Jan 2017 15:41:24 +0000 (07:41 -0800)]
Revert "Revert "Add basic implementation of IsModifiableClass""

This reverts commit c66c077d40db58ec239f93a9c42b9939439c85c7.

Reason for revert: Problem with preceding CL fixed.

Test: mma -j40 test-art-host

7 years agoRevert "Revert "Add basic checks for redefinition.""
Alex Light [Tue, 10 Jan 2017 15:37:17 +0000 (15:37 +0000)]
Revert "Revert "Add basic checks for redefinition.""

This reverts commit f9d41c1d269f3031c0a89e34fc4a04303e186958.

Reason for revert: Fixed issue of missing target skip.

Test: mma -j40 test-art-host
Change-Id: Ibe632e1f3063373950fb873e1716d0439c561297

7 years agoRecognize getClass() in RTP.
Nicolas Geoffray [Mon, 19 Dec 2016 09:18:07 +0000 (09:18 +0000)]
Recognize getClass() in RTP.

Also always keep around the resolved field
in related HInstructions to avoid resolving it again
and again.

Test: test-art-host, 631-checker-get-class

Change-Id: I3bc6be11f3eb175c635e746006f39865947e0669

7 years agoMerge "The HBoundsCheck should be the index input of String.charAt."
Nicolas Geoffray [Tue, 10 Jan 2017 12:18:33 +0000 (12:18 +0000)]
Merge "The HBoundsCheck should be the index input of String.charAt."
am: fac5c658f1

Change-Id: I17b4f972c473d14726a9ab0371d637c860cdd6e9

7 years agoMerge "The HBoundsCheck should be the index input of String.charAt."
Nicolas Geoffray [Tue, 10 Jan 2017 12:10:09 +0000 (12:10 +0000)]
Merge "The HBoundsCheck should be the index input of String.charAt."

7 years agoMerge "Revert "Add basic checks for redefinition.""
Nicolas Geoffray [Tue, 10 Jan 2017 09:04:40 +0000 (09:04 +0000)]
Merge "Revert "Add basic checks for redefinition.""
am: c38c429ef1

Change-Id: Ic414583e30bd59a2a87aa9114660f61bb8f6e1bd

7 years agoMerge "Revert "Add basic implementation of IsModifiableClass""
Nicolas Geoffray [Tue, 10 Jan 2017 09:04:22 +0000 (09:04 +0000)]
Merge "Revert "Add basic implementation of IsModifiableClass""
am: a82de09e6d

Change-Id: If86f3647e524da59d5168dee62c518e21934193d

7 years agoMerge "Revert "Add basic checks for redefinition.""
Nicolas Geoffray [Tue, 10 Jan 2017 09:00:28 +0000 (09:00 +0000)]
Merge "Revert "Add basic checks for redefinition.""

7 years agoRevert "Add basic checks for redefinition."
Nicolas Geoffray [Tue, 10 Jan 2017 08:58:44 +0000 (08:58 +0000)]
Revert "Add basic checks for redefinition."

Test fails.

This reverts commit 10f02fb4f026c493c69b21d4ec7c3096970357e1.

Change-Id: I21abfff0d7cd4ec840447f19819b7859b90f45b2

7 years agoMerge "Revert "Add basic implementation of IsModifiableClass""
Nicolas Geoffray [Tue, 10 Jan 2017 08:59:54 +0000 (08:59 +0000)]
Merge "Revert "Add basic implementation of IsModifiableClass""

7 years agoRevert "Add basic implementation of IsModifiableClass"
Nicolas Geoffray [Tue, 10 Jan 2017 08:59:31 +0000 (08:59 +0000)]
Revert "Add basic implementation of IsModifiableClass"

Built on top of a failing change.

This reverts commit b4e51ebfa23a1cb175a6c317ac4a69228709e78f.

Change-Id: I7f4dbe22271a9c04e518bceabba12c95cad3c6f7

7 years agoMerge "Add basic implementation of IsModifiableClass"
Alex Light [Tue, 10 Jan 2017 02:01:27 +0000 (02:01 +0000)]
Merge "Add basic implementation of IsModifiableClass"
am: 888e66fdfb

Change-Id: I3ce1d22ef8d9eb4b0bee782f4f6f0ed2d0336a40

7 years agoMerge "Add basic implementation of IsModifiableClass"
Treehugger Robot [Tue, 10 Jan 2017 01:52:42 +0000 (01:52 +0000)]
Merge "Add basic implementation of IsModifiableClass"

7 years agoMerge "Use relative futex timeout in SuspendAllInternal."
Mathieu Chartier [Tue, 10 Jan 2017 01:13:24 +0000 (01:13 +0000)]
Merge "Use relative futex timeout in SuspendAllInternal."
am: 99cd29fa68

Change-Id: Ib63fe3dc90863d23d0a95a9856915fd90108e95f

7 years agoMerge "Use relative futex timeout in SuspendAllInternal."
Mathieu Chartier [Tue, 10 Jan 2017 01:04:32 +0000 (01:04 +0000)]
Merge "Use relative futex timeout in SuspendAllInternal."

7 years agoAdd basic implementation of IsModifiableClass
Alex Light [Tue, 10 Jan 2017 00:28:58 +0000 (16:28 -0800)]
Add basic implementation of IsModifiableClass

Currently we just flatly disallow some types of modifications that
might be allowed in the future.

Bug: 31684578
Test: mma -j40 test-art-host
Change-Id: Ica76d12276eb11b318da2f642591ea78766f36ad

7 years agoMerge "ART: Add method modifiers functions"
Andreas Gampe [Tue, 10 Jan 2017 00:28:51 +0000 (00:28 +0000)]
Merge "ART: Add method modifiers functions"
am: 6c0a92fd90

Change-Id: Ib753c915fbbeb1b68030da824eca6ea6b76a3899

7 years agoMerge "ART: Add method modifiers functions"
Treehugger Robot [Tue, 10 Jan 2017 00:22:41 +0000 (00:22 +0000)]
Merge "ART: Add method modifiers functions"

7 years agoMerge "Add basic checks for redefinition."
Alex Light [Tue, 10 Jan 2017 00:18:22 +0000 (00:18 +0000)]
Merge "Add basic checks for redefinition."
am: 5896957f4f

Change-Id: Iae3793a6c2cb6e5718bf33bea70b381eae94f7e8

7 years agoMerge "Add basic checks for redefinition."
Treehugger Robot [Tue, 10 Jan 2017 00:13:40 +0000 (00:13 +0000)]
Merge "Add basic checks for redefinition."

7 years agoMerge "Remove oat-target* rules"
Dan Willemsen [Tue, 10 Jan 2017 00:03:19 +0000 (00:03 +0000)]
Merge "Remove oat-target* rules"
am: 7399a7293b

Change-Id: I3a2f26175b360e5de9f2ae06ae71e285febed3f3

7 years agoMerge "Remove oat-target* rules"
Dan Willemsen [Mon, 9 Jan 2017 23:55:50 +0000 (23:55 +0000)]
Merge "Remove oat-target* rules"

7 years agoMerge "ART: Add method code item functions"
Andreas Gampe [Mon, 9 Jan 2017 23:01:16 +0000 (23:01 +0000)]
Merge "ART: Add method code item functions"
am: 25f38be13c

Change-Id: I7c15b662597a4a501bb31c78b37501eec48d6bf6

7 years agoMerge "ART: Add method code item functions"
Treehugger Robot [Mon, 9 Jan 2017 22:57:24 +0000 (22:57 +0000)]
Merge "ART: Add method code item functions"

7 years agoART: Add method modifiers functions
Andreas Gampe [Mon, 9 Jan 2017 22:40:25 +0000 (14:40 -0800)]
ART: Add method modifiers functions

Add support for IsMethodNative, IsMethodObsolete and IsMethodSynthetic.
Add tests.

Bug: 34163329
Test: m test-art-host-run-test-910-methods
Change-Id: I89077cfde1f37861ccb718345b753dfae1d6abe3

7 years agoAdd basic checks for redefinition.
Alex Light [Sat, 7 Jan 2017 00:21:48 +0000 (16:21 -0800)]
Add basic checks for redefinition.

This adds some checks for redefined classes. Currently it checks that
the transformed class has the same name, interfaces, and access flags.

Other checks will be added in the future.

Test: mma -j40 test-art-host
Change-Id: Iaa94e9e8688db1985d15f27acf3ddb53908a1c8b

7 years agoThe HBoundsCheck should be the index input of String.charAt.
Nicolas Geoffray [Mon, 9 Jan 2017 14:02:45 +0000 (14:02 +0000)]
The HBoundsCheck should be the index input of String.charAt.

Otherwise, the charAt call may be licmed but the bounds check
stay in the loop.

bug: 33909430
bug: 28330359
Test: 632-checker-char-at-bounds
Change-Id: I3cb749785c26ff8a016a7103899e9b19a24d5022

7 years agoART: Add method code item functions
Andreas Gampe [Mon, 9 Jan 2017 19:38:04 +0000 (11:38 -0800)]
ART: Add method code item functions

Add support for GetArgumentsSize, GetMaxLocals and GetMethodLocation
support. Add tests.

Bug: 34163329
Test: m test-art-host-run-test-910-methods
Change-Id: I14b5d02bf0513dc5a8d3f4ea17c849ab08b8554a

7 years agoMerge "ART: Change no-image run-test dependency"
Andreas Gampe [Mon, 9 Jan 2017 21:11:37 +0000 (21:11 +0000)]
Merge "ART: Change no-image run-test dependency"
am: 0d0bfae492

Change-Id: I73ef05eef66f124e9700b1ef1fc2dd6bd259227a

7 years agoMerge "ART: Change no-image run-test dependency"
Treehugger Robot [Mon, 9 Jan 2017 21:04:09 +0000 (21:04 +0000)]
Merge "ART: Change no-image run-test dependency"

7 years agoMerge "Simplify the collector names."
Hiroshi Yamauchi [Mon, 9 Jan 2017 20:33:22 +0000 (20:33 +0000)]
Merge "Simplify the collector names."
am: c6cbe3cdeb

Change-Id: Id67627117319183661438edccaca85a6d304a1cd

7 years agoMerge "ART: Add trivial implementation of extensions"
Andreas Gampe [Mon, 9 Jan 2017 20:33:06 +0000 (20:33 +0000)]
Merge "ART: Add trivial implementation of extensions"
am: eeb1ca64da

Change-Id: I5ba6dc20b0cca5849c712362c6b448554eb2049b

7 years agoMerge "Simplify the collector names."
Hiroshi Yamauchi [Mon, 9 Jan 2017 20:26:01 +0000 (20:26 +0000)]
Merge "Simplify the collector names."

7 years agoMerge "ART: Add trivial implementation of extensions"
Treehugger Robot [Mon, 9 Jan 2017 20:25:59 +0000 (20:25 +0000)]
Merge "ART: Add trivial implementation of extensions"

7 years agoART: Add trivial implementation of extensions
Andreas Gampe [Mon, 9 Jan 2017 18:50:17 +0000 (10:50 -0800)]
ART: Add trivial implementation of extensions

We do not need extension support.

Bug: 31455788
Test: m test-art-host
Change-Id: I40e9435ad3ffee83070c522a1938509db4cc889e

7 years agoART: Change no-image run-test dependency
Andreas Gampe [Mon, 9 Jan 2017 18:42:25 +0000 (10:42 -0800)]
ART: Change no-image run-test dependency

Let the no-image run-test Make configuration depend on the pic
image for prebuilding. This is what the run-test/run-test-jar
configuration will use.

Test: m ART_TEST_RUN_TEST_NO_IMAGE=true test-art-host && rm $ANDROID_HOST_OUT/framework/x86*/* && m ART_TEST_RUN_TEST_NO_IMAGE=true test-art-host
Change-Id: I5c02e76d5e51a63416705a58f733135b688158c2

7 years agoMerge "ART: Add GetObjectSize and GetObjectHashCode"
Andreas Gampe [Mon, 9 Jan 2017 17:58:24 +0000 (17:58 +0000)]
Merge "ART: Add GetObjectSize and GetObjectHashCode"
am: 8cf62ddb99

Change-Id: Ia691573a79f27a4ef27e56eefe0524d49fe74495

7 years agoMerge "ART: Add GetObjectSize and GetObjectHashCode"
Treehugger Robot [Mon, 9 Jan 2017 17:53:25 +0000 (17:53 +0000)]
Merge "ART: Add GetObjectSize and GetObjectHashCode"

7 years agoARM: Instruction set features clean-up.
Serban Constantinescu [Wed, 26 Oct 2016 10:15:00 +0000 (11:15 +0100)]
ARM: Instruction set features clean-up.

Clean-up the instruction set features for ARM. Remove all the CPU variants
that are not supported or used with ART.

Remove:
 - Old cpu variants (eg: arm7tdmi - does not have the features needed by ART).
 - M & R class cpu variants (currently ART only runs on A class cpus).
 - cpu variants that are unlikely to be used with ART  (eg: cyclone).

Test: mma test-art-target && mma test-art-host

Change-Id: I2b7e5169022ea0a5a943281381b9446c52e17364

7 years agoRemove the unused SMP instruction set feature option.
Serban Constantinescu [Fri, 23 Sep 2016 10:06:03 +0000 (11:06 +0100)]
Remove the unused SMP instruction set feature option.

The SMP option is currently not used in the ART codebase
(and it rots away).
Single CPU systems that run SMP code should be able to deal
with it nicely (otherwise the CPU has some serious problems).

Test: mma test-art-target && mma test-art-host

Change-Id: Ifaab42b29de1062866a0af7525de2f834a4a5a57

7 years agoFix some issues reported by Valgrind
Anton Kirilov [Fri, 6 Jan 2017 13:33:42 +0000 (13:33 +0000)]
Fix some issues reported by Valgrind

* Update the target suppression file.
* Disable the detection of mismatched free() / delete / delete []
calls, since it results in a lot of false positives (a known
Valgrind limitation associated with asymmetric inlining of
operator new() and operator delete()).
* Avoid a memory leak in the code generator tests, caused by the
fact that the VIXL-based ARM code generator does not always use
the arena allocator.
* Fix an access to uninitialized memory.

Test: m valgrind-test-art-target
Test: valgrind --leak-check=full --show-mismatched-frees=no \
               --ignore-range-below-sp=1024-1 \
               --suppressions=valgrind-target-suppressions.txt \
               dalvikvm ...
Change-Id: I891a3247aa9828226b4e62c69d6e1c8398d757b8

7 years agoDo not return patchoat for dexopt needed.
Richard Uhler [Thu, 8 Dec 2016 09:48:01 +0000 (09:48 +0000)]
Do not return patchoat for dexopt needed.

Dex preopt now always compiles PIC, so patchoat is no longer needed to
relocate prebuilts on first boot or system update when the boot image is
relocated.

The only remaining case when patchoat would be used on oat files is the rare,
unexpected case when something bad happens to the device, such as a boot loop,
to cause the prebuilt boot image to be relocated again. In this case, non-PIC
oat files compiled on device may have up-to-date dex and image checksums but
wrong patch deltas. In this case, it is fine to recompile the oat file from
scratch using dex2oat rather than using patchoat.

Test: oat_file_assistant_test
Bug: 33192586
Change-Id: If3f2457c7b358e1328476a460a0f15bfa89b7def

7 years agoUse relative futex timeout in SuspendAllInternal.
rock.yeh [Fri, 23 Dec 2016 07:11:13 +0000 (15:11 +0800)]
Use relative futex timeout in SuspendAllInternal.

This erroneously used an absolute timeout for FUTEX_WAIT, potentially
causing it to block for MUCH longer than 10 seconds.
http://man7.org/linux/man-pages/man2/futex.2.html
Note: for FUTEX_WAIT, timeout is interpreted as a relative value.

Error case:
kernel time: 15842.476344
nsec: 31694950164731
12-22 20:25:48.020043     0     0 F [15842.476344][HeapTaskDaemon:3008]
futex_wait 00000070fcdf8980 1 1 31694950164731

Normal case:
kernel time: 15842.476344
nsec: 15842476344

Block backtrace:
"HeapTaskDaemon" sysTid=3008
  #00 pc 000000000001bcac  /system/lib64/libc.so (syscall+28)
  #01 pc 0000000000461db0  /system/lib64/libart.so
(_ZN3art10ThreadList18SuspendAllInternalEPNS_6ThreadES2_S2_b+720)
  #02 pc 000000000046249c  /system/lib64/libart.so
(_ZN3art10ThreadList10SuspendAllEPKcb+532)
  #03 pc 00000000001e8fc8  /system/lib64/libart.so
(_ZN3art2gc9collector9MarkSweep9RunPhasesEv+232)
  #04 pc 00000000001e1694  /system/lib64/libart.so
(_ZN3art2gc9collector16GarbageCollector3RunENS0_7GcCauseEb+332)
  #05 pc 0000000000211500  /system/lib64/libart.so
(_ZN3art2gc4Heap22CollectGarbageInternalENS0_9collector6GcTypeENS0_7Gc
CauseEb+3048)
  #06 pc 0000000000218acc  /system/lib64/libart.so
(_ZN3art2gc4Heap12ConcurrentGCEPNS_6ThreadEb+124)
  #07 pc 000000000021fbf4  /system/lib64/libart.so
(_ZN3art2gc4Heap16ConcurrentGCTask3RunEPNS_6ThreadE+36)

This is a fix patch log and each timeout log interval of 10 seconds:
12-27 03:27:46.153744 1631 1713 E art : Unexpected time out during
suspend all.
12-27 03:27:56.154401 1631 1713 E art : Unexpected time out during
suspend all.
12-27 03:28:06.154956 1631 1713 E art : Unexpected time out during
suspend all.

7 years agoMerge "Find the classpath boundary for being assignable to an interface."
Nicolas Geoffray [Sat, 7 Jan 2017 13:52:50 +0000 (13:52 +0000)]
Merge "Find the classpath boundary for being assignable to an interface."
am: 91db41f315

Change-Id: Ib0ac9d0f6367701a6772748e41446040b07600e3

7 years agoMerge "Find the classpath boundary for being assignable to an interface."
Nicolas Geoffray [Sat, 7 Jan 2017 13:46:59 +0000 (13:46 +0000)]
Merge "Find the classpath boundary for being assignable to an interface."

7 years agoFind the classpath boundary for being assignable to an interface.
Nicolas Geoffray [Wed, 21 Dec 2016 16:54:52 +0000 (16:54 +0000)]
Find the classpath boundary for being assignable to an interface.

Test: verifier_deps_test, test-art-host

Change-Id: Icab3a5a9f94f6a38fa8ef320f93ac14691a732d3

7 years agoRemove oat-target* rules
Dan Willemsen [Sat, 7 Jan 2017 07:14:05 +0000 (23:14 -0800)]
Remove oat-target* rules

This really only did anything for the 'mm' case, and was broken:

* Didn't find any apps (needed to search app/*/*.apk)
* Attempted to build framework/pm.odex instead of
  framework/oat/arm/pm.odex.
* Caused Kati to re-read all the makefiles any time the contents of
  system/app or system/framework changed.

Test: m -j installclean; m -j a (repeat until kati doesn't regenerate)
      m -j pmlib; m -j a (doesn't regenerate)
Change-Id: Icca6556f0de952b8fbc740433272766a1ce5cdc9

7 years agoART: Add GetObjectSize and GetObjectHashCode
Andreas Gampe [Sat, 7 Jan 2017 02:00:20 +0000 (18:00 -0800)]
ART: Add GetObjectSize and GetObjectHashCode

Add support for these two functions. Add tests.

Bug: 31684578
Test: m test-art-host-run-test-920-objects
Change-Id: If5dfb5aedddee47e5d739b0c56c7d264ba6e2d51

7 years agoMerge "Revert "Revert "Create test for field access in obsolete methods."""
Alex Light [Sat, 7 Jan 2017 02:26:39 +0000 (02:26 +0000)]
Merge "Revert "Revert "Create test for field access in obsolete methods."""
am: dd5a42753d

Change-Id: I649bab26adb56dd2b1cf8b1dc85de8147b38a4c1

7 years agoMerge "Revert "Revert "Create test for field access in obsolete methods."""
Treehugger Robot [Sat, 7 Jan 2017 02:20:28 +0000 (02:20 +0000)]
Merge "Revert "Revert "Create test for field access in obsolete methods."""

7 years agoMerge "Make GetErrorName allocate the output buffer."
Alex Light [Sat, 7 Jan 2017 02:14:09 +0000 (02:14 +0000)]
Merge "Make GetErrorName allocate the output buffer."
am: d4abdaf889

Change-Id: I81e6521850ccfdd5371af3c4dbcb2d49b789c073

7 years agoMerge "Make GetErrorName allocate the output buffer."
Treehugger Robot [Sat, 7 Jan 2017 02:07:08 +0000 (02:07 +0000)]
Merge "Make GetErrorName allocate the output buffer."

7 years agoMerge "ART: Add GetClassLoader"
Andreas Gampe [Sat, 7 Jan 2017 02:02:08 +0000 (02:02 +0000)]
Merge "ART: Add GetClassLoader"
am: 0bf5ddc601

Change-Id: I893925bd8e30631cd711ca891940189320b325b5