OSDN Git Service

android-x86/art.git
7 years agoTemporarily add debug logging for b/31357497
Hiroshi Yamauchi [Thu, 6 Oct 2016 01:13:23 +0000 (18:13 -0700)]
Temporarily add debug logging for b/31357497

Note the check can't be a DCHECK because 103-string-append runs with the
non-debug build (libart.so).

Bug: 31357497
Bug: 12687968
Test: run-test 103-string-append on N9.
Change-Id: I30ebe9111fa6c42796dcafa182ae066214805173

7 years agoMerge "Refactoring of graph linearization and linear order."
Treehugger Robot [Wed, 5 Oct 2016 20:29:58 +0000 (20:29 +0000)]
Merge "Refactoring of graph linearization and linear order."

7 years agoMerge "Initialize dex cache while holding dex_lock"
Mathieu Chartier [Wed, 5 Oct 2016 19:59:08 +0000 (19:59 +0000)]
Merge "Initialize dex cache while holding dex_lock"

7 years agoRefactoring of graph linearization and linear order.
Aart Bik [Wed, 5 Oct 2016 00:33:56 +0000 (17:33 -0700)]
Refactoring of graph linearization and linear order.

Rationale:
Ownership of graph's linear order and iterators was
a bit unclear now that other phases are using it.
New approach allows phases to compute their own
order, while ssa_liveness is sole owner for graph
(since it is not mutated afterwards).

Also shortens lifetime of loop's arena.

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

7 years agoMerge "Don't push handle scope for critical native generic JNI"
Treehugger Robot [Wed, 5 Oct 2016 18:19:36 +0000 (18:19 +0000)]
Merge "Don't push handle scope for critical native generic JNI"

7 years agoMerge "Remove #include "oat_file.h" from class_linker.h ."
Vladimir Marko [Wed, 5 Oct 2016 17:00:41 +0000 (17:00 +0000)]
Merge "Remove #include "oat_file.h" from class_linker.h ."

7 years agoDon't push handle scope for critical native generic JNI
Mathieu Chartier [Tue, 4 Oct 2016 22:41:42 +0000 (15:41 -0700)]
Don't push handle scope for critical native generic JNI

Leaving a stale handle scope causes problems for the GC the next
time roots are visited. At this point the stack will have other
contents and the GC will attempt to mark many invalid roots.

Bug: 31933313

Test: non preopt eng build booting.
Test: test-art-host

(cherry picked from commit 92879f9bbcfc034660ed1ff5ef741d7f2bcb116f)

Change-Id: I7d57964ccd2b59a05bb06f67062f646362ce1204

7 years agoInitialize dex cache while holding dex_lock
Mathieu Chartier [Thu, 15 Sep 2016 17:24:43 +0000 (10:24 -0700)]
Initialize dex cache while holding dex_lock

Fixes multiple threads calling RegisterDexFile occasionally getting
DCHECK failures due to the arrays not being null since the BSS ones
is per dex file.

Bug: 31369621

Test: test-art-host, no DCHECK failure during debug booting

Change-Id: I7b6e4cd03460dd1213eb4e044bdcf5f6103fd5f9

7 years agoMerge "Make it possible to pass an arena allocator to HLoopOptimization."
Treehugger Robot [Wed, 5 Oct 2016 16:03:30 +0000 (16:03 +0000)]
Merge "Make it possible to pass an arena allocator to HLoopOptimization."

7 years agoMerge "Temporarily blacklist 955-method-handles-smali."
Narayan Kamath [Wed, 5 Oct 2016 13:46:49 +0000 (13:46 +0000)]
Merge "Temporarily blacklist 955-method-handles-smali."

7 years agoTemporarily blacklist 955-method-handles-smali.
Narayan Kamath [Wed, 5 Oct 2016 13:15:01 +0000 (14:15 +0100)]
Temporarily blacklist 955-method-handles-smali.

Needs a companion smali change 7b348e4f323f44a7c44282.

Test: make test-art-host

Change-Id: Id245d9ead8467315c97cfe07103da2b406b08c49

7 years agoMake it possible to pass an arena allocator to HLoopOptimization.
Nicolas Geoffray [Wed, 5 Oct 2016 12:49:44 +0000 (13:49 +0100)]
Make it possible to pass an arena allocator to HLoopOptimization.

loop_optimization_test uses memory from HLoopOptimization's
allocator, which is scoped by the Run method.

Fix is to pass custom allocator.

test: m test-art-host-gtest
Change-Id: I359330e22202519f400a26da5403eeb00f0b2db4

7 years agoRemove #include "oat_file.h" from class_linker.h .
Vladimir Marko [Tue, 4 Oct 2016 13:44:28 +0000 (14:44 +0100)]
Remove #include "oat_file.h" from class_linker.h .

