OSDN Git Service

android-x86/art.git
7 years agoAdd support for proguard deobfuscation.
Richard Uhler [Fri, 13 May 2016 21:19:37 +0000 (14:19 -0700)]
Add support for proguard deobfuscation.

Test: m ahat-test, with obfuscation of test-dump.hprof added.
Bug: 25812772
Change-Id: I0f257432da570aa146e6bb5c549f014aecc0c326

7 years agoMerge "Improve recognition of select-based period induction."
Treehugger Robot [Thu, 20 Oct 2016 22:50:12 +0000 (22:50 +0000)]
Merge "Improve recognition of select-based period induction."

7 years agoImprove recognition of select-based period induction.
Aart Bik [Tue, 18 Oct 2016 20:03:31 +0000 (13:03 -0700)]
Improve recognition of select-based period induction.

Rationale:
Similar to the previous CL, this helps to eliminate more dead induction.
Now, CaffeineLogic, when compiled with dx (rather than jack) improves
by a 1.5 speedup (9000us -> 6000us).

Note:
We need to run the simplifier before induction analysis to trigger
the select simplification first. Although a bit of a compile-time hit,
it seems a good idea to run a simplifier here again anyway.

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

7 years agoMerge "Test for the CC RegionSpace::WalkInternal crash."
Hiroshi Yamauchi [Thu, 20 Oct 2016 21:10:57 +0000 (21:10 +0000)]
Merge "Test for the CC RegionSpace::WalkInternal crash."

7 years agoMerge "Ensure that overrides work in presence of package-private methods."
Treehugger Robot [Thu, 20 Oct 2016 18:50:24 +0000 (18:50 +0000)]
Merge "Ensure that overrides work in presence of package-private methods."

7 years agoMerge "Disable 151-OpenFileLimit test."
Richard Uhler [Thu, 20 Oct 2016 14:57:15 +0000 (14:57 +0000)]
Merge "Disable 151-OpenFileLimit test."

7 years agoDisable 151-OpenFileLimit test.
Richard Uhler [Thu, 20 Oct 2016 14:41:21 +0000 (15:41 +0100)]
Disable 151-OpenFileLimit test.

Until we can track down all the crashes it leads to.

Bug: 32302133
Test: mma -j32 ART_TEST_JIT=true ART_TEST_INTERPRETER=true test-art-host-run-test-151-OpenFileLimit
Change-Id: I515a5175b4cefe49a8e270d354879050b1f616f9

7 years agoMerge changes I16f8b7ec,I075bbf55
Igor Murashkin [Thu, 20 Oct 2016 14:41:18 +0000 (14:41 +0000)]
Merge changes I16f8b7ec,I075bbf55

* changes:
  jni: Support @FastNative methods that return objects
  Revert "jni: Disable FastNative path for methods returning objects"

7 years agoMerge "Revert "Revert "Interpreter: Add support for direct handle invokes on methods."""
Narayan Kamath [Thu, 20 Oct 2016 14:39:10 +0000 (14:39 +0000)]
Merge "Revert "Revert "Interpreter: Add support for direct handle invokes on methods."""

7 years agoMerge "ARM: VIXL32: Pass initial ART tests with new code generator."
Roland Levillain [Thu, 20 Oct 2016 11:59:42 +0000 (11:59 +0000)]
Merge "ARM: VIXL32: Pass initial ART tests with new code generator."

7 years agoMerge "DexCache: Add support for updating MethodType references during GC."
Treehugger Robot [Thu, 20 Oct 2016 11:59:27 +0000 (11:59 +0000)]
Merge "DexCache: Add support for updating MethodType references during GC."

7 years agoMerge "Return error message if IndirectReferenceTable construction fails."
Treehugger Robot [Thu, 20 Oct 2016 11:45:05 +0000 (11:45 +0000)]
Merge "Return error message if IndirectReferenceTable construction fails."

7 years agoRevert "Revert "Interpreter: Add support for direct handle invokes on methods.""
Narayan Kamath [Thu, 20 Oct 2016 09:57:45 +0000 (10:57 +0100)]
Revert "Revert "Interpreter: Add support for direct handle invokes on methods.""

This reverts commit cfa61ad52077df66a448b84c360b12bc6f0e3f51.

Test flakiness in 956-methodhandles is fixed by
d08e39b6f02368aaa668b5aae6b6077b3eb44d9c.

Test: make test-art-host

Change-Id: I56e02e9a5bbc2b992cf746a92fd95ea77d32456c

7 years agoDexCache: Add support for updating MethodType references during GC.
Narayan Kamath [Wed, 19 Oct 2016 13:16:35 +0000 (14:16 +0100)]
DexCache: Add support for updating MethodType references during GC.

Fixes flakiness in 956-methodhandles

