OSDN Git Service
Mathieu Chartier [Tue, 20 Sep 2016 22:33:31 +0000 (15:33 -0700)]
Smarter image layout
Put strings in the dex file that resolves them.
Depth first traversal with overrides for class and dex cache. The
work list keeps track of what oat_index with each pushed item. This
means the static fields of a class will usually be in the same image.
Added layout test to image_test to make sure things are somewhat
reasonably attributed.
Bug:
28640955
Test: test-art-host
Change-Id: I67a536c33aeed603b252d8e0f75622c9efbf2559
TreeHugger Robot [Thu, 22 Sep 2016 02:00:45 +0000 (02:00 +0000)]
Merge "Make image test multi image" into nyc-mr1-dev
Mathieu Chartier [Wed, 21 Sep 2016 22:24:18 +0000 (15:24 -0700)]
Make image test multi image
Required for testing multi image layout in future CLs.
Bug:
28640955
Test: clean-oat-hos, test-art-host, device booting
Change-Id: I14809f56e711b4a87e01056c327eddbbd087f4ee
Jeff Hao [Wed, 14 Sep 2016 22:56:35 +0000 (15:56 -0700)]
Ensure class is initialized when reading its fields from debugger.
Bug:
31016523
Test: mm run-jdwp-tests-ri & mm run-jdwp-tests-host
(cherry-picked from commit
de19a25625823496bcf8f92352f709c7a3924bfa)
Change-Id: I02f6c66116f4507c89f7ca1cb480d7029d97c485
TreeHugger Robot [Fri, 9 Sep 2016 21:51:51 +0000 (21:51 +0000)]
Merge "Fix vtable corruption issue" into nyc-mr1-dev
Alex Light [Wed, 7 Sep 2016 19:04:20 +0000 (12:04 -0700)]
Fix vtable corruption issue
We were adding duplicate methods to the vtable in some cases where
default methods (and conflict methods) were used. This caused issues
where they were not correctly overridden in subclasses that implement
these methods directly. When overridden only one of the vtable entries
was updated meaning it was still possible to reach the overridden code
using a virtual call.
This change prevents the duplicate methods from being added to the
vtable in this circumstance. It also adds a debug check that ensures
that the vtable has no duplicates to prevent regressions.
Bug:
31280371
Test: mma test-art-host
Test: mma test-art-host-run-test-960-default-smali
Change-Id: I17d88fb8949c8d5d75b4de3c734fd98660b81e61
(cherry picked from commit
1f3925d4f067438d3689ef2736fd2af063c98668)
Mathieu Chartier [Fri, 9 Sep 2016 00:34:25 +0000 (17:34 -0700)]
Don't assume resolved classses are filled in for ResolvedFieldAccessTest
The assumption that the dex cache type for class of the field is
resolved is not correct since FindClass does not fill in the
resolved type array. This resulted in crashes if dex_access_to ==
nullptr.
Also implemented for ResolvedMethodAccessTest
Bug:
31277064
Test: Launch ZeroTouch with profile guided compilation.
Change-Id: I40cfb15f3ae4fbfe941fd01ea46211bd86b6e6f7
David Sehr [Wed, 17 Aug 2016 02:22:57 +0000 (19:22 -0700)]
Save environment snapshot and use at fork/exec
Some applications may inadvertently or maliciously set of environment
variables such as LD_LIBRARY_PATH before spawning subprocesses.
To make this more difficult, save the environment at the time the
runtime starts and use the saved copy anytime Exec is called.
BUG:
30160149
TEST: make test-art-{host,target}
Change-Id: I887b78bdb21ab20855636a96da14a74c767bbfef
(cherry picked from commit
d106d9f871c957286ccdeb79c1c2a5ed41f859a6)
Nicolas Geoffray [Mon, 29 Aug 2016 22:50:54 +0000 (22:50 +0000)]
Pass the right class loader when inlining. am:
c770fe0480
am:
5b5ee2a89f
Change-Id: I47bfba0654850a6e15ef0337556ed6a12e02fb90
Nicolas Geoffray [Mon, 29 Aug 2016 22:47:31 +0000 (22:47 +0000)]
Pass the right class loader when inlining.
am:
c770fe0480
Change-Id: If6f2946d649addef8381079eb0132d35ee1fd62f
Nicolas Geoffray [Thu, 28 Jul 2016 02:49:14 +0000 (03:49 +0100)]
Pass the right class loader when inlining.
Otherwise, method and type resolution can resolve to the wrong
things and as a side effect update the dex cache with wrong data.
bug:
30403437
Change-Id: I23f94486f51c65e0a1328c6185b36084627e09b3
test:./art/test/run-test --host --jit --dev --no-prebuild 613
(cherry picked from commit
0a210d9b108c87c0e7c1d430a92ce6fc89790c95)
Christopher Ferris [Fri, 17 Jun 2016 06:19:36 +0000 (23:19 -0700)]
Add lock when iterating over BacktraceMap.
In order to avoid a race condition in the maps data, acquire
a read lock while iterating over the maps data.
Bug:
29387050
Bug:
31067025
(cherry picked from commit
56f8b5631ab2874dc2ec385802e38555acac0d90)
Change-Id: I48ecd2705b4aa4eedfed1daae2eb3b9b8bf8dda9
Mathieu Chartier [Fri, 5 Aug 2016 17:46:36 +0000 (10:46 -0700)]
Card mark holding class instead of declaring class
For profiling info, we need to mark the card of the holding class
instead of declaring class. This is required for GC correctness since
the GC relies on the card table to track cross space references.
Test: test-art-host ART_TEST_JIT=true
Bug:
30655270
(cherry picked from commit
65975776f807d55c83af6cca1e447f8daa794413)
Change-Id: I3de518693d3cac1ad9770eae671db740ebdf1d8d
Mathieu Chartier [Fri, 29 Jul 2016 23:26:01 +0000 (16:26 -0700)]
Revert "Revert "Use try lock to fix class resolution race""
Fix possible deadlock in EnsureResolved caused by interaction with
GC. Since we were sleeping while holding the mutator lock, it could
block thread suspension. This would deadlock if the thread that
had locked h_class is already suspended since we would spin forever
and not make progress.
Bug:
27417671
Bug:
30500547
Test: test-art-host ART_TEST_GC_STRESS=true
This reverts commit
69bf969c055c31a75d17ea92aeee756042678114.
(cherry picked from commit
4b0ef1c980a1f3b0201d77e33bdb2f7df12c9114)
Change-Id: If5766c2c3c8a130cbb83735cdb9970038570dafd
Mathieu Chartier [Fri, 29 Jul 2016 20:06:45 +0000 (20:06 +0000)]
Revert "Use try lock to fix class resolution race"
This reverts commit
a704eda0078989a73cac111ed309aca50d2e289b.
Bug:
27417671
Bug:
30500547
(cherry picked from commit
69bf969c055c31a75d17ea92aeee756042678114)
Change-Id: I4354d1c9f1c554f054e99efd7aa52d8a2c5d402c
Mathieu Chartier [Wed, 13 Jul 2016 16:53:35 +0000 (09:53 -0700)]
Use try lock to fix class resolution race
There was some possible deadlocks related to EnsureResolved caused by
acquiring an object lock.
Scenario:
Thread 1 acquires lock on obj1
Thread 1 begins to resolve / initialize class1
Thread 1 blocks since it sees that class1 is already being resolved and
gets preempted before it can acquire the object lock on class1
Thread 2 finishes resolving and initializing class1 and locks class1
Thread 2 blocks attempting to lock obj1
Thread 1 blocks attempting to lock class1
Deadlock
Fixed the deadlock by changing EnsureResolved to use a try lock for the
unresolved case.
Added a test.
Test: Device boot, test-art-host, monitor_test
Bug:
27417671
(cherry picked from commit
a704eda0078989a73cac111ed309aca50d2e289b)
Change-Id: I1150b19bdc1a5cc87ae95eda4f2b6b4bca215a60
David Sehr [Tue, 23 Aug 2016 16:44:25 +0000 (16:44 +0000)]
Merge "Revert "Save environment snapshot and use at fork/exec"" into nyc-mr1-dev
David Sehr [Tue, 23 Aug 2016 15:59:24 +0000 (15:59 +0000)]
Revert "Save environment snapshot and use at fork/exec"
This reverts commit
1488ff8aa3b041734ef0fbd113df512a2376e44e.
Change-Id: I3c237c94ffa865378f8efd9aa2b0fb2ad33867c2
David Sehr [Mon, 22 Aug 2016 23:07:35 +0000 (23:07 +0000)]
Merge "Save environment snapshot and use at fork/exec" into nyc-mr1-dev
Jeff Hao [Sat, 20 Aug 2016 01:31:39 +0000 (18:31 -0700)]
Fix debugger calling new String().
Used to return an empty string instead of the newly created String.
Requires accompanying jdwp test fix to test String contents.
Bug:
30951794
Test: mm -j24 run-jdwp-tests-host
Merges two cherry-picks:
f15ec05896ddc5fec1f224ef97bdfebb72b5a855
9e0878494cdacd0877a1614041efc38ebb053017
Change-Id: Idc4725b82798a9b6d636c72e76715bc97ad30d23
David Sehr [Wed, 17 Aug 2016 02:22:57 +0000 (19:22 -0700)]
Save environment snapshot and use at fork/exec
Some applications may inadvertently or maliciously set of environment
variables such as LD_LIBRARY_PATH before spawning subprocesses.
To make this more difficult, save the environment at the time the
runtime starts and use the saved copy anytime Exec is called.
BUG=b/
30160149
TEST=make test-art-{host,target}-gtest-utils_test
Change-Id: Ice0097bf0de30db3d4ead124caf93316f39e3df3
Mathieu Chartier [Thu, 11 Aug 2016 17:56:04 +0000 (17:56 +0000)]
Merge "Fix pending exception failure for encoded statics" into nyc-mr1-dev
TreeHugger Robot [Thu, 11 Aug 2016 02:01:53 +0000 (02:01 +0000)]
Merge "ART: Check for more low-space situations in zygote" into nyc-mr1-dev
Mathieu Chartier [Wed, 10 Aug 2016 20:57:39 +0000 (13:57 -0700)]
Fix pending exception failure for encoded statics
ReadValueToField may allocate a string and cause OOME, we were
not checking this each loop iteration. Throwing an exception
with a pending exception causes an abort.
Bug:
30690988
Test: test-art-host
(cherry picked from commit
da595bec0f9af0b087822e4febc282fe8ec28192)
Change-Id: I4701a4dcc63553aeb5c7970f99fd7f136443b266
Andreas Gampe [Wed, 10 Aug 2016 03:19:18 +0000 (20:19 -0700)]
ART: Check for more low-space situations in zygote
Even if a boot image exists and can be loaded, the rest of the
platform may not be able to boot. We previously only checked
after full image generation and missed this case.
Also prune the cache if there wasn't even space to put the boot
marker.
Bug:
30765660
Change-Id: Icd43746e681c62ce2e4e8745fb17bda65ca60372
Nicolas Geoffray [Sat, 30 Jul 2016 21:49:11 +0000 (22:49 +0100)]
Put the deletion of profiling info under a GC critical section.
Otherwise the GC could see dangling pointers.
bug:
30033802
(cherry picked from commit
cf48fa030780c3185f225d558b704c396f7713cc)
Change-Id: I2c43e973878f50dc147aa0af81551ecc942a790d
Jeff Hao [Wed, 27 Jul 2016 17:35:03 +0000 (10:35 -0700)]
Fix profiling output to properly display class info.
The profiler stores class def indexes, not type ids.
Bug:
30436198
(cherry-picked from commit
58d40f3a7245e65d57a5daf6bf27c3b209260044)
Change-Id: I63524957547c5e0dbaf1d752220de8d05473638f
Nicolas Geoffray [Thu, 28 Jul 2016 02:49:14 +0000 (03:49 +0100)]
Pass the right class loader when inlining.
Otherwise, method and type resolution can resolve to the wrong
things and as a side effect update the dex cache with wrong data.
bug:
30403437
Change-Id: I23f94486f51c65e0a1328c6185b36084627e09b3
test:./art/test/run-test --host --jit --dev --no-prebuild 613
Nicolas Geoffray [Thu, 21 Jul 2016 23:32:11 +0000 (23:32 +0000)]
JIT: Don\'t update the dex cache of another class loader.
am:
e50a7b834b
Change-Id: Ib2019ac3afafebaa01c8b74f7e8e1744c85f367d
Nicolas Geoffray [Tue, 19 Jul 2016 16:06:23 +0000 (17:06 +0100)]
JIT: Don't update the dex cache of another class loader.
This only works for properly delegating class loaders. But Java allows
non-delegating ones :(
bug:
29964720
test:612-jit-dex-cache
(cherry picked from commit
491617a612c8a1c890e72d8ba780a151ddee8e11)
(cherry picked from commit
a2d7cbb44e570ec0a9064dc93f57441e6ab9e45a)
(cherry picked from commit
ae093d69f58c2b6257c3e5b82a32c135a1f33641)
Change-Id: I73df55286a9bdb3f96963e0756e3a8b784aa9077
Nicolas Geoffray [Tue, 19 Jul 2016 16:06:23 +0000 (17:06 +0100)]
JIT: Don't update the dex cache of another class loader.
This only works for properly delegating class loaders. But Java allows
non-delegating ones :(
bug:
29964720
test:612-jit-dex-cache
(cherry picked from commit
491617a612c8a1c890e72d8ba780a151ddee8e11)
(cherry picked from commit
a2d7cbb44e570ec0a9064dc93f57441e6ab9e45a)
Change-Id: I2523ce1fd4cd36dc83394d0f77ffc3f844e80c69
TreeHugger Robot [Tue, 19 Jul 2016 22:34:10 +0000 (22:34 +0000)]
Merge "Do allocation fence before pushing on allocation stack" into nyc-mr1-dev
Mathieu Chartier [Mon, 18 Jul 2016 18:11:45 +0000 (11:11 -0700)]
Do allocation fence before pushing on allocation stack
Heap::VisitObjects relies on having valid classes for objects in
the allocation stack. If the writes reorder, the thread calling
VisitObjects could see the free list pointer instead of the class
of the object. I believe this is causing crashes in VisitObjects.
Bug:
28790624
Test: Volantis booted
(cherry picked from commit
011dc2c4b9f3a064cba801679aedd3251fe191e3)
Change-Id: Ib620acbcd641ccd59fea9a66f5587c5026110a22
Philip Cuadra [Thu, 14 Jul 2016 22:26:20 +0000 (22:26 +0000)]
Merge "Add API for getting location of odex or oat file" into nyc-mr1-dev
Philip Cuadra [Tue, 12 Jul 2016 23:37:40 +0000 (16:37 -0700)]
Add API for getting location of odex or oat file
Add an API for getting the file path of odex or oat file given a dex
path.
Bug
28251566
Change-Id: Ibebaa20f15d8135b25d9eb5927b7979801ebf0b2
Nicolas Geoffray [Wed, 13 Jul 2016 13:13:48 +0000 (14:13 +0100)]
Fix a bug in ClassTableGet code generation for IMTs.
Introduced by:
https://android-review.googlesource.com/#/c/244980/
test:566-polymorphic-inling for fixing x86 crash. Also
fixes a performance regression.
bug:
29188168
(cherry picked from commit
ff484b95b25a5181a6a8a191cbd11da501c97651)
Change-Id: Iae5a63cb24017222c3fefda695a0a39673719f51
Andreas Gampe [Wed, 13 Jul 2016 18:29:47 +0000 (18:29 +0000)]
Merge "ART: Remove zygote OTA code" into nyc-mr1-dev
Nicolas Geoffray [Mon, 11 Jul 2016 12:33:16 +0000 (12:33 +0000)]
Merge "Fix System.arraycopy when doing same array copying." into nyc-mr1-dev
Andreas Gampe [Sat, 9 Jul 2016 17:51:12 +0000 (10:51 -0700)]
ART: Remove zygote OTA code
The renaming and relabeling of the A/B artifacts is now done in
a special-purpose script started by init, so as to not complicate
the logic here (e.g., name of the current slot).
Partially reverts commit
754479f7aa056602de8282f4f03718b42c20b89b.
Bug:
25612095
Bug:
28069686
Change-Id: I4d965361000fd448e199c9af059b6d18bfe928bb
Artem Udovichenko [Thu, 30 Jun 2016 09:18:25 +0000 (09:18 +0000)]
Revert "Revert "Optimize IMT""
This reverts commit
88f288e3564d79d87c0cd8bb831ec5a791ba4861.
Test: Includes smali tests to exercise cts failures that led to revert.
These tests check that objects that don't implement any interfaces are
handled properly when interface methods are invoked on them.
Bug:
29188168 (for initial CL)
Bug:
29778499 (reason for revert)
Change-Id: I49605d53692cbec1e2622e23ff2893fc51ed4115
Nicolas Geoffray [Thu, 7 Jul 2016 11:07:42 +0000 (12:07 +0100)]
Fix System.arraycopy when doing same array copying.
At compile time, if constant source < constant destination, and we don't
know if the arrays are the same, then we must emit code that checks
if the two arrays are the same. If so, we jump to the slow path.
test:610-arraycopy
bug:
30030084
(cherry picked from commit
9f65db89353c46f6b189656f7f55a99054e5cfce)
Change-Id:Ida67993d472b0ba4056d9c21c68f6e5239421f7d
Vladimir Marko [Tue, 26 Apr 2016 16:55:55 +0000 (17:55 +0100)]
Work around Jack optimizations in arm64 shifter operand test.
And also in the ror test.
Bug:
28392114
(cherry picked from commit
5bc80b9994bde67184adc1a168538c2a9b99fc8b)
Change-Id: I597a2556a81792d7a5289cc4925cb057ee57438d
Andreas Gampe [Sat, 25 Jun 2016 04:05:23 +0000 (21:05 -0700)]
ART: Add very-large threshold to dex2oat
Add a variable threshold to dex2oat. If the total dex file size for
an app reaches this threshold, dex2oat will punt all compilation and
compile the app with verify-at-runtime. This ensures smaller compile
time and memory thrashing, while still extracting the dex files and
thus helping with dirty memory later.
Added tests.
Bug:
29557002
Bug:
29790079
Test: m test-art-host-gtest-dex2oat_test
Change-Id: I78870e4a80ccaafcbbe56839e61ced0acd2ca05e
Vladimir Marko [Wed, 29 Jun 2016 19:10:20 +0000 (19:10 +0000)]
Fix merging HLoadClass with HNewInstance.
am:
2b8b6040d0
Change-Id: I31021cee60cd328e952f33bf8d98c6f26319c779
Vladimir Marko [Wed, 29 Jun 2016 13:59:07 +0000 (14:59 +0100)]
Fix merging HLoadClass with HNewInstance.
Do not merge HLoadClass with HNewInstance if they do not
come from the same dex instruction. This is the same check
as for moving the clinit check responsibility around.
Test: Added a regression test, run standard ART test suite
plus gcstress and ndebug modes on host and Nexus 9.
Bug:
29570861
Bug:
29321958
(cherry picked from commit
c7591b4c0dd405a766f4d701deea6c3750101978)
Change-Id: I0f019c36dd991889caad2666e61bbcc6d9d9c91f
TreeHugger Robot [Wed, 29 Jun 2016 16:01:21 +0000 (16:01 +0000)]
Merge changes I2814a0b8,I05a7961f into nyc-mr1-dev
* changes:
ART: Add dex2oat swap-usage parameters
OatFileAssistantTest: do not relocate image randomly.
Andreas Gampe [Fri, 24 Jun 2016 21:55:38 +0000 (14:55 -0700)]
ART: Add dex2oat swap-usage parameters
Make the dex2oat swap usage decision dependent on parameters that
can be changed on the command line. Both the dex file size and dex
file count can be modified through the following to new parameters:
--swap-dex-size-threshold
--swap-dex-count-threshold
The defaults remain the same (20MB and 2).
Factor out some dex2oat setup code from oat_file_assistant_test
and use it in a new dex2oat test.
Bug:
29557002
Test: m test-art-host-gtest-dex2oat_test
Test: m test-art-host-gtest-oat_file_assistant_test
Test: m test-art-host
Change-Id: I2814a0b895d960416d20b31c4b0052f98c9cb5e6
Jeff Hao [Tue, 28 Jun 2016 23:47:09 +0000 (23:47 +0000)]
Revert "Optimize IMT"
This reverts commit
0790af1391b316c5c12b4e135be357008c060696.
Bug:
29188168 (for initial CL)
Bug:
29778499 (reason for revert)
Change-Id: I2c3e4ec2cebdd40faec67ddb721b7acdc8e90061
Andreas Gampe [Mon, 27 Jun 2016 23:04:02 +0000 (23:04 +0000)]
ART: Disable no-prebuild test for run-test 608
am:
0748ed9fcf
Change-Id: I24f3f299b9f7159b17857a503559436905667b65
Nicolas Geoffray [Mon, 27 Jun 2016 22:58:49 +0000 (22:58 +0000)]
Do not remove loads/store with unresolved accesses.
am:
c2f1735e04
Change-Id: I83f86184e8ab5bd1143b8f66d35bd4c752995ea4
Andreas Gampe [Mon, 27 Jun 2016 21:55:02 +0000 (14:55 -0700)]
ART: Disable no-prebuild test for run-test 608
This test relies on unresolved types, which is not the case in a
no-prebuild setting (as all parts will be on the classpath).
Bug:
29433999
Change-Id: I11b1c6b446905aacd7a520796d0b2217319cefc7
Test: m ART_TEST_RUN_TEST_NO_PREBUILD=true test-art-host-run-test
(cherry picked from commit
06b7c4de44979f1cb51707d2236142bc733ebf75)
Nicolas Geoffray [Mon, 27 Jun 2016 09:03:29 +0000 (10:03 +0100)]
Do not remove loads/store with unresolved accesses.
Due to AOT and compiling classes that are not ready yet
(eg missing a super class), we need to be conservative when
accessing fields and can end up in a situation where the same
field can be resolved and unresolved within the same method
(because of inlining). Therefore, disable removing loads and
stores in a method when there are unresolved accesses.
bug:
29433999
(cherry picked from commit
b93a16517dce12b83e9d5d3b599446e25fcc157a)
Change-Id: I8fcfb52c584222474a8220eb16c6581350b702e0
Richard Uhler [Tue, 26 Apr 2016 17:24:38 +0000 (10:24 -0700)]
OatFileAssistantTest: do not relocate image randomly.
Manually relocate the boot image to a known location before starting
the runtime so that the image won't be randomly relocated. This fixes
flaky test failures due to the image randomly being relocated by 0.
Bug:
28294887
Bug:
29557002
(cherry picked from commit
a48403eb54494ac52f81c9ecc9da723075ac65da)
Change-Id: I05a7961f1237a05e89d3f631c959e260ccfe0b70
Oleksiy Vyalov [Wed, 22 Jun 2016 22:56:10 +0000 (22:56 +0000)]
Merge \"Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable.\" into nyc-dev
am:
f7a0543d88
Change-Id: Ifd8495cb08cf25f94ac0b87dc844f95c41ccda25
Oleksiy Vyalov [Wed, 22 Jun 2016 22:43:47 +0000 (22:43 +0000)]
Merge "Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable." into nyc-dev
Oleksiy Vyalov [Tue, 21 Jun 2016 23:21:37 +0000 (16:21 -0700)]
Call prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) if app is debuggable.
Enabled Yama security may prevent non-privileged debugger from
attaching to the app. However, if app is marked is debuggable
then it should acceptable to allow debugger with arbitrary pid
to connect the app.
Bug:
29549463
Change-Id: I50c79dbca272dc473e489cc61471628e2fdc4a03
Nicolas Geoffray [Wed, 22 Jun 2016 08:55:00 +0000 (08:55 +0000)]
Fix braino in the test to make it work on target.
am:
af17a5e38a
Change-Id: I900bac835a6380a770d56b41c1749b276f79577a
Mathieu Chartier [Wed, 15 Jun 2016 22:07:03 +0000 (15:07 -0700)]
Propagate flags to ShouldHaveEmbeddedVTable
Pass kVerifyFlags and kReadBarrierrOption to ShouldHaveEmbeddedVTable
from ShouldHaveImt.
Bug:
29188168
(cherry picked from commit
efeb9f01308c5c4b723ff905cf5bea1636f7a549)
Change-Id: Ia76d8cd340fbb0527955f4ef611d6e14bebf8dd9
Nelli Kim [Fri, 13 May 2016 10:08:53 +0000 (13:08 +0300)]
Optimize IMT
* Remove IMT for classes which do not implement interfaces
* Remove IMT for array classes
* Share same IMT
Saved memory (measured on hammerhead):
boot.art:
Total number of classes: 3854
Number of affected classes: 1637
Saved memory: 409kB
Chrome (excluding classes in boot.art):
Total number of classes: 2409
Number of affected classes: 1259
Saved memory: 314kB
Google Maps (excluding classes in boot.art):
Total number of classes: 6988
Number of affected classes: 2574
Saved memory: 643kB
Performance regression on benchmarks/InvokeInterface.java benchmark
(measured timeCall10Interface)
1st launch: 9.6%
2nd launch: 6.8%
Bug:
29188168
(cherry picked from commit
badee9820fcf5dca5f8c46c3215ae1779ee7736e)
Change-Id: If8db765e3333cb78eb9ef0d66c2fc78a5f17f497
Nicolas Geoffray [Tue, 21 Jun 2016 12:05:24 +0000 (13:05 +0100)]
Fix braino in the test to make it work on target.
bug:
29449194
(cherry picked from commit
d8aa513eba9c6100a829168d31938610a99eecbb)
Change-Id: I58bd94a6c8cef7b6ac52dfb375a1df1937510767
Mathieu Chartier [Tue, 21 Jun 2016 01:05:30 +0000 (01:05 +0000)]
Merge changes from topic 'PHENOMENAL_CHANGE' into nyc-mr1-dev
* changes:
Use collector specific helper classes
Avoid duplicate class for mark compact
Andreas Gampe [Sat, 18 Jun 2016 02:31:06 +0000 (02:31 +0000)]
ART: Use null for the BootClassLoader in LoadLibrary
am:
f7e0db0ce1
Change-Id: Ibd9858ffa97d23d896efbf6d55da1c0a44db5e9a
Mathieu Chartier [Thu, 16 Jun 2016 18:44:28 +0000 (11:44 -0700)]
Use collector specific helper classes
Changed to use inner classes. Also changed some visitors to lambdas.
Bug:
29413717
Bug:
19534862
(cherry picked from commit
a07f55913824ab4215a9a4f827fa9c043c0d44d9)
Change-Id: I631c8bfe5f795eda4623c5bb4f357f2dd12358e2
Mathieu Chartier [Thu, 16 Jun 2016 17:28:43 +0000 (10:28 -0700)]
Avoid duplicate class for mark compact
Renamed BitmapSetSlowPathVisitor to MCBitmapSetSlowPathVisitor for
the mark compact case.
Bug:
29413717
(cherry picked from commit
d528f6819571ce5276cb71134044c55408a901a1)
Change-Id: Id5a7040c0c22a7a66309b8cbd7f874819852b10e
Andreas Gampe [Fri, 17 Jun 2016 19:46:14 +0000 (12:46 -0700)]
ART: Use null for the BootClassLoader in LoadLibrary
We must translate the fake BootClassLoader object to the internally
used null when loading libraries.
Bug:
29449194
Change-Id: I823d34e209149b5b96529a423c60a1d77bf8e9d1
Mathieu Chartier [Sat, 11 Jun 2016 00:04:20 +0000 (17:04 -0700)]
Use ScopedObjectAccess in ThreadList::Dump
Prevent deadlocks if two different threads are calling Dump at the
same time:
Thread 1: Requests thread 2 to suspend
Thread 2: Requests thread 1 to suspend
Both threads are suspended and blocked on ScopedObjectAccess in
thread dumping.
Added to suspend all stress, reduced thread count to 4 temporarily
since this is the maximum number of simultaneous checkpoints.
Bug:
28988206
Bug:
26118154
(cherry picked from commit
e99f53203904c23a26e53ca1bf6a4e45814146fe)
Change-Id: I9e4b8391ebad0bca0e42a03819c58c99ddba6b35
Mathieu Chartier [Fri, 17 Jun 2016 00:02:52 +0000 (17:02 -0700)]
Revert "Skip DumpForSigQuit if debugger is active"
Bug:
26118154
This reverts commit
0b8f1bfdfc721a41d98d13e12c4c67f62f698dfc.
Change-Id: I03c743c1385e2488be1e21ee2ce34a74e6f22546
Andreas Gampe [Tue, 14 Jun 2016 00:56:06 +0000 (00:56 +0000)]
ART: Turn off unattached thread dumping
am:
a3e8fc3aab
Change-Id: If0995694634388a42bde1e527f07ff8f16335776
Andreas Gampe [Mon, 13 Jun 2016 23:15:33 +0000 (16:15 -0700)]
ART: Turn off unattached thread dumping
May be responsible for lack of ANR dumps in some situations.
Bug:
29248079
Change-Id: Ib742c063b1d77216eddfbf4392d17d024e028bf8
Nicolas Geoffray [Mon, 13 Jun 2016 12:49:44 +0000 (12:49 +0000)]
Remove too aggressive DCHECKs.
am:
f7d994622a
Change-Id: I4ea0b0a4b1d72168e517b3ccc81ec9c9ed5bdbf0
Nicolas Geoffray [Fri, 10 Jun 2016 15:06:34 +0000 (16:06 +0100)]
Remove too aggressive DCHECKs.
A class can move from a state greater or equal than resolved
to erroneous concurrently to the verifier or the compiler.
bug:
29239283
Change-Id: I89f3fe1c1d9556c6c99b8e005b3ec02de7f01b85
Mathieu Chartier [Fri, 10 Jun 2016 16:44:27 +0000 (16:44 +0000)]
Merge \"Fix dex file leak in oat file manager\" into nyc-dev
am:
28ea938d90
Change-Id: Icd02f322782eefaac6559425ddec5989ed13a2c2
Mathieu Chartier [Fri, 10 Jun 2016 16:38:49 +0000 (16:38 +0000)]
Merge "Fix dex file leak in oat file manager" into nyc-dev
Andreas Gampe [Fri, 10 Jun 2016 01:46:26 +0000 (01:46 +0000)]
Merge \"ART: Fix swap usage determination in dex2oat\" into nyc-dev
am:
6822c26c81
Change-Id: I396c40f75164b90999f91283771bdd71ceaae3be
TreeHugger Robot [Fri, 10 Jun 2016 01:41:13 +0000 (01:41 +0000)]
Merge "ART: Fix swap usage determination in dex2oat" into nyc-dev
Mathieu Chartier [Thu, 9 Jun 2016 23:18:04 +0000 (16:18 -0700)]
Fix dex file leak in oat file manager
Simplified ownership by having a vector of unique pointers own
all newly opened dex files.
Bug:
29246280
Change-Id: I1ffcfef35c14c732e15e83ce4674034eddfc136b
Andreas Gampe [Thu, 9 Jun 2016 01:18:47 +0000 (18:18 -0700)]
ART: Fix swap usage determination in dex2oat
The decision needs to be postponed until we have access to the
dex files.
Bug:
27878043
Change-Id: I55833c6ea827ec7a322711bd182fc723d1727f08
Nicolas Geoffray [Thu, 9 Jun 2016 12:20:08 +0000 (12:20 +0000)]
Merge \"Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.\" into nyc-dev
am:
08e5c07d2c
Change-Id: I6f2687374291c9a3be757551b222f6386fb4ac4e
Nicolas Geoffray [Thu, 9 Jun 2016 12:11:27 +0000 (12:11 +0000)]
Merge "Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86." into nyc-dev
Nicolas Geoffray [Wed, 8 Jun 2016 17:01:22 +0000 (18:01 +0100)]
Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.
They were creating a stack that the runtime did not understand.
bug:
28348339
(cherry picked from commit
0f838aa279a296b5f14c231065bb2f96b02d9caf)
Change-Id: Iecaa274512b42ad76fccb48c11a0076d0292c240
Nicolas Geoffray [Wed, 8 Jun 2016 07:50:14 +0000 (07:50 +0000)]
Merge \"Revert \"Revert \"Fix ArtMethod::GetInvokeType for static methods on interfaces.\"\"\" into nyc-dev
am:
355d93caa7
Change-Id: Iacaa5c1bb3cba4e2acf63f4e7a489d44baf03613
Nicolas Geoffray [Wed, 8 Jun 2016 07:44:14 +0000 (07:44 +0000)]
Merge "Revert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces.""" into nyc-dev
Jeff Hao [Wed, 8 Jun 2016 02:29:40 +0000 (02:29 +0000)]
Wrap certain exception types when loading an erroneous class.
am:
7c8aa83571
Change-Id: I09900135d574d750aed5f84a669d3b748e80b4b6
Jeff Hao [Mon, 6 Jun 2016 18:09:20 +0000 (11:09 -0700)]
Wrap certain exception types when loading an erroneous class.
Bug:
28787733
Change-Id: I22e1e4339a95706a0fb9c1474b360e9bde232539
Nicolas Geoffray [Tue, 7 Jun 2016 14:14:37 +0000 (14:14 +0000)]
Revert "Revert "Fix ArtMethod::GetInvokeType for static methods on interfaces.""
bug:
29089267
bug:
27521545
We were hitting a compiler DCHECK that a class would never require to
do access checks on itself. The reason was that the compiler driver
was not trying to resolve a type, but instead relied on the verifier
for pre-populating the dex cache. However, the verifier doesn't
necessarily run in JIT mode.
This reverts commit
12abcbd950bd0ff4528e2e0d27ca5e881c7b0467.
(cherry picked from commit
3aaf9645639ff56fbfe49a981242cbda01d6796e)
Change-Id: I2f0de6e4f00f336dc61b2378054fb6d27a7298d0
Anton Shamin [Tue, 7 Jun 2016 16:15:27 +0000 (16:15 +0000)]
ART: ArrayGet hoisting restriction added.
am:
f479d7758d
* commit '
f479d7758dbe7e8740386fbf1d73e05b0277c5e3':
ART: ArrayGet hoisting restriction added.
Change-Id: Iaaa64f583b06d6f7edf5b4e65246df382574d72d
Anton Shamin [Mon, 16 May 2016 10:44:13 +0000 (16:44 +0600)]
ART: ArrayGet hoisting restriction added.
Currently if we hoist ArrayGet from loop there is no guarantee
that insn will be executed at runtime. Because of that we could
face issues like crashes in generated code.
This patch introduces restriction for ArrayGet hoisting. We say
that ArrayGet execution is guaranteed at least one time if its bb
dominates all exit blocks.
Signed-off-by: Anton Shamin <anton.shamin@intel.com>
(cherry picked from commit
f89381fed12faf96c45a83a989ae2fff82c05f3b)
BUG=
29145171
Change-Id: Ia5664dedb1543d78a7b4038801b8372572f069f6
David Sehr [Mon, 6 Jun 2016 20:21:09 +0000 (20:21 +0000)]
Merge "Enable profman pretty printing" into nyc-dev
am:
841f999d9d
* commit '
841f999d9d487f42ac38bc62ddd8cf1c93ec0503':
Enable profman pretty printing
Change-Id: I6a48e8c23b0daddc0eb32d23f7673c92817e5f09
David Sehr [Mon, 6 Jun 2016 20:16:10 +0000 (20:16 +0000)]
Merge "Enable profman pretty printing" into nyc-dev
Mathieu Chartier [Mon, 6 Jun 2016 20:13:28 +0000 (20:13 +0000)]
Revert "Revert "Hold dex caches live in class table""
am:
c9dbb1df3b
* commit '
c9dbb1df3b5c06ba122cacaf35b17cb53c6be3c6':
Revert "Revert "Hold dex caches live in class table""
Change-Id: Ib4ff1862aa38615901caddd3ad54aabadde55b5a
Mathieu Chartier [Sat, 4 Jun 2016 00:47:32 +0000 (17:47 -0700)]
Revert "Revert "Hold dex caches live in class table""
Bug:
29083330
This reverts commit
f102faf1bcbdb2149e3e7bf27b1819f621b7894b.
Change-Id: Ibc6d260247b3113beec7d33552061512a36c9ce8
David Sehr [Thu, 2 Jun 2016 17:46:19 +0000 (10:46 -0700)]
Enable profman pretty printing
Bug:
28748264
Change-Id: I4dc366aa710c9ef05aa5d1b164d558232fe57a3d
Brian Carlstrom [Sat, 4 Jun 2016 00:46:17 +0000 (00:46 +0000)]
Revert "Hold dex caches live in class table"
am:
f102faf1bc
* commit '
f102faf1bcbdb2149e3e7bf27b1819f621b7894b':
Revert "Hold dex caches live in class table"
Change-Id: I048421781af100212e6e8826c5dbbc5d8ca2877c
Brian Carlstrom [Sat, 4 Jun 2016 00:22:32 +0000 (00:22 +0000)]
Revert "Hold dex caches live in class table"
This reverts commit
d6d49e56c2b7b11f474acb80cb02bb1fe9b7861e.
Bug:
29083330
Change-Id: Ie209b27897b8079f2d13fd0837fe5f83a7e61afc
Mathieu Chartier [Fri, 3 Jun 2016 20:50:41 +0000 (20:50 +0000)]
Hold dex caches live in class table
am:
d6d49e56c2
* commit '
d6d49e56c2b7b11f474acb80cb02bb1fe9b7861e':
Hold dex caches live in class table
Change-Id: I81bb893896d8c16762a78f2e3735e4ed26a27f69
Mathieu Chartier [Thu, 2 Jun 2016 18:48:30 +0000 (11:48 -0700)]
Hold dex caches live in class table
Prevents temporary dex caches being unloaded for the same dex file.
Usually this is OK, but if someone resolved a string in that dex
cache, it could leave stale pointers in BSS. Also it can use extra
memory in linear alloc if we allocate dex cache arrays multiple
times.
Bug:
29083330
(cherry picked from commit
f284d448e3edd428b6ade473d0993028638b2064)
Change-Id: Ie1b0b0cf835a998e19227cbb90014011a6cd40c4
Vladimir Marko [Fri, 3 Jun 2016 14:27:22 +0000 (14:27 +0000)]
Delay dex-to-dex compilation until Optimizing is done.
am:
b089eccf50
* commit '
b089eccf503646e6ed2d5bb20d973d9131166655':
Delay dex-to-dex compilation until Optimizing is done.
Change-Id: I33105e36ec363b43e561ee60d31d31d7b2929a25
Nicolas Geoffray [Fri, 3 Jun 2016 12:51:03 +0000 (12:51 +0000)]
Fix ArtMethod::GetInvokeType for static methods on interfaces.
am:
2dc77ecf37
* commit '
2dc77ecf375882f51ff7c09712c05b80e58abb6b':
Fix ArtMethod::GetInvokeType for static methods on interfaces.
Change-Id: I41fc36cf86e2b3f2961b41206e6e85b0f3ea418c
Vladimir Marko [Wed, 1 Jun 2016 17:38:43 +0000 (18:38 +0100)]
Delay dex-to-dex compilation until Optimizing is done.
This fixes a race between inlining in the Optimizing
backend and dex-to-dex quickening where the Optimizing can
read the non-quickened opcode and then the quickened field
index or vtable index and look up the wrong field or method.
Even if we such tearing of the dex instruction does not
happen, the possible reordering of dex-to-dex and Optimizing
compilation makes the final oat file non-deterministic.
Also, remove VerificationResults::RemoveVerifiedMethod() as
we have only the Optimizing backend now and as such it was
dead code and would have interfered with this change.
Bug:
29043547
Bug:
29089975
(cherry picked from commit
492a7fa6df3b197a24099a50f5abf624164f3842)
Change-Id: I1337b772dc69318393845a790e5f6d38aa3de60f
Nicolas Geoffray [Thu, 2 Jun 2016 14:55:48 +0000 (15:55 +0100)]
Fix ArtMethod::GetInvokeType for static methods on interfaces.
And avoid calling ResolveMethod in the JIT, since it already
knows that method.
bug:
29089267
bug:
27521545
Change-Id: I5c5dae385804f1d2062defca459f69c26cdb4fef