OSDN Git Service

android-x86/art.git
7 years agoFix the target Linux builds of ART
Julien Duraj [Wed, 16 Nov 2016 14:05:48 +0000 (14:05 +0000)]
Fix the target Linux builds of ART

When ART_TARGET_LINUX was set it would hit some pieces of dead code that
were using old defines i.e. `__ANDROID__`

Test: export ART_TARGET_LINUX=true
Test: source build/envsetup.sh
Test: lunch
Test: cd art && mma

Change-Id: I80102750192928606e0884d2b723a87ccb7d7e19

7 years agoMerge "Fix build rules for statically linked oatdump on host."
Roland Levillain [Wed, 23 Nov 2016 10:33:03 +0000 (10:33 +0000)]
Merge "Fix build rules for statically linked oatdump on host."

7 years agoMerge changes from topic 'dex2oat_dexlayout'
Jeff Hao [Tue, 22 Nov 2016 23:49:19 +0000 (23:49 +0000)]
Merge changes from topic 'dex2oat_dexlayout'

* changes:
  Add layout scheme to dexlayout for dex file reordering.
  Add new --layout-profile compiler-filter for dex2oat.
  Dexlayout cleanup and refactoring.

7 years agoMerge "Always fill in root table length"
Mathieu Chartier [Tue, 22 Nov 2016 23:09:48 +0000 (23:09 +0000)]
Merge "Always fill in root table length"

7 years agoAdd layout scheme to dexlayout for dex file reordering.
Jeff Hao [Wed, 19 Oct 2016 18:17:11 +0000 (11:17 -0700)]
Add layout scheme to dexlayout for dex file reordering.

Currently takes startup classes from profile and groups them together
with the lowest class indexes. Moves the ClassDef, ClassData, and
CodeItem sections.

Results gathered from 5 second systrace of app startup (no other input):
Maps
base.vdex - 24.70MB -> 19.35MB (30.50MB file size)
base.odex - 13.22MB -> 12.82MB (13.22MB file size)
Running time of dex2oat: 27.5s -> 37.1s

Photos
base.vdex - 12.98MB ->  9.77MB (15.10MB file size)
base.odex -  6.84MB ->  6.24MB ( 6.84MB file size)
Running time of dex2oat: 15.6s -> 19.9s

Plus
base.vdex - 14.09MB -> 13.29MB (16.72MB file size)
base.odex -  2.47MB ->  2.47MB ( 2.47MB file size)
Running time of dex2oat: 14.1s -> 18.5s

Performance and memory tracking bug: b/33017139

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

7 years agoAlways fill in root table length
Mathieu Chartier [Tue, 22 Nov 2016 21:24:40 +0000 (13:24 -0800)]
Always fill in root table length

Otherwise, there may be DCHECK failure in JitCodeCache::ClearData.
Fixes gcstress JIT tests.

Test: test/run-test --host --relocate --prebuild  --64 --jit --gcstress --dev 021-string2

Change-Id: I757ccd1e5a015c5e686254417a2a3f68b650da1c

7 years agoMerge "Verify for type_id out of range errors"
Treehugger Robot [Tue, 22 Nov 2016 20:30:12 +0000 (20:30 +0000)]
Merge "Verify for type_id out of range errors"

7 years agoMerge "Correctly handle EINTR return from futex"
Mathieu Chartier [Tue, 22 Nov 2016 19:26:09 +0000 (19:26 +0000)]
Merge "Correctly handle EINTR return from futex"

7 years agoVerify for type_id out of range errors
David Sehr [Mon, 21 Nov 2016 20:52:12 +0000 (12:52 -0800)]
Verify for type_id out of range errors

The dalvik documentation states that several fields used as type ids are
uint, which is 32 bits.  Other places use uint16, which is obviously 16.
This adds assertions that there are fewer than 65536
class_def_items/class_data_items and that the fields in question are
either valid (0 <= id <= 0xffff) or id == kDexNoIndex (0xffffffff).

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

7 years agoMerge "Revert "Make sure that const-class linkage is preserved.""
Vladimir Marko [Tue, 22 Nov 2016 17:49:05 +0000 (17:49 +0000)]
Merge "Revert "Make sure that const-class linkage is preserved.""

7 years agoRevert "Make sure that const-class linkage is preserved."
Vladimir Marko [Tue, 22 Nov 2016 17:37:21 +0000 (17:37 +0000)]
Revert "Make sure that const-class linkage is preserved."

Bug: 30627598

This reverts commit 19886dbeced9430579a27979beb92b09c95197b4.
Squashed reverts of subsequent partial fixes.
    This reverts commit bad475a63b7c938b7ff7903ea1dae27369c3f629.
    This reverts commit 0ba0c7d9b0328af39a385014652eb9af4e42d8b5.
    This reverts commit ddb8afec79492750f16f98e5bd07d44f3dc485d4.

