OSDN Git Service

android-x86/art.git
7 years agoFix Arena allocation tracking.
Vladimir Marko [Thu, 13 Apr 2017 12:43:43 +0000 (13:43 +0100)]
Fix Arena allocation tracking.

Add missing allocation kind name and try to avoid
bit-rot in future by explicitly instantiating
ArenaAllocatorStatsImpl<true> in debug builds.

Bug: 34083438
Test: Rely on TreeHugger.
Change-Id: Ibe78a9f15d04b2ca2f03143fb4f49c01ae18471e

7 years agoMerge changes I1d4db176,Ifb931a99
Aart Bik [Wed, 12 Apr 2017 15:52:08 +0000 (15:52 +0000)]
Merge changes I1d4db176,Ifb931a99

* changes:
  ARM64: Support vectorization for double and long.
  ARM64: Support 128-bit registers for SIMD.

7 years agoMerge "MIPS: Use Lsa/Dlsa when possible."
Treehugger Robot [Wed, 12 Apr 2017 12:17:44 +0000 (12:17 +0000)]
Merge "MIPS: Use Lsa/Dlsa when possible."

7 years agoMerge "Add an 'art-preopt' test target configuration."
Richard Uhler [Wed, 12 Apr 2017 07:44:46 +0000 (07:44 +0000)]
Merge "Add an 'art-preopt' test target configuration."

7 years agoMerge changes Ic7d75e1e,Iaf828034
Andreas Gampe [Wed, 12 Apr 2017 04:07:43 +0000 (04:07 +0000)]
Merge changes Ic7d75e1e,Iaf828034

* changes:
  ART: Fix GetSystemProperty (2)
  ART: Fix GetSystemProperty

7 years agoMerge changes Ib29b3920,Ice5efad9
Treehugger Robot [Tue, 11 Apr 2017 23:51:05 +0000 (23:51 +0000)]
Merge changes Ib29b3920,Ice5efad9

* changes:
  ART: Move trampoline logging to -verbose:dex
  ART: Add -verbose:dex

7 years agoART: Fix GetSystemProperty (2)
Andreas Gampe [Tue, 11 Apr 2017 23:47:29 +0000 (16:47 -0700)]
ART: Fix GetSystemProperty (2)

Add live-phase Java-call fallback for java.library.path.

Bug: 31455788
Test: manual
Change-Id: Ic7d75e1e17760fce5506359058b754eb283b9c41

7 years agoART: Fix GetSystemProperty
Andreas Gampe [Tue, 11 Apr 2017 22:59:24 +0000 (15:59 -0700)]
ART: Fix GetSystemProperty

Align with VMRuntime.getClassPath to emit "." for an empty path.

Bug: 31455788
Test: manual
Change-Id: Iaf828034d414f45c20960ab6fd0ceb598362c6f1

7 years agoMerge "Add option for duplicate classes check to return all dupes."
Treehugger Robot [Tue, 11 Apr 2017 21:41:00 +0000 (21:41 +0000)]
Merge "Add option for duplicate classes check to return all dupes."

7 years agoART: Move trampoline logging to -verbose:dex
Andreas Gampe [Tue, 11 Apr 2017 20:50:23 +0000 (13:50 -0700)]
ART: Move trampoline logging to -verbose:dex

Move invoke logging to VLOG(dex).

Bug: 37158297
Test: m test-art-host
Change-Id: Ib29b3920e8f227395b99a9ed65de5ca10c737cc0

7 years agoART: Add -verbose:dex
Andreas Gampe [Tue, 11 Apr 2017 20:48:37 +0000 (13:48 -0700)]
ART: Add -verbose:dex

Add a dex verbose flag to separate out concerns for dex investigations.

Bug: 37158297
Test: m test-art-host
Change-Id: Ice5efad919ae0b6838d44e2f3711563a0774ef0e

7 years agoMerge "Fix bug in vectorization of charAt, with regression test"
Treehugger Robot [Tue, 11 Apr 2017 19:46:48 +0000 (19:46 +0000)]
Merge "Fix bug in vectorization of charAt, with regression test"

7 years agoMerge "optimizing: do not illegally remove constructor barriers after inlining"
Igor Murashkin [Tue, 11 Apr 2017 18:39:59 +0000 (18:39 +0000)]
Merge "optimizing: do not illegally remove constructor barriers after inlining"

7 years agoMerge "target_config: add art-test-javac target"
Igor Murashkin [Tue, 11 Apr 2017 18:03:36 +0000 (18:03 +0000)]
Merge "target_config: add art-test-javac target"

7 years agoFix bug in vectorization of charAt, with regression test
Aart Bik [Tue, 11 Apr 2017 17:15:44 +0000 (10:15 -0700)]
Fix bug in vectorization of charAt, with regression test

Rationale:
String array get instruction cannot be vectorized
in a straightforward way, since compression has
to be dealt with. So rejected for now.

Test: test-art-target, test-art-host
Bug: 37151445
Change-Id: I16112cb8b1be30babd8ec07af5976db0369f8c28