Refactor the OatClass and OatMethod related functions from
ClassLinker to OatFile and ArtMethod, respectively. Refactor
the remaining ClassLinker dependencies on OatFile to break
the #include dependency and reduce incremental build times.

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

7 years agoMerge "Basic implementation of invoke / invoke-polymorphic."
Treehugger Robot [Wed, 5 Oct 2016 12:19:30 +0000 (12:19 +0000)]
Merge "Basic implementation of invoke / invoke-polymorphic."

7 years agoMerge "Properly scope HLoopOptimization's allocator."
Treehugger Robot [Wed, 5 Oct 2016 10:30:14 +0000 (10:30 +0000)]
Merge "Properly scope HLoopOptimization's allocator."

7 years agoBasic implementation of invoke / invoke-polymorphic.
Narayan Kamath [Wed, 3 Aug 2016 11:46:58 +0000 (12:46 +0100)]
Basic implementation of invoke / invoke-polymorphic.

Basic switch interpreter support for invoke-polymorphic. This change
allows for virtual/interface and static invokes on method handles.

Support for direct invokes (including constructors) and field
getters and setters will be added in follow up changes.

Bug: 30550796
Test: make test-art-host

Change-Id: Ieb3a991d974060d930d56467908d5c7c11d0e38e

7 years agoProperly scope HLoopOptimization's allocator.
Nicolas Geoffray [Wed, 5 Oct 2016 08:55:42 +0000 (09:55 +0100)]
Properly scope HLoopOptimization's allocator.

HOptimization classes do not get their destructor called,
as they are arena objects. So the scope for the optimization
allocator needs to be the Run method.

Also anticipate bisection search breakage by adding
HLoopOptimization to the list of recognized optimizations.

Change-Id: I7770989c39d5700a3b6b0a20af5d4b874dfde111

7 years agoMerge "MIPS32: Fix GenerateVirtualCall in the presence of intrinsics"
Treehugger Robot [Wed, 5 Oct 2016 03:55:28 +0000 (03:55 +0000)]
Merge "MIPS32: Fix GenerateVirtualCall in the presence of intrinsics"

7 years agoMerge "Revert "Compute PPID at ninja time""
Colin Cross [Wed, 5 Oct 2016 01:38:09 +0000 (01:38 +0000)]
Merge "Revert "Compute PPID at ninja time""

7 years agoMerge "Fix build break from merge conflict"
Mathieu Chartier [Wed, 5 Oct 2016 00:54:38 +0000 (00:54 +0000)]
Merge "Fix build break from merge conflict"

7 years agoFix build break from merge conflict
Mathieu Chartier [Wed, 5 Oct 2016 00:48:45 +0000 (17:48 -0700)]
Fix build break from merge conflict

Bug: 31113334

Test: mm -j32

Change-Id: I5643a0ec22cf03a54671a5c7fa0ebda41cc9a8c3

7 years agoMerge "Rename ObjPtr::Decode to ObjPtr::Ptr"
Mathieu Chartier [Wed, 5 Oct 2016 00:39:07 +0000 (00:39 +0000)]
Merge "Rename ObjPtr::Decode to ObjPtr::Ptr"

7 years agoMerge "Fix a CC crash with ThreadStress."
Hiroshi Yamauchi [Wed, 5 Oct 2016 00:27:46 +0000 (00:27 +0000)]
Merge "Fix a CC crash with ThreadStress."

7 years agoRevert "Compute PPID at ninja time"
Colin Cross [Tue, 4 Oct 2016 23:06:16 +0000 (23:06 +0000)]
Revert "Compute PPID at ninja time"

This reverts commit b1c17bb080ccf41b30909c0401df59e6f3a1ebb1.

It breaks make test-art-host when /bin/sh is not bash, as
/bin/sh -c /bin/bash -c echo $PPID
returns the pid of /bin/sh, not the pid of ninja.

Test: none
Change-Id: Ia4e5f76ea4c5f5b5c102ce54ae03c3fccb23a49f

7 years agoFix a CC crash with ThreadStress.
Hiroshi Yamauchi [Tue, 4 Oct 2016 22:20:36 +0000 (15:20 -0700)]
Fix a CC crash with ThreadStress.

Add a read barrier on the locked object in Monitor::DescribeWait().

Bug: 31848261
Bug: 12687968
Test: test-art-host with CC and N9 libartd boot.
Change-Id: I569e1499c2aadf54d9074a8a790e5d512c2dad4f

7 years agoMerge "Fix build breakage."
Nicolas Geoffray [Tue, 4 Oct 2016 21:59:14 +0000 (21:59 +0000)]
Merge "Fix build breakage."

7 years agoFix build breakage.
Nicolas Geoffray [Tue, 4 Oct 2016 21:56:35 +0000 (22:56 +0100)]
Fix build breakage.