Test: make test-art-host
bug: 30550796
Change-Id: Ia5359390d59e65fc6efc16cc55c11bc65029104d

7 years agoMerge "Change pResolveString entrypoint to kSaveEverything."
Vladimir Marko [Thu, 20 Oct 2016 09:24:03 +0000 (09:24 +0000)]
Merge "Change pResolveString entrypoint to kSaveEverything."

7 years agoMerge "Build: Avoid using ppid to generate temporary directory name."
Narayan Kamath [Thu, 20 Oct 2016 07:49:22 +0000 (07:49 +0000)]
Merge "Build: Avoid using ppid to generate temporary directory name."

7 years agoMerge "ART: Harden dex-file verifier wrt/ LEB128"
Treehugger Robot [Thu, 20 Oct 2016 03:26:21 +0000 (03:26 +0000)]
Merge "ART: Harden dex-file verifier wrt/ LEB128"

7 years agoMerge "Persistent bitmap for region space"
Mathieu Chartier [Thu, 20 Oct 2016 00:25:39 +0000 (00:25 +0000)]
Merge "Persistent bitmap for region space"

7 years agoART: Harden dex-file verifier wrt/ LEB128
Andreas Gampe [Sat, 3 Sep 2016 01:12:00 +0000 (18:12 -0700)]
ART: Harden dex-file verifier wrt/ LEB128

Use out-of-bounds checks when decoding (U)LEB128.

Bug: 31252966
Test: m test-art-host
Change-Id: Id6dbbceb37c4d8d698e7685c61bf31912e3bf69e

7 years agoEnsure that overrides work in presence of package-private methods.
Alex Light [Tue, 18 Oct 2016 21:33:18 +0000 (14:33 -0700)]
Ensure that overrides work in presence of package-private methods.

It was possible that methods with the same signature & name of
package-private methods could fail to be correctly overridden causing
surprising behavior and DCHECK failures.

Bug: 32193118
Test: mma test-art-host
Test: ART_TEST_RUN_TEST_NDEBUG=true ART_TEST_RUN_TEST_NO_PREBUILD=true mma test-art-host-run-test-300-package-override
Change-Id: I8f53a830cd8d4210f60e9827e525c779a0696e04

7 years agoPersistent bitmap for region space
Mathieu Chartier [Fri, 7 Oct 2016 22:24:46 +0000 (15:24 -0700)]
Persistent bitmap for region space

Fix bug where region space was not safely walkable due to holes
in the unevac regions possibly having dangling class pointers.

No preformance change, RAM overhead 1.1-1.2% .Heap (non LOS).

Test: test-art-host
Test: https://android-review.googlesource.com/#/c/288907/

Bug: 31522820

Change-Id: Ic4f8b7175e117689cb1ce3e28b082cf63f1f7b5a

7 years agoMerge "Move most of class linker to ObjPtr"
Mathieu Chartier [Wed, 19 Oct 2016 19:35:54 +0000 (19:35 +0000)]
Merge "Move most of class linker to ObjPtr"

7 years agoMerge "Fix bug in dynamic BCE. With regression test."
Treehugger Robot [Wed, 19 Oct 2016 18:53:06 +0000 (18:53 +0000)]
Merge "Fix bug in dynamic BCE. With regression test."

7 years agojni: Support @FastNative methods that return objects
Igor Murashkin [Thu, 13 Oct 2016 00:44:50 +0000 (17:44 -0700)]
jni: Support @FastNative methods that return objects

Bug: 32088975
Change-Id: I16f8b7ec6b251812af60ab25f2153d9b72f37044

7 years agoRevert "jni: Disable FastNative path for methods returning objects"
Igor Murashkin [Thu, 13 Oct 2016 15:12:20 +0000 (15:12 +0000)]
Revert "jni: Disable FastNative path for methods returning objects"

This reverts commit 6f029d9cfae142f318e3986331b04695f3ea524a.

Change-Id: I075bbf55a07565118b8fa529a397bb42490e6e51

7 years agoFix bug in dynamic BCE. With regression test.
Aart Bik [Tue, 18 Oct 2016 18:35:22 +0000 (11:35 -0700)]
Fix bug in dynamic BCE. With regression test.

Rationale:
We implicitly assumed anything on a fixed offset to a suitable
candidate could be picked for codegen. Although this is usually
true, the scanner found an exception (on types). So, it is best
to make the test explicit. Note: some type implications are TBD.

Bug:32193474

Test: test-art-host and offending APKs
Change-Id: I664a2caa97a7f231509f8832b940dd72da11a372

7 years agoMove most of class linker to ObjPtr
Mathieu Chartier [Tue, 18 Oct 2016 23:27:40 +0000 (16:27 -0700)]
Move most of class linker to ObjPtr