7 years agoMerge "Don't add Jack dependencies when building without Jack"
Colin Cross [Tue, 11 Apr 2017 16:39:19 +0000 (16:39 +0000)]
Merge "Don't add Jack dependencies when building without Jack"

7 years agoDon't add Jack dependencies when building without Jack
Colin Cross [Tue, 11 Apr 2017 02:04:59 +0000 (19:04 -0700)]
Don't add Jack dependencies when building without Jack

Runtests add dependencies on the core library classes.jack files,
which don't exist when compiling with javac.  Disable the dependencies
when building without Jack for now.

Test: m -j ANDROID_COMPILE_WITH_JACK=false tests
Change-Id: I40925c8c8536cc048e7308e6202db420154a18aa

7 years agoMerge "Add checker part of test, fix intrinsic copying"
Aart Bik [Tue, 11 Apr 2017 15:57:31 +0000 (15:57 +0000)]
Merge "Add checker part of test, fix intrinsic copying"

7 years agoMerge "Remove some obsolete TODO comments."
Treehugger Robot [Tue, 11 Apr 2017 15:41:29 +0000 (15:41 +0000)]
Merge "Remove some obsolete TODO comments."

7 years agoMerge "ART: Expose jni_binder's FindClass"
Treehugger Robot [Tue, 11 Apr 2017 15:40:59 +0000 (15:40 +0000)]
Merge "ART: Expose jni_binder's FindClass"

7 years agoAdd an 'art-preopt' test target configuration.
Richard Uhler [Tue, 11 Apr 2017 09:22:30 +0000 (10:22 +0100)]
Add an 'art-preopt' test target configuration.

To test the common case of running preopted apps, which are
precompiled pic against an unrelocated image then used with a
relocated image.

Bug: 33192586
Test: run_build_test_target.py art-preopt
Change-Id: Iababf267b90c63afa137f16a85c78a362de4626a

7 years agoMerge "ART: Package expected run-test results with jvmti Java library"
Treehugger Robot [Tue, 11 Apr 2017 04:24:20 +0000 (04:24 +0000)]
Merge "ART: Package expected run-test results with jvmti Java library"

7 years agoART: Expose jni_binder's FindClass
Andreas Gampe [Tue, 11 Apr 2017 04:09:13 +0000 (21:09 -0700)]
ART: Expose jni_binder's FindClass

Required for the CTS agent.

Bug: 32072923
Test: m test-art-host
Change-Id: I37764b0646fdb0df7ec9dd544d1dffdc909e269b

7 years agoART: Package expected run-test results with jvmti Java library
Andreas Gampe [Mon, 10 Apr 2017 17:41:26 +0000 (10:41 -0700)]
ART: Package expected run-test results with jvmti Java library

Include the JVMTI Java library Makefile to make it buildable.

Include expected.txt files in the form of results.{NR}.expected.txt.
This is the best we can do with the current restrictions of
LOCAL_JAVA_RESOURCE_DIRS/FILES.

Bug: 32072923
Test: mmma art
Change-Id: Ie96ef38b50d523b9d3e31978216e9ec6d8c955f5

7 years agoAdd checker part of test, fix intrinsic copying
Aart Bik [Mon, 10 Apr 2017 20:15:57 +0000 (13:15 -0700)]
Add checker part of test, fix intrinsic copying

Rationale:
I forgot to add the check test part of this test,
and incidentally found an omission: intrinsic
information should be set in the scalar loop
(to get best code there too, not just a lib call).

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

7 years agoMerge "Revert "Avoid JNI usage error when JNI_OnLoad throws""
Treehugger Robot [Mon, 10 Apr 2017 22:05:24 +0000 (22:05 +0000)]
Merge "Revert "Avoid JNI usage error when JNI_OnLoad throws""

7 years agooptimizing: do not illegally remove constructor barriers after inlining
Igor Murashkin [Thu, 6 Apr 2017 21:40:08 +0000 (14:40 -0700)]
optimizing: do not illegally remove constructor barriers after inlining

Remove the illegal optimization that destroyed constructor barriers
after inlining invoke-super constructor calls.

---

According to JLS 7.5.1,

"Note that if one constructor invokes another constructor, and the
invoked constructor sets a final field, the freeze for the final field
takes place at the end of the invoked constructor."

This means if an object is published (stored to a location potentially
visible to another thread) inside of an outer constructor, all final
field stores from any inner constructors must be visible to other
threads.

Test: art/test.py
Bug: 37001605
Change-Id: I3b55f6c628ff1773dab88022a6475d50a1a6f906

7 years agoRevert "Avoid JNI usage error when JNI_OnLoad throws"
Igor Murashkin [Mon, 10 Apr 2017 20:34:29 +0000 (20:34 +0000)]
Revert "Avoid JNI usage error when JNI_OnLoad throws"

This reverts commit d111f90a386f7bad1474189390fce7a8d1ff1ab5.

Change-Id: Ia8461946088644e41e0f2e14d7e806a70dec41ab

7 years agotarget_config: add art-test-javac target
Igor Murashkin [Mon, 10 Apr 2017 20:13:55 +0000 (13:13 -0700)]
target_config: add art-test-javac target

