OSDN Git Service

android-x86/art.git
7 years agoMerge "Preserve verification invariant after compile-time verification."
Andreas Gampe [Wed, 25 Jan 2017 21:08:56 +0000 (21:08 +0000)]
Merge "Preserve verification invariant after compile-time verification."

7 years agoMerge "Temporarily disable tests 934 & 935 for interpreter and jit."
Alex Light [Wed, 25 Jan 2017 21:02:12 +0000 (21:02 +0000)]
Merge "Temporarily disable tests 934 & 935 for interpreter and jit."

7 years agoTemporarily disable tests 934 & 935 for interpreter and jit.
Alex Light [Wed, 25 Jan 2017 20:56:23 +0000 (12:56 -0800)]
Temporarily disable tests 934 & 935 for interpreter and jit.

These need some additional support from the ClassPreDefine event which
will be added shortly.

Test: mma -j40 test-art-host ART_TEST_INTERPRETER=true ART_TEST_JIT=true
Change-Id: Id60da22d96a9f6c9084fdf6bf810874284d5d2a8

7 years agoMerge "Implement class-pre-define time redefinition."
Treehugger Robot [Wed, 25 Jan 2017 19:33:37 +0000 (19:33 +0000)]
Merge "Implement class-pre-define time redefinition."

7 years agoImplement class-pre-define time redefinition.
Alex Light [Tue, 24 Jan 2017 23:32:25 +0000 (15:32 -0800)]
Implement class-pre-define time redefinition.

This allows one to redefine classes as they are being loaded without
restriction as to the types of transformations that may be included.
For example one is allowed to add additional methods or fields to the
class being defined.

Bug: 31684920
Test: mma -j40 test-art-host
Change-Id: I671ee13444c05f28424e727fd80d9d46c78ca287

7 years agoPreserve verification invariant after compile-time verification.
Nicolas Geoffray [Wed, 25 Jan 2017 16:18:54 +0000 (16:18 +0000)]
Preserve verification invariant after compile-time verification.

After the verification step of the compiler, all classes in the
dex file that are being compiled should be either erroneous,
verified, or verify at runtime.

vdex used to break that invariant by only setting the status of
verified classes.

bug: 34691602
bug: 34691854

test: 634-vdex-duplicate, which breaks for the newly added
      EnsureVerifiedOrVerifyAtRuntime check.

Change-Id: I67bd57880ed3238525f36fde484e36ca535ae5d5

7 years agoMerge "MethodHandles: Write tests for MethodHandle.asCollector."
Narayan Kamath [Wed, 25 Jan 2017 15:03:18 +0000 (15:03 +0000)]
Merge "MethodHandles: Write tests for MethodHandle.asCollector."

7 years agoMethodHandles: Write tests for MethodHandle.asCollector.
Narayan Kamath [Tue, 24 Jan 2017 19:16:25 +0000 (19:16 +0000)]
MethodHandles: Write tests for MethodHandle.asCollector.

Tracks libcore change 0e8de7372de378e00c429dbf9d55526d433a7a21.

Test: make test-art-host

Change-Id: I1d7e33f1cc11104b7b015afd7d49a48f2f2c5312

7 years agoMerge "MethodHandles: Support and tests for invokeWithArguments."
Narayan Kamath [Wed, 25 Jan 2017 10:45:30 +0000 (10:45 +0000)]
Merge "MethodHandles: Support and tests for invokeWithArguments."

7 years agoMerge "Rewrite retrieval of resolved classes."
Vladimir Marko [Wed, 25 Jan 2017 10:42:02 +0000 (10:42 +0000)]
Merge "Rewrite retrieval of resolved classes."

7 years agoMerge "Revert "OatFileAssistant: look at vdex file for IsDexOptNeeded""
Richard Uhler [Wed, 25 Jan 2017 08:47:45 +0000 (08:47 +0000)]
Merge "Revert "OatFileAssistant: look at vdex file for IsDexOptNeeded""

7 years agoMerge "Disable test 154 for GC stress"
Treehugger Robot [Wed, 25 Jan 2017 02:19:08 +0000 (02:19 +0000)]
Merge "Disable test 154 for GC stress"

7 years agoMerge "ART: Refactor TI events"
Treehugger Robot [Wed, 25 Jan 2017 00:58:31 +0000 (00:58 +0000)]
Merge "ART: Refactor TI events"

7 years agoDisable test 154 for GC stress
Mathieu Chartier [Tue, 24 Jan 2017 22:48:24 +0000 (14:48 -0800)]
Disable test 154 for GC stress

GC stress does too many GCs and may cause the test to fail.

Test: test-art-host -j32 ART_TEST_GC_STRESS=true ART_TEST_INTERPRETER=tru

Change-Id: I7a46d185b718a3faaa74dbc561506e4844b79032