Return values are still mirror pointer. Fix some failing asserts in
compiler driver and tests.

Bug: 31113334

Test: test-art-host

Change-Id: I4450bf9dfb2541749496b8388616e8aae8488919

7 years agoChange pResolveString entrypoint to kSaveEverything.
Vladimir Marko [Fri, 30 Sep 2016 13:50:51 +0000 (14:50 +0100)]
Change pResolveString entrypoint to kSaveEverything.

Test: Run ART test suite including gcstress on host and Nexus 9.
Test: Run ART test suite including gcstress with baker CC on host and Nexus 9.
Bug: 20323084
Change-Id: I63c21a7d3be8ff7a5765b5003c85b5317635efe6

7 years agoMerge "Delete unused blocked_register_pairs_ in code generators"
Mathieu Chartier [Wed, 19 Oct 2016 17:01:02 +0000 (17:01 +0000)]
Merge "Delete unused blocked_register_pairs_ in code generators"

7 years agoMerge "Remove mirror:: and ArtMethod deps in utils.{h,cc}"
David Sehr [Wed, 19 Oct 2016 16:18:50 +0000 (16:18 +0000)]
Merge "Remove mirror:: and ArtMethod deps in utils.{h,cc}"

7 years agoReturn error message if IndirectReferenceTable construction fails.
Richard Uhler [Tue, 11 Oct 2016 14:06:38 +0000 (15:06 +0100)]
Return error message if IndirectReferenceTable construction fails.

Previously if there was an error when constructing the
IndirectReferenceTable, the error message was lost. Now expose and
include the error message when throwing an exception related to
failures to construct the IndirectReferenceTable.

The error message is propagated through JVMEnvExt, JavaVMExt, and
Runtime::Init as well.

Bug: 32013594
Test: Added new 151-OpenFileLimit runtest.
Test: m test-art-host, m test-art-target

Change-Id: I3692f6928c9570358571bce634569d6f14cdeb05

7 years agoMerge "Revert "Interpreter: Add support for direct handle invokes on methods.""
Treehugger Robot [Wed, 19 Oct 2016 14:55:34 +0000 (14:55 +0000)]
Merge "Revert "Interpreter: Add support for direct handle invokes on methods.""

7 years agoBuild: Avoid using ppid to generate temporary directory name.
Narayan Kamath [Wed, 19 Oct 2016 10:05:04 +0000 (11:05 +0100)]
Build: Avoid using ppid to generate temporary directory name.

When TMPDIR is left unset, use the BSD checksum of
$(ANDROID_BUILD_TOP)-$(USER) instead of the PPID to construct a root
directory for all test runs. This workaround lets us run tests from
multiple repos at the same time, and will also avoid having to deal
with path length issues on the build bots.

This is a hacky workaround, but the only proper fix is stop using a
test runner built on top of make.

Bug: 32165422
Test: test-art-host

Change-Id: I61bc1eb3cf57d498f910573926d826a36020067a

7 years agoRevert "Interpreter: Add support for direct handle invokes on methods."
Narayan Kamath [Wed, 19 Oct 2016 13:21:59 +0000 (13:21 +0000)]
Revert "Interpreter: Add support for direct handle invokes on methods."

This reverts commit e5cd2cd7d0f8e1332f25edfd2798d84fec871f10.

Reverting due to flakiness in 956-methodhandles. Flakiness will be
fixed by 67f0929710a4489e3603383e57c9d236920654aa but might take time
to submit.

Change-Id: Ifdda5d3caca62d16d21cefaab7742fb2e8ca6969

7 years agoMerge "Remove libcore tests failures expectations for the concurrent collector."
Roland Levillain [Wed, 19 Oct 2016 12:19:03 +0000 (12:19 +0000)]
Merge "Remove libcore tests failures expectations for the concurrent collector."

7 years agoMerge "Fix string compression, add tests."
Treehugger Robot [Wed, 19 Oct 2016 11:32:59 +0000 (11:32 +0000)]
Merge "Fix string compression, add tests."

7 years agoMerge "Interpreter: Add support for direct handle invokes on methods."
Narayan Kamath [Wed, 19 Oct 2016 10:30:57 +0000 (10:30 +0000)]
Merge "Interpreter: Add support for direct handle invokes on methods."

7 years agoMerge "Blacklist test that has been flaky for days."
Treehugger Robot [Wed, 19 Oct 2016 10:04:50 +0000 (10:04 +0000)]
Merge "Blacklist test that has been flaky for days."

7 years agoFix string compression, add tests.
Vladimir Marko [Mon, 17 Oct 2016 13:45:29 +0000 (14:45 +0100)]
Fix string compression, add tests.