Effectively runs the same commands as:
  ANDROID_COMPILE_WITH_JACK=false make test-art-host

This builds libcore/art with javac/dx/desugar, then runs the gtests
and run-tests for it.

(It does not yet fix run-test to use javac everywhere. That will be a
follow-up change).

Bug: 36902714
Change-Id: Ibd226efcfe78c795474f98d69f513648cff5351a

7 years agoMerge "testrunner/env.py - Run from any directory"
Treehugger Robot [Mon, 10 Apr 2017 19:05:18 +0000 (19:05 +0000)]
Merge "testrunner/env.py - Run from any directory"

7 years agoMerge "Avoid JNI usage error when JNI_OnLoad throws"
Treehugger Robot [Mon, 10 Apr 2017 17:47:30 +0000 (17:47 +0000)]
Merge "Avoid JNI usage error when JNI_OnLoad throws"

7 years agoMIPS: Use Lsa/Dlsa when possible.
Chris Larsen [Fri, 31 Mar 2017 22:26:54 +0000 (15:26 -0700)]
MIPS: Use Lsa/Dlsa when possible.

For MIPS32R6 replace instances of "sll/addu" to calculate the
address of an item in an array with "lsa". For other versions of
MIPS32 use the "sll/addu" sequence. Encapsulate this logic in an
assembler method to eliminate having a lot of statements like
"if (IsR6()) { ... } else { ... }" scattered throughout the code.

MIPS64 always supports R6. This means that all instances of
"dsll/daddu" used to calculate the address of an item in an array
can be replaced by "dlsa" so there is no need to encapsulate
conditional logic in a special method. The code can just emit
"dlsa" directly.

Test: mma -j2 ART_TEST_OPTIMIZING=true test-art-target-run-test
Tested on MIPS32, and MIPS64 QEMU.
Test: "make test-art-target-gtest32" on CI20 board.
Test: "cd art; test/testrunner/testrunner.py --target --optimizing --32"
      on CI20 board.

Change-Id: Ibe5facc1bc2a6a7a6584e23d3a48e163ae38077d

7 years agoRemove some obsolete TODO comments.
Alex Light [Mon, 10 Apr 2017 17:10:10 +0000 (10:10 -0700)]
Remove some obsolete TODO comments.

Test: ./test.py --host -j40

Bug: 31455788
Change-Id: I66ebf053a8eb454a32905f5f5bd5be1fb1d2cc3c

7 years agotestrunner/env.py - Run from any directory
Igor Murashkin [Mon, 3 Apr 2017 21:33:22 +0000 (14:33 -0700)]
testrunner/env.py - Run from any directory

env.py will calculate ANDROID_BUILD_TOP relative to where its located,
if it wasn't already set.

This enables 'run_build_test_target' to successfully run even if
build/envsetup.sh was not run first.

(also rename env.py's members to have the private naming convention,
as they are not meant to be exposed to other modules)

Change-Id: I236c6005d56fa1a155c6eb104936e3e010a169de

7 years agoMerge "Fix dexdiag start end address"
David Sehr [Mon, 10 Apr 2017 16:02:32 +0000 (16:02 +0000)]
Merge "Fix dexdiag start end address"

7 years agoMerge changes from topic 'more_jvmti_run-test_refactor_java_side'
Treehugger Robot [Mon, 10 Apr 2017 15:55:39 +0000 (15:55 +0000)]
Merge changes from topic 'more_jvmti_run-test_refactor_java_side'

* changes:
  ART: More refactor for JVMTI run tests (3/3)
  ART: More refactor for JVMTI run tests (2/3)
  ART: More refactor for JVMTI run tests (1/3)
  ART: Add JVMTI test shim

7 years agoARM64: Support vectorization for double and long.
Artem Serov [Wed, 5 Apr 2017 10:31:19 +0000 (11:31 +0100)]
ARM64: Support vectorization for double and long.

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

7 years agoARM64: Support 128-bit registers for SIMD.
Artem Serov [Mon, 3 Apr 2017 17:47:32 +0000 (18:47 +0100)]
ARM64: Support 128-bit registers for SIMD.

Test: test-art-host, test-art-target

Change-Id: Ifb931a99d34ea77602a0e0781040ed092de9faaa

7 years agoAdd option for duplicate classes check to return all dupes.
Jeff Hao [Fri, 7 Apr 2017 23:28:12 +0000 (16:28 -0700)]
Add option for duplicate classes check to return all dupes.

When verbose oat is enabled, duplicate classes check will not stop at
the first duplicate found, outputting all duplicates found.
Can be enabled via: adb shell setprop dalvik.vm.extra-opts -verbose:oat

Test: mm test-art-host
Change-Id: If1cd55e2ad18fa4bb12d9237e18735ee0f89840b

7 years agoMerge "Change dump-classes profman option to dump-classes-and-methods"
Treehugger Robot [Sat, 8 Apr 2017 01:19:27 +0000 (01:19 +0000)]
Merge "Change dump-classes profman option to dump-classes-and-methods"