7 years agoRevert "OatFileAssistant: look at vdex file for IsDexOptNeeded"
Andreas Gampe [Wed, 25 Jan 2017 00:16:27 +0000 (00:16 +0000)]
Revert "OatFileAssistant: look at vdex file for IsDexOptNeeded"

This reverts commit 402089a27b25a9d1112c49189eb83a567719188f.

Leads to crashes when vdex doesn't seem to contain dex files.

Bug: 34339100
Bug: 34685231
Change-Id: I57c3134892a190f792e196e6d7162285e74a64e4
Test: m test-art-host

7 years agoMerge "Enable PRODUCT_ART_USE_READ_BARRIER by default."
Hiroshi Yamauchi [Tue, 24 Jan 2017 23:49:43 +0000 (23:49 +0000)]
Merge "Enable PRODUCT_ART_USE_READ_BARRIER by default."

7 years agoART: Refactor TI events
Andreas Gampe [Tue, 24 Jan 2017 03:46:56 +0000 (19:46 -0800)]
ART: Refactor TI events

Refactor for type safety of event dispatch. Use template specialization
to ensure that only correct calls will work.

Bug: 31684920
Test: m test-art-host
Change-Id: Ifbb47447fb46dd6e799bc824a60df51b15b73618

7 years agoRewrite retrieval of resolved classes.
Vladimir Marko [Tue, 24 Jan 2017 18:06:55 +0000 (18:06 +0000)]
Rewrite retrieval of resolved classes.

Use ClassLinker::VisitClasses() instead of walking over dex
cache type arrays. The old technique relies on the dex cache
holding references to all resolved classes, an assumption
that we're going to break soon.

Test: m test-art-host-run-test-595-profile-saving
Bug: 30627598
Change-Id: Icae71f53b5a33ff931d83aa8d44cc182889f26da

7 years agoMerge "Add dexoptanalyzer tool"
Calin Juravle [Tue, 24 Jan 2017 22:14:10 +0000 (22:14 +0000)]
Merge "Add dexoptanalyzer tool"

7 years agoMerge "Temporarily increase heap min and max free"
Mathieu Chartier [Tue, 24 Jan 2017 21:44:15 +0000 (21:44 +0000)]
Merge "Temporarily increase heap min and max free"

7 years agoMerge "Fix typo in argument name."
Treehugger Robot [Tue, 24 Jan 2017 21:00:39 +0000 (21:00 +0000)]
Merge "Fix typo in argument name."

7 years agoTemporarily increase heap min and max free
Mathieu Chartier [Tue, 24 Jan 2017 17:40:56 +0000 (09:40 -0800)]
Temporarily increase heap min and max free

Make sure that GC doesn't run too often for TLAB ergonomics. Added a
regression test.

Bug: 34576638

Test: test-art-host

Change-Id: Ie07c7c470aaca044fea20b21cbe6bfe8667d082f

7 years agoAdd dexoptanalyzer tool
Calin Juravle [Sat, 14 Jan 2017 00:32:38 +0000 (16:32 -0800)]
Add dexoptanalyzer tool

dexoptanalyzer is a command line tool which analyzes whether or not a
given dex file needs to be dexopted. It is a wrapper around
OatFileAssistant::GetDexOptNeeded and its results have a mapping to
OatFileAssistant::DexOptNeeded.

This is needed for the management of secondary dex file. We need a way
to retrieve the DexOptNeeded status from installd outside system server.
We can't simply use the system server path (as we do for the main apks)
because system server can't access content writable by the apps.

Bug: 32871170
Test: m test-art-(host|target)
Change-Id: Ife1534560ca2658079d4a38a30bc8d94f35fe9c8

7 years agoEnable PRODUCT_ART_USE_READ_BARRIER by default.
Hiroshi Yamauchi [Tue, 24 Jan 2017 19:06:47 +0000 (11:06 -0800)]
Enable PRODUCT_ART_USE_READ_BARRIER by default.

Bug: 34084559
Bug: 34576638
Test: Boot gce_x86_phone on master
Change-Id: I4ccedf52b71f305792998262bcee4110a05df9cc

7 years agoMerge "run-test: ThreadSuspendTimeout only applies to ART."
Narayan Kamath [Tue, 24 Jan 2017 19:23:50 +0000 (19:23 +0000)]
Merge "run-test: ThreadSuspendTimeout only applies to ART."

7 years agoFix typo in argument name.
Alex Light [Tue, 24 Jan 2017 19:15:20 +0000 (11:15 -0800)]
Fix typo in argument name.

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

7 years agoMerge "Add class status for resolved erroneous classes."
Vladimir Marko [Tue, 24 Jan 2017 17:58:53 +0000 (17:58 +0000)]
Merge "Add class status for resolved erroneous classes."

7 years agorun-test: ThreadSuspendTimeout only applies to ART.
Narayan Kamath [Tue, 24 Jan 2017 17:40:47 +0000 (17:40 +0000)]
run-test: ThreadSuspendTimeout only applies to ART.