Fix String.compareTo() for interpreter; memcmp() does not
return the required result (only the right sign).
Fix x86-64 stub where the assembler silently accepted and
generated bad code for out-of-range JECXZ.
Add extensive tests for String.equals(), String.compareTo()
and String.indexOf().

Bug: 31040547
Test: Run ART test suite including interpreter tests on host and Nexus 9.
Test: Ditto with string compression enabled.
Change-Id: I21b7a74da8a577c8fbaf8d9225f048550236d414

7 years agoMerge "Release version 0.8 of ahat."
Treehugger Robot [Wed, 19 Oct 2016 09:29:36 +0000 (09:29 +0000)]
Merge "Release version 0.8 of ahat."

7 years agoBlacklist test that has been flaky for days.
Nicolas Geoffray [Wed, 19 Oct 2016 08:32:10 +0000 (09:32 +0100)]
Blacklist test that has been flaky for days.

Change-Id: Ic3f4a10568b03f02c2173fd18e7642bb9ae4e2b3

7 years agoMerge "ART: Remove IRT cruft"
Treehugger Robot [Wed, 19 Oct 2016 02:00:08 +0000 (02:00 +0000)]
Merge "ART: Remove IRT cruft"

7 years agoRemove mirror:: and ArtMethod deps in utils.{h,cc}
David Sehr [Thu, 13 Oct 2016 16:12:37 +0000 (09:12 -0700)]
Remove mirror:: and ArtMethod deps in utils.{h,cc}

The latest chapter in the ongoing saga of attempting to dump a DEX
file without having to start a whole runtime instance.  This episode
finds us removing references to ArtMethod/ArtField/mirror.

One aspect of this change that I would like to call out specfically
is that the utils versions of the "Pretty*" functions all were written
to accept nullptr as an argument.  I have split these functions up as
follows:
1) an instance method, such as PrettyClass that obviously requires
this != nullptr.
2) a static method, that behaves the same way as the util method, but
calls the instance method if p != nullptr.
This requires using a full class qualifier for the static methods,
which isn't exactly beautiful.  I have tried to remove as many cases
as possible where it was clear p != nullptr.

Bug: 22322814
Test: test-art-host
Change-Id: I21adee3614aa697aa580cd1b86b72d9206e1cb24

7 years agoDelete unused blocked_register_pairs_ in code generators
Mathieu Chartier [Tue, 18 Oct 2016 20:24:05 +0000 (13:24 -0700)]
Delete unused blocked_register_pairs_ in code generators

Legacy code for compatibility with quick?

Test: test-art-host CC
Change-Id: I9de261daea67dfd9bd3df89826ba9d10f135e29e

7 years agoMerge "Update the Begin() of LargeObjectMapSpace"
Mathieu Chartier [Tue, 18 Oct 2016 20:39:28 +0000 (20:39 +0000)]
Merge "Update the Begin() of LargeObjectMapSpace"

7 years agoRemove libcore tests failures expectations for the concurrent collector.
Roland Levillain [Tue, 18 Oct 2016 18:07:49 +0000 (19:07 +0100)]
Remove libcore tests failures expectations for the concurrent collector.

Test: art/tools/run-libcore-tests.sh --mode=host --variant=X32 --debug (with ART_USE_READ_BARRIER=true)
Bug: 12687968
Change-Id: I470f11d0bc6e38011c5b8f3797f2c0e9ec1e56cc

7 years agoMerge "Enable last value generation of periodic sequence."
Treehugger Robot [Tue, 18 Oct 2016 18:02:37 +0000 (18:02 +0000)]
Merge "Enable last value generation of periodic sequence."

7 years agoMerge "Move art/native to ObjPtr"
Mathieu Chartier [Tue, 18 Oct 2016 17:40:52 +0000 (17:40 +0000)]
Merge "Move art/native to ObjPtr"

7 years agoMerge "More store/allocation elimination for singletons in case of loops"
Mingyao Yang [Tue, 18 Oct 2016 17:32:46 +0000 (17:32 +0000)]
Merge "More store/allocation elimination for singletons in case of loops"

7 years agoMerge changes If0d5eeeb,Id927f2b5
Treehugger Robot [Tue, 18 Oct 2016 17:32:14 +0000 (17:32 +0000)]
Merge changes If0d5eeeb,Id927f2b5

* changes:
  ART: Fix and extend test 904
  ART: Better handle multiple event enables

7 years agoMerge "ART: Expect a null self in SetEntrypointsInstrumented"
Andreas Gampe [Tue, 18 Oct 2016 17:13:02 +0000 (17:13 +0000)]
Merge "ART: Expect a null self in SetEntrypointsInstrumented"

7 years agoART: Expect a null self in SetEntrypointsInstrumented
Andreas Gampe [Tue, 18 Oct 2016 17:03:42 +0000 (10:03 -0700)]
ART: Expect a null self in SetEntrypointsInstrumented