7 years agoMerge "Fixed missing context while detecting unit strides."
Treehugger Robot [Sat, 8 Apr 2017 00:46:55 +0000 (00:46 +0000)]
Merge "Fixed missing context while detecting unit strides."

7 years agoFix dexdiag start end address
David Sehr [Fri, 7 Apr 2017 23:56:46 +0000 (16:56 -0700)]
Fix dexdiag start end address

The end address was computed incorrectly due to a mix-up between pages
and addresses.

Bug: 35800981
Test: dexdiag -s `pid zygote`
Change-Id: I25d6c4b9a1e5395dc05b276111d9ec63c45951e0

7 years agoAvoid JNI usage error when JNI_OnLoad throws
Daniel Colascione [Fri, 24 Feb 2017 04:30:00 +0000 (20:30 -0800)]
Avoid JNI usage error when JNI_OnLoad throws

Test: included
Change-Id: I534de714fad2cfb9b53d66da11ade0e5142cb819

7 years agoMerge "Free unneeded obsolete maps"
Treehugger Robot [Fri, 7 Apr 2017 23:33:06 +0000 (23:33 +0000)]
Merge "Free unneeded obsolete maps"

7 years agoChange dump-classes profman option to dump-classes-and-methods
Mathieu Chartier [Thu, 6 Apr 2017 20:55:46 +0000 (13:55 -0700)]
Change dump-classes profman option to dump-classes-and-methods

The new option is called "--dump-classes-and-methods". This option
dumps methods and classes in the profile as a format that is valid
input for the "--create-profile-from" option.

The goal is to be able to store text based profiles that don't
depend on dex indices or checksums.

Test: mm test-art-host-gtest-profile_assistant_test -j40

Bug: 36457259
Bug: 34927277

(cherry picked from commit 09f6c36c0c5ac055bbb5e36991ab60156be1fb46)

Change-Id: I79c4bd8da5c0b4dc9c4c6daed538845792f52299

7 years agoFixed missing context while detecting unit strides.
Aart Bik [Fri, 7 Apr 2017 18:33:37 +0000 (11:33 -0700)]
Fixed missing context while detecting unit strides.

With regression test (found by fuzz testing).

Bug: 37033123
Test: test-art-target
Change-Id: Id738b2a3a353985c3d0bf3beeb581a31f1fcbc3f

7 years agoFree unneeded obsolete maps
Alex Light [Fri, 7 Apr 2017 17:38:06 +0000 (10:38 -0700)]
Free unneeded obsolete maps

In cases where there are no new obsolete methods we can get rid of the
obsolete maps arrays.

Bug: 31455788

Test: ./test.py --host -j40

Change-Id: I4a8cd96b4293439c6e67d9426011b92125cc7b03

7 years agoMerge "Update NativeBridge interface in ART test"
Treehugger Robot [Fri, 7 Apr 2017 21:46:14 +0000 (21:46 +0000)]
Merge "Update NativeBridge interface in ART test"

7 years agoART: More refactor for JVMTI run tests (3/3)
Andreas Gampe [Fri, 7 Apr 2017 16:36:06 +0000 (09:36 -0700)]
ART: More refactor for JVMTI run tests (3/3)

Add missing Main classes.

Bug: 32072923
Test: m test-art-host
Change-Id: I600dd5563e44604bd7b61c7d381f0a7d92db278a

7 years agoART: More refactor for JVMTI run tests (2/3)
Andreas Gampe [Fri, 7 Apr 2017 16:18:45 +0000 (09:18 -0700)]
ART: More refactor for JVMTI run tests (2/3)

Move refactored tests into their final places. Add a host java
library that includes those test files.

This is a follow-up to CL I740731c3af793521c5a859ef4a1f0ae94d2e1c19
and must be used together with it.

Bug: 32072923
Test: None
Change-Id: I20b6070eb6bdd4b7a0bf42046302bafa10eee54f

7 years agoART: More refactor for JVMTI run tests (1/3)
Andreas Gampe [Fri, 7 Apr 2017 16:00:04 +0000 (09:00 -0700)]
ART: More refactor for JVMTI run tests (1/3)

Put (most) tests into a new package and give them dedicated
class names (Test9XY).

NOTE: BROKEN WITHOUT A FOLLOW-UP CL TO CHANGE DIRECTORY STRUCTURE
      AND FILE NAMES!

Bug: 32072923
Test: None
Change-Id: I291b0543f7782914e446a74f0d9037020c88e5b5

7 years agoART: Add JVMTI test shim
Andreas Gampe [Fri, 7 Apr 2017 16:28:48 +0000 (09:28 -0700)]
ART: Add JVMTI test shim

Add shim to expose basic native binding methods.

Bug: 32072923
Test: m test-art-host
Change-Id: Ifcb9e3f66fce8002dd7d5ecb4de1729ab8939d0d

7 years agoMerge "MIPS64: Fix Math.ceil/floor intrinsics"
Treehugger Robot [Fri, 7 Apr 2017 15:01:50 +0000 (15:01 +0000)]
Merge "MIPS64: Fix Math.ceil/floor intrinsics"