Test: art/test/run-test --jvm works
Test: art/test/run-test --host works
Change-Id: I58f10b6c7b19df0827e108d2da89d873582bafbe

7 years agoMethodHandles: Support and tests for invokeWithArguments.
Narayan Kamath [Thu, 19 Jan 2017 20:42:23 +0000 (20:42 +0000)]
MethodHandles: Support and tests for invokeWithArguments.

Tracks libcore change a8cf0bffdb9e9cf031efd0d3c8b5645d45963562.

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

7 years agoMerge "Revert "Redesign implementation of RegisterNativeAllocation.""
Richard Uhler [Tue, 24 Jan 2017 14:19:57 +0000 (14:19 +0000)]
Merge "Revert "Redesign implementation of RegisterNativeAllocation.""

7 years agoRevert "Redesign implementation of RegisterNativeAllocation."
Richard Uhler [Tue, 24 Jan 2017 14:17:05 +0000 (14:17 +0000)]
Revert "Redesign implementation of RegisterNativeAllocation."

This reverts commit 6bfc37d875b2556b3f1d95b00a785a09dc94ccb0.

Test failures in 004-NativeAllocations.

Bug: 29156652
Bug: 32576211

Change-Id: Ic54c67caf913024485a5c0621857d68a6fb710fa

7 years agoMerge "MethodHandles: Tests for asSpreader / spreadInvoker."
Narayan Kamath [Tue, 24 Jan 2017 13:10:03 +0000 (13:10 +0000)]
Merge "MethodHandles: Tests for asSpreader / spreadInvoker."

7 years agoMerge "Disable 912 for JIT."
Nicolas Geoffray [Tue, 24 Jan 2017 12:37:00 +0000 (12:37 +0000)]
Merge "Disable 912 for JIT."

7 years agoDisable 912 for JIT.
Nicolas Geoffray [Tue, 24 Jan 2017 12:35:48 +0000 (12:35 +0000)]
Disable 912 for JIT.

bug: 34655682
test: test-art-host
Change-Id: I80e51d2866dfb47fc725877356168d2c27255bf5

7 years agoAdd class status for resolved erroneous classes.
Vladimir Marko [Fri, 20 Jan 2017 19:32:50 +0000 (19:32 +0000)]
Add class status for resolved erroneous classes.

Split the old ambiguous status mirror::Class::kStatusError
into kStatusErrorUnresolved and kStatusErrorResolved. Once
a class has been resolved, IsResolved() shall return true
even if the class later becomes erroneous. Allow returning
erroneous class from ClassLinker::EnsureResolved() if it has
been previously resolved. This allows consistent behavior
for retrieving classes, immune to multi-threaded races and
multi-dex weirdness. It also allows JVMTI to properly report
"prepared" (i.e. resolved) classes that are also erroneous.

The new behavior is consistent with the RI.

Add regression tests to 008-exceptions for inconsistent
behavior for multi-dex retrieval of erroneous resolved class
(wrapping or not wrapping the old exception based on which
dex file is used for lookup) and for a CHECK(IsResolved())
crash in ClassLinker::LoadSuperAndInterfaces() (without any
tests for similar checks that could have previously failed
only due to extremely unlikely race conditions; these should
now also be fixed).

Inconsistency still remains for class verification as shown
by the new exceptionsForSuperClassInitFailure() test in
008-exceptions, where interpreter and Optimizing still
cause different exceptions to be thrown.

Note: This is partially changing behavior implemented for
bug 28787733. Since we allow the class loader to retrieve an
erroneous resolved class, the ExceptionInInitializerError is
not thrown at all from VMClassLoader_findLoadedClass(), so
there is nothing to wrap in ClassNotFoundException.

Test: m test-art-host
Bug: 30627598
Bug: 28787733
Change-Id: I86cdca00f35a0d6221d2559e3026ac0428a3613c

7 years agoMerge "Redesign implementation of RegisterNativeAllocation."
Treehugger Robot [Tue, 24 Jan 2017 11:49:30 +0000 (11:49 +0000)]
Merge "Redesign implementation of RegisterNativeAllocation."

7 years agoMerge "Allow multiple HX86ComputeBaseMethodAddress."
Nicolas Geoffray [Tue, 24 Jan 2017 08:55:14 +0000 (08:55 +0000)]
Merge "Allow multiple HX86ComputeBaseMethodAddress."

7 years agoMerge "ART: More rework of test 912"
Andreas Gampe [Tue, 24 Jan 2017 08:36:09 +0000 (08:36 +0000)]
Merge "ART: More rework of test 912"

7 years agoMerge "OatFileAssistant: look at vdex file for IsDexOptNeeded"
Treehugger Robot [Tue, 24 Jan 2017 08:29:09 +0000 (08:29 +0000)]
Merge "OatFileAssistant: look at vdex file for IsDexOptNeeded"

7 years agoART: More rework of test 912
Andreas Gampe [Tue, 24 Jan 2017 06:48:15 +0000 (22:48 -0800)]
ART: More rework of test 912

