OSDN Git Service
Richard Uhler [Fri, 25 Nov 2016 18:20:48 +0000 (18:20 +0000)]
Simplify decision of which is the best oat file.
am:
70a8426705
Change-Id: I6dba62a2eb73d74cea86866da121ff4016858b70
Vladimir Marko [Fri, 25 Nov 2016 18:20:31 +0000 (18:20 +0000)]
Merge "Revert "Revert "Revert "Make sure that const-class linkage is preserved.""""
am:
7b7a78e811
Change-Id: Ie11ea8b42fd57f035fb6b3eaca350e30ad651a9c
Vladimir Marko [Thu, 24 Nov 2016 13:05:12 +0000 (13:05 +0000)]
Merge "Revert "Revert "Revert "Make sure that const-class linkage is preserved.""""
Vladimir Marko [Thu, 24 Nov 2016 13:03:57 +0000 (13:03 +0000)]
Revert "Revert "Revert "Make sure that const-class linkage is preserved."""
626-const-class-linking is failing (spurious wakeups?)
970-iface-super-resolution-gen is failing:
dex2oatd F 11-24 10:57:16 6410 6410 image_writer.cc:1144]
Check failed: !IsBootClassLoaderClass(as_klass)
java.lang.Class<java.lang.NoSuchMethodError>
Bug:
30627598
This reverts commit
25dcbad4462ea7279ee2bbe0884abc25bdfac77a.
Change-Id: Ie010169bdde45e6ccf2e04a521da4682bd817114
Orion Hodson [Thu, 24 Nov 2016 12:00:45 +0000 (12:00 +0000)]
Merge "Method Handles: Add VarargsCollector."
am:
4bb3c7fb33
Change-Id: Ibc3683991b3ec1c782080545c717f41f5675e501
Orion Hodson [Thu, 24 Nov 2016 11:57:29 +0000 (11:57 +0000)]
Merge "Method Handles: Add VarargsCollector."
Vladimir Marko [Thu, 24 Nov 2016 10:12:21 +0000 (10:12 +0000)]
Merge "Revert "Revert "Make sure that const-class linkage is preserved."""
am:
8f3435981e
Change-Id: Ia674db31f9d9da3b09cd0c325467473342c36941
Vladimir Marko [Thu, 24 Nov 2016 10:07:53 +0000 (10:07 +0000)]
Merge "Revert "Revert "Make sure that const-class linkage is preserved."""
Richard Uhler [Tue, 8 Nov 2016 16:51:51 +0000 (16:51 +0000)]
Simplify decision of which is the best oat file.
Previously the best oat file was determined by looking at all
combination of states of the oat file in the odex location and the oat
location. This change simplifies the decision by using the oat
location if that oat file is not out of date and using the odex
location otherwise. For practical cases, both decisions lead to the
same result.
Bug:
30937355
Test: oat_file_assistant_test
Change-Id: I687206612914cdbd43950fcdd7dd818a54255a6b
Mathieu Chartier [Wed, 23 Nov 2016 19:22:55 +0000 (19:22 +0000)]
Merge "Speed up verified methods"
am:
4b600964fe
Change-Id: I7a0b407cfeadc31974c4322659a8bf8b837b527a
Mathieu Chartier [Wed, 23 Nov 2016 19:19:22 +0000 (19:19 +0000)]
Merge "Speed up verified methods"
Nicolas Geoffray [Wed, 23 Nov 2016 18:09:42 +0000 (18:09 +0000)]
Merge "libopenjdkjvmti is actually not a test library."
am:
b9bc47f0e2
Change-Id: I4d2d12ff0a83d3c0cc17cead1c88c3e086f63ce9
Nicolas Geoffray [Wed, 23 Nov 2016 17:26:20 +0000 (17:26 +0000)]
Merge "libopenjdkjvmti is actually not a test library."
Vladimir Marko [Wed, 23 Nov 2016 13:35:26 +0000 (13:35 +0000)]
Revert "Revert "Make sure that const-class linkage is preserved.""
Fix jdwp getting multiple instances of the same class.
Fix counting "zygote"/"non-zygote" classes in class table.
Fix FindClass() to EnsureResolved() classes added by
a racing thread to the class table.
Test: m test-art-host
Test: art/tools/run-jdwp-tests.sh --mode=host --variant=X64 --debug
Bug:
30627598
This reverts commit
ecffc67068a28d55d131553bf915fdb9fafbbc03.
Change-Id: I15807949da4f163c2693fac2fbfc274f17685f8a
Orion Hodson [Fri, 11 Nov 2016 11:11:31 +0000 (11:11 +0000)]
Method Handles: Add VarargsCollector.
Enable support for methods with variable arity arguments.
Test: m test-art-host-run-test-956-methodhandles
Bug:
30550796
Change-Id: I205724ddacc6c9840e18093a3984c1ad6e54394a
Nicolas Geoffray [Wed, 23 Nov 2016 16:25:15 +0000 (16:25 +0000)]
libopenjdkjvmti is actually not a test library.
Use the right target for the libopenjdkjvmti library.
Test: test-art-target-sync
Change-Id: I8c23c87911bc890482e5e9be3d64ce0a362b6924
Nicolas Geoffray [Wed, 23 Nov 2016 14:26:36 +0000 (14:26 +0000)]
Merge "Update expectations in SetVerifierDeps/SetStackSample."
am:
bbf3311144
Change-Id: Ie8034aac520e01e4e86d1d9769683e188463488d
Nicolas Geoffray [Wed, 23 Nov 2016 14:23:05 +0000 (14:23 +0000)]
Merge "Update expectations in SetVerifierDeps/SetStackSample."
Calin Juravle [Wed, 23 Nov 2016 12:56:00 +0000 (12:56 +0000)]
Merge "Revert "Use interpret-only instead of verify-at-runtime when testing JIT""
am:
dd77c2b4ff
Change-Id: I7ebda97eb2430684f5acbbf90f36174f5a1b6fe8
Calin Juravle [Wed, 23 Nov 2016 12:53:24 +0000 (12:53 +0000)]
Merge "Revert "Use interpret-only instead of verify-at-runtime when testing JIT""
Calin Juravle [Wed, 23 Nov 2016 12:52:53 +0000 (12:52 +0000)]
Revert "Use interpret-only instead of verify-at-runtime when testing JIT"
This reverts commit
8b2cf761df20e60a9e0e57564db3ab4eae5d64a7.
Change-Id: I3a15a20eb9d3c71902f42cd5e559d8ab4e15f07d
Nicolas Geoffray [Wed, 23 Nov 2016 12:52:01 +0000 (12:52 +0000)]
Update expectations in SetVerifierDeps/SetStackSample.
SetStackSample might update an existing sample. So instead
check that SetStackSample is only called in non-AOT mode, and
SetVerifierDeps is only called in AOT mode.
Test: 099-vmdebug
Change-Id: I80dc3d61da651fb311364418802b0bb7e1ce9351
Nicolas Geoffray [Wed, 23 Nov 2016 12:38:59 +0000 (12:38 +0000)]
Merge "Update run-test dependencies on device."
am:
8f26b1039a
Change-Id: Ic8a87bf2993e4c1a058341b941369dd53f979445
Nicolas Geoffray [Wed, 23 Nov 2016 12:35:42 +0000 (12:35 +0000)]
Merge "Update run-test dependencies on device."
Nicolas Geoffray [Wed, 23 Nov 2016 10:47:02 +0000 (10:47 +0000)]
Update run-test dependencies on device.
Test: test-art-target
Change-Id: I5f58bcbf9eb41571d9511eba8b3f11765baf24a2
Roland Levillain [Wed, 23 Nov 2016 10:39:53 +0000 (10:39 +0000)]
Merge "Fix build rules for statically linked oatdump on host."
am:
71601907b9
Change-Id: Ie2ce7d6a6d8cd8da033da76e97657ab81ba12411
Roland Levillain [Wed, 23 Nov 2016 10:33:03 +0000 (10:33 +0000)]
Merge "Fix build rules for statically linked oatdump on host."
Mathieu Chartier [Mon, 21 Nov 2016 23:05:23 +0000 (15:05 -0800)]
Speed up verified methods
Switch to an array of atomic pointers instead of a map. Removes lock
and map lookup. Also address comments from previous CL.
GetVerifiedMethod: 1.59% -> 0.18% of compilation time.
Install time seems to goes down by around 1%.
Also has significant RAM savings (FB host compile):
dex2oat native alloc:
84695472B ->
71268736B
For the JIT case, the old method is used to prevent any increase in
RAM usage.
Bug:
32641252
Test: test-art-host
Change-Id: I47b4b8a4a3cb3f8ef23e36a888b8885e12168787
Jeff Hao [Tue, 22 Nov 2016 23:56:34 +0000 (23:56 +0000)]
Merge changes from topic 'dex2oat_dexlayout'
am:
f215c5255c
Change-Id: I3fbaa07cff742d3a30d9690c20b0cef0ce704e8e
Jeff Hao [Tue, 22 Nov 2016 23:56:31 +0000 (23:56 +0000)]
Add layout scheme to dexlayout for dex file reordering.
am:
042e898f18
Change-Id: Id986b7e4565e8a212592cbea436bbc6f3fcd2144
Jeff Hao [Tue, 22 Nov 2016 23:56:22 +0000 (23:56 +0000)]
Add new --layout-profile compiler-filter for dex2oat.
am:
608f2ce4b9
Change-Id: I1c9efafa21d8c5395e972ce877ec536b06cda0b6
Jeff Hao [Tue, 22 Nov 2016 23:56:13 +0000 (23:56 +0000)]
Dexlayout cleanup and refactoring.
am:
ea7c62983b
Change-Id: Icd9dfef960434e98f15d41c40587d49e9eeda39a
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.
Mathieu Chartier [Tue, 22 Nov 2016 23:16:41 +0000 (23:16 +0000)]
Merge "Always fill in root table length"
am:
47d840bcf9
Change-Id: Ib3d5aba98aa9bc309adc8b7da343c413dac097f5
Mathieu Chartier [Tue, 22 Nov 2016 23:09:48 +0000 (23:09 +0000)]
Merge "Always fill in root table length"
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
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
David Sehr [Tue, 22 Nov 2016 20:36:33 +0000 (20:36 +0000)]
Merge "Verify for type_id out of range errors"
am:
0e5e9fd335
Change-Id: I518647ad95f43009faedc6856e414c85a95ffe44
Treehugger Robot [Tue, 22 Nov 2016 20:30:12 +0000 (20:30 +0000)]
Merge "Verify for type_id out of range errors"
Mathieu Chartier [Tue, 22 Nov 2016 19:30:25 +0000 (19:30 +0000)]
Merge "Correctly handle EINTR return from futex"
am:
f05ccaf2cc
Change-Id: I414188a3ea6a4e5012a3c7e3aa1dec80e7d23020
Mathieu Chartier [Tue, 22 Nov 2016 19:26:09 +0000 (19:26 +0000)]
Merge "Correctly handle EINTR return from futex"
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
Vladimir Marko [Tue, 22 Nov 2016 17:55:47 +0000 (17:55 +0000)]
Merge "Revert "Make sure that const-class linkage is preserved.""
am:
c394d0558d
Change-Id: I814068b7798f1122adf45cd148b378ee58788562
Vladimir Marko [Tue, 22 Nov 2016 17:49:05 +0000 (17:49 +0000)]
Merge "Revert "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
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
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
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
Nicolas Geoffray [Tue, 22 Nov 2016 17:11:46 +0000 (17:11 +0000)]
Merge "Use a per-thread VerifierDeps."
am:
b46782abf6
Change-Id: I900234e05e0ec4bd9daaf2cbff4342bbc8cdc969
Nicolas Geoffray [Tue, 22 Nov 2016 17:07:46 +0000 (17:07 +0000)]
Merge "Use a per-thread VerifierDeps."
Nicolas Geoffray [Tue, 22 Nov 2016 16:44:14 +0000 (16:44 +0000)]
Merge "Clear the right data pointer."
am:
24a56c6207
Change-Id: I81be126ea1ca97b4879196ac6ffd9d98c2ac75ed
Nicolas Geoffray [Tue, 22 Nov 2016 16:40:20 +0000 (16:40 +0000)]
Merge "Clear the right data pointer."
Vladimir Marko [Tue, 22 Nov 2016 15:05:45 +0000 (15:05 +0000)]
Merge changes If9d1da45,I6daecb52
am:
701bb7d1d7
Change-Id: I2f916d2ca886544bb8ea466be8ed4ff9b3e83261
Vladimir Marko [Tue, 22 Nov 2016 15:05:44 +0000 (15:05 +0000)]
Do not test class unloading in 626-const-class-linking
am:
ddb8afec79
Change-Id: I0f4b03d17ac2ab4f8127547f349c62ffed51288b
Vladimir Marko [Tue, 22 Nov 2016 15:05:36 +0000 (15:05 +0000)]
Fix 626-const-class-linking for no-dex2oat configuration.
am:
0ba0c7d9b0
Change-Id: I401dde049079e642520d3f7a1f721a226b9879ad
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.
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
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
Nicolas Geoffray [Tue, 22 Nov 2016 13:23:59 +0000 (13:23 +0000)]
Merge "ARM: VIXL32: Fix the assembler usage in the intrinsics."
am:
eb9c58e88f
Change-Id: I3327dea73266d30d2b98ae83e6cf913028a29f08
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
Nicolas Geoffray [Tue, 22 Nov 2016 13:18:55 +0000 (13:18 +0000)]
Merge "ARM: VIXL32: Fix the assembler usage in the intrinsics."
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
Vladimir Marko [Tue, 22 Nov 2016 12:14:56 +0000 (12:14 +0000)]
Merge "Fix build: update test to use dex::TypeIndex."
am:
71d15102b5
Change-Id: Icffcb8367e69bfa2db75c908ea0ec56309322882
Vladimir Marko [Tue, 22 Nov 2016 12:12:12 +0000 (12:12 +0000)]
Merge "Fix 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
Vladimir Marko [Tue, 22 Nov 2016 11:29:23 +0000 (11:29 +0000)]
Merge "Make sure that const-class linkage is preserved."
am:
9ee5fdf92f
Change-Id: I8afb9b99379656a8206b3bfed565a887189fbf16
Vladimir Marko [Tue, 22 Nov 2016 11:23:16 +0000 (11:23 +0000)]
Merge "Make sure that const-class linkage is preserved."
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
Mathieu Chartier [Mon, 21 Nov 2016 23:37:02 +0000 (23:37 +0000)]
Merge "Check same dex file for finding class descriptor string id"
am:
da2d78ba97
Change-Id: I9b1b817d53bdc3d90287a73ea1765628aa5d12bb
Mathieu Chartier [Mon, 21 Nov 2016 23:32:45 +0000 (23:32 +0000)]
Merge "Check same dex file for finding class descriptor string id"
Andreas Gampe [Mon, 21 Nov 2016 22:11:59 +0000 (22:11 +0000)]
Merge changes I8e51415a,I79a255c1
am:
668ba83a0a
Change-Id: Ibebfdde3f142515400a75a53f8d40ef99f64f50a
Andreas Gampe [Mon, 21 Nov 2016 22:11:57 +0000 (22:11 +0000)]
ART: Add JNI local details for FollowReferences
am:
93c3090f39
Change-Id: I005db15356e6fdbbebd3fd56163a2c41dd406079
Andreas Gampe [Mon, 21 Nov 2016 22:11:50 +0000 (22:11 +0000)]
ART: Fix generic_ptr handling in GetMethodName
am:
862bdd8ac9
Change-Id: Idb8ac2e3df2215aeaaa58998b5cd78b25e979514
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
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
Andreas Gampe [Mon, 21 Nov 2016 21:21:47 +0000 (21:21 +0000)]
Merge "ART: Add dex::TypeIndex"
am:
a598b869b2
Change-Id: I37ff0c2a56b79e1288375f9126dc885688f2facc
Treehugger Robot [Mon, 21 Nov 2016 21:17:32 +0000 (21:17 +0000)]
Merge "ART: Add dex::TypeIndex"
Andreas Gampe [Mon, 21 Nov 2016 20:51:14 +0000 (20:51 +0000)]
Merge "ART: Add boot classpath check for initialization"
am:
b2dc551496
Change-Id: Ifc8f22c78299f05575bd122c36b00c5a57391b68
Treehugger Robot [Mon, 21 Nov 2016 20:43:12 +0000 (20:43 +0000)]
Merge "ART: Add boot classpath check for initialization"
Mathieu Chartier [Mon, 21 Nov 2016 20:25:12 +0000 (20:25 +0000)]
Merge "Use type lookup tables in compiler"
am:
e38f0320df
Change-Id: I15abc8dd3dd125cc58a0db8805708fcf9f548411
Mathieu Chartier [Mon, 21 Nov 2016 20:19:58 +0000 (20:19 +0000)]
Merge "Use type lookup tables in compiler"
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
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
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
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
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
Andreas Gampe [Mon, 21 Nov 2016 17:43:03 +0000 (17:43 +0000)]
Merge "ART: Fix line break in Throwable::Dump"
am:
bb4366d2b0
Change-Id: Ib5a4c88e55c982563e607282d9f3100ec7fc1101
Treehugger Robot [Mon, 21 Nov 2016 17:38:14 +0000 (17:38 +0000)]
Merge "ART: Fix line break in Throwable::Dump"
Nicolas Geoffray [Mon, 21 Nov 2016 10:24:07 +0000 (10:24 +0000)]
Merge "Revert "Revert "Revert "Revert "JIT root tables."""""
am:
dac7ad17c7
Change-Id: Ie713d994800586937fb5fa09b1e21610bf3c3a47
Nicolas Geoffray [Mon, 21 Nov 2016 10:14:06 +0000 (10:14 +0000)]
Merge "Revert "Revert "Revert "Revert "JIT root tables."""""
Andreas Gampe [Sun, 20 Nov 2016 00:45:26 +0000 (00:45 +0000)]
Merge changes I240f8bb7,I27defaa7,Ib82d64cc
am:
af524438b8
Change-Id: I18004b2d494439d0049bab27c3b1e17acf358fa3
Andreas Gampe [Sun, 20 Nov 2016 00:45:24 +0000 (00:45 +0000)]
ART: Do not DCHECK in verifier when already aborting
am:
f8f36c246e
Change-Id: Ibdb46ec8ba6cceafa632d9598cb1ecfd1365321a
Andreas Gampe [Sun, 20 Nov 2016 00:45:14 +0000 (00:45 +0000)]
ART: Add debug exception check to JIT
am:
320ba91911
Change-Id: Iea08ffba838db12b597ac6019963ba591299ee46
Andreas Gampe [Sun, 20 Nov 2016 00:45:05 +0000 (00:45 +0000)]
ART: Extend DumpRecursiveAbort
am:
9fd470f873
Change-Id: I1ac6cd762b562d95cbd783f2eb0ff3cb81fa4ae3
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
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
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
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
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
Andreas Gampe [Sat, 19 Nov 2016 01:13:36 +0000 (01:13 +0000)]
Merge "Fix valgrind issue with thread_pool_test."
am:
ab07cbe238
Change-Id: Ia415fcd73aa4533af33273f71bb8c8fa8827ffcc