OSDN Git Service
Mathieu Chartier [Thu, 28 Apr 2016 16:44:54 +0000 (09:44 -0700)]
Revert "Revert "Write conflict tables in image""
Added test.
Bug:
27906566
This reverts commit
8e2478d23e89a7022c93ddc608dcbba7b29b91e6.
Change-Id: I0894f5f7cd11af29ed9d0345b51f527fc8a41d19
Calin Juravle [Thu, 28 Apr 2016 15:32:33 +0000 (15:32 +0000)]
Merge "Fix -Xint and -Xusejit interaction" into nyc-dev
Vladimir Marko [Thu, 28 Apr 2016 15:20:32 +0000 (15:20 +0000)]
Merge "ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list" into nyc-dev
TreeHugger Robot [Thu, 28 Apr 2016 14:20:59 +0000 (14:20 +0000)]
Merge "Decrease transition weight." into nyc-dev
Calin Juravle [Wed, 27 Apr 2016 17:50:45 +0000 (18:50 +0100)]
Fix -Xint and -Xusejit interaction
- don't allow interpret and jit compilation at the same time
- make sure we -Xsaveprofileinfo works with -Xint.
Bug:
27916886
Change-Id: Icab85e5b6f576f82374d5f88145cc81595afce37
Junmo Park [Wed, 27 Apr 2016 07:51:50 +0000 (16:51 +0900)]
ART: add exynos-m1 to a53 #835769 & #843419 erratum exception list
Exynos-M1 is custom-designed 64-bit ARM CPU and does not need this A53
erratum handling.
Bug:
28412250
Signed-off-by: Junmo Park <junmoz.park@samsung.com>
(cherry picked from commit
2bd7d2d6d92daa796ee33e70bb788d3dae1f2fc9)
Change-Id: Id460e4e98baafeed1cf3540cec754b30044cda11
Nicolas Geoffray [Thu, 28 Apr 2016 12:56:04 +0000 (13:56 +0100)]
Decrease transition weight.
bug:
27865109
Change-Id: I551040e61f36fc675c0f5d1c3907c690112a84be
Nicolas Geoffray [Fri, 22 Apr 2016 12:16:14 +0000 (13:16 +0100)]
Forbid HDeoptimize instructions in OSR methods.
Otherwise dominated instructions will assume something that
isn't necessarily correct if coming from the interpreter.
bug:
28335959
bug:
28249238
bug:
28348878
bug:
28080135
Contains fix from https://android-review.googlesource.com/#/c/220661/.
(cherry picked from commit
93a18c5d4160f632ecdb92af099574e9c7098c49)
Change-Id: I86c3f9340077caa0a3e3db896e0519e7d38d91a0
David Brazdil [Thu, 28 Apr 2016 08:23:15 +0000 (08:23 +0000)]
Merge "ART: Disable back edge uses for irreducible loops" into nyc-dev
Dimitry Ivanov [Wed, 27 Apr 2016 23:37:10 +0000 (23:37 +0000)]
Merge "Initialize native loader on JNI_CreateJavaVM" into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 21:20:06 +0000 (21:20 +0000)]
Merge "Revert "Write conflict tables in image"" into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 21:03:42 +0000 (21:03 +0000)]
Revert "Write conflict tables in image"
Some strange issues on angler.
This reverts commit
cda9386add68d94697449c6cb08b356747e55c21.
Change-Id: Iba3a8bac6ce40ee16d83163823356951fecb6787
Dimitry Ivanov [Thu, 21 Apr 2016 23:01:24 +0000 (16:01 -0700)]
Initialize native loader on JNI_CreateJavaVM
We need to initialize native loader in order to
be able to use JNI from any VM, be it dalvikvm
or VM started by zygote.
Bug: http://b/
28082914
Bug: http://b/
28320913
Change-Id: Ice9a33a736d7c6ec3af9a5a0fb25a378ad9d2c59
(cherry picked from commit
041169f7ca703d560a819e7a568170731d4ecdd6)
Jeff Hao [Wed, 27 Apr 2016 19:54:02 +0000 (19:54 +0000)]
Merge "Support to pass <uses-library> option through to dex2oat." into nyc-dev
Mathieu Chartier [Wed, 27 Apr 2016 18:29:20 +0000 (18:29 +0000)]
Merge "Write conflict tables in image" into nyc-dev
Jeff Hao [Wed, 27 Apr 2016 18:07:41 +0000 (11:07 -0700)]
Support to pass <uses-library> option through to dex2oat.
This change takes an app's shared libraries specified by <uses-library>
and passes it through to dex2oat to be used during compilation.
Part of a multi-project change.
Includes fix from
a6d46161aea07ebd1cbd6ab78b2b323f940e9c1e
Bug:
26880306
(cherry-picked from commit
26e8a2f150cd7f7195a10650ab8a5b6fa5014bc8)
Change-Id: I6bfc13693dbb835ca52fed2d03ec5346d43ec5d9
Mathieu Chartier [Thu, 14 Apr 2016 17:49:19 +0000 (10:49 -0700)]
Write conflict tables in image
Add image sections for runtime methods and conflict tables. This
makes it that we do not need to fake up a length prefixed array
for runtime methods.
Reduces .art private dirty and PSS.
System wide .art PSS goes from 32.5MB to 30.5MB after system boot.
Business card .art private dirty goes from 588K to 504K.
Increases image size by ~100K.
Bug:
27906566
Change-Id: I38cbe3150c3eeb385b8cad7cf93614e3980f4162
David Brazdil [Wed, 27 Apr 2016 14:33:22 +0000 (15:33 +0100)]
ART: Disable back edge uses for irreducible loops
Algorithm adding back edge uses in liveness analysis makes assumptions
about the linear order which are not met in the presence of irreducible
loops. Disable back edges uses when the graph contains them.
This partially reverts CL I63632e8819ea3644d5c6fdfea00b66128bf22c24.
Bug:
28252747
Bug:
27615840
Bug:
27624868
Change-Id: I7ecdde0ed8a8831f7513b8e43cf7d84599b830a7
(cherry picked from commit
07b35109c64fc449a14723b259df17806fd0b16e)
Calin Juravle [Wed, 27 Apr 2016 13:14:58 +0000 (14:14 +0100)]
Add command line option for jit invoke transition weight
Bug:
27865109
Change-Id: If5eb53714e2c92397ad3e45bc0b4facb84329bc2
Calin Juravle [Wed, 20 Apr 2016 13:22:09 +0000 (14:22 +0100)]
Split profile recording from jit compilation
We still use ProfileInfo objects to record profile information. That
gives us the flexibility to add the inline caches in the future and the
convenience of the already implemented GC.
If UseJIT is false and SaveProfilingInfo true, we will only record the
ProfileInfo and never launch compilation tasks.
Bug:
27916886
Change-Id: I6e4768dc5d58f2f85f947b276b4244aa11ce3fca
Vladimir Marko [Wed, 27 Apr 2016 09:04:21 +0000 (09:04 +0000)]
Merge "Thumb2: Reduce memory used for fixup dependencies." into nyc-dev
Aart Bik [Tue, 26 Apr 2016 19:55:48 +0000 (19:55 +0000)]
Merge "Test component type for errors too. With regression test." into nyc-dev
Aart Bik [Mon, 25 Apr 2016 19:51:37 +0000 (12:51 -0700)]
Test component type for errors too.
With regression test.
Rationale:
Moved erroneous check in convenience method, so we
put all the same logic in one place. When testing
for erroneous T[], check both the array type
as well at the component type T for errors
(it is possible T[] is not marked erroneous
even though T is eventually).
BUG=
28358598
(cherry picked from commit
f417ff44d1eb111854d7a213f106912b3dd9e3d4)
Change-Id: Ieba66aa4b55d8e7ebddf200239c7e4095dfd4678
Vladimir Marko [Mon, 25 Apr 2016 12:43:50 +0000 (12:43 +0000)]
Thumb2: Reduce memory used for fixup dependencies.
Mark fixups for far backward branches as 32-bit from the
beginning and ignore their dependencies since they cannot
be expanded anymore. This reduces the memory used by the
fixup_dependents_ when compiling methods with a lot of
slow paths.
Bug:
28256882
This is a cherry-pick of the fixed revert-revert
Revert "Revert "Thumb2: Reduce memory used for fixup dependencies.""
(cherry picked from commit
a64f249add4a0a9e93aa6f246045ca79f5916dcd)
Change-Id: I9ca766b73d9f5a1da5dc10ad070145ac88fbcd53
Vladimir Marko [Fri, 22 Apr 2016 17:07:13 +0000 (18:07 +0100)]
Reduce memory lost by ArenaAllocator for large allocations.
When allocating from a new arena, check if the old arena has
more remaining space than the new one after the current
allocation. If so, keep using the old arena to reduce the
amount of "lost" arena memory. This can happen when we try
to allocate more than half the default arena size. If the
allocation exceeds the default arena size, it's very likely
to happen even though the ArenaPool could still provide some
much larger previously allocated arena.
Also avoid artithmetic overflow when checking if the
request can be satisfied from the current arena.
And abort immediately if calloc() fails.
Bug:
28173563
Bug:
28256882
In addition to the initial CL
(cherry picked from commit
3e0e7173c0cdfc57dba39fe781e30d187d50fa9c)
this contains a squashed subsequent fix
Fix valgrind tests: mark allocated space as defined.
(cherry picked from commit
3f84f2cb3cadc25d75e1e3e2c1bc26c1a671f336)
Change-Id: Id80d5601874e8e28d930c0dd47a51c73c4810094
Andreas Gampe [Tue, 26 Apr 2016 00:32:38 +0000 (00:32 +0000)]
Merge "ART: Change x86 from modify_ldt to set_thread_data" into nyc-dev
TreeHugger Robot [Mon, 25 Apr 2016 21:53:29 +0000 (21:53 +0000)]
Merge "Make a fake libart for misbehaving apps." into nyc-dev
Nicolas Geoffray [Mon, 25 Apr 2016 13:58:06 +0000 (14:58 +0100)]
Make sure the referring class is in the dex cache.
The method CanAccessResolvedMethod expects the referring class
in the dex file is already in the dex cache, which is true during AOT,
but not necessarilly during JIT.
bug:
28295348
(cherry picked from commit
393fdb8b4822d80bbbd6347b088e28c03a72289e)
Change-Id: I9665d377070278639eb4b5a6eeced85d656e6cb6
David Brazdil [Mon, 25 Apr 2016 16:47:43 +0000 (17:47 +0100)]
ART: Fix ROR Checker test
Recent update of Jack started encoding "x << -2" as "x << 30". Update
the corresponding Checker test to accept both values.
Bug:
28244190
Change-Id: I65833afa416a7eb8fa05d381cff547a58dcc0bea
(cherry picked from commit
22c1f543ed75114d8ee5219598ba766e7dc674c0)
Andreas Gampe [Tue, 16 Feb 2016 23:58:20 +0000 (15:58 -0800)]
ART: Change x86 from modify_ldt to set_thread_data
Do not use modify_ldt, so it can be deprecated.
Bug:
27199066
Change-Id: Ib5fb40d4f720b697d786c5c971638fd57681d308
(cherry picked from commit
8a2c62c62b3398afbac00b1cb8772ae5b53b62a3)
Nicolas Geoffray [Wed, 20 Apr 2016 15:27:53 +0000 (16:27 +0100)]
Add flag to ArtMethod to skip compilation.
To ensure even the JIT will not try to compile methods with
soft failures a runtime_throw.
bug:
28293819
bug:
28313047
(cherry picked from commit
250a378d5a2152662e0fa820f2b38f794ddd3596)
Change-Id: Ic6d019bc2dd24e35e1377a6c3f8530348c1049df
David Brazdil [Mon, 25 Apr 2016 08:22:00 +0000 (08:22 +0000)]
Merge "ART: Naive NullCheck elimination in InstructionBuilder" into nyc-dev
Mathieu Chartier [Fri, 22 Apr 2016 20:34:17 +0000 (20:34 +0000)]
Merge "Add support for eagerly calculating conflict tables" into nyc-dev
Mathieu Chartier [Thu, 14 Apr 2016 17:49:19 +0000 (10:49 -0700)]
Add support for eagerly calculating conflict tables
Will be used to put them in the image by having the compiler eagerly
calculate them.
Enabled for debug builds (non compiler). Support for having conflict
tables written in the image will come in the next CL.
Bug:
27906566
Change-Id: I03d1671a4b49317aaab5a741bbeaed7957cd6229
TreeHugger Robot [Fri, 22 Apr 2016 19:32:44 +0000 (19:32 +0000)]
Merge "ART: Disable unstarted runtime pow test for valgrind" into nyc-dev
TreeHugger Robot [Fri, 22 Apr 2016 18:36:16 +0000 (18:36 +0000)]
Merge "ART: Slightly change InitializeClass flow" into nyc-dev
Andreas Gampe [Fri, 22 Apr 2016 00:23:31 +0000 (17:23 -0700)]
ART: Disable unstarted runtime pow test for valgrind
Valgrind seems to give the wrong result. Disable test for now.
Bug:
27265238
(cherry picked from commit
b6795157fd010375ca646ea95e972b616b4aeeaf)
Change-Id: I2b136abc107b53d89b70ccb20dd378a7b704d077
David Brazdil [Fri, 22 Apr 2016 15:57:00 +0000 (16:57 +0100)]
ART: Naive NullCheck elimination in InstructionBuilder
Save a little bit of memory by not generating trivially redundant
HNullCheck instructions. This patch builds on the fact that the
InstructionBuilder now directly generates SSA form and looks at the
input of the NullCheck. For obvious cases, such as NewInstance/Array
or `this`, the NullCheck generation is completely avoided.
Bug:
28173563
Change-Id: I1fdf3b096c7a939f7b8586c02a2a6b44dfa43443
(cherry picked from commit
c120bbe26fe116d3c9d8322f44bb9e330e07f745)
Andreas Gampe [Thu, 21 Apr 2016 19:21:55 +0000 (12:21 -0700)]
ART: Slightly change InitializeClass flow
Since
884f3b83ed6b2a378535ac6b2be57d6b2e22de09, verification isn't
run completely under a class' lock. This means it is possible to
race from unverified to initialized in InitializeClass. So check
the class state after VerifyClass, and handle new success and
failure cases.
Bug:
28254258
Change-Id: I22a6121477e409987281bc81c28b6c942f1bd319
TreeHugger Robot [Thu, 21 Apr 2016 23:14:05 +0000 (23:14 +0000)]
Merge "Make dex file loading failure more explicit about failure." into nyc-dev
TreeHugger Robot [Thu, 21 Apr 2016 22:16:57 +0000 (22:16 +0000)]
Merge "Fix interaction between instrumentation and jit lock." into nyc-dev
Alex Light [Wed, 20 Apr 2016 21:26:34 +0000 (14:26 -0700)]
Make dex file loading failure more explicit about failure.
We make sure that if we fail to load a dex file due to having an
unsupported dex version number we will say so explicitly in the
exceptions.
Bug:
28269864
Change-Id: I3c61d088cd0d04cf2a02246e69a4161180e3f2d8
(cherry picked from commit
3045b66613404fa973aafc8c2aae3728e9c12d9a)
Nicolas Geoffray [Mon, 18 Apr 2016 11:09:30 +0000 (12:09 +0100)]
Fix interaction between instrumentation and jit lock.
The jit lock needs to have higher priority than the
deoptimized methods lock.
bug:
28236735
(cherry picked from commit
480d5108fa62f28cbc2e7072610f974953ff73a8)
Change-Id: I6e5f8597c4ab88993f6a32a204383b766ff03e33
Mathieu Chartier [Thu, 21 Apr 2016 19:01:32 +0000 (19:01 +0000)]
Merge "Fix heap check." into nyc-dev
Mathieu Chartier [Thu, 21 Apr 2016 17:23:16 +0000 (10:23 -0700)]
Fix heap check.
Previously, we only checked the image we were patching. This did not
work if the referent was in another image. Fixed the DCHECK to check
all the boot images.
Bug:
28286961
Change-Id: I7195314e531d0a950d495296d1e2f953e7b66659
Vladimir Marko [Thu, 21 Apr 2016 16:52:32 +0000 (16:52 +0000)]
Merge "Use dex cache from compilation unit in RTP." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 16:52:08 +0000 (16:52 +0000)]
Merge "Thumb2: Fix disassembly of the b.w offset." into nyc-dev
David Brazdil [Thu, 21 Apr 2016 13:00:15 +0000 (14:00 +0100)]
ART: Address late comments on a GVN memory-saving CL
Added extra comments and removed redundant code as requested.
Bug:
28173563
Bug:
28287086
Change-Id: If6aff68c4c30427a86a27ffba5df1ae135edd294
(cherry picked from commit
94408d3144061bd6efc74b3d884d38169969c63f)
Vladimir Marko [Thu, 21 Apr 2016 13:52:03 +0000 (14:52 +0100)]
Thumb2: Fix disassembly of the b.w offset.
Bug:
28311085
(cherry picked from commit
cb55b29e466939d222b83f0593a1141221f2425c)
Change-Id: I36ec3ef951ef9d2e5a9e60c0709cfeaf1210ddd0
Vladimir Marko [Tue, 19 Apr 2016 14:12:13 +0000 (14:12 +0000)]
Use dex cache from compilation unit in RTP.
Avoid calling the costly ClassLinker::FindDexCache() from
reference type propagation when the dex cache from the
compilation unit will do, i.e. almost always. Compiling
the Nexus 5 boot image on host under perf(1) shows that
the FindDexCache() hits drop from about 0.2% to almost
nothing, though enabling inlining for the boot image will
increase it a bit to 0.03% due to unavoidable calls from
the inliner.
Also clean up the ScopedObjectAccess usage a bit.
Bug:
28173563
Cherry-picked the "revert-revert"
(cherry picked from commit
456307a47336e3d6576ed6d8563b67573a4238d3)
and squashed two subsequent fixes
Fix RTP to hold mutator lock while using raw mirror pointers.
(cherry picked from commit
62977ff198deb673a6990202a2fb8b993217c57c)
Fix reference_type_propagation_test.
(cherry picked from commit
5eed0c5d27f091c952704f652cd77c4e3833ad88)
Change-Id: Ia944452d7ab26aed963832a9346df363743a419f
David Brazdil [Wed, 20 Apr 2016 13:24:12 +0000 (14:24 +0100)]
Reduce memory usage in GVN
Implement recycling of ValueSet data structures which the GVN
algorithm will not access any more.
Savings depend on the shape of the graph, but can be as high as 93%.
Peak memory usage for GSA drops from 32MB to 26MB, compile times seem
unaffected.
Bug:
28173563
Bug:
28287086
Change-Id: If227177449bc90ad24fa68c37b0c2615924af1ed
(cherry picked from commit
cc857cfbe4a179dfa7935b7334f1efbb21f2ac76)
Vladimir Marko [Thu, 21 Apr 2016 07:54:30 +0000 (07:54 +0000)]
Merge "Thumb2: Fix EmitJumpTables() to extend buffer only if needed." into nyc-dev
Vladimir Marko [Thu, 21 Apr 2016 07:53:47 +0000 (07:53 +0000)]
Merge "Fix HInstruction::ReplaceInput(), allow no-op." into nyc-dev
Alex Light [Fri, 15 Apr 2016 19:41:09 +0000 (12:41 -0700)]
Make a fake libart for misbehaving apps.
Bug:
27775991
Change-Id: I22864aa22d4864d85e055a5b1d3ff1faf122011b
TreeHugger Robot [Wed, 20 Apr 2016 19:03:49 +0000 (19:03 +0000)]
Merge "ART: Add logging for CHECK failure" into nyc-dev
Vladimir Marko [Wed, 20 Apr 2016 17:45:25 +0000 (18:45 +0100)]
Fix HInstruction::ReplaceInput(), allow no-op.
Allow HInstruction::ReplaceInput() to be called with
a `replacement` being the same as the old input and
do nothing in that case.
This is a follow-up to
https://android-review.googlesource.com/216923
where I erroneously assumed that it never happens.
Also adhere to the standard C++ std::forward_list<>
semantics in the single-element overload of
`IntrusiveForwardList<>::splice_after()`.
Bug:
28173563
(cherry picked from commit
c6b5627c25ff5653e97ccff8c5ccf6ac967b6f83)
Change-Id: I66b7d4b48f629284d0bcb1d31100519e02a872e5
Andreas Gampe [Wed, 20 Apr 2016 17:09:24 +0000 (17:09 +0000)]
Merge changes I0360a078,I3e267519 into nyc-dev
* changes:
ART: Add Math cutouts
ART: Add some reflection cutouts
Andreas Gampe [Wed, 20 Apr 2016 16:55:25 +0000 (09:55 -0700)]
ART: Add logging for CHECK failure
Add more logging around which thread raced this one.
Bug:
28254258
Change-Id: I136a8074295527a4908825f424fc7fe4b13fbae4
Aart Bik [Wed, 20 Apr 2016 16:29:45 +0000 (16:29 +0000)]
Merge "Avoid constructing types with errors." into nyc-dev
Vladimir Marko [Wed, 20 Apr 2016 16:17:49 +0000 (16:17 +0000)]
Merge changes Iddd42d75,Ifb2d7b35 into nyc-dev
* changes:
Reuse HUseListNode<>s when replacing instruction or input.
Use iterators "before" the use node in HUserRecord<>.
Vladimir Marko [Tue, 19 Apr 2016 13:36:35 +0000 (14:36 +0100)]
Reuse HUseListNode<>s when replacing instruction or input.
Compiling the Nexus 5 boot image with the 64-bit dex2oat
on host this CL reduces the memory used for compiling the
most hungry method, BatteryStats.dumpLocked(), by ~5.6MiB:
Before:
MEM: used:
44393040, allocated:
45361248, lost: 968208
Number of arenas allocated: 319,
Number of allocations: 815492, avg size: 54
...
UseListNode
10308480
...
After:
MEM: used:
38554536, allocated:
39463008, lost: 908472
Number of arenas allocated: 274,
Number of allocations: 572221, avg size: 67
...
UseListNode
4469976
...
With 32-bit dex2oat, the UseListNode would be 2/3 of the
values for 64-bit dex2oat (both before and after).
Bug:
28173563
Bug:
27856014
(cherry picked from commit
3c19d3e029a9fcc123d2c6fd1e5e13867d2cfe1f)
Change-Id: Iddd42d7545e4f97a13da63590b33711a5bbdd43b
Vladimir Marko [Tue, 29 Mar 2016 11:21:58 +0000 (12:21 +0100)]
Use iterators "before" the use node in HUserRecord<>.
Create a new template class IntrusiveForwardList<> that
mimicks std::forward_list<> except that all allocations
are handled externally. This is essentially the same as
boost::intrusive::slist<> but since we're not using Boost
we have to reinvent the wheel.
Use the new container to replace the HUseList and use the
iterators to "before" use nodes in HUserRecord<> to avoid
the extra pointer to the previous node which was used
exclusively for removing nodes from the list. This reduces
the size of the HUseListNode by 25%, 32B to 24B in 64-bit
compiler, 16B to 12B in 32-bit compiler. This translates
directly to overall memory savings for the 64-bit compiler
but due to rounding up of the arena allocations to 8B, we
do not get any improvement in the 32-bit compiler.
Compiling the Nexus 5 boot image with the 64-bit dex2oat
on host this CL reduces the memory used for compiling the
most hungry method, BatteryStats.dumpLocked(), by ~3.3MiB:
Before:
MEM: used:
47829200, allocated:
48769120, lost: 939920
Number of arenas allocated: 345,
Number of allocations: 815492, avg size: 58
...
UseListNode
13744640
...
After:
MEM: used:
44393040, allocated:
45361248, lost: 968208
Number of arenas allocated: 319,
Number of allocations: 815492, avg size: 54
...
UseListNode
10308480
...
Note that while we do not ship the 64-bit dex2oat to the
device, the JIT compilation for 64-bit processes is using
the 64-bit libart-compiler.
Bug:
28173563
Bug:
27856014
(cherry picked from commit
46817b876ab00d6b78905b80ed12b4344c522b6c)
Change-Id: Ifb2d7b357064b003244e92c0d601d81a05e56a7b
TreeHugger Robot [Wed, 20 Apr 2016 14:40:26 +0000 (14:40 +0000)]
Merge "ProfileSaver: query profiling_infos instead of the code_map" into nyc-dev
Vladimir Marko [Wed, 20 Apr 2016 13:39:47 +0000 (14:39 +0100)]
Thumb2: Fix EmitJumpTables() to extend buffer only if needed.
Bug:
28256882
(cherry picked from commit
9152fed693f5d823ef29c373d658adc67fa92fe7)
Change-Id: I804e45c8c6a7bc97fcec5a380ccc1bdf70de8b00
Calin Juravle [Tue, 19 Apr 2016 15:33:46 +0000 (16:33 +0100)]
ProfileSaver: query profiling_infos instead of the code_map
This is the first step in being able to record profiles without jit
being active.
Bug:
27916886
Change-Id: I2fcbd03560e109e6866ad6d82c79b902a889e620
Vladimir Marko [Wed, 20 Apr 2016 09:07:45 +0000 (09:07 +0000)]
Merge changes I5044e94b,I149273b7 into nyc-dev
* changes:
Fix 570-checker-osr test for non-debuggable mode.
Fix inlining loops in OSR mode.
Andreas Gampe [Wed, 20 Apr 2016 03:53:51 +0000 (03:53 +0000)]
Merge "ART: Fast-fail empty other handlers in fault handling" into nyc-dev
Aart Bik [Wed, 6 Apr 2016 18:22:12 +0000 (11:22 -0700)]
Avoid constructing types with errors.
BUG=
27626735
Rationale:
Do not construct classes with a link error. Without this,
the error type thought it was Object (mirror's method
IsObjectClass() returns true if there is no superclass).
(cherry picked from commit
8b3f9b246d5bdbf67faeb2b872b75b8d72777bc0)
(also contains follow-up commit
31244b4cde9156632a08103a8bf1cbff4cbae3cc)
Change-Id: I4443779dda47c320115975c1c71b22e118bd8252
Mathieu Chartier [Tue, 19 Apr 2016 20:46:03 +0000 (13:46 -0700)]
Do less work holding thread list lock
Avoid doing stuff that requires access java heap like PrettyMethod.
Fixes lock violation.
Bug:
28268478
Change-Id: Ie090879690df7a6db15a9c8b7e82f3809450d653
Vladimir Marko [Tue, 19 Apr 2016 16:26:54 +0000 (17:26 +0100)]
Fix 570-checker-osr test for non-debuggable mode.
For non-debuggable mode, we need to create profiling info.
Bug:
28210356
(cherry picked from commit
b9d338b96c804a077dc2ed60b36b7ab64dc2c78c)
Change-Id: I5044e94bf78bd982007c8e7a3a9e5ee56f861e9c
Calin Juravle [Tue, 19 Apr 2016 17:17:41 +0000 (18:17 +0100)]
Fix comparison in profile saver
Bug:
27893309
Change-Id: I076a20413cffc69ca9e562fb4fc75615fead7690
Calin Juravle [Tue, 19 Apr 2016 17:03:28 +0000 (17:03 +0000)]
Merge "Fix tracking foreign dex files" into nyc-dev
TreeHugger Robot [Tue, 19 Apr 2016 16:56:18 +0000 (16:56 +0000)]
Merge "Skip profiling if the dex file is fully compiled" into nyc-dev
Andreas Gampe [Tue, 19 Apr 2016 16:49:03 +0000 (16:49 +0000)]
Merge "ART: Remove Security initialization cutout" into nyc-dev
Richard Uhler [Tue, 19 Apr 2016 16:24:12 +0000 (16:24 +0000)]
Merge changes Ia55ae13e,Ib3e2e6d2 into nyc-dev
* changes:
Disable stripped-dex test for no-dex2oat.
Disable stripped-dex test on target.
TreeHugger Robot [Tue, 19 Apr 2016 15:50:39 +0000 (15:50 +0000)]
Merge "Use dex cache from compilation unit in HInstructionBuilder." into nyc-dev
Andreas Gampe [Tue, 19 Apr 2016 00:15:42 +0000 (17:15 -0700)]
ART: Fast-fail empty other handlers in fault handling
Don't try to set up the nested handler environment if there are
no other handlers installed.
Stop-gap for the current setup without other handlers. There are
a myriad more issues before we can safely re-enable other handlers.
Bug:
28245957
(cherry picked from commit
d14b73d9d9027539c1dfeff93f784a58c93f4e32)
Change-Id: I526aef82aa1ca2b6c4b1959858fe76231bc067d9
David Brazdil [Tue, 19 Apr 2016 09:10:17 +0000 (10:10 +0100)]
ART: Fix IsLinearOrderWellFormed in liveness analysis
Graph may contain nullptr in list of basic blocks when
the basic block is removed. So we must handle nullptr explicitly.
Bug:
28252537
Bug:
27615840
Bug:
27624868
Change-Id: If430939b8fe793e4a9c974936180d06c1a9f90c6
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
fa3091ef031da6c18478fdede12d7762634ee271)
Calin Juravle [Mon, 18 Apr 2016 17:59:22 +0000 (18:59 +0100)]
Fix tracking foreign dex files
Apps which share the same VM will have different application data
directories. We used to store only the first one registered and miss
subsequent registrations.
Bug:
28012567
Change-Id: I27c2aa2efa938b072be7c73bb778db82f80fcf1e
Calin Juravle [Mon, 18 Apr 2016 15:38:27 +0000 (16:38 +0100)]
Skip profiling if the dex file is fully compiled
The OatFile does not store the original dex location that was used to
compile the file. So in order to get the oat file for a given code path
we need to iterate over the inner oat dex files and check against them.
Also, we used to pass the unfiltered code_paths set to the saver which
would make the filtering useless. This fixes the parameter passing as
well.
Bug:
27893309
Change-Id: Ia95d61a82a9e74769ebf3329bb1f9c714bcff27f
Vladimir Marko [Wed, 13 Apr 2016 18:29:26 +0000 (19:29 +0100)]
Use dex cache from compilation unit in HInstructionBuilder.
Avoid calling costly ClassLinker::FindDexCache() from
HInstructionBuilder, the dex cache is already available in
the compilation unit. Compiling Nexus 5 boot image on host
under perf(1) shows that the time spent in FindDexCache()
is reduced from about 2% to well under 0.2%, 90% of the
remaining hits coming from ReferenceTypePropagation which
doesn't have access to the compilation unit.
Bug:
28173563
(cherry picked from commit
3cd50df11b3076b801954018236c366fd9b97948)
Change-Id: Ife0dba2dd8f49bd52f86ddadf06ee787bad03d66
Vladimir Marko [Mon, 18 Apr 2016 14:37:01 +0000 (15:37 +0100)]
Fix inlining loops in OSR mode.
When compiling a method in OSR mode and the method does not
contain a loop (arguably, a very odd case) but we inline
another method with a loop and then the final DCE re-runs
the loop identification, the inlined loop would previously
be marked as irreducible. However, the SSA liveness analysis
expects irreducible loop to have extra loop Phis which were
already eliminated from the loop before the inner graph was
inlined to the outer graph, so we would fail a DCHECK().
We fix this by not marking inlined loops as irreducible when
compiling in OSR mode.
Bug:
28210356
(cherry picked from commit
fd66c50d64c38e40bafde83b4872e27bbff7546d)
Change-Id: I149273b766d1c713c571baad6033c5f70e6dd960
Andreas Gampe [Tue, 19 Apr 2016 03:51:13 +0000 (20:51 -0700)]
ART: Add Math cutouts
Add sin, cos and pow to unstarted runtime. Add tests for some
very specific values that are seen.
Allows to compile-time initialize:
* android.graphics.drawable.RippleForeground
* android.widget.EdgeEffect
Bug:
27265238
Change-Id: I0360a078e7dc9d2a176ec1cf2d8dbb242da1c83e
Andreas Gampe [Tue, 19 Apr 2016 00:07:30 +0000 (17:07 -0700)]
ART: Add some reflection cutouts
Add Class.getInnerClassFlags and Method.invoke to unstarted runtime.
Allows to compile-time initialize:
* android.net.NetworkInfo
* android.net.wifi.WifiInfo
Bug:
27265238
Change-Id: I3e267519acf14b08c687f1e831e2027d37158767
Andreas Gampe [Tue, 19 Apr 2016 00:04:14 +0000 (00:04 +0000)]
Merge "ART: Add cutout for Character.toLower/UpperCase" into nyc-dev
Andreas Gampe [Tue, 19 Apr 2016 00:03:46 +0000 (00:03 +0000)]
Merge "ART: Add ClassLoader.getResourceAsStream cutout" into nyc-dev
Mathieu Chartier [Mon, 18 Apr 2016 18:43:29 +0000 (11:43 -0700)]
Prevent holding stale Thread pointers
It is only really safe to hold non-self Thread* if you hold the
thread list lock. Changed a few places to use thread ids instead
of Thread.
Bug:
28223501
Change-Id: Ie58bd755bf1dcf3c1f37da79ba0b2507f77574dd
Andreas Gampe [Sat, 16 Apr 2016 04:24:28 +0000 (21:24 -0700)]
ART: Add cutout for Character.toLower/UpperCase
Add support for ASCII codepoint toLowerCase/toUpperCase. Those
inputs are easy, and generally sufficient.
Allows to compile-time initialize:
* android.text.Html$HtmlParser
* java.util.UUID$Holder
* sun.security.ec.ECKeyFactory
Bug:
27265238
Change-Id: I0f164a7df4f26c0b266cef230e36f6ca3af20bde
Mathieu Chartier [Mon, 18 Apr 2016 17:37:19 +0000 (17:37 +0000)]
Merge "Add more info to monitor contention logging" into nyc-dev
Mathieu Chartier [Sat, 16 Apr 2016 02:11:45 +0000 (19:11 -0700)]
Add more info to monitor contention logging
Print owner thread name and tid. Print blocking file name and line
number.
Bug:
28223501
Change-Id: I6ee50ba8521c37977accad039fcf039c78b246e2
Richard Uhler [Fri, 15 Apr 2016 19:16:45 +0000 (12:16 -0700)]
Disable stripped-dex test for no-dex2oat.
Because the stripped-dex test requires a prebuild configuration.
Bug:
27599626
(cherry picked from commit
1b85354e974bac725b5baf1c8d1041b9b1e96643)
Change-Id: Ia55ae13e8ce2ab34348a5b9a096031d57c0048fa
Richard Uhler [Thu, 14 Apr 2016 20:31:30 +0000 (13:31 -0700)]
Disable stripped-dex test on target.
Because the targets don't have the required zip command.
Bug:
27599626
(cherry picked from commit
d7864d85b9ce87bc4a0ceb94adf6b9c216543da0)
Change-Id: Ib3e2e6d2874a36fa0e2ff2cba3e986107a05eaaa
Roland Levillain [Mon, 18 Apr 2016 14:15:22 +0000 (14:15 +0000)]
Merge changes I077465e3,I30173023 into nyc-dev
* changes:
Fix: correctly destruct VIXL labels.
Move Assemblers to the Arena.
Yi Kong [Mon, 18 Apr 2016 12:07:51 +0000 (12:07 +0000)]
Merge "Increase vtable size for String class" into nyc-dev
Alexandre Rames [Fri, 15 Apr 2016 10:54:06 +0000 (11:54 +0100)]
Fix: correctly destruct VIXL labels.
(cherry picked from commit
c01a66465a398ad15da90ab2bdc35b7f4a609b17)
Bug:
27505766
Change-Id: I077465e3d308f4331e7a861902e05865f9d99835
Vladimir Marko [Wed, 13 Apr 2016 10:59:46 +0000 (11:59 +0100)]
Move Assemblers to the Arena.
And clean up some APIs to return std::unique_ptr<> instead
of raw pointers that don't communicate ownership.
(cherry picked from commit
93205e395f777c1dd81d3f164cf9a4aec4bde45f)
Bug:
27505766
Change-Id: I3017302307a0253d661240750298802fb0d9585e
Calin Juravle [Mon, 18 Apr 2016 10:40:29 +0000 (10:40 +0000)]
Merge "Allow the framework to register sensistive threads to the runtime" into nyc-dev
Nicolas Geoffray [Mon, 18 Apr 2016 10:36:01 +0000 (10:36 +0000)]
Merge "Add weight to compiled/interpreter transitions." into nyc-dev
Yi Kong [Tue, 12 Apr 2016 21:38:06 +0000 (22:38 +0100)]
Increase vtable size for String class
Tracks libcore change
5458546631c65f6d375b6a1780d36d0abb5b95af which
increases vtable size for String by four.
Bug:
28108421
Change-Id: I3f7b373ffc08a0f5351f04b5045866ea040f8e6e
(cherry picked from commit
478078a8f9375ec53a3c77c19c0cdb82a9917c88)
Narayan Kamath [Wed, 13 Apr 2016 13:17:44 +0000 (14:17 +0100)]
Track removal of String hash functions.
The number of virtual methods dropped by one. The change to the
field counting merits some explanation, with the change to OpenJDK
we got rid of two 16 bit fields and added a 32 bit field (which the
companion change removed), so things continued to work happily.
This change brings the number of 16 bit fields down to zero.
Also fixes 100-reflect2, which iterates over all methods in j.l.String.
bug:
28082128
(cherry picked from commit
5d8fa8bbcb9411015c92d687cb1f3cb785146bf7)
Change-Id: I4e5454547e08b072768bbc466e2f5c027b8dab86