Change-Id: Id94af5ae56a0335f9641a79c885cc75bba971713

7 years agoFix build rules for statically linked oatdump on host.
Roland Levillain [Tue, 22 Nov 2016 17:20:46 +0000 (17:20 +0000)]
Fix build rules for statically linked oatdump on host.

Test: m build-art-host
Test: m test-art-host-gtest-oatdump_test
Bug: 29530992
Change-Id: Iaa1ff13f0d42e5bc9670fc87da5b6e291482f626

7 years agoAdd new --layout-profile compiler-filter for dex2oat.
Jeff Hao [Wed, 19 Oct 2016 18:17:11 +0000 (11:17 -0700)]
Add new --layout-profile compiler-filter for dex2oat.

New compiler filter makes dex2oat call into dexlayout.
Added basic test for --layout-profile filter to make sure dex2oat runs
to completion and file is valid. Contests of file are not checked.

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

7 years agoDexlayout cleanup and refactoring.
Jeff Hao [Tue, 15 Nov 2016 02:10:16 +0000 (18:10 -0800)]
Dexlayout cleanup and refactoring.

Created option to output to a mem map in preparation of hooking
dexlayout into dex2oat.

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

7 years agoMerge "Use a per-thread VerifierDeps."
Nicolas Geoffray [Tue, 22 Nov 2016 17:07:46 +0000 (17:07 +0000)]
Merge "Use a per-thread VerifierDeps."

7 years agoMerge "Clear the right data pointer."
Nicolas Geoffray [Tue, 22 Nov 2016 16:40:20 +0000 (16:40 +0000)]
Merge "Clear the right data pointer."

7 years agoMerge changes If9d1da45,I6daecb52
Vladimir Marko [Tue, 22 Nov 2016 14:58:42 +0000 (14:58 +0000)]
Merge changes If9d1da45,I6daecb52

* changes:
  Do not test class unloading in 626-const-class-linking
  Fix 626-const-class-linking for no-dex2oat configuration.

7 years agoDo not test class unloading in 626-const-class-linking
Vladimir Marko [Tue, 22 Nov 2016 14:38:31 +0000 (14:38 +0000)]
Do not test class unloading in 626-const-class-linking

Keep tests that classes were not unloaded but do not test
that they are actually unloaded. Both JIT and tracing can
hold onto those classes.

Test: m ART_USE_JIT=true test-art-host-run-test-626-const-class-linking
Test: m ART_TEST_TRACE=true test-art-host-run-test-626-const-class-linking
Bug: 30627598
Change-Id: If9d1da45d8691c5ee05b6cf500d7d132bcab611f

7 years agoClear the right data pointer.
Nicolas Geoffray [Tue, 22 Nov 2016 13:45:36 +0000 (13:45 +0000)]
Clear the right data pointer.

Internally, stack_map_data is an offset of the roots_data allocation.
Pass both to the ClearData method, which will use the right pointer
to deallocate.

Test: test-art-host in debug mode
Change-Id: Ibfe38e7f1853870076048427f2efe7121c11c136

7 years agoFix 626-const-class-linking for no-dex2oat configuration.
Vladimir Marko [Tue, 22 Nov 2016 13:18:00 +0000 (13:18 +0000)]
Fix 626-const-class-linking for no-dex2oat configuration.

For this configuration, the MisbehavingLoader.loadClass()
is called twice, so we cannot rely on printing the message
exactly once.

Test: m ART_TEST_RUN_TEST_NO_DEX2OAT=true \
      test-art-host-run-test-626-const-class-linking
Bug: 30627598
Change-Id: I6daecb52efc1d25fc5cf796f8aef726666e97c8b

7 years agoMerge "ARM: VIXL32: Fix the assembler usage in the intrinsics."
Nicolas Geoffray [Tue, 22 Nov 2016 13:18:55 +0000 (13:18 +0000)]
Merge "ARM: VIXL32: Fix the assembler usage in the intrinsics."

7 years agoUse a per-thread VerifierDeps.
Nicolas Geoffray [Fri, 18 Nov 2016 16:03:10 +0000 (16:03 +0000)]
Use a per-thread VerifierDeps.

Avoid lock contention on a singleton VerifierDeps by allocating
temporary per-thread VerifierDeps that get merged after verification.

This saves around ~35% compile-times on interpret-only.

Only the creation of extra strings is guarded by a lock, for simplicity.

Test: test-art-host, test-art-target
bug: 32641252
bug: 30937355

Change-Id: I11a2367da882b58e39afa7b42cba2e74a209b75d

7 years agoMerge "Fix build: update test to use dex::TypeIndex."
Vladimir Marko [Tue, 22 Nov 2016 12:12:12 +0000 (12:12 +0000)]
Merge "Fix build: update test to use dex::TypeIndex."