7 years agoMerge "ARM64: Saves 128-bit regs state along SuspendCheckSlowPath."
Aart Bik [Fri, 7 Apr 2017 14:28:47 +0000 (14:28 +0000)]
Merge "ARM64: Saves 128-bit regs state along SuspendCheckSlowPath."

7 years agoMIPS64: Fix Math.ceil/floor intrinsics
Goran Jakovljevic [Fri, 7 Apr 2017 09:18:59 +0000 (11:18 +0200)]
MIPS64: Fix Math.ceil/floor intrinsics

The latest MIPS64R6 emulator supports NAN2008 standard. When
FCSR.NAN2008=1 (required from R6) ceil.l.d and floor.l.d instructions
will return -2^63 when the input value is smaller than -2^63. This
wasn't the case when FCSR.NAN2008=0. In that case, result from the
instructions was 2^63-1 when the input value was smaller than -2^63.

This fixes test 082-inline-execute.

Test: ./testrunner.py --target --optimizing --64 -j1 (in QEMU)

Change-Id: I3d2cdd1d55b3694549f88f4f5b903a0c4f1c0d09

7 years agoMerge "IWYU fixes for sigchainlib/sigchain.cc"
Treehugger Robot [Fri, 7 Apr 2017 01:01:26 +0000 (01:01 +0000)]
Merge "IWYU fixes for sigchainlib/sigchain.cc"

7 years agoMerge "ART: Report array and proxy classes in ClassLoad & ClassPrepare"
Treehugger Robot [Thu, 6 Apr 2017 21:59:45 +0000 (21:59 +0000)]
Merge "ART: Report array and proxy classes in ClassLoad & ClassPrepare"

7 years agoMerge "Force save profiles for SIGUSR1"
Mathieu Chartier [Thu, 6 Apr 2017 21:43:47 +0000 (21:43 +0000)]
Merge "Force save profiles for SIGUSR1"

7 years agoIWYU fixes for sigchainlib/sigchain.cc
Luis Hector Chavez [Thu, 6 Apr 2017 21:18:09 +0000 (14:18 -0700)]
IWYU fixes for sigchainlib/sigchain.cc

This change adds the necessary headers for std::initializer_list, errno,
and strerror.

Bug: None
Test: m
Change-Id: I9b97635f378a205604c75601cddd6f87883cdb4b

7 years agoMerge "Fixup JDWP for obsolete methods"
Treehugger Robot [Thu, 6 Apr 2017 20:50:25 +0000 (20:50 +0000)]
Merge "Fixup JDWP for obsolete methods"

7 years agoMerge "Fix a few comments in vectorization code that were incorrect or incomplete."
Treehugger Robot [Thu, 6 Apr 2017 18:53:56 +0000 (18:53 +0000)]
Merge "Fix a few comments in vectorization code that were incorrect or incomplete."

7 years agoART: Report array and proxy classes in ClassLoad & ClassPrepare
Andreas Gampe [Thu, 6 Apr 2017 15:03:32 +0000 (08:03 -0700)]
ART: Report array and proxy classes in ClassLoad & ClassPrepare

We need to report ClassLoad and ClassPrepare events when proxy
classes are created.

We also generate ClassLoad and ClassPrepare events to match the
VmObjectAlloc for arrays.

Bug: 31684920
Test: art/test.py --host -r -t 912
Change-Id: I66901a9d7ff8c1f60f075dfbdd3a28d00ab60bdc

7 years agoMerge "CHA: Don't return a non resolved class to the inliner."
Treehugger Robot [Thu, 6 Apr 2017 17:44:07 +0000 (17:44 +0000)]
Merge "CHA: Don't return a non resolved class to the inliner."

7 years agoFixup JDWP for obsolete methods
Alex Light [Thu, 6 Apr 2017 17:10:51 +0000 (10:10 -0700)]
Fixup JDWP for obsolete methods

We needed to implement some additional methods and behaviors in JDWP
in order to support JVMTI obsolete methods.

Test: Manual (using art/test/915-obsolete-2 & jdb debugger)
Test: Manual (using art/test/915-obsolete-2 & Android Studio/IntelliJ debugger)

Bug: 31455788

Change-Id: I20c2fa27a2dd002e37526b126f23ce552f19e623

7 years agoFix a few comments in vectorization code that were incorrect or incomplete.
Aart Bik [Thu, 6 Apr 2017 16:59:06 +0000 (09:59 -0700)]
Fix a few comments in vectorization code that were incorrect or incomplete.

Test: test-art-target
Change-Id: I7c6a5a2d29edd0b2782abc303d8d8cb09c1c2f91

7 years agoForce save profiles for SIGUSR1
Mathieu Chartier [Thu, 6 Apr 2017 00:23:54 +0000 (17:23 -0700)]
Force save profiles for SIGUSR1

Force save profiles from signal catcher for SIGUSR1. Saving the
profiles is expensive but we already do a GC which is also expensive
for this signal.

Test: adb shell ls -l /data/misc/profiles/cur/1000/system_server/
Test: adb shell kill -s SIGUSR1 `pid system_server`
Test: adb shell ls -l /data/misc/profiles/cur/1000/system_server/

Bug: 36457259
Bug: 34927277