Ensure that the JIT finished compiling before enabling events.
Also run and join a thread before the test.

Bug: 31684920
Test: m ART_TEST_JIT=true ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT=true test-art-host-run-test-912-classes
Change-Id: I86ce3820923fb6d68a5cb2ccc971fca16fe5e35f

7 years agoMerge "ART: Change test 912 order"
Andreas Gampe [Tue, 24 Jan 2017 03:23:10 +0000 (03:23 +0000)]
Merge "ART: Change test 912 order"

7 years agoMerge "Add ClassPreDefine hook."
Treehugger Robot [Tue, 24 Jan 2017 01:29:31 +0000 (01:29 +0000)]
Merge "Add ClassPreDefine hook."

7 years agoART: Change test 912 order
Andreas Gampe [Tue, 24 Jan 2017 01:29:07 +0000 (17:29 -0800)]
ART: Change test 912 order

Enable events after setting up helpers to avoid internal load
order issues.

Bug: 31684920
Test: m ART_TEST_JIT=true ART_TEST_INTERPRETER=true ART_TEST_GC_STRESS=true test-art-host-run-test-912-classes
Change-Id: Ib744309d778591a337fe2434ad67926e8d12e997

7 years agoMerge "Add more code info size dumping to oatdump"
Mathieu Chartier [Tue, 24 Jan 2017 01:02:48 +0000 (01:02 +0000)]
Merge "Add more code info size dumping to oatdump"

7 years agoAdd more code info size dumping to oatdump
Mathieu Chartier [Wed, 18 Jan 2017 00:38:30 +0000 (16:38 -0800)]
Add more code info size dumping to oatdump

Helps break down where oat bytes are being used, example output on
a large app:

OAT FILE STATS:
Dumping cumulative use of 95784720 accounted bytes
Code                            = 68894196 (72% of total)
QuickMethodHeader               =  3071080 ( 3% of total)
CodeInfoEncoding                =  1226080 ( 1% of total)
CodeInfoLocationCatalog         =  1005716 ( 1% of total)
CodeInfoDexRegisterMap          =  5813389 ( 6% of total)
CodeInfoInlineInfo              =  2391251 ( 2% of total)
CodeInfoStackMap                = 13383008 (14% of total)
  StackMapNativePc              =  1607888 (12% of stack map)
  StackMapDexPcEncoding         =  1116724 ( 8% of stack map)
  StackMapDexRegisterMap        =  1277680 (10% of stack map)
  StackMapInlineInfo            =  1082720 ( 8% of stack map)
  StackMapRegisterMaskEncoding  =  5104960 (38% of stack map)
  StackMapMask                  =  3193034 (24% of stack map)
  StackMapOther                 =        0 ( 0% of stack map)

Test: test-art-host, oatdump

Bug: 34621054

Change-Id: I5daf0f1308d126b6a30928f523c6051585f1491f

7 years agoAdd ClassPreDefine hook.
Alex Light [Mon, 23 Jan 2017 22:25:17 +0000 (14:25 -0800)]
Add ClassPreDefine hook.

This hook is called prior to defining a class for the first time. It
allows callbacks to modify the dex-file used to load the class if they
wish. The event handler is responsible for ensuring that the returned
dex-file is set-up correctly.

Bug: 31684920
Test: mma -j40 test-art-host
Change-Id: Iaed79c1597913148ead795e033a0a10a4ebe6b2b

7 years agoMerge "ART: Add DataDumpRequest"
Treehugger Robot [Mon, 23 Jan 2017 22:15:08 +0000 (22:15 +0000)]
Merge "ART: Add DataDumpRequest"

7 years agoMerge "Add explicit monitor inflation run test."
Hans Boehm [Mon, 23 Jan 2017 22:12:58 +0000 (22:12 +0000)]
Merge "Add explicit monitor inflation run test."

7 years agoMerge "ART: Add class events"
Treehugger Robot [Mon, 23 Jan 2017 20:59:07 +0000 (20:59 +0000)]
Merge "ART: Add class events"

7 years agoAdd explicit monitor inflation run test.
Hans Boehm [Thu, 5 May 2016 01:35:57 +0000 (18:35 -0700)]
Add explicit monitor inflation run test.

This tests some of the same code as the monitor_pool_test
gtest. But it tests a larger pool size with the code needed to
invoke it from the Java level.  Larger pool sizes have gotten
more interesting with the new monitor pool layout.

Add a function to return the size of the current MonitorList.
Currently this is only used by this test, but it is likely to
have debugging or performance analysis uses as well.

Test: Passed on host and on angler.

Change-Id: I4f3f150044a0d8c800eb60635e074119598cfdd1

7 years agoART: Add DataDumpRequest
Andreas Gampe [Mon, 23 Jan 2017 16:50:04 +0000 (08:50 -0800)]
ART: Add DataDumpRequest

Add support for DataDumpRequest. Add test.