7 years agoFix build: update test to use dex::TypeIndex.
Vladimir Marko [Tue, 22 Nov 2016 11:56:48 +0000 (11:56 +0000)]
Fix build: update test to use dex::TypeIndex.

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

7 years agoMerge "Make sure that const-class linkage is preserved."
Vladimir Marko [Tue, 22 Nov 2016 11:23:16 +0000 (11:23 +0000)]
Merge "Make sure that const-class linkage is preserved."

7 years agoCorrectly handle EINTR return from futex
Daniel Colascione [Mon, 21 Nov 2016 22:35:42 +0000 (14:35 -0800)]
Correctly handle EINTR return from futex

We should handle EINTR the same way we do EAGAIN: they're both
transient failures. Either way, higher-level code (see
ReaderWriterMutex::SharedLock) will do the right thing, loop around,
and try again.

Test: code inspection
Change-Id: I1eb7fb6851cc1a65acc9a0cf7cbeef787b6b28b6

7 years agoMerge "Check same dex file for finding class descriptor string id"
Mathieu Chartier [Mon, 21 Nov 2016 23:32:45 +0000 (23:32 +0000)]
Merge "Check same dex file for finding class descriptor string id"

7 years agoMerge changes I8e51415a,I79a255c1
Treehugger Robot [Mon, 21 Nov 2016 22:01:14 +0000 (22:01 +0000)]
Merge changes I8e51415a,I79a255c1

* changes:
  ART: Add JNI local details for FollowReferences
  ART: Fix generic_ptr handling in GetMethodName

7 years agoCheck same dex file for finding class descriptor string id
Mathieu Chartier [Thu, 17 Nov 2016 21:08:35 +0000 (13:08 -0800)]
Check same dex file for finding class descriptor string id

Use ClassDef for finding same dex file class descriptor string id
for vdex. Removes some calls to FindStringId, the remaining calls to
FindStringId are due to multidex or referring to types in the boot
class path.

Also check method index slot to see if we get lucky.

Host perf:
DexFile::FindStringId: 2.57% -> 0.94%

Not done for fields since these do not seem to reach the FindStringId
case accordingto perf. The remaining calls to FindStringId come from:
100.00% verifier::VerifierDeps::GetClassDescriptorStringId
-> 66.62% verifier::VerifierDeps::AddAssignability
-> 33.38% verifier::VerifierDeps::AddMethodResolution

FB install time: 35.54s -> 34.41s (avg of 40 samples at 960MHZ N6P).

Bug: 32641252

Test: test-art-host

Change-Id: If50408cf1be5c2d2127140780b8d5af66306939c

7 years agoMerge "ART: Add dex::TypeIndex"
Treehugger Robot [Mon, 21 Nov 2016 21:17:32 +0000 (21:17 +0000)]
Merge "ART: Add dex::TypeIndex"

7 years agoMerge "ART: Add boot classpath check for initialization"
Treehugger Robot [Mon, 21 Nov 2016 20:43:12 +0000 (20:43 +0000)]
Merge "ART: Add boot classpath check for initialization"

7 years agoMerge "Use type lookup tables in compiler"
Mathieu Chartier [Mon, 21 Nov 2016 20:19:58 +0000 (20:19 +0000)]
Merge "Use type lookup tables in compiler"

7 years agoARM: VIXL32: Fix the assembler usage in the intrinsics.
Anton Kirilov [Mon, 14 Nov 2016 14:37:00 +0000 (14:37 +0000)]
ARM: VIXL32: Fix the assembler usage in the intrinsics.

The assembler must not be used outside of any scopes;
the macroassembler methods should be called instead.

Test: ART_USE_VIXL_ARM_BACKEND=true m test-art-host
Test: ART_USE_VIXL_ARM_BACKEND=true m test-art-target
Change-Id: I1358bea5330547db9b7a8446932d85ba946e5683

7 years agoMake sure that const-class linkage is preserved.
Vladimir Marko [Fri, 11 Nov 2016 11:40:40 +0000 (11:40 +0000)]
Make sure that const-class linkage is preserved.

After calling loadClass() on the initiating loader, insert
the Class to the ClassTable. Check that the returned class
has the correct name and that the ClassTable does not yet
contain a different Class for the same name. If either check
fails, follow the RI behavior for parallel capable class
loaders, i.e. throw NoClassDefFoundError for name mismatch
(with more descriptive message than RI) or return the Class
already present in the ClassTable. This ensures that the
const-class instruction for a given name always gives the
same result as the first time it succeeded for the same
initiating loader, even for non-well-behaved loader.

Inserting the Class to the ClassTable is also a necessary
step for changing to hash-based dex cache type array when
the DexCache will not necessarily keep the Class and
therefore the defining loader alive while the initiating
loader stays alive, so the ClassTable entry is necessary
to keep the dependecy.