(cherry picked from commit 8f23d97af3b10ae56fb16d63fd2932098dac45c0)

Change-Id: I810b66a7fe4b06efc7468d65ac737d74c5669abe

7 years agoARM64: Saves 128-bit regs state along SuspendCheckSlowPath.
Artem Serov [Tue, 4 Apr 2017 14:44:09 +0000 (15:44 +0100)]
ARM64: Saves 128-bit regs state along SuspendCheckSlowPath.

We need to save 128 bits of data (default ABI of ART runtime
only saves 64 bits). Note that this is *only* done for Q-registers
that are live, so overhead is not too big.

Test: test-art-target, test-art-host.
Change-Id: I1f018a708c316f9d426db13b2e3b3071aa4c999b

7 years agoMerge "Revert "Blacklist libcore tests relying on libjavacoretests.""
Nicolas Geoffray [Thu, 6 Apr 2017 15:11:17 +0000 (15:11 +0000)]
Merge "Revert "Blacklist libcore tests relying on libjavacoretests.""

7 years agoMerge "Testrunner: Fix output message"
Nicolas Geoffray [Thu, 6 Apr 2017 15:01:16 +0000 (15:01 +0000)]
Merge "Testrunner: Fix output message"

7 years agoMerge "Clean up after MIPS got read barriers support"
Treehugger Robot [Thu, 6 Apr 2017 11:42:56 +0000 (11:42 +0000)]
Merge "Clean up after MIPS got read barriers support"

7 years agoClean up after MIPS got read barriers support
Goran Jakovljevic [Wed, 5 Apr 2017 14:27:25 +0000 (16:27 +0200)]
Clean up after MIPS got read barriers support

This enables checker tests, as well as compiler_driver_test and
reflection_test for MIPS32 and MIPS64.

Test: mma test-art-host-gtest
Test: mma test-art-target-gtest in QEMU (MIPS64)
Test: ./testrunner.py --optimizing --target in QEMU (MIPS64)

Change-Id: Ic6fe5b17f7f2cd7e38e12fef25afccf9358b80e0

7 years agoMerge "Revert "Add dexdiag_test""
Treehugger Robot [Thu, 6 Apr 2017 07:05:37 +0000 (07:05 +0000)]
Merge "Revert "Add dexdiag_test""

7 years agoTestrunner: Fix output message
Goran Jakovljevic [Thu, 6 Apr 2017 05:47:59 +0000 (07:47 +0200)]
Testrunner: Fix output message

Test: ./testrunner.py --target -j1 --optimizing --timeout 1 -t 001

Change-Id: I5028b62ee333773dc2a6d2a0a374cef8d696e169

7 years agoRevert "Add dexdiag_test"
Andreas Gampe [Thu, 6 Apr 2017 05:37:08 +0000 (05:37 +0000)]
Revert "Add dexdiag_test"

Missing dependencies in test branches.

This reverts commit 146c3fac3a1e86b944d866e286551957c7513fd4.

Bug: 35800981
Change-Id: I6251b4b7132594a65f2f5faf48ed60eed96403af
Test: none

7 years agoMerge "Ensure environment is ready when populating loop."
Aart Bik [Thu, 6 Apr 2017 00:02:23 +0000 (00:02 +0000)]
Merge "Ensure environment is ready when populating loop."

7 years agoMerge "Check LocalInfo descriptor for nullptr in dexlayout."
Treehugger Robot [Wed, 5 Apr 2017 21:18:39 +0000 (21:18 +0000)]
Merge "Check LocalInfo descriptor for nullptr in dexlayout."

7 years agoMerge "Add dexdiag_test"
Treehugger Robot [Wed, 5 Apr 2017 20:41:10 +0000 (20:41 +0000)]
Merge "Add dexdiag_test"

7 years agoMerge "Implemented ABS vectorization."
Aart Bik [Wed, 5 Apr 2017 20:22:42 +0000 (20:22 +0000)]
Merge "Implemented ABS vectorization."

7 years agoCheck LocalInfo descriptor for nullptr in dexlayout.
Jeff Hao [Wed, 5 Apr 2017 16:29:43 +0000 (09:29 -0700)]
Check LocalInfo descriptor for nullptr in dexlayout.

Bug: 36966414
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: Iff289e4b877354d6ae7922a55ded961072aa0186

7 years agoMerge "Add test for kryo support."
Christopher Ferris [Wed, 5 Apr 2017 17:26:22 +0000 (17:26 +0000)]
Merge "Add test for kryo support."

7 years agoEnsure environment is ready when populating loop.
Aart Bik [Wed, 5 Apr 2017 17:03:15 +0000 (10:03 -0700)]
Ensure environment is ready when populating loop.

Rationale:
OSR requires the suspend check to already have an environment,
albeit just for testing irreducible loops. This CL fixes the
omission. Note, the error is spurious on OSR and writing a
unit or regression test for this is hard.

Test: test-art-host
Bug: 36950873
Change-Id: Ica89e18e10deb438dead79e2cc40dd00a60b529f

7 years agoImplemented ABS vectorization.
Aart Bik [Mon, 3 Apr 2017 21:35:41 +0000 (14:35 -0700)]
Implemented ABS vectorization.