Follow-up to commit 157c77eb9a5d6a7fe6ebcc29afa7f1913a877c87.

Bug: 31684277
Test: m ART_TEST_GC_STRESS=true test-art-host
Change-Id: I9de848ea6a9484798b75a594f3e390ef27394743

7 years agoInterpreter: Add support for direct handle invokes on methods.
Narayan Kamath [Fri, 14 Oct 2016 17:49:12 +0000 (18:49 +0100)]
Interpreter: Add support for direct handle invokes on methods.

Constructors are still not supported and will be implemented in a
follow up change.

Also adds a new run-test that compiles from source using an alpha
version of Jack.

Test: make test-art-host
bug: 30550796
Change-Id: I3212c032a5885854f691156c29f12613e5194667

7 years agoEnable last value generation of periodic sequence.
Aart Bik [Fri, 14 Oct 2016 16:49:42 +0000 (09:49 -0700)]
Enable last value generation of periodic sequence.

Rationale:
This helps to eliminate more dead induction. For example,
CaffeineLogic when compiled with latest Jack improves with
a 1.3 speedup (2900us -> 2200us) due to eliminating first
loop (second loop can be removed also, but for a later
case). The currently benchmarks.dex has a different construct
for the periodics, however, still to be recognized.

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

7 years agoRelease version 0.8 of ahat.
Richard Uhler [Tue, 18 Oct 2016 15:26:50 +0000 (16:26 +0100)]
Release version 0.8 of ahat.

Test: m ahat-test
Change-Id: I964f86fc66f901bff7ddeda81dd42a6e658fda9d

7 years agoART: Fix and extend test 904
Andreas Gampe [Tue, 18 Oct 2016 01:05:19 +0000 (18:05 -0700)]
ART: Fix and extend test 904

Fix using the wrong thread when unregistering. The inner thread
should not use Thread.currentThread (copy-n-paste mistake).

Add test for registering in OnLoad.

Add test for keeping registered on exit.

Bug: 31684277
Bug: 31684920
Test: m test-art-host-run-test-904-object-allocation
Change-Id: If0d5eeeb864684ab42eeaf62698d1e639f2071d6

7 years agoMerge changes I7061c450,Ie8f8f24b,Ia6cee2cb
Andreas Gampe [Tue, 18 Oct 2016 15:15:56 +0000 (15:15 +0000)]
Merge changes I7061c450,Ie8f8f24b,Ia6cee2cb

* changes:
  ART: Do not free allocation listener in heap destructor
  ART: Fix allocation entrypoint instrumentation
  ART: Fix lock order issue in allocation tracking

7 years agoMerge "Revert "Revert "Revert "Temporarily blacklist 955-method-handles-smali.""""
Narayan Kamath [Tue, 18 Oct 2016 09:49:15 +0000 (09:49 +0000)]
Merge "Revert "Revert "Revert "Temporarily blacklist 955-method-handles-smali.""""

7 years agoMerge "Fix handling of dex cache arrays for method types."
Narayan Kamath [Tue, 18 Oct 2016 09:23:04 +0000 (09:23 +0000)]
Merge "Fix handling of dex cache arrays for method types."

7 years agoUpdate the Begin() of LargeObjectMapSpace
tony.ys_liu [Mon, 17 Oct 2016 03:18:09 +0000 (11:18 +0800)]
Update the Begin() of LargeObjectMapSpace

Root cause:
  LargeObjectMapSpace's begin_ is initialized by nullptr.
  so, it's always 0 after std::min

Solution:
  Consider the nullptr case when update begin_

Notes:
  Remove the nullptr check for end_ since it's not needed

Test: make test-art-host-gtest-large_object_space_test

Change-Id: I9918c30916e5d359f0ab23ec2bdb0fc9f093a85f

7 years agoART: Remove IRT cruft
Andreas Gampe [Tue, 18 Oct 2016 03:12:52 +0000 (20:12 -0700)]
ART: Remove IRT cruft

Remove dead code for initial vs maximum table size.

Bug: 32125344
Test: m test-art-host
Change-Id: Ie5806da7f5f3238483da918deca5982f01764466

7 years agoART: Better handle multiple event enables
Andreas Gampe [Tue, 18 Oct 2016 00:49:59 +0000 (17:49 -0700)]
ART: Better handle multiple event enables

Only do extra work like allocation listener registration when the
global state changes.

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

7 years agoART: Do not free allocation listener in heap destructor
Andreas Gampe [Tue, 18 Oct 2016 00:46:15 +0000 (17:46 -0700)]
ART: Do not free allocation listener in heap destructor

Do not deallocate on exit. Libraries are freed only after the heap
has already been destroyed.