Bug: 31684920
Test: m test-art-host-run-test-933-misc-events
Change-Id: Ic54b644a87cd046bc646d9f7fe24c0192f562677

7 years agoART: Add class events
Andreas Gampe [Sat, 21 Jan 2017 01:37:50 +0000 (17:37 -0800)]
ART: Add class events

Add initial support for ClassLoad and ClassPrepare events. Add tests.

The initial implementation does not deal with the difference between
ClassLoad and ClassPrepare classes (the former may be temporary
classes).

Bug: 31684920
Test: m test-art-host-run-test-912-classes
Change-Id: I83535b9c871971f60b6b61f26651958fb32d502f

7 years agoMerge "[ART] Prepare streaming output of method tracing for developer use."
Shukang Zhou [Mon, 23 Jan 2017 18:35:16 +0000 (18:35 +0000)]
Merge "[ART] Prepare streaming output of method tracing for developer use."

7 years agoMerge "Fix some typos in ART."
Treehugger Robot [Mon, 23 Jan 2017 18:18:44 +0000 (18:18 +0000)]
Merge "Fix some typos in ART."

7 years agoMerge "ART: Add ThreadStart & ThreadEnd"
Treehugger Robot [Mon, 23 Jan 2017 18:08:00 +0000 (18:08 +0000)]
Merge "ART: Add ThreadStart & ThreadEnd"

7 years agoMerge "ART: Reference.getReferent intrinsic for arm and arm64"
Treehugger Robot [Mon, 23 Jan 2017 16:48:50 +0000 (16:48 +0000)]
Merge "ART: Reference.getReferent intrinsic for arm and arm64"

7 years agoAllow multiple HX86ComputeBaseMethodAddress.
Nicolas Geoffray [Sun, 22 Jan 2017 15:44:39 +0000 (15:44 +0000)]
Allow multiple HX86ComputeBaseMethodAddress.

So that even graphs with irreducible loops can use it
and avoid loading methods/classes/strings through KDexCacheViaMethod.

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

7 years agoFix some typos in ART.
Roland Levillain [Tue, 18 Oct 2016 17:03:43 +0000 (18:03 +0100)]
Fix some typos in ART.

Test: m build-art-host
Test: m cpplint-art
Change-Id: Ifc6ce3d0d645c4a8dca72dd483fc03fc05077130

7 years agoMerge "Fix inserting classes to initiating loader's class table."
Vladimir Marko [Mon, 23 Jan 2017 15:08:01 +0000 (15:08 +0000)]
Merge "Fix inserting classes to initiating loader's class table."

7 years agoART: Reference.getReferent intrinsic for arm and arm64
TatWai Chong [Wed, 2 Nov 2016 08:12:48 +0000 (16:12 +0800)]
ART: Reference.getReferent intrinsic for arm and arm64

Test: m test-art-host
Test: m test-art-target
Test: export ART_HEAP_POISONING=true; m test-art-host
Test: export ART_HEAP_POISONING=true; m test-art-target
Bug: 32535355
Change-Id: Ie63317689dd9e03a24e701c30411f8014970173a

7 years agoMerge "Allow multiple HArmDexCacheArrayBase."
Nicolas Geoffray [Mon, 23 Jan 2017 13:24:23 +0000 (13:24 +0000)]
Merge "Allow multiple HArmDexCacheArrayBase."

7 years agoOatFileAssistant: look at vdex file for IsDexOptNeeded
Richard Uhler [Wed, 18 Jan 2017 08:39:23 +0000 (08:39 +0000)]
OatFileAssistant: look at vdex file for IsDexOptNeeded

Even if the oat file cannot be opened, there may be a vdex file that
contains valid dex code. The oat file assistant should take this into
account when determining the dexopt status.

Bug: 34339100
Test: oat_file_assistant_test, with new tests added.
Test: install an app, dumpsys package to show app status,
      delete app's oat file, dumpsys package to show status as vdex only,
      cmd package compile -r install app, verify in log that input vdex fd is
      provided to dex2oat.

Change-Id: Iab43e617a899773b318d61adeb117ed2cec085da

7 years agoMerge "ART: Re-enable TI tests for target"
Nicolas Geoffray [Mon, 23 Jan 2017 13:13:35 +0000 (13:13 +0000)]
Merge "ART: Re-enable TI tests for target"

7 years agoMerge "MIPS64: Extend assembler_mips64_test"
Treehugger Robot [Mon, 23 Jan 2017 12:20:28 +0000 (12:20 +0000)]
Merge "MIPS64: Extend assembler_mips64_test"

7 years agoRedesign implementation of RegisterNativeAllocation.
Richard Uhler [Thu, 24 Nov 2016 11:21:41 +0000 (11:21 +0000)]
Redesign implementation of RegisterNativeAllocation.

Improve the performance and remove the issue with GCing apps to death when
they reach the growth_limit_.