Rationale:
This CL adds the concept of vectorizing intrinsics
to the ART vectorizer. More can follow (MIN, MAX, etc).

Test: test-art-host, test-art-target (angler)
Change-Id: Ieed8aa83ec64c1250ac0578570249cce338b5d36

7 years agoMerge "Sigchainlib: Add OWNERS file"
Treehugger Robot [Wed, 5 Apr 2017 16:11:51 +0000 (16:11 +0000)]
Merge "Sigchainlib: Add OWNERS file"

7 years agoAdd dexdiag_test
David Sehr [Tue, 4 Apr 2017 22:40:12 +0000 (15:40 -0700)]
Add dexdiag_test

Tests that dexdiag runs on the current process and returns with a
non-error status.

Bug: 35800981
Test: make test-art-target-gtest-dexdiag_test
Change-Id: I4254939307b035dfe2a83667ef6c853f710dde47

7 years agoSigchainlib: Add OWNERS file
Andreas Gampe [Wed, 5 Apr 2017 00:34:57 +0000 (17:34 -0700)]
Sigchainlib: Add OWNERS file

Test: m
Bug: 33166666
Change-Id: Ic4d695313e18adc31392cc1ab326a2ded0439d6d

7 years agoMerge "Ensure invoking obsolete methods throws errors."
Treehugger Robot [Tue, 4 Apr 2017 21:52:11 +0000 (21:52 +0000)]
Merge "Ensure invoking obsolete methods throws errors."

7 years agoMerge "ART: Fix preloaded dex cache expectations"
Treehugger Robot [Tue, 4 Apr 2017 18:54:04 +0000 (18:54 +0000)]
Merge "ART: Fix preloaded dex cache expectations"

7 years agoMerge "build: Add golem run_build_test_targets for go/ab"
Treehugger Robot [Tue, 4 Apr 2017 18:53:35 +0000 (18:53 +0000)]
Merge "build: Add golem run_build_test_targets for go/ab"

7 years agoEnsure invoking obsolete methods throws errors.
Alex Light [Mon, 3 Apr 2017 22:39:55 +0000 (15:39 -0700)]
Ensure invoking obsolete methods throws errors.

This sets the entrypoint for obsolete methods to a special stub that
will ensure that calling them results in an Error being thrown.
Previously we were allowing obsolete methods to be run if they could
reach the appropriate places in the runtime.

Getting into the state where this is possible is extremely difficult
since one can only get an jmethodID to an obsolete method by snatching
it off the stack (or by inspecting internal runtime data). From there
normally invoking it will do lookup on the receiver which will get you
the original version.

Bug: 36867251
Bug: 31455788

Test: ./test.py --host -j40
Test: (with aosp_marlin-userdebug device) ./test.py --target -j4

Change-Id: I2ca0503966a4e3de18dd89cb7ff224eba1459b49

7 years agoAdd test for kryo support.
Christopher Ferris [Wed, 29 Mar 2017 20:12:32 +0000 (13:12 -0700)]
Add test for kryo support.

Bug: 36728278

Test: Ran all art unit tests on host and against a sailfish set to use kryo.
Change-Id: If9a4c3d10b082610d38b28e77b6155e3f60a6f2b

7 years agoMerge "SIMD pcmpgtb,w,d,q for x86/x86_64"
Aart Bik [Tue, 4 Apr 2017 18:07:58 +0000 (18:07 +0000)]
Merge "SIMD pcmpgtb,w,d,q for x86/x86_64"
am: 7cd18fb5a7

Change-Id: I7e54ae1206be1dd8bc0f15b89a0567ca640cfabc

7 years agoMerge "SIMD pcmpgtb,w,d,q for x86/x86_64"
Treehugger Robot [Tue, 4 Apr 2017 17:59:09 +0000 (17:59 +0000)]
Merge "SIMD pcmpgtb,w,d,q for x86/x86_64"

7 years agoMerge "Add analyzer for dex memory map"
David Sehr [Tue, 4 Apr 2017 17:20:54 +0000 (17:20 +0000)]
Merge "Add analyzer for dex memory map"
am: 674bc3c984

Change-Id: Ica8f665892856bbf42cdb7b9ae425011fb374a3b

7 years agoMerge "Add analyzer for dex memory map"
Treehugger Robot [Tue, 4 Apr 2017 17:13:11 +0000 (17:13 +0000)]
Merge "Add analyzer for dex memory map"

7 years agoART: Fix preloaded dex cache expectations
Andreas Gampe [Tue, 4 Apr 2017 17:09:05 +0000 (10:09 -0700)]
ART: Fix preloaded dex cache expectations

In fallback mode, there may not be dex caches for all boot classpath
dex files - there is no guarantee that a class from every dex file
has been loaded.

Bug: 36033084
Test: m
Test: m test-art-host
Test: manual - fill the /data partition, reboot
Change-Id: I3752b48d9d61947959e8056bd01db0e323724d37