Revert did not apply cleanly.

test: make test-art-host
Change-Id: Id94d377d19dc80237951ad40fd5e01f8fec67a47

7 years agoMerge "Revert "Remove dead code from compiler driver.""
Nicolas Geoffray [Tue, 4 Oct 2016 21:45:24 +0000 (21:45 +0000)]
Merge "Revert "Remove dead code from compiler driver.""

7 years agoRevert "Remove dead code from compiler driver."
Nicolas Geoffray [Tue, 4 Oct 2016 21:44:45 +0000 (21:44 +0000)]
Revert "Remove dead code from compiler driver."

This reverts commit 44b3da25191052acc18528d8ade9cf3038505180.

Change-Id: I0cf049ed967bcaf8dfd89fc88288d992c63a4939

7 years agoMerge "A first implementation of a loop optimization framework."
Aart Bik [Tue, 4 Oct 2016 20:40:23 +0000 (20:40 +0000)]
Merge "A first implementation of a loop optimization framework."

7 years agoMerge changes I65bc7769,Ib24c7060
Andreas Gampe [Tue, 4 Oct 2016 19:08:14 +0000 (19:08 +0000)]
Merge changes I65bc7769,Ib24c7060

* changes:
  ART: Reprint long messages on abort
  ART: Clean up IRT-related abort messaging

7 years agoMerge "Revert "Revert "Store resolved Strings for AOT code in .bss."""
Vladimir Marko [Tue, 4 Oct 2016 19:00:30 +0000 (19:00 +0000)]
Merge "Revert "Revert "Store resolved Strings for AOT code in .bss."""

7 years agoMerge "Option to gnuplot dex layout"
David Sehr [Tue, 4 Oct 2016 18:06:48 +0000 (18:06 +0000)]
Merge "Option to gnuplot dex layout"

7 years agoOption to gnuplot dex layout
David Sehr [Mon, 26 Sep 2016 14:44:04 +0000 (07:44 -0700)]
Option to gnuplot dex layout

Display the portions of the dex file that are accessed by the classes in
the dex file.  Optionally limit the display to only those classes that
are present in a runtime profile.

Bug: 29921113
Change-Id: I2a998fba448fec6c23941d3b4358531b1336e1b3
Test: dexlayout test

7 years agoRename ObjPtr::Decode to ObjPtr::Ptr
Mathieu Chartier [Tue, 4 Oct 2016 01:01:28 +0000 (18:01 -0700)]
Rename ObjPtr::Decode to ObjPtr::Ptr

Done to prevent ambiguity with ScopedObjectAccess::Decode.

Bug: 31113334

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

7 years agoRevert "Revert "Store resolved Strings for AOT code in .bss.""
Vladimir Marko [Mon, 3 Oct 2016 08:46:48 +0000 (08:46 +0000)]
Revert "Revert "Store resolved Strings for AOT code in .bss.""

Fixed oat_test to keep dex files alive. Fixed mips build.
Rewritten the .bss GC root visiting and added write barrier
to the artResolveStringFromCode().

Test: build aosp_mips-eng
Test: m ART_DEFAULT_GC_TYPE=SS test-art-target-host-gtest-oat_test
Test: Run ART test suite on host and Nexus 9.
Bug: 20323084
Bug: 30627598

This reverts commit 5f926055cb88089d8ca27243f35a9dfd89d981f0.

Change-Id: I07fa2278d82b8eb64964c9a4b66cb93726ccda6b

7 years agoMerge "Compute PPID at ninja time"
Colin Cross [Tue, 4 Oct 2016 16:45:44 +0000 (16:45 +0000)]
Merge "Compute PPID at ninja time"

7 years agoMerge "Remove dead code from compiler driver."
Nicolas Geoffray [Tue, 4 Oct 2016 14:08:10 +0000 (14:08 +0000)]
Merge "Remove dead code from compiler driver."

7 years agoRemove dead code from compiler driver.
Nicolas Geoffray [Mon, 3 Oct 2016 14:09:25 +0000 (15:09 +0100)]
Remove dead code from compiler driver.

test: m test-art-host
Change-Id: Ie4b6a4c371fff6c9c213d8d6604eb09a5e71d595

7 years agoMerge "Revert "Add dex file writer to dexlayout tool.""
Nicolas Geoffray [Tue, 4 Oct 2016 11:01:53 +0000 (11:01 +0000)]
Merge "Revert "Add dex file writer to dexlayout tool.""

7 years agoRevert "Add dex file writer to dexlayout tool."
Nicolas Geoffray [Tue, 4 Oct 2016 11:01:17 +0000 (11:01 +0000)]
Revert "Add dex file writer to dexlayout tool."

Bug: 29921113

This reverts commit 69b58cf399c3507ca3debf9ec9b2db3c5a0fe7f2.

Change-Id: I8bf9b1222d99489059e45f47d220396a853170a4

7 years agoMIPS32: Fix GenerateVirtualCall in the presence of intrinsics
Goran Jakovljevic [Tue, 4 Oct 2016 08:17:34 +0000 (10:17 +0200)]
MIPS32: Fix GenerateVirtualCall in the presence of intrinsics

Fix GenerateVirtualCall like it is done in the
I0ed88a48b313a8d28bc39fae40631123aadb13ef for all other architectures.

Test: mma -j2 test-art-target-run-test-optimizing on CI20
Change-Id: Ie55c62701b20c4f40badc95563b2aef9e83807de

7 years agoMerge "interpreter: Remove unnecessary template arg from DoCallCommon."
Narayan Kamath [Tue, 4 Oct 2016 08:35:13 +0000 (08:35 +0000)]
Merge "interpreter: Remove unnecessary template arg from DoCallCommon."

7 years agointerpreter: Remove unnecessary template arg from DoCallCommon.
Narayan Kamath [Mon, 3 Oct 2016 15:51:22 +0000 (16:51 +0100)]
interpreter: Remove unnecessary template arg from DoCallCommon.

The function was always called with a fixed size array so there's
no real advantage in templatizing it this way.

Test: make build-art-host

Change-Id: I782e113225f1c97877f2bcb5afe8df9ae8efd26e

7 years agoMerge "Add handle wrapper for interpreter field get/set"
Mathieu Chartier [Tue, 4 Oct 2016 08:02:59 +0000 (08:02 +0000)]
Merge "Add handle wrapper for interpreter field get/set"

7 years agoAdd handle wrapper for interpreter field get/set
Mathieu Chartier [Tue, 4 Oct 2016 05:49:46 +0000 (22:49 -0700)]
Add handle wrapper for interpreter field get/set

The listeners have thread suspension for jdwp tests.

Bug: 31113334

Test: tools/run-jdwp-tests.sh '--mode=host' '--variant=X32' --no-jit --debug

Change-Id: I08f17432cc0c79ee9a0163eb88d4d6355f6851ca

7 years agoART: Reprint long messages on abort
Andreas Gampe [Tue, 4 Oct 2016 02:47:08 +0000 (19:47 -0700)]
ART: Reprint long messages on abort

Add an abort message parameter to Runtime::Abort. In case the message
is multiline (and will thus not be completely preserved in the
Android abort reason), reprint the message after all threads have
been dumped.

Bug: 31893081
Test: m test-art-host
Change-Id: I65bc77691fec79f7c868a90d6132805fcc91e473

7 years agoART: Clean up IRT-related abort messaging
Andreas Gampe [Mon, 3 Oct 2016 18:42:31 +0000 (11:42 -0700)]
ART: Clean up IRT-related abort messaging

Change AbortIfNoCheckJNI to take the abort message as a parameter.
This way it can be passed down.

Bug: 31893081
Test: m test-art-host
Change-Id: Ib24c7060f1b32c9613ab84e6c1966082c866bc14

7 years agoMerge changes I50493bca,I8b266ad0
Mathieu Chartier [Tue, 4 Oct 2016 01:06:05 +0000 (01:06 +0000)]
Merge changes I50493bca,I8b266ad0

* changes:
  Use ObjPtr for ResolvedFieldAccessTest and ResolvedMethodAccessTest
  Move ArtField to ObjPtr

7 years agoCompute PPID at ninja time
Colin Cross [Mon, 3 Oct 2016 23:40:13 +0000 (16:40 -0700)]
Compute PPID at ninja time

Using $(shell $$PPID) to compute PPID will return the pid of kati, which
will be the same for multiple sequential runs of make without changing
any makefiles.  Replace it with a bash subshell command to return the pid
of ninja, which will be different for every call to make.

ART_HOST_TEST_DIR now contains $ that need to propagate to the final
bash command, and must be evaluated exactly once.  Escape the $ in
${ART_HOST_TEST_DIR} in define-test-art-run-test so that
${ART_HOST_TEST_DIR} is not substituted in the function call to prevent
evaluating its contents in the $(eval) that wraps it, which would
substitute out the necessary $.

Test: m -j test-art-host
Change-Id: I3303805481cc1c77d1a321674e8c7c003043a7c4

7 years agoMerge "Add dex file writer to dexlayout tool."
Jeff Hao [Tue, 4 Oct 2016 00:46:26 +0000 (00:46 +0000)]
Merge "Add dex file writer to dexlayout tool."

7 years agoMerge "art: Replace cutils/log.h with android/log.h"
Mark Salyzyn [Mon, 3 Oct 2016 23:02:27 +0000 (23:02 +0000)]
Merge "art: Replace cutils/log.h with android/log.h"

7 years agoUse ObjPtr for ResolvedFieldAccessTest and ResolvedMethodAccessTest
Mathieu Chartier [Fri, 30 Sep 2016 17:27:43 +0000 (10:27 -0700)]
Use ObjPtr for ResolvedFieldAccessTest and ResolvedMethodAccessTest

Also added LookupResolvedType that is guaranteed to not do thread
suspension but deals with multidex since GetResolvedType will
return null if the type was resolved in another dex file.

Added test.

Bug: 31113334

Test: test-art-host CC baker

Change-Id: I50493bca7d8ce9760546c3116b717484c62c47a4

7 years agoA first implementation of a loop optimization framework.
Aart Bik [Fri, 26 Aug 2016 18:31:48 +0000 (11:31 -0700)]
A first implementation of a loop optimization framework.

Rationale:
We are planning to add more and more loop related optimizations
and this framework provides the basis to do so. For starters,
the framework optimizes dead induction, induction that can be
replaced with a simpler closed-form, and eliminates dead loops
completely (either pre-existing or as a result of induction
removal).

Speedup on e.g. Benchpress Loop is 73x (17.5us. -> 0.24us.)
[with the potential for more exploiting outer loop too]

Test: 618-checker-induction et al.

Change-Id: If80a809acf943539bf6726b0030dcabd50c9babc

7 years agoAdd dex file writer to dexlayout tool.
Jeff Hao [Fri, 23 Sep 2016 01:02:49 +0000 (18:02 -0700)]
Add dex file writer to dexlayout tool.

All sections are being written out properly.
There is one small difference:
  - unindexed string data is not written out

Bug: 29921113
Test: mm test-art-host-gtest-dexlayout_test
Change-Id: I3872327526a350f33f0f851516a389622c1a54ae

7 years agoMerge "Run dexfuzz in bisection-search mode"
Aart Bik [Mon, 3 Oct 2016 21:29:19 +0000 (21:29 +0000)]
Merge "Run dexfuzz in bisection-search mode"

7 years agoMove ArtField to ObjPtr
Mathieu Chartier [Fri, 30 Sep 2016 17:27:43 +0000 (10:27 -0700)]
Move ArtField to ObjPtr

Added EXPECT_OBJ_PTR_EQ and variants to gtests.

Fixed moving GC bugs in:
ClassLinker::CreatePathClassLoader
ClassLinkerTest: StaticFields

ObjPtr Decode call sites: 186 -> 181.

Some tests fail due to ResolvedFieldAccessTest, will fix in follow
up CL.

Bug: 31113334

Test: test-art-host CC baker

Change-Id: I8b266ad00f3c20c8cbe7cfdf280d175083df0b88

7 years agoRun dexfuzz in bisection-search mode
Wojciech Staszkiewicz [Thu, 29 Sep 2016 22:12:48 +0000 (15:12 -0700)]
Run dexfuzz in bisection-search mode

Call dexfuzz with --bisection-search switch to automatically bisect
discovered divergences.

Test: ./run_dex_fuzz_test.py
Change-Id: I87af8b45675b464e984a05e06eac24cad3650d2b

7 years agoMerge "benchmark: Add a build target that's not Android-dependent"
Treehugger Robot [Mon, 3 Oct 2016 19:39:28 +0000 (19:39 +0000)]
Merge "benchmark: Add a build target that's not Android-dependent"

7 years agoart: Replace cutils/log.h with android/log.h
Mark Salyzyn [Wed, 28 Sep 2016 22:29:14 +0000 (15:29 -0700)]
art: Replace cutils/log.h with android/log.h

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: Ie5720d9e1388047856392e8635895895c22f3112

7 years agoMerge "Delete some unused bitmap walking code"
Mathieu Chartier [Mon, 3 Oct 2016 18:27:26 +0000 (18:27 +0000)]
Merge "Delete some unused bitmap walking code"

7 years agobenchmark: Add a build target that's not Android-dependent
Igor Murashkin [Fri, 30 Sep 2016 21:12:14 +0000 (14:12 -0700)]
benchmark: Add a build target that's not Android-dependent

Allow building the micronative portion of libartbenchmark as pure JNI without any android
library dependencies.

Bug: 31401609
Change-Id: I99f1466fb668a9ae5dd2f7229dca44d3bb064e15

7 years agoMerge "Reserve space in the char backing vector to prevent reallocations"
Jeff Hao [Mon, 3 Oct 2016 17:42:15 +0000 (17:42 +0000)]
Merge "Reserve space in the char backing vector to prevent reallocations"

7 years agoMerge "DexCachePair : Add an Assign method."
Narayan Kamath [Mon, 3 Oct 2016 13:10:42 +0000 (13:10 +0000)]
Merge "DexCachePair : Add an Assign method."

7 years agoDexCachePair : Add an Assign method.
Narayan Kamath [Fri, 30 Sep 2016 15:29:19 +0000 (16:29 +0100)]
DexCachePair : Add an Assign method.

This prevents the logic for determining a slot from the type ID from
being scattered all over the place.

Bug: 30550796
Test: make test-art-host
Change-Id: I4ad6db8b730dc617fa8474a71c3794963b58279b

7 years agoMerge "Address review comments for change 25352fc06c84cdab8a2ab."
Narayan Kamath [Mon, 3 Oct 2016 13:09:34 +0000 (13:09 +0000)]
Merge "Address review comments for change 25352fc06c84cdab8a2ab."

7 years agoAddress review comments for change 25352fc06c84cdab8a2ab.
Narayan Kamath [Mon, 3 Oct 2016 10:33:01 +0000 (11:33 +0100)]
Address review comments for change 25352fc06c84cdab8a2ab.

Test: make test-art-host
Bug: 30550796

Change-Id: Ic689e4c9bee691f03703288c3b12634a26841140

7 years agoMerge "class_linker: Add support for resolving method types."
Treehugger Robot [Mon, 3 Oct 2016 10:32:15 +0000 (10:32 +0000)]
Merge "class_linker: Add support for resolving method types."

7 years agoclass_linker: Add support for resolving method types.
Narayan Kamath [Wed, 3 Aug 2016 11:46:58 +0000 (12:46 +0100)]
class_linker: Add support for resolving method types.

- Add a new fixed size dex cache array for resolved method types.
  The size of this array is set to 1024.
- Also introduces a new runtime flag that controls this feature.

Test: make test-art-host
Bug: 30550796

Change-Id: I147b33398d71ee21f2e91b418d3700d4630801ff

7 years agoMerge "Integrate dexfuzz with bisection search"
Treehugger Robot [Sat, 1 Oct 2016 01:00:38 +0000 (01:00 +0000)]
Merge "Integrate dexfuzz with bisection search"

7 years agoIntegrate dexfuzz with bisection search
Wojciech Staszkiewicz [Thu, 29 Sep 2016 00:51:06 +0000 (17:51 -0700)]
Integrate dexfuzz with bisection search

Adds --bisection-search switch to dexfuzz. When specified makes
dexfuzz run bisection search on discovered output divergences.

Bisection search output is saved to bisection_outputs/ directory which
is assumed to be present.

If --bisection-search is used, bisection_search.py has to be on PATH.

Test: ./run_dex_fuzz_test.py , with hardcoded change to emit a known
divergent program instead of calling jfuzz.

Change-Id: I8fcb45e201761f1f05adee74e6b8636bcc452332

7 years agoMerge "String Compression for ARM and ARM64"
Jeff Hao [Fri, 30 Sep 2016 22:52:13 +0000 (22:52 +0000)]
Merge "String Compression for ARM and ARM64"

7 years agoMerge "String compression on intrinsics x86 and x86_64"
Jeff Hao [Fri, 30 Sep 2016 22:44:45 +0000 (22:44 +0000)]
Merge "String compression on intrinsics x86 and x86_64"

7 years agoMerge "ART: Add odex IMT dumping to oatdump"
Treehugger Robot [Fri, 30 Sep 2016 22:20:10 +0000 (22:20 +0000)]
Merge "ART: Add odex IMT dumping to oatdump"

7 years agoMerge "Set coverage to false for dex2oat."
Treehugger Robot [Fri, 30 Sep 2016 22:08:56 +0000 (22:08 +0000)]
Merge "Set coverage to false for dex2oat."

7 years agoReserve space in the char backing vector to prevent reallocations
Ben Gruver [Fri, 30 Sep 2016 20:10:42 +0000 (13:10 -0700)]
Reserve space in the char backing vector to prevent reallocations

The pointers in image_filenames_ and oat_filenames can become invalidated
if the char_backing_storage_ vector gets reallocated when adding strings.

Test: mma test-art-host-gtest-dex2oat_test
Change-Id: I82714468163ce49ce53953e6edcb57a17d46cdbb

7 years agoDelete some unused bitmap walking code
Mathieu Chartier [Fri, 30 Sep 2016 17:59:32 +0000 (10:59 -0700)]
Delete some unused bitmap walking code

No longer required with newer versions of the image writer.

Test: mm -j32

Change-Id: I496bc49c80d84bfa3aada39f8c6e3e4e4dfb15d4

7 years agoString Compression for ARM and ARM64
jessicahandojo [Sat, 10 Sep 2016 02:01:32 +0000 (19:01 -0700)]
String Compression for ARM and ARM64

Changes on intrinsics and Code Generation on ARM and ARM64
for string compression feature. Currently the feature is off.

The size of boot.oat and boot.art for ARM before and after the
changes (feature OFF) are still. When the feature ON,
boot.oat increased by 0.60% and boot.art decreased by 9.38%.

Meanwhile for ARM64, size of boot.oat and boot.art before and
after changes (feature OFF) are still. When the feature ON,
boot.oat increased by 0.48% and boot.art decreased by 6.58%.

Turn feature on: runtime/mirror/string.h (kUseStringCompression = true)
runtime/asm_support.h (STRING_COMPRESSION_FEATURE 1)

Test: m -j31 test-art-target
All tests passed both when the mirror::kUseStringCompression
is ON and OFF.

Bug: 31040547
Change-Id: I24e86b99391df33ba27df747779b648c5a820649

7 years agoMerge "Remove dependency on libcutils"
Dimitry Ivanov [Fri, 30 Sep 2016 17:37:57 +0000 (17:37 +0000)]
Merge "Remove dependency on libcutils"

7 years agoMerge "Revert "Store resolved Strings for AOT code in .bss.""
Vladimir Marko [Fri, 30 Sep 2016 17:12:41 +0000 (17:12 +0000)]
Merge "Revert "Store resolved Strings for AOT code in .bss.""

7 years agoString compression on intrinsics x86 and x86_64
jessicahandojo [Fri, 9 Sep 2016 02:49:13 +0000 (19:49 -0700)]
String compression on intrinsics x86 and x86_64

Changes on intrinsics and Code Generation (x86 and x86_64)
for string compression feature. Currently the feature is off.

The size of boot.oat and boot.art for x86 before and after the
changes (feature OFF) are still. When the feature ON,
boot.oat increased by 0.83% and boot.art decreased by 19.32%.

Meanwhile for x86_64, size of boot.oat and boot.art before and
after changes (feature OFF) are still. When the feature ON,
boot.oat increased by 0.87% and boot.art decreased by 6.59%.

Turn feature on: runtime/mirror/string.h (kUseStringCompression = true)
runtime/asm_support.h (STRING_COMPRESSION_FEATURE 1)

Test: m -j31 test-art-host
All tests passed both when the mirror::kUseStringCompression
is ON and OFF.

The jni_internal_test changed to assert an empty string length
to be equal -(1 << 31) as it is compressed.

Bug: 31040547
Change-Id: Ia447c9b147cabb6a69e6ded86be1fe0c46d9638d

7 years agoRevert "Store resolved Strings for AOT code in .bss."
Vladimir Marko [Fri, 30 Sep 2016 17:04:49 +0000 (17:04 +0000)]
Revert "Store resolved Strings for AOT code in .bss."

There are some issues with oat_test64 on host and aosp_mips-eng.

Also reverts "compiler_driver: Fix build."

Bug: 20323084
Bug: 30627598

This reverts commit 63dccbbefef3014c99c22748d18befcc7bcb3b41.
This reverts commit 04a44135ace10123f059373691594ae0f270a8a4.

Change-Id: I568ba3e58cf103987fdd63c8a21521010a9f27c4

7 years agoART: Add odex IMT dumping to oatdump
Andreas Gampe [Fri, 30 Sep 2016 02:50:27 +0000 (19:50 -0700)]
ART: Add odex IMT dumping to oatdump

Support scanning oat files besides the boot image.

Bug: 31594153
Test: m test-art-host
Change-Id: I672d0534b8a8274a4430217656b68c55e4b31cc4

7 years agoMerge "Make run-test fail if output-path is too long"
Treehugger Robot [Fri, 30 Sep 2016 16:42:48 +0000 (16:42 +0000)]
Merge "Make run-test fail if output-path is too long"

7 years agoRemove dependency on libcutils
Dimitry Ivanov [Wed, 28 Sep 2016 09:44:00 +0000 (02:44 -0700)]
Remove dependency on libcutils

Use liblog for liblog (instead of libcutils)
Replace calls to property_get with libbase
GetProperty()

Bug: http://b/31289077
Bug: http://b/27171986
Test: remove liblog from libcutils and recompile
Test: make test-art-target -j4
Change-Id: I2a2913af8f521131558e9dd672d3973a64a410d3

7 years agoMerge "Add const-string benchmark."
Treehugger Robot [Fri, 30 Sep 2016 14:50:55 +0000 (14:50 +0000)]
Merge "Add const-string benchmark."

7 years agoMerge "compiler_driver: Fix build."
Nicolas Geoffray [Fri, 30 Sep 2016 14:36:37 +0000 (14:36 +0000)]
Merge "compiler_driver: Fix build."

7 years agocompiler_driver: Fix build.
Narayan Kamath [Fri, 30 Sep 2016 14:24:19 +0000 (15:24 +0100)]
compiler_driver: Fix build.

Test: make-art-host
Change-Id: I94e164ed245caea60fe26872a943ea5e14aa8860

7 years agoMerge "Store resolved Strings for AOT code in .bss."
Vladimir Marko [Fri, 30 Sep 2016 14:10:21 +0000 (14:10 +0000)]
Merge "Store resolved Strings for AOT code in .bss."

7 years agoMerge "Simplify our intrinsic recognizer."
Treehugger Robot [Fri, 30 Sep 2016 11:38:56 +0000 (11:38 +0000)]
Merge "Simplify our intrinsic recognizer."

7 years agoMerge "Move two dangling mirror objects into handles."
Treehugger Robot [Fri, 30 Sep 2016 10:47:24 +0000 (10:47 +0000)]
Merge "Move two dangling mirror objects into handles."

7 years agoAdd const-string benchmark.
Vladimir Marko [Fri, 30 Sep 2016 10:21:07 +0000 (11:21 +0100)]
Add const-string benchmark.

Test: vogar --benchmark art/benchmark/const-string/src/ConstStringBenchmark.java
Bug: 20323084
Change-Id: I6b0b9cc8de19694ca43221b3224ac09eaa54d9ff

7 years agoSimplify our intrinsic recognizer.
Nicolas Geoffray [Fri, 15 Jul 2016 14:28:35 +0000 (15:28 +0100)]
Simplify our intrinsic recognizer.

- Use the modifiers for storing the intrinsic kind.
- Delete dex_file_method_inliner and its associated map.

This work was also motivated by the fact that the inline
method analyzer leaks intrinsic tables, and even worse, might re-use
a table from one dex file to another unrelated dex file in the presence
of class unloading and the unlikely event of the dex files getting
the same address.

test: m test-art-host m test-art-target

Change-Id: Ia653d2c72df13889dc85dd8c84997582c034ea4b

7 years agoMove two dangling mirror objects into handles.
Nicolas Geoffray [Fri, 30 Sep 2016 08:51:32 +0000 (09:51 +0100)]
Move two dangling mirror objects into handles.

test: libcore.java.lang.reflect.MissingClassesTest#testGetFieldFails
test: ./art/tools/run-libcore-tests.sh --mode=host --variant=X64
Change-Id: Ib708e914cac6abe4d4fc7cb88e258da83a8219ab

7 years agoMerge "dex_cache: rewrite StringDexCachePair as DexCachePair<T>"
Treehugger Robot [Fri, 30 Sep 2016 08:52:28 +0000 (08:52 +0000)]
Merge "dex_cache: rewrite StringDexCachePair as DexCachePair<T>"

7 years agoMerge "Clean up ScopedThreadStateChange to use ObjPtr"
Mathieu Chartier [Fri, 30 Sep 2016 02:33:08 +0000 (02:33 +0000)]
Merge "Clean up ScopedThreadStateChange to use ObjPtr"

7 years agoClean up ScopedThreadStateChange to use ObjPtr
Mathieu Chartier [Wed, 28 Sep 2016 01:43:30 +0000 (18:43 -0700)]
Clean up ScopedThreadStateChange to use ObjPtr

Also fixed inclusion of -inl.h files in .h files by adding
scoped_object_access-inl.h and scoped_fast_natvie_object_access-inl.h

Changed AddLocalReference / Decode to use ObjPtr.

Changed libartbenchmark to be debug to avoid linkage errors.

Bug: 31113334

Test: test-art-host

Change-Id: I4d2e160483a29d21e1e0e440585ed328b9811483

7 years agoSet coverage to false for dex2oat.
Vishwath Mohan [Thu, 29 Sep 2016 22:05:51 +0000 (15:05 -0700)]
Set coverage to false for dex2oat.

dex2oat explicitly sets address to false when SANITIZE_TARGET is
non-empty, in order to prevent it being compiled with ASAN. This CL also
sets coverage to false to prevent build errors when
SANITIZE_TARGET="address coverage" (because coverage currently does not
work without address).

Bug: 29188876
Test: SANITIZE_TARGET="address coverage" builds without error
Change-Id: I0faeb7fab76678b923af732235188e19e08ea90c

7 years agodex_cache: rewrite StringDexCachePair as DexCachePair<T>
Narayan Kamath [Thu, 29 Sep 2016 16:07:20 +0000 (17:07 +0100)]
dex_cache: rewrite StringDexCachePair as DexCachePair<T>

.. with [T = mirror::String]. This is in preparation for introducing
a dex cache array for MethodTypes, which will be treated the same way.

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

7 years agoStore resolved Strings for AOT code in .bss.
Vladimir Marko [Wed, 21 Sep 2016 12:51:10 +0000 (13:51 +0100)]
Store resolved Strings for AOT code in .bss.

And do some related refactorings.

Bug: 20323084
Bug: 30627598
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.
Test: Build aosp_mips64-eng.
Change-Id: I1b12c1570fee8e5da490b47f231050142afcbd1e