This implements the REDESIGN approach described in detail in the
document at go/understanding-register-native-allocation.

Bug: 29156652
Bug: 32576211
Test: m test-art-host
Test: vogar libcore/luni/src/test/java/libcore/util/NativeAllocationRegistryTest.java
Test: Device boots.
Test: adb bugreport and look for "Registered native bytes allocated"

Change-Id: I09176b2b0e4f0c401fe1947830fa5271060f4e61

7 years agoAllow multiple HArmDexCacheArrayBase.
Nicolas Geoffray [Mon, 23 Jan 2017 09:03:12 +0000 (09:03 +0000)]
Allow multiple HArmDexCacheArrayBase.

So that even graphs with irreducible loops can use it
and avoid loading methods through KDexCacheViaMethod.

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

7 years agoMerge "Use higher default thread suspend timeout for run tests"
Treehugger Robot [Sun, 22 Jan 2017 23:33:19 +0000 (23:33 +0000)]
Merge "Use higher default thread suspend timeout for run tests"

7 years agoUse higher default thread suspend timeout for run tests
Mathieu Chartier [Sun, 22 Jan 2017 21:33:40 +0000 (13:33 -0800)]
Use higher default thread suspend timeout for run tests

Increase the default for tests from 10s-50s to 500s. This is done
by adding a run-test option "--suspend-timeout" that defaults to
500000.

Example when passing a low value of 100:
test/run-test --host --suspend-timeout 100 --dev 004-ThreadStress

Results in:
dalvikvm32 F 01-22 13:33:31 12067 12118 thread_list.cc:669] Timed
out waiting for threads to suspend, waited for 100.114ms

This should fix some of the recent test flakiness.

Test: test-art-host

Change-Id: I303c4f198e560e9f38ec375e9d7a80a5e61f776e

7 years agoART: Add ThreadStart & ThreadEnd
Andreas Gampe [Fri, 20 Jan 2017 20:34:15 +0000 (12:34 -0800)]
ART: Add ThreadStart & ThreadEnd

Add support for ThreadStart and ThreadEnd events. Add tests.

Bug: 31684920
Test: m test-art-host-run-test-924-threads
Change-Id: I516993402747ffdc9a7d66985b21b95c059be107

7 years agoART: Re-enable TI tests for target
Andreas Gampe [Sat, 21 Jan 2017 03:49:11 +0000 (19:49 -0800)]
ART: Re-enable TI tests for target

Fix invalid null handle for dlsym on arm32. Fix missing cast in
dispatch.

Remove the test black-list.

Bug: 31681198
Test: m test-art-target-run-test (bullhead)
Change-Id: I3edc68421933330b4361fb9e49d4e5ff4966a4ff

7 years ago[ART] Prepare streaming output of method tracing for developer use.
Shukang Zhou [Fri, 20 Jan 2017 19:40:16 +0000 (11:40 -0800)]
[ART] Prepare streaming output of method tracing for developer use.

Changes include:

* Flush the buffer to file when tracing ends, so every record is
  preserved.

* At the end of the streaming output, add what's the header when the
  output mode is not strreaming (called 'trace summary' in code).
  * A new special token (kOpTraceSummary) is added for this purpose.
  * The summary used to be written to a .sec file, which has
    permission issues with non-rooted devices.

* Update the streaming output converter (stream-trace-converter.py)
  to handle the updated format. When the trace summary is present,
  it is used to populate the output header, which provides more
  complete info than existing implementation where some info is
  inferred from the records.

The changes to trace.h/cc impact streaming output mode only.

The updated stream-trace-converter.py works with or without the
trace summary at the file end, so pulling the file in the middle
is still supported.

Bug: b/33300765

Test: m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host
I also tested manually: flashed a Nexus 6P, collected traces, and
parsed them in Studio.

Change-Id: I697d2ec09bed56033cfce9a8f27dc4710d8b0798

7 years agoMerge "ART: Refactor TI tests"
Treehugger Robot [Sat, 21 Jan 2017 01:34:30 +0000 (01:34 +0000)]
Merge "ART: Refactor TI tests"

7 years agoMerge "Compressed native PC for stack maps"
Mathieu Chartier [Sat, 21 Jan 2017 01:29:33 +0000 (01:29 +0000)]
Merge "Compressed native PC for stack maps"

7 years agoMerge "ARM64: Clean-up and extend the supported cpu_variant list."
Treehugger Robot [Sat, 21 Jan 2017 00:56:30 +0000 (00:56 +0000)]
Merge "ARM64: Clean-up and extend the supported cpu_variant list."

7 years agoCompressed native PC for stack maps
Mathieu Chartier [Thu, 19 Jan 2017 22:48:48 +0000 (14:48 -0800)]
Compressed native PC for stack maps

Compress native PC based on instruction alignment. This reduces the
size of stack maps, boot.oat is 0.4% smaller for arm64.

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

Change-Id: I2b70eecabda88b06fa80a85688fd992070d54278