7 years agoSIMD pcmpgtb,w,d,q for x86/x86_64
Aart Bik [Mon, 3 Apr 2017 21:09:01 +0000 (14:09 -0700)]
SIMD pcmpgtb,w,d,q for x86/x86_64

Rationale:
Enables fast compare gt.

Test: assembler_x86[_64]_test
Change-Id: I0a069649480529f3fec2c2b100e2aaaa2cd79820

7 years agoAdd analyzer for dex memory map
David Sehr [Fri, 31 Mar 2017 00:50:24 +0000 (17:50 -0700)]
Add analyzer for dex memory map

Use libpagemap to process vdex pages that are resident in memory.
Walks over each vdex file mapping in a given pid, processing in one of
two ways.

Using the -s (summarize) option gives, e.g.:

MAPPING /system/framework/arm64/boot.vdex: 7e90133000-7e90641000
DEX classes.dex: 7e90133000-7e90608000
Section name                resident     total % of   % of
                               pages     pages sect.  total
Header                             0         0   0.00   0.00
AnnotationSetReferenceItem         0         0   0.00   0.00
StringId                           1        33   3.03   0.08
TypeId                             0         4   0.00   0.00
ProtoId                            1        21   4.76   0.08
FieldId                            0        25   0.00   0.00
MethodId                           2        69   2.90   0.16
ClassDef                           0        26   0.00   0.00
AnnotationSetItem                  0        13   0.00   0.00
CodeItem                           1       555   0.18   0.08
AnnotationsDirectoryItem           0        34   0.00   0.00
TypeList                           0        10   0.00   0.00
StringData                         2       174   1.15   0.16
DebugInfo                          0       175   0.00   0.00
AnnotationItem                     0        29   0.00   0.00
EncodedArrayItem                   0         3   0.00   0.00
ClassData                          0        59   0.00   0.00
GRAND TOTAL                        7      1230          0.57

Using the -v (verbose) option gives, e.g.:

MAPPING /system/framework/arm64/boot.vdex: 7e90133000-7e90641000
DEX classes.dex: 7e90133000-7e90608000
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
STTTTPPPPPPP.PPPPPPPPPPPPPPFFFFF
FFF.FFFF.F.F.FFFF...MMMMMMMMMMMM
MMMMMMMM.MM.....MMMMMMMMMMM..MMM
.M.MMM..MMMM.MMMMMMMMMMM.CCCCCCC
CCCCCCCCCCC.C.CCCCCC22.2........
.XX...XXX..XXXXXXX.............X
.XXXX......XXXXX..XXXX.XXXX..XXX
.............X..XX....X.XXXX....
..X....X...X..X..XXX.XXXXX.XXX.X
X.X.X..........X.X...........XXX
X...............................
.......X.....................XXX
..XX...XX.....X............XX.X.
.....XXXX......X.X..X...........
.XXXXXXX..XXXXXXXX..............
......XXXX...XX...XX..XXXX...X..
.......................X........
.......................X.XX..XX.
X...........X.X.X.X.............
X.....XXX..........XXXXX.XX.XX.X
XXXXX...........................
............X.................X.
X..............4....4...........
............4.tttttttttts...sss.
.ss.ss..s.ss.sssssss.sssssssssss
ssssssssssssssssssssssssssssssss
ssssssssssssssssssss.ss...ssss.s
ssssssssssssssssssssssssssssssss
ssssssssssssssssssssssssssssssss
sssssssss..DD.DD...DD...........
............D...................
................................
...................D.....DD.....
...........................D.D..
.D........................3...3.
......................EEE.c..ccc
.cc.ccc.c.c.....c.cc.ccc..c.....
.c...ccc.cc.ccc......

Where the letters indicate a page of a particular dex file section are
resident in memory and '.' indicates a page is not resident.

Bug: 35800981
Test: dexdiag <pid>
Change-Id: Ib4662fe499ad82d4f0baace2affab0d56f0890c9

7 years agoMerge "Allow -Xjitsaveprofilinginfo for system server"
Mathieu Chartier [Tue, 4 Apr 2017 03:20:05 +0000 (03:20 +0000)]
Merge "Allow -Xjitsaveprofilinginfo for system server"
am: 8682fce263

Change-Id: I01af28a95bb1722725131588ea2ecefa6bb4896d

7 years agoMerge "Allow -Xjitsaveprofilinginfo for system server"
Treehugger Robot [Tue, 4 Apr 2017 03:11:33 +0000 (03:11 +0000)]
Merge "Allow -Xjitsaveprofilinginfo for system server"

7 years agoAllow -Xjitsaveprofilinginfo for system server
Mathieu Chartier [Fri, 31 Mar 2017 21:49:09 +0000 (14:49 -0700)]
Allow -Xjitsaveprofilinginfo for system server

setenforce 0 is still required to prevent selinux violations.

Test: adb shell setprop dalvik.vm.extra-opts "'-Xusejit:false -Xint -Xjitsaveprofilinginfo'" && adb shell start

Bug: 34927277
Bug: 36457259

(cherry picked from commit 449f0589c8c8572e32c57befee089123e9eea1ba)

Change-Id: I644cefe8aebf9ff47dc736eda8143d2f6258c324