Bug: 31684277
Bug: 31684920
Test: m test-art-host
Change-Id: I7061c4500a9ad314e2c00d7d722bb3372dff4810

7 years agoART: Fix allocation entrypoint instrumentation
Andreas Gampe [Tue, 18 Oct 2016 00:44:41 +0000 (17:44 -0700)]
ART: Fix allocation entrypoint instrumentation

Fix the unstarted-runtime case. Special-case the reset call to
the current thread, only.

Bug: 31684277
Test: m test-art-host
Change-Id: Ie8f8f24b2a6041344266a4e6b6bf8ddd9a0352a5

7 years agoART: Fix lock order issue in allocation tracking
Andreas Gampe [Tue, 18 Oct 2016 00:40:27 +0000 (17:40 -0700)]
ART: Fix lock order issue in allocation tracking

(Un)instrumenting requires the instrumenting lock, which must be
acquired before the mutator lock. As the plugin can be called both
with and without the lock held, be careful. For simplicity, acquire
the lock (potentially) and immediately suspend.

Bug: 31684277
Test: m test-art-host
Change-Id: Ia6cee2cbe90f13f5543bdfea815d469b28a0f8f4

7 years agoMove art/native to ObjPtr
Mathieu Chartier [Mon, 17 Oct 2016 22:46:31 +0000 (15:46 -0700)]
Move art/native to ObjPtr

Bug: 31113334

Test: test-art-host

Change-Id: I67eb89cf042c762c6dcd5eb8b008b9a28e9b3319

7 years agoMerge "event interface going private"
Treehugger Robot [Mon, 17 Oct 2016 23:08:41 +0000 (23:08 +0000)]
Merge "event interface going private"

7 years agoMerge "Remove logging dependency on runtime"
Treehugger Robot [Mon, 17 Oct 2016 22:47:01 +0000 (22:47 +0000)]
Merge "Remove logging dependency on runtime"

7 years agoMerge "Fix invoke-virtual not throwing ICCE in some cases"
Treehugger Robot [Mon, 17 Oct 2016 21:56:12 +0000 (21:56 +0000)]
Merge "Fix invoke-virtual not throwing ICCE in some cases"

7 years agoevent interface going private
Mark Salyzyn [Mon, 17 Oct 2016 21:11:20 +0000 (14:11 -0700)]
event interface going private

Test: compile
Bug: 30465923
Change-Id: I704e0e6ae886207a9625fcb59be4876307d21e5f

7 years agoRemove logging dependency on runtime
David Sehr [Mon, 17 Oct 2016 17:09:33 +0000 (10:09 -0700)]
Remove logging dependency on runtime

Moved the abort backtracing function to runtime, forcing callers to
supply the aborter at InitLogging.  This makes runtime properly layer
on top of logging by removing the cyclic dependency.

Bug: 22322814
Test: test-art-host
Change-Id: I8b2e72174e937bb88fe1bddd6d04b564cfb011a9

7 years agoMerge "Move most mirror:: args to ObjPtr"
Mathieu Chartier [Mon, 17 Oct 2016 20:29:37 +0000 (20:29 +0000)]
Merge "Move most mirror:: args to ObjPtr"

7 years agoFix invoke-virtual not throwing ICCE in some cases
Alex Light [Mon, 17 Oct 2016 20:02:39 +0000 (13:02 -0700)]
Fix invoke-virtual not throwing ICCE in some cases

Due to an oversight invoke-virtual on an interface method would
not cause an ICCE to be thrown if the target method is default. This
could potentially cause incorrect methods to be called at runtime.

Bug: 32201623
Test: mma test-art-host-run-test-978-virtual-interface
Change-Id: Ie565cf2fbe8602b17be0fb051e21d221a17b518f

7 years agoMore store/allocation elimination for singletons in case of loops
Mingyao Yang [Fri, 14 Oct 2016 23:26:08 +0000 (16:26 -0700)]
More store/allocation elimination for singletons in case of loops

For a store into a singleton's location, if it happens inside a loop, it
means the singleton's location value may be killed by loop side effects.
However if the singleton is defined inside that loop, that loop should
be skipped since its loop side effects kill values at loop header where
the singleton's location doesn't exist yet.

Test: test-art-host

Bug: 31716107
Change-Id: Iae2494ea93295977f90d1463ee136a7e2e09ba9b

7 years agoMove most mirror:: args to ObjPtr
Mathieu Chartier [Sat, 15 Oct 2016 01:43:19 +0000 (18:43 -0700)]
Move most mirror:: args to ObjPtr

Fixed possible moving GC bugs in ClinitImageUpdate class.

Bug: 31113334

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

7 years agoMerge "Use FdFile::Copy() in dex2oat for better error checking."
Vladimir Marko [Mon, 17 Oct 2016 16:43:30 +0000 (16:43 +0000)]
Merge "Use FdFile::Copy() in dex2oat for better error checking."

7 years agoRevert "Revert "Revert "Temporarily blacklist 955-method-handles-smali."""
Narayan Kamath [Mon, 17 Oct 2016 15:13:46 +0000 (16:13 +0100)]
Revert "Revert "Revert "Temporarily blacklist 955-method-handles-smali."""

This reverts commit 5665f6a561262b78d85afc975eca5a3138f4efa2.

Test failures were fixed in d4fd5b1ec3bea01ad6985b7fe19a0f80b5fc970b.

Test: make test-art-host.

Change-Id: I45901836a92336ed1a337cdbf3fa9a0181c3d975

7 years agoFix handling of dex cache arrays for method types.
Narayan Kamath [Fri, 14 Oct 2016 17:49:12 +0000 (18:49 +0100)]
Fix handling of dex cache arrays for method types.

- Add support for relocating method type dex cache arrays.
- Add missing call to MethodTypeDexCachePair::Initialize in the
  class_linker.
- Fix alignment calculation for method_types in
  DexCacheArraysLayout.
- Removed unused MethodTypeOffset(uint32_t) method.

Fixes tests with --pic.

Test: make test-art-host
Bug: 30550796

Change-Id: I2bba7228762b9e9834e7659fe62090be78afdfa8

7 years agoMerge "Ensure OpenDexFilesFromImage closes file to prevent file descriptor leak"
Brian Carlstrom [Mon, 17 Oct 2016 15:18:09 +0000 (15:18 +0000)]
Merge "Ensure OpenDexFilesFromImage closes file to prevent file descriptor leak"

7 years agoMerge "Add DCHECK() for class loader in artResolveStringFromCode()."
Vladimir Marko [Mon, 17 Oct 2016 15:08:21 +0000 (15:08 +0000)]
Merge "Add DCHECK() for class loader in artResolveStringFromCode()."

7 years agoUse FdFile::Copy() in dex2oat for better error checking.
Vladimir Marko [Mon, 17 Oct 2016 14:25:10 +0000 (15:25 +0100)]
Use FdFile::Copy() in dex2oat for better error checking.

Previously, read errors would have been silently ignored
and write errors would ungracefully crash.

Also improves performance on Linux, including Android,
by using sendfile(). (We still keep Mac builds around.)

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

7 years agoARM: VIXL32: Pass initial ART tests with new code generator.
Scott Wakeling [Mon, 17 Oct 2016 09:03:36 +0000 (10:03 +0100)]
ARM: VIXL32: Pass initial ART tests with new code generator.

- Implement enough codegen to pass ~70 art/tests.

- When ART_USE_VIXL_ARM_BACKEND is defined:
  - Blacklist known-to-fail target tests
  - interpret-only everything except the tests themselves
  - Set a flag to use the VIXL based ARM backend

Test: export ART_USE_VIXL_ARM_BACKEND=true && mma test-art-target && mma test-art-host

Change-Id: Ic8bc095e8449f10f97fa0511284790f36c20e276

7 years agoMerge "Do not write empty class table and intern table to image."
Vladimir Marko [Mon, 17 Oct 2016 12:27:55 +0000 (12:27 +0000)]
Merge "Do not write empty class table and intern table to image."

7 years agoMerge "ART: Blacklist test 907 for target"
Treehugger Robot [Sat, 15 Oct 2016 04:06:52 +0000 (04:06 +0000)]
Merge "ART: Blacklist test 907 for target"

7 years agoART: Blacklist test 907 for target
Andreas Gampe [Sat, 15 Oct 2016 02:05:06 +0000 (19:05 -0700)]
ART: Blacklist test 907 for target

Bug: 31684578
Test: m test-art-host
Change-Id: If2353bef8601ba16941a7b1df2befc215b493431

7 years agoMerge changes If95ecaf4,Ifb33cae2
Treehugger Robot [Sat, 15 Oct 2016 02:02:37 +0000 (02:02 +0000)]
Merge changes If95ecaf4,Ifb33cae2

* changes:
  ART: Temporarily use global references for GetLoadedClasses
  ART: Add GetLoadedClasses support

7 years agoMerge "ART: Make JNI global and weak global locks global"
Treehugger Robot [Sat, 15 Oct 2016 01:08:46 +0000 (01:08 +0000)]
Merge "ART: Make JNI global and weak global locks global"

7 years agoEnsure OpenDexFilesFromImage closes file to prevent file descriptor leak
Brian Carlstrom [Fri, 14 Oct 2016 08:04:26 +0000 (01:04 -0700)]
Ensure OpenDexFilesFromImage closes file to prevent file descriptor leak

(cherry picked from commit 645e477c2ce7a59ac98bc86463826cf082a13ad8)

Test: m -j32 test-art-host
Bug: 32095919
Change-Id: I44541edeb403a508e1b9794ee09fb1f55e3f42bf

7 years agoMerge "Move reference processor and mirror::Reference to ObjPtr"
Mathieu Chartier [Fri, 14 Oct 2016 23:40:46 +0000 (23:40 +0000)]
Merge "Move reference processor and mirror::Reference to ObjPtr"

7 years agoART: Temporarily use global references for GetLoadedClasses
Andreas Gampe [Fri, 14 Oct 2016 20:30:56 +0000 (13:30 -0700)]
ART: Temporarily use global references for GetLoadedClasses

Until we have enough local references, use global references.

Bug: 31684578
Bug: 32125344
Test: m test-art-host
Change-Id: If95ecaf424cfc7e8a84c7f99b071ac5d6bfb7797

7 years agoART: Add GetLoadedClasses support
Andreas Gampe [Wed, 12 Oct 2016 19:51:25 +0000 (12:51 -0700)]
ART: Add GetLoadedClasses support

Add support to retrieve all loaded classes. Use the standard
ClassLoader callback infrastructure.

Bug: 31684578
Test: m test-art-host-run-test-907-get-loaded-classes
Change-Id: Ifb33cae27dc32602bcd8fd930d3c7eda02598c26

7 years agoART: Make JNI global and weak global locks global
Andreas Gampe [Fri, 14 Oct 2016 20:27:12 +0000 (13:27 -0700)]
ART: Make JNI global and weak global locks global

Add them to Locks. Give the JNI global table lock
a lock level, close to the weak global JNI references.

Bug: 31684578
Test: m test-art-host
Change-Id: I3857a3b0be69b16811d9999096b2c42e7a25d227

7 years agoMerge "Add a mark bit check in the read barrier jni entrypoint."
Hiroshi Yamauchi [Fri, 14 Oct 2016 21:46:31 +0000 (21:46 +0000)]
Merge "Add a mark bit check in the read barrier jni entrypoint."

7 years agoMove reference processor and mirror::Reference to ObjPtr
Mathieu Chartier [Fri, 14 Oct 2016 21:28:47 +0000 (14:28 -0700)]
Move reference processor and mirror::Reference to ObjPtr

Bug: 31113334

Test: test-art-host

Change-Id: I2c7c3dfd88ebf12a0de271436f8a7781f997e061

7 years agoAdd a mark bit check in the read barrier jni entrypoint.
Hiroshi Yamauchi [Fri, 14 Oct 2016 18:21:38 +0000 (11:21 -0700)]
Add a mark bit check in the read barrier jni entrypoint.

Bug: 30437917
Bug: 12687968
Test: test-art host/N9, N9 libartd boot, Ritz EAAC.
Change-Id: Ic5f8080959f243e80f00da73ba5f4b91a8d8b617

7 years agoMerge "Move mirror::ObjectArray to ObjPtr"
Mathieu Chartier [Fri, 14 Oct 2016 16:54:05 +0000 (16:54 +0000)]
Merge "Move mirror::ObjectArray to ObjPtr"

7 years agoAdd DCHECK() for class loader in artResolveStringFromCode().
Vladimir Marko [Fri, 14 Oct 2016 15:28:52 +0000 (16:28 +0100)]
Add DCHECK() for class loader in artResolveStringFromCode().

Address late comment from
    https://android-review.googlesource.com/281642

Test: m test-art-host
Bug: 20323084
Bug: 30627598
Change-Id: I3ba2617d2bc52ac8ba11307d206e6f5e6c017fb7

7 years agoMerge "Revert "Revert "Temporarily blacklist 955-method-handles-smali."""
Narayan Kamath [Fri, 14 Oct 2016 14:29:03 +0000 (14:29 +0000)]
Merge "Revert "Revert "Temporarily blacklist 955-method-handles-smali."""

7 years agoRevert "Revert "Temporarily blacklist 955-method-handles-smali.""
Narayan Kamath [Fri, 14 Oct 2016 14:27:33 +0000 (14:27 +0000)]
Revert "Revert "Temporarily blacklist 955-method-handles-smali.""

This reverts commit
f18d84699a7c18802f9774069143c173c6b927fb.

Tests are red on the bot. Blacklisting until this is investigated further.

Change-Id: Ibb9b4066abe28e8625c4eed5e0818e6a3fdd4f44

7 years agoMerge "Revert "Temporarily blacklist 955-method-handles-smali.""
Treehugger Robot [Fri, 14 Oct 2016 13:23:03 +0000 (13:23 +0000)]
Merge "Revert "Temporarily blacklist 955-method-handles-smali.""