7 years agoART: Refactor TI tests
Andreas Gampe [Fri, 20 Jan 2017 05:13:46 +0000 (21:13 -0800)]
ART: Refactor TI tests

Add a helper to explicitly bind native methods in a given class,
using dlsym to look up C functions in the local environment.

Add a callback helper that hooks VmInit and calls the above function
on the Main class. Use the callback helper before calling the test-
defined or shared minimal OnLoad function.

Add a binder helper that immediately binds the Main functions. Use
the helper before calling the test-defined OnAttach function.

Remove System.loadLibrary from tests. Instead rely on the explicit
binding.

In preparation for making the tests functional on device.

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

7 years agoMerge "ART: More valgrind suppressions"
Treehugger Robot [Fri, 20 Jan 2017 22:30:29 +0000 (22:30 +0000)]
Merge "ART: More valgrind suppressions"

7 years agoMerge "Use original dex file for retransformation."
Alex Light [Fri, 20 Jan 2017 22:06:09 +0000 (22:06 +0000)]
Merge "Use original dex file for retransformation."

7 years agoART: More valgrind suppressions
Andreas Gampe [Fri, 20 Jan 2017 19:38:37 +0000 (11:38 -0800)]
ART: More valgrind suppressions

Local host seems different from build bots.

Bug: 31684920
Test: m valgrind-test-art-host-gtest-runtime_callbacks_test
Change-Id: Ie662373e7779be1694b8d338b3ddf91b5fd25df1

7 years agoUse original dex file for retransformation.
Alex Light [Thu, 19 Jan 2017 22:57:28 +0000 (14:57 -0800)]
Use original dex file for retransformation.

The spec requires us to pass the dex file as it appeared before any
retransformation-capable agents had modified it to the
ClassFileLoadHooks when RetransformClasses is called. We do this by
saving the initial dex file bytes into the class as a byte[].

Bug: 32369916
Test: mma -j40 test-art-host

Change-Id: Ic6af3738cd2a831e91ba1144f502fa58b3c333e4

7 years agoMerge "Dexfuzz: Added --divergence-retry option."
Treehugger Robot [Fri, 20 Jan 2017 19:10:32 +0000 (19:10 +0000)]
Merge "Dexfuzz: Added --divergence-retry option."

7 years agoMerge "Revert "CHA for abstract methods.""
Colin Cross [Fri, 20 Jan 2017 18:34:32 +0000 (18:34 +0000)]
Merge "Revert "CHA for abstract methods.""

7 years agoRevert "CHA for abstract methods."
Colin Cross [Fri, 20 Jan 2017 17:37:02 +0000 (17:37 +0000)]
Revert "CHA for abstract methods."

This reverts commit ae6c189b9d63ca4c2ae0e952187819c5e442e3c9.

This is causing sporadic build failures with:
dex2oatd F 01-20 15:05:33 8343 10164 cha.cc:292] Check failed: method_in_super->HasSingleImplementation()

Change-Id: I4435ab028d3f7893e18b44347f294326c573a255

7 years agoFix inserting classes to initiating loader's class table.
Vladimir Marko [Wed, 18 Jan 2017 15:22:59 +0000 (15:22 +0000)]
Fix inserting classes to initiating loader's class table.

Fix two cases that were missed in
    https://android-review.googlesource.com/312285

First, copy all class references to app image class table,
including boot image classes where the class loader used for
AOT is only the initiating loader, not the defining loader.

Second, add array classes to the initiating loader's class
table.

Without these fixes, ClassLinker::LookupResolvedType() was
actually relying on the type being in the dex cache because
in some cases the slow path would not be able to find it.

Add a test for ClassLinker::LookupResolvedType() with an
array type and fix that function to avoid null pointer
dereference.

Test: m test-art-host
Bug: 30627598
Change-Id: I7cb14788700e6a22d16c364f8a35e2b6b3d954e4

7 years agoMerge "ART: Add GetClassVersionNumbers."
Treehugger Robot [Fri, 20 Jan 2017 17:06:30 +0000 (17:06 +0000)]
Merge "ART: Add GetClassVersionNumbers."

7 years agoMerge "ART: Add tests for TLS"
Treehugger Robot [Fri, 20 Jan 2017 17:05:23 +0000 (17:05 +0000)]
Merge "ART: Add tests for TLS"

7 years agoMerge changes I914dfac9,I33b1934a
Treehugger Robot [Fri, 20 Jan 2017 17:04:29 +0000 (17:04 +0000)]
Merge changes I914dfac9,I33b1934a

* changes:
  ART: Add phase events
  ART: Add GetPhase

7 years agoMerge "CHA for abstract methods."
Mingyao Yang [Fri, 20 Jan 2017 14:23:39 +0000 (14:23 +0000)]
Merge "CHA for abstract methods."

7 years agoDexfuzz: Added --divergence-retry option.
Branislav Rankov [Fri, 23 Dec 2016 16:19:09 +0000 (16:19 +0000)]
Dexfuzz: Added --divergence-retry option.