Add tests that a const-class instruction always returns the
same Class<?> as it returned the first time, i.e. when it
was "linked", even for class loaders that are not
well-behaved, even if the dex cache type array is cleared.
Also test the edge cases, i.e. NoClassDefFoundError and
returning old entry from ClassTable when already inserted
by another thread.

Bug: 30627598
Test: 626-const-class-linking
Test: m test-art-host
Change-Id: Ie9b721464b4e9a5dcce8df8095548e983bba1fe8

7 years agoART: Add dex::TypeIndex
Andreas Gampe [Thu, 17 Nov 2016 23:21:22 +0000 (15:21 -0800)]
ART: Add dex::TypeIndex

Add abstraction for uint16_t type index.

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

7 years agoART: Add boot classpath check for initialization
Andreas Gampe [Mon, 21 Nov 2016 18:10:08 +0000 (10:10 -0800)]
ART: Add boot classpath check for initialization

Boot classpath classes should not fail initialization.

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

7 years agoUse type lookup tables in compiler
Mathieu Chartier [Thu, 17 Nov 2016 00:22:37 +0000 (16:22 -0800)]
Use type lookup tables in compiler

This recently regressed and stopped happening, the fix creates fake
OatDexFiles so that the compiler uses the type lookup tables instead
of slow FindClassDef and FindTypeId.

Perf on host compile Facebook:
Before:
2.49%: art::DexFile::FindClassDef(unsigned short) const
1.59%: art::DexFile::FindTypeId(char const*) const

After:
0.42%: art::OatDexFile::FindClassDef(art::DexFile const&, char const*, unsigned long)
0%: art::DexFile::FindTypeId(char const*) const
0%: art::DexFile::FindClassDef(unsigned short) const

Average install (N6P 960 mhz average of 40 samples): 38.2s -> 35.64s

Bug: 32641252

Test: test-art-host, adb install.

Change-Id: I34df21dc2c155bc2579c5cafdd91f9cb0fead1a9

7 years agoMerge "ART: Fix line break in Throwable::Dump"
Treehugger Robot [Mon, 21 Nov 2016 17:38:14 +0000 (17:38 +0000)]
Merge "ART: Fix line break in Throwable::Dump"

7 years agoMerge "Revert "Revert "Revert "Revert "JIT root tables."""""
Nicolas Geoffray [Mon, 21 Nov 2016 10:14:06 +0000 (10:14 +0000)]
Merge "Revert "Revert "Revert "Revert "JIT root tables."""""

7 years agoMerge changes I240f8bb7,I27defaa7,Ib82d64cc
Treehugger Robot [Sun, 20 Nov 2016 00:37:56 +0000 (00:37 +0000)]
Merge changes I240f8bb7,I27defaa7,Ib82d64cc

* changes:
  ART: Do not DCHECK in verifier when already aborting
  ART: Add debug exception check to JIT
  ART: Extend DumpRecursiveAbort

7 years agoART: Fix line break in Throwable::Dump
Andreas Gampe [Sat, 19 Nov 2016 01:43:05 +0000 (17:43 -0800)]
ART: Fix line break in Throwable::Dump

Add line breaks for missing stack traces.

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

7 years agoART: Do not DCHECK in verifier when already aborting
Andreas Gampe [Sat, 19 Nov 2016 22:51:52 +0000 (14:51 -0800)]
ART: Do not DCHECK in verifier when already aborting

Only log an error in FailOrAbort in the debug build when the
runtime is already aborting.

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

7 years agoART: Add debug exception check to JIT
Andreas Gampe [Sat, 19 Nov 2016 01:39:45 +0000 (17:39 -0800)]
ART: Add debug exception check to JIT

Check for a pending exception after JIT compilation finishes.

Test: m ART_TEST_JIT=true test-art-host
Change-Id: I27defaa733f360cb1dbabede62d4908777bc5d2b

7 years agoART: Extend DumpRecursiveAbort
Andreas Gampe [Sat, 19 Nov 2016 01:21:12 +0000 (17:21 -0800)]
ART: Extend DumpRecursiveAbort

Accept recursive dump request for deeper recursions. Otherwise,
two or more threads aborting concurrently would ensure that there
are no dumps.

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

7 years agoMerge "Fix valgrind issue with thread_pool_test."
Treehugger Robot [Sat, 19 Nov 2016 01:07:35 +0000 (01:07 +0000)]
Merge "Fix valgrind issue with thread_pool_test."

7 years agoFix valgrind issue with thread_pool_test.
Andreas Gampe [Fri, 18 Nov 2016 23:06:21 +0000 (15:06 -0800)]
Fix valgrind issue with thread_pool_test.

Make sure the task list is empty at the end of the test. Follow-up
to commit e2fc98e88106b9cfa44eeacc6765c291feda04a8.

Test: m test-art-host-gtest-thread_pool_test
Test: m valgrind-test-art-host-gtest-thread_pool_test
Change-Id: Ib41a1f7dde9d45f1195e18ff6db4241fb7dc7428

7 years agoART: Add JNI local details for FollowReferences
Andreas Gampe [Fri, 18 Nov 2016 21:30:30 +0000 (13:30 -0800)]
ART: Add JNI local details for FollowReferences

Give details for the thread.

Stack depth and method are currently approximated (as
bottom of the stack), as the RootInfo does not have that
information.

Bug: 31385354
Test: m test-art-host-run-test-913-heaps
Change-Id: I8e51415a02678c55b687144b4cb749c4105bd3c1

7 years agoART: Fix generic_ptr handling in GetMethodName
Andreas Gampe [Fri, 18 Nov 2016 21:31:13 +0000 (13:31 -0800)]
ART: Fix generic_ptr handling in GetMethodName

Do not write null into a null pointer.

Bug: 31684812
Test: m test-art-host-run-test-910-methods
Change-Id: I79a255c1403ca9621390c9cdc09d2381c26fffb6

7 years agoMerge "Revert "Revert "Use interpret-only instead of verify-at-runtime when testing...
Treehugger Robot [Fri, 18 Nov 2016 21:04:59 +0000 (21:04 +0000)]
Merge "Revert "Revert "Use interpret-only instead of verify-at-runtime when testing JIT"""

7 years agoMerge "ART: Dump native stack on recursive abort"
Andreas Gampe [Fri, 18 Nov 2016 21:03:13 +0000 (21:03 +0000)]
Merge "ART: Dump native stack on recursive abort"

7 years agoMerge "Run 103-string-append with libartd."
Hiroshi Yamauchi [Fri, 18 Nov 2016 20:16:30 +0000 (20:16 +0000)]
Merge "Run 103-string-append with libartd."

7 years agoMerge "ART: Use cerr in Runtime::Abort on the host"
Treehugger Robot [Fri, 18 Nov 2016 19:33:25 +0000 (19:33 +0000)]
Merge "ART: Use cerr in Runtime::Abort on the host"

7 years agoRevert "Revert "Use interpret-only instead of verify-at-runtime when testing JIT""
Calin Juravle [Fri, 18 Nov 2016 17:39:26 +0000 (17:39 +0000)]
Revert "Revert "Use interpret-only instead of verify-at-runtime when testing JIT""

This reverts commit 0b4d05e096d31e9c2d5ae522dbcc7b190b60a6f6.

Test: m test-art-host-run-test
Change-Id: Ie946ebd899002bdc7502276b3d53000c551be768

7 years agoART: Dump native stack on recursive abort
Andreas Gampe [Fri, 18 Nov 2016 17:51:06 +0000 (09:51 -0800)]
ART: Dump native stack on recursive abort

Dump the native stack of the current thread on recursive abort.
That is safe to do, as it requires no runtime interaction.

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

7 years agoART: Use cerr in Runtime::Abort on the host
Andreas Gampe [Fri, 18 Nov 2016 17:30:08 +0000 (09:30 -0800)]
ART: Use cerr in Runtime::Abort on the host

Use cerr to immediately write out abort info on the host, in an
effort to make recursive aborts diagnosable. This is similar
(but slightly inferior) to the previous INTERNAL_FATAL fastpathing.

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

7 years agoMerge "Revert "Revert Revert "Use interpret-only instead of verify-at-runtime when...
Calin Juravle [Fri, 18 Nov 2016 16:09:11 +0000 (16:09 +0000)]
Merge "Revert "Revert Revert "Use interpret-only instead of verify-at-runtime when testing JIT"""

7 years agoRevert "Revert Revert "Use interpret-only instead of verify-at-runtime when testing...
Calin Juravle [Fri, 18 Nov 2016 16:07:58 +0000 (16:07 +0000)]
Revert "Revert Revert "Use interpret-only instead of verify-at-runtime when testing JIT""

test-art-host-run-test-debug-prebuild-jit-relocate-ntrace-gcstress-checkjni-picimage-npictest-ndebuggable-974-verify-interface-super64 fails on the build servers.

It's unclear if it's because of this CL but revert again to check if it fixes the problem.

Locally everything is green...
This reverts commit 0b64a5195b38773084ff94618ac22284bc855b92.

Change-Id: I4668b8d8f8c9672fd942a693d98a20113fbb6b9e

7 years agoRevert "Revert "Revert "Revert "JIT root tables.""""
Nicolas Geoffray [Wed, 16 Nov 2016 09:19:42 +0000 (09:19 +0000)]
Revert "Revert "Revert "Revert "JIT root tables.""""

Test: 626-set-resolved-string, test-art-host, test-art-target
Test: run-libcore-tests.sh
Test: phone boots and runs

This reverts commit 3395fbc20bcd20948bec8958db91b304c17cacd8.

Change-Id: I104b73d093e3eb6a271d564cfdb9ab09c1c8cf24

7 years agoMerge "Add dequickening support."
Nicolas Geoffray [Fri, 18 Nov 2016 13:14:10 +0000 (13:14 +0000)]
Merge "Add dequickening support."

7 years agoMerge "ARM: VIXL32: Fix PackedSwitch."
Nicolas Geoffray [Fri, 18 Nov 2016 12:54:00 +0000 (12:54 +0000)]
Merge "ARM: VIXL32: Fix PackedSwitch."

7 years agoMerge "Fix valgrind issue with thread_pool_test."
Nicolas Geoffray [Fri, 18 Nov 2016 12:02:15 +0000 (12:02 +0000)]
Merge "Fix valgrind issue with thread_pool_test."

7 years agoMerge "Revert Revert "Use interpret-only instead of verify-at-runtime when testing...
Calin Juravle [Fri, 18 Nov 2016 12:01:36 +0000 (12:01 +0000)]
Merge "Revert Revert "Use interpret-only instead of verify-at-runtime when testing JIT""

7 years agoMerge "Make ImageWriter and PatchOat helper classes nested."
Treehugger Robot [Fri, 18 Nov 2016 11:24:20 +0000 (11:24 +0000)]
Merge "Make ImageWriter and PatchOat helper classes nested."

7 years agoAdd dequickening support.
Nicolas Geoffray [Thu, 17 Nov 2016 10:58:36 +0000 (10:58 +0000)]
Add dequickening support.

Both vdex and BCI require full dequickening support. This
change implements dequickening by using the existing encoded
quickening, and adds the checkcast quickening to that encoding.

bug: 30937355
bug: 32369913
Test: dex_to_dex_decompiler_test.cc test-art-host

Change-Id: Ie95f46946d59b28157d6e47dcf4a859be032d1c3

7 years agoFix valgrind issue with thread_pool_test.
Nicolas Geoffray [Fri, 18 Nov 2016 10:12:51 +0000 (10:12 +0000)]
Fix valgrind issue with thread_pool_test.

Make sure the task list is empty at the end of the test.

Test: thread_pool_test

Change-Id: I155a8eb90dc83a0dd9128f0c0bc64deeba7a92e9

7 years agoMerge "ART: Make libopenjdkjvmti a run-test dependency"
Treehugger Robot [Fri, 18 Nov 2016 08:29:12 +0000 (08:29 +0000)]
Merge "ART: Make libopenjdkjvmti a run-test dependency"

7 years agoART: Make libopenjdkjvmti a run-test dependency
Andreas Gampe [Fri, 18 Nov 2016 06:50:33 +0000 (22:50 -0800)]
ART: Make libopenjdkjvmti a run-test dependency

Add libopenjdkjvmti as a host dependency for running tests, as
required by the tests 900-913.

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

7 years agoMerge "Fix false positive stack ASan errors on x86."
Treehugger Robot [Fri, 18 Nov 2016 04:02:56 +0000 (04:02 +0000)]
Merge "Fix false positive stack ASan errors on x86."

7 years agoMerge "ART: Remove ti library dependency for ti tests"
Treehugger Robot [Fri, 18 Nov 2016 03:21:03 +0000 (03:21 +0000)]
Merge "ART: Remove ti library dependency for ti tests"

7 years agoFix false positive stack ASan errors on x86.
Evgenii Stepanov [Fri, 18 Nov 2016 01:57:25 +0000 (17:57 -0800)]
Fix false positive stack ASan errors on x86.

Call a special ASan function in x86 DoLongJump to let the tool know
that strange things are going to happen with the stack pointer. Other
architectures do not need this because they do the stack pointer
manipulation in a separate ((noreturn)) function, and noreturn
attribute triggers the same conservative behaviour in ASan.

Bug: 24199050
Bug: 32849425
Test: SANITIZE_HOST=address stub_test32
Change-Id: Ic639d2d84474d875487e66369c034db9907a7e8f

7 years agoRun 103-string-append with libartd.
Hiroshi Yamauchi [Fri, 18 Nov 2016 01:33:40 +0000 (17:33 -0800)]
Run 103-string-append with libartd.

For debugging b/31357497.

Bug: 31357497
Bug: 12687968
Test: run-test --host 103-string-append.
Change-Id: I7450c8b142b2cf29615e12aeecd6285d45f468c0

7 years agoART: Remove ti library dependency for ti tests
Andreas Gampe [Fri, 18 Nov 2016 01:13:53 +0000 (17:13 -0800)]
ART: Remove ti library dependency for ti tests

The agent so should not depend on libopenjdkjvmti.so.

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

7 years agoMerge "ART: Rewrite test 913 printing"
Treehugger Robot [Thu, 17 Nov 2016 23:17:31 +0000 (23:17 +0000)]
Merge "ART: Rewrite test 913 printing"

7 years agoMerge "Change offline profile to store type_idx of classes."
Jeff Hao [Thu, 17 Nov 2016 21:31:00 +0000 (21:31 +0000)]
Merge "Change offline profile to store type_idx of classes."

7 years agoMerge changes I710ca0ed,I576e7926,Id0144b68
Treehugger Robot [Thu, 17 Nov 2016 20:59:11 +0000 (20:59 +0000)]
Merge changes I710ca0ed,I576e7926,Id0144b68

* changes:
  ART: Stop JIT in 913-heaps
  ART: Add ScopedJitSuspend
  ART: Change ThreadPool::Wait behavior

7 years agoART: Rewrite test 913 printing
Andreas Gampe [Thu, 17 Nov 2016 19:23:35 +0000 (11:23 -0800)]
ART: Rewrite test 913 printing

Detailed printing has to be postponed, as many required functions
are not callback-safe. Refactor the printing logic.

Bug: 31385354
Test: m test-art-host-run-test-913-heaps
Change-Id: I690752bffe4b27292eb2f2e89b1b6281a5836bb2

7 years agoChange offline profile to store type_idx of classes.
Jeff Hao [Wed, 16 Nov 2016 23:15:04 +0000 (15:15 -0800)]
Change offline profile to store type_idx of classes.

Changed from storing class_def_idx to type_idx. Allows dexlayout to move
class defs without affecting the profile.

Test: mm test-art-host

Change-Id: I8a040adf0f5f47a1592e18aeb55edde01cb3e1ed

7 years agoMerge "[MIPS64] JNI Compiler: compiler independent test"
Treehugger Robot [Thu, 17 Nov 2016 17:30:43 +0000 (17:30 +0000)]
Merge "[MIPS64] JNI Compiler: compiler independent test"

7 years agoMake ImageWriter and PatchOat helper classes nested.
Vladimir Marko [Thu, 17 Nov 2016 16:38:59 +0000 (16:38 +0000)]
Make ImageWriter and PatchOat helper classes nested.

Nested classes are better for encapsulation. For example,
we've had an art::FixupRootVisitor in both image_writer.cc
and patchoat.cc and we didn't get an ODR violation only
because these two files are never used in the same process.

Test: Rely on the TreeHugger.
Change-Id: I39a86994923a9c0faa5f05d8c9ede982ce9c0c4c

7 years agoART: Stop JIT in 913-heaps
Andreas Gampe [Wed, 16 Nov 2016 18:58:11 +0000 (10:58 -0800)]
ART: Stop JIT in 913-heaps

To avoid any JIT interaction, stop the JIT thread pool in
test 913-heaps.

Bug: 31385354
Test: m ART_TEST_JIT=true test-art-host-run-test-913-heaps
Change-Id: I710ca0ed3736b5394863aa76aff9ea2ae7d50cb1

7 years agoART: Add ScopedJitSuspend
Andreas Gampe [Wed, 16 Nov 2016 22:58:24 +0000 (14:58 -0800)]
ART: Add ScopedJitSuspend

Add a helper to suspend the JIT in a scope. This will
wait for the JIT to quiesce, finishing already running
compile jobs. Note that the queue will not be drained,
jobs not picked up by the pool, yet, will remain in
the queue.

Bug: 31385354
Test: m test-art-host
Change-Id: I576e7926423f19a8f382be1263838cd924955f1c

7 years agoART: Change ThreadPool::Wait behavior
Andreas Gampe [Wed, 16 Nov 2016 21:58:05 +0000 (13:58 -0800)]
ART: Change ThreadPool::Wait behavior

When a pool is in the stopped state, Wait() will not wait for all
tasks to complete.

Bug: 31385354
Test: m test-art-host-gtest-thread_pool_test
Change-Id: Id0144b685ee2fddf1a1c2c2ca334251130121033

7 years agoARM: VIXL32: Fix PackedSwitch.
Artem Serov [Fri, 11 Nov 2016 16:15:11 +0000 (16:15 +0000)]
ARM: VIXL32: Fix PackedSwitch.

Fix the case when the jumptable is very far and offset doesn't
fit ADR offset field.

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

Change-Id: I2b8ac04eb343947f9a9301f3ce6285794ddad4b8

7 years agoMerge "Revert "jni: Punt to generic JNI for mips""
Treehugger Robot [Thu, 17 Nov 2016 15:57:53 +0000 (15:57 +0000)]
Merge "Revert "jni: Punt to generic JNI for mips""

7 years agoMerge "jni: Add @CriticalNative support for MIPS32/MIPS64"
Treehugger Robot [Thu, 17 Nov 2016 15:57:53 +0000 (15:57 +0000)]
Merge "jni: Add @CriticalNative support for MIPS32/MIPS64"

7 years agoMerge "MIPS32: Assign missing entrypoints in InitEntryPoints"
Treehugger Robot [Thu, 17 Nov 2016 15:57:48 +0000 (15:57 +0000)]
Merge "MIPS32: Assign missing entrypoints in InitEntryPoints"

7 years agoRevert Revert "Use interpret-only instead of verify-at-runtime when testing JIT"
Calin Juravle [Thu, 17 Nov 2016 15:19:21 +0000 (15:19 +0000)]
Revert Revert "Use interpret-only instead of verify-at-runtime when testing JIT"

This reverts commit f1d926592ca7030ad12abc75f2b56643a9e23645.

Change-Id: I161f2e0381a31cad8b014d7384eac2e776ae5411

7 years agoMerge "Add const-class benchmark."
Vladimir Marko [Thu, 17 Nov 2016 14:24:45 +0000 (14:24 +0000)]
Merge "Add const-class benchmark."

7 years agoAdd const-class benchmark.
Vladimir Marko [Wed, 16 Nov 2016 15:40:12 +0000 (15:40 +0000)]
Add const-class benchmark.

Also fix indentation in const-string benchmark.

Test: vogar --benchmark art/benchmark/const-class/src/ConstClassBenchmark.java
Test: vogar --benchmark art/benchmark/const-string/src/ConstStringBenchmark.java
Bug: 30627598
Change-Id: I04ca9514f6e647640e2c0d9d65fdc4ace652927a

7 years ago[MIPS64] JNI Compiler: compiler independent test
Pavle Batuta [Wed, 16 Mar 2016 10:31:46 +0000 (11:31 +0100)]
[MIPS64] JNI Compiler: compiler independent test

Fixed MIPS64 stackArgsSignExtendedTest that did not work properly
when code was built with clang. The the test is now written in an
asm stub and should be completely compiler indepedent.

Test: mma test-art-target-gtest-jni_compiler_test

Change-Id: Idefef3a8414dd8b88a28d2d8862a724bc72402a7

7 years agoMerge "MethodHandles: Check return types when resolving handles."
Orion Hodson [Thu, 17 Nov 2016 10:26:45 +0000 (10:26 +0000)]
Merge "MethodHandles: Check return types when resolving handles."

7 years agoMerge "ARM: VIXL32: Arch specific operations."
Nicolas Geoffray [Thu, 17 Nov 2016 09:39:23 +0000 (09:39 +0000)]
Merge "ARM: VIXL32: Arch specific operations."

7 years agoMerge "Address comments from aog/303658."
Hiroshi Yamauchi [Thu, 17 Nov 2016 00:36:44 +0000 (00:36 +0000)]
Merge "Address comments from aog/303658."

7 years agoMerge "Ensure CC GC is used for the read barrier config."
Treehugger Robot [Wed, 16 Nov 2016 22:39:44 +0000 (22:39 +0000)]
Merge "Ensure CC GC is used for the read barrier config."

7 years agoMerge "Change iftable to never be null"
Mathieu Chartier [Wed, 16 Nov 2016 21:40:34 +0000 (21:40 +0000)]
Merge "Change iftable to never be null"

7 years agoAddress comments from aog/303658.
Hiroshi Yamauchi [Wed, 16 Nov 2016 21:30:17 +0000 (13:30 -0800)]
Address comments from aog/303658.

Bug: 12687968
Test: test-art-host with CC.
Change-Id: I87a3be336cb1c6b17acc515415c325464ffddc01

7 years agoEnsure CC GC is used for the read barrier config.
Hiroshi Yamauchi [Tue, 15 Nov 2016 01:35:12 +0000 (17:35 -0800)]
Ensure CC GC is used for the read barrier config.

To prevent the -Xgc option from causing unsupported GC types to run.

Bug: 12687968
Test: test-art-host with CC.
Change-Id: I10b42190c0888342e9127c52e863ddae82e4d7a1

7 years agoChange iftable to never be null
Mathieu Chartier [Tue, 15 Nov 2016 23:51:31 +0000 (15:51 -0800)]
Change iftable to never be null

Simplifies code generation by removing a null check. The null case
is rare.

Ritzperf code size: 13107624 -> 13095336

Also addressed comments from previous CL.

Bug: 32577579

Test: test-art-host, run ritzperf both with CC

Change-Id: I2b31e800867112869d7f0643e16c08826296979e

7 years agoARM: VIXL32: Arch specific operations.
Artem Serov [Fri, 21 Oct 2016 10:51:50 +0000 (11:51 +0100)]
ARM: VIXL32: Arch specific operations.

Tests which now start to pass:
  550-checker-multiply-accumulate
  564-checker-negbitwise

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

Change-Id: I0b057486a8e0e48afbc52dd18b61ea16c671bec2

7 years agoMerge "A few more tests for LICM."
Aart Bik [Wed, 16 Nov 2016 18:04:54 +0000 (18:04 +0000)]
Merge "A few more tests for LICM."