This option controls the number of retries done when checking for self-divergence.

Test: dexfuzz --inputs=seeds --execute --arm --optimizing --interpreter --repeat=100 --divergence-retry=20

Change-Id: I90e2705e40c6f23d47ddbb856828147c4f6a4157

7 years agoMethodHandles: Tests for asSpreader / spreadInvoker.
Narayan Kamath [Thu, 19 Jan 2017 20:42:23 +0000 (20:42 +0000)]
MethodHandles: Tests for asSpreader / spreadInvoker.

Tracks libcore change 337f641cc6e323c52a9e772cb2e499a515c2b533.

Test: make test-art-host

Change-Id: Iec5fa0f9366b0ef6f5cfcc6e22618e8ab8c1ed1a

7 years agoMerge "Fix polymorphic invokes (one more round)."
Treehugger Robot [Fri, 20 Jan 2017 10:57:28 +0000 (10:57 +0000)]
Merge "Fix polymorphic invokes (one more round)."

7 years agoMerge "vdex optimization: avoid doing application type resolution."
Nicolas Geoffray [Fri, 20 Jan 2017 10:29:59 +0000 (10:29 +0000)]
Merge "vdex optimization: avoid doing application type resolution."

7 years agoMIPS64: Extend assembler_mips64_test
Goran Jakovljevic [Fri, 20 Jan 2017 10:11:11 +0000 (11:11 +0100)]
MIPS64: Extend assembler_mips64_test

Add tests for several existing instructions.

Test: mma test-art-host-gtest-assembler_mips64_test

Change-Id: I1505dc0cf019de2afedc9648e3fd41e7fd051861

7 years agoMerge "ART: Add valgrind suppression"
Treehugger Robot [Fri, 20 Jan 2017 09:08:47 +0000 (09:08 +0000)]
Merge "ART: Add valgrind suppression"

7 years agoMerge "Do not use npic image for oat file assistant tests."
Treehugger Robot [Fri, 20 Jan 2017 08:47:51 +0000 (08:47 +0000)]
Merge "Do not use npic image for oat file assistant tests."

7 years agoART: Add GetClassVersionNumbers.
Andreas Gampe [Fri, 20 Jan 2017 06:04:46 +0000 (22:04 -0800)]
ART: Add GetClassVersionNumbers.

Add support for GetClassVersionNumbers. Return the dex file version
as major, zero as minor. Add test.

Bug: 31684578
Test: m test-art-host-run-test-912-classes
Change-Id: Ib5082cd58b27a9183d8f19d42d4d8af46a6bb9c9

7 years agoART: Add phase events
Andreas Gampe [Fri, 20 Jan 2017 05:59:22 +0000 (21:59 -0800)]
ART: Add phase events

Add VMStart, VMInit and VMDeath event support. Add removal of
jvmtiEnv from the event handler. Add and extend tests.

Bug: 31684920
Test: m test-art-host-901-hello-ti-agent
Change-Id: I914dfac98c2fb7b59efdfde69597a7fcd20fd486

7 years agoART: Add valgrind suppression
Andreas Gampe [Fri, 20 Jan 2017 07:30:41 +0000 (23:30 -0800)]
ART: Add valgrind suppression

Suppress libunwind/libbacktrace reading arbitrary memory. Triggered
by SIGQUIT behavior in runtime_callbacks_test.

Bug: 31684920
Test: m valgrind-test-art-host-gtest-runtime_callbacks_test
Change-Id: Ifba237027b5e029b0e4f98264bd5c9eafa243beb

7 years agoART: Add GetPhase
Andreas Gampe [Fri, 20 Jan 2017 03:45:30 +0000 (19:45 -0800)]
ART: Add GetPhase

Extend RuntimePhaseCallback. Add support for GetPhase.
Add tests.

Bug: 31455788
Test: m test-art-host-run-test-901-hello-ti-agent
Change-Id: I33b1934a0789bc713675f21c2c9f676c9d3a1ed1

7 years agoFix polymorphic invokes (one more round).
Alexey Frunze [Fri, 20 Jan 2017 03:07:37 +0000 (19:07 -0800)]
Fix polymorphic invokes (one more round).

memcpy() exhibits undefined behavior when the source and the
destination overlap. Use memmove() instead.

This fixes test failures when running the below tests on MIPS.

Test: booted MIPS32R2 in QEMU
Test: ./run-test --interpreter 953-invoke-polymorphic-compiler
Test: ./run-test --interpreter 955-methodhandles-smali
Test: ./run-test --interpreter 956-methodhandles
Test: ./run-test --interpreter 957-methodhandle-transforms
Test: ./run-test --interpreter 958-methodhandle-emulated-stackframe
Test: ./run-test --interpreter 959-invoke-polymorphic-accessors

Change-Id: Ia17ff25001faa7d91ce1178ab35313c36e75aa07