OSDN Git Service
Aart Bik [Thu, 19 May 2016 22:34:19 +0000 (22:34 +0000)]
Merge "Do not allow OSR jump while debugging is active." into nyc-dev
Aart Bik [Wed, 18 May 2016 22:44:07 +0000 (15:44 -0700)]
Do not allow OSR jump while debugging is active.
Rationale:
This prevents dangerous transitions between interpreter
and osr compiled code while e.g. single stepping through
a method that is becoming hot.
BUG=
28672961
(cherry picked from commit
29bdaeef925f35eed68f3e52d04416daa0a62317)
Change-Id: I7647710dbe794a1b3320a9666d3e3be85fc40ccd
TreeHugger Robot [Thu, 19 May 2016 18:52:34 +0000 (18:52 +0000)]
Merge "Add missing check for IsShuttingDown in profile saver" into nyc-dev
Calin Juravle [Wed, 18 May 2016 22:49:36 +0000 (15:49 -0700)]
Add missing check for IsShuttingDown in profile saver
Bug:
28814718
Change-Id: I709fc30147047c7a420cd6ff2f0c3b57c54c2021
Mathieu Chartier [Thu, 19 May 2016 17:04:35 +0000 (17:04 +0000)]
Merge "Fix profile saver initial wait" into nyc-dev
TreeHugger Robot [Thu, 19 May 2016 14:30:18 +0000 (14:30 +0000)]
Merge "Revert "Move rewritten StringFactory call results into dex registers for deopt"" into nyc-dev
Roland Levillain [Thu, 19 May 2016 13:00:55 +0000 (13:00 +0000)]
Revert "Move rewritten StringFactory call results into dex registers for deopt"
This reverts commit
0ea451b4d74e8ddc28ea5ce87ef6d21113a3cdd5.
597-deopt-new-string is failing.
Bug:
28846692
Bug:
28555675
Change-Id: I8274e5ae1d065dedc562132882b39e7f3fe5baf4
Andreas Gampe [Thu, 19 May 2016 04:27:00 +0000 (21:27 -0700)]
ART: Fix Mac build
Follow-up to
9821cceebf077cb747aed543582b3d740a03ea7f.
Bug:
28801010
Change-Id: I0bbdf83d64ea81e56824aa19bfae3baa341a2b73
TreeHugger Robot [Thu, 19 May 2016 03:51:04 +0000 (03:51 +0000)]
Merge "ART: Optimize PreSetup pass for oat-file open" into nyc-dev
Mathieu Chartier [Thu, 19 May 2016 02:51:23 +0000 (19:51 -0700)]
Fix profile saver initial wait
Was using TimedWait for the initial wait, but this can return
early if the process receives any interrupt (due to futex). The
solution is to use a wait loop. If the wait returned early, not
enough classes were including in the profile. This negatively
affected application launch times in some scenarios.
Sample wait times before the change:
Waited 2.002s
Waited 97.808ms
Waited 182.676ms
Waited 2.000s
Waited 1.678s
Bug:
27688727
Change-Id: Ia84878e1278d70b4cc239374a2107d0f111dbdc5
Andreas Gampe [Wed, 18 May 2016 20:09:54 +0000 (13:09 -0700)]
ART: Optimize PreSetup pass for oat-file open
The PreSetup pass for opening an oatfile with dlopen parses all
shared objects and tries to retrieve the corresponding mem map
(so as to have a fake MemMap to reserve the space for any scanning
operations and so on). Optimistically optimize this pass by counting
the number of shared objects before the dlopen, and skipping as
many afterwards.
This saves about half a millisecond on an N6P.
Bug:
28801010
Change-Id: I70156f9875e89c5af3c9e36e8f01c5662e3f736e
Mingyao Yang [Mon, 16 May 2016 18:01:49 +0000 (11:01 -0700)]
Move rewritten StringFactory call results into dex registers for deopt
Bug:
28555675
(cherry picked from commit
8ca33bf04060fadd5b35fa93fa56547c62fe52e7)
Change-Id: I9236df283f2e83ca5dcde01f73dc0522d745cd59
Roland Levillain [Wed, 18 May 2016 14:48:45 +0000 (14:48 +0000)]
Merge "Catch classes inheriting from themselves in the class linker." into nyc-dev
Roland Levillain [Wed, 18 May 2016 11:25:38 +0000 (12:25 +0100)]
Catch classes inheriting from themselves in the class linker.
Bug:
28685551
Bug:
27682580
Bug:
28830038
Change-Id: If568013bf3c82c1df9b282522712d9af5ca5945d
Andreas Gampe [Tue, 17 May 2016 17:13:10 +0000 (10:13 -0700)]
ART: Fix systrace monitor logging
Thinlock unlocking was incorrectly unconditionally ending a block.
Bug:
28423466
Change-Id: Ifaebd9e959041e157e292d4cba05675a37e9c700
TreeHugger Robot [Tue, 17 May 2016 01:46:56 +0000 (01:46 +0000)]
Merge "Revert "Reject classes inheriting from themselves directly or transitively."" into nyc-dev
Mathieu Chartier [Tue, 17 May 2016 01:21:19 +0000 (01:21 +0000)]
Merge "Visit IMT of all classes during image writing" into nyc-dev
Nicolas Geoffray [Tue, 17 May 2016 00:12:11 +0000 (00:12 +0000)]
Revert "Reject classes inheriting from themselves directly or transitively."
Bug:
28685551
Bug:
27682580
Bug:
28797012
This reverts commit
9de98ef4ad4311e85d124099b0b36ab81171ea20.
Change-Id: Ic4a21194ad602f4897f088a66672f3dd9f30f607
Mathieu Chartier [Mon, 16 May 2016 21:58:01 +0000 (14:58 -0700)]
Visit IMT of all classes during image writing
We still need to visit the IMT for classes that does not have any
methods. It is required to visit the IMT of every class to assign
image offsets for the conflict table methods.
Added regression test.
Bug:
28707801
Change-Id: I1cd21f20e1e3c606ecfe8cbabe1045cadd86f268
Mingyao Yang [Mon, 16 May 2016 23:15:03 +0000 (23:15 +0000)]
Merge "Fix assert failure in interpreter after deoptimization." into nyc-dev
Calin Juravle [Fri, 29 Apr 2016 15:44:11 +0000 (16:44 +0100)]
Adjust ProfileSaver strategy
Change to a notification based strategy (instead of polling):
- the JIT notifies the ProfileSaver everytime it attempts a compilation
or generate (in a task) a ProfileInfo object for the method
- once a certain number of hot methods notification are received,
ProfileSaver wakes up the thread to do the analysis
- a wake up does not equal to I/O since the during processing we might
realized that's actually not enough new data.
- ProfileSaver throtles the request and ensures it doesn't do the
processing more often than kMinSavePeriodNs.
The new strategy avoids waking the thread unnecessary during extended
idle periods when we don't JIT.
Bug:
26815940
Change-Id: I24cb15daead5c5a5395ae6f5f79549e39e2f3011
Jeff Hao [Mon, 16 May 2016 17:15:20 +0000 (17:15 +0000)]
Merge "Make quick frames of proxy methods visited if they're constructors." into nyc-dev
Roland Levillain [Thu, 12 May 2016 15:12:47 +0000 (16:12 +0100)]
Reject classes inheriting from themselves directly or transitively.
Also enforce class definition ordering with respect to super
classes within a Dex file.
(cherry picked from commit
498bb81f8725e2cf8f5ce1aa6b49ab5a9c5bb4c9)
Bug:
28685551
Bug:
27682580
Change-Id: If3eba782538eb4328d4b8a542236632379e7c050
Jeff Hao [Fri, 13 May 2016 21:46:28 +0000 (14:46 -0700)]
Make quick frames of proxy methods visited if they're constructors.
Also adds a test case for getting annotations during moving GC.
Bug:
28510922
Change-Id: Ic9b849cd16321da3a3a609182dcdea08782496f9
Przemyslaw Szczepaniak [Thu, 12 May 2016 13:55:48 +0000 (14:55 +0100)]
Ensure that java.lang.reflect.Field is initialized
Recent change in libcore (a move of clinit code
to register function for java.net.InetAddress
class) was triggering a failure in 119-noimage-patchoat
test. Failure was occurring when the test was running
without the image. This was caused by the
java.lang.reflect.Field not being initialized when
running InetAddress.<clinit>, which is a side effect
of calling JNIEnv->GetMethodId inside the libcore JNI_OnLoad.
This changes makes sure that this class is initialized
when we're running without image.
Bug:
28153851
Bug:
27265238
Change-Id: I8aeb5eb312a163c452c40b851112544a8340e488
(cherry picked from commit
a2b147eaf72c5af23302a382620360b4cac28934)
Aart Bik [Wed, 11 May 2016 17:30:47 +0000 (10:30 -0700)]
Fix oatdump crash on arm64/arm code.
Also adds 16 bit literal information.
Rationale:
When "run-away" instructions are disassembled, the literal
addresses may go out of range, causing oatdump to crash.
This CL guards memory access against the full memory range
allocated to assembly instructions and data (it is possible
but not really necessary to refine this a bit). Out of range
arguments are now displayed as (?) to denote the issue, which
is a lot nicer than crashing.
BUG=
28670871
(cherry picked from commit
d3059e77818a058513ed92557160bdb6d5102b67)
Change-Id: I322bbdf83509e253430c40428a05c0ad16b81354
Richard Uhler [Thu, 12 May 2016 15:12:28 +0000 (15:12 +0000)]
Merge "Don't expect permission to open foreign dex use marks." into nyc-dev
TreeHugger Robot [Thu, 12 May 2016 07:57:02 +0000 (07:57 +0000)]
Merge "Fix another case of live_in at irreducible loop entry." into nyc-dev
Mathieu Chartier [Wed, 11 May 2016 22:15:39 +0000 (22:15 +0000)]
Merge "Prevent ArtMethod clearing race" into nyc-dev
Mathieu Chartier [Wed, 11 May 2016 01:13:20 +0000 (18:13 -0700)]
Prevent ArtMethod clearing race
There was race condition where the GC would be visiting the methods
of a class while the class linker overwrote the contents with 0xFE
when copying to a new array.
Since the GC is holding the class table lock at this time, we can
use this lock in the class linker to prevent the race.
Bug:
28699001
(cherry picked from commit
10c5f56423feaf3eadb3d4c09c61d2b998404162)
Change-Id: I5ddca93106cb8e48962cf44e5ce434c45e05cd0c
Mathieu Chartier [Wed, 11 May 2016 18:35:39 +0000 (11:35 -0700)]
Add histogram for native allocations
Shows up in traces.txt, sample output:
Histogram of native allocation 0:4315,131072:33,
1179648:3 bucket size 131072
Histogram of native free 0:995,131072:19,
1179648:2 bucket size 131072
Bug:
28680116
Change-Id: I584eb85709d3ae28f5142a01af11075a2a6436d7
Richard Uhler [Tue, 10 May 2016 21:01:18 +0000 (14:01 -0700)]
Don't expect permission to open foreign dex use marks.
sepolicy says we can create the mark files, but open requires
additional permissions we don't need. Don't print a warning when we
aren't given those additional permissions.
Bug:
28241500
Change-Id: I6764a9b0e165ff9781a10f682d7387b094d34da9
Mingyao Yang [Thu, 28 Apr 2016 23:23:01 +0000 (16:23 -0700)]
Fix assert failure in interpreter after deoptimization.
There is code that does
new String(chararr, 0, chararr_count);
which under debuggable turns into a call into pNewEmptyString() plus a
call into pNewStringFromChars_CII().
Even though we currently don't patch return pc in a runtime method,
calling into pNewEmptyString() is special since it's hacked such
that it's acting as if the caller calls into the java method
StringFactory.newEmptyString() directly. So deoptimization can now
happen at the NewEmptyString site and the assert is triggered since
it's a new instance instead of an invoke instruction.
The fix relaxes the assert to allow the special case.
Bug:
28555675
(cherry picked from commit
504a69081f63818ca332ddaf54e8198448554538)
Change-Id: Idbb159b5aa450df2344cd93ae74fef5f55bdc534
Nicolas Geoffray [Tue, 10 May 2016 13:35:34 +0000 (14:35 +0100)]
Fix another case of live_in at irreducible loop entry.
GVN was implicitly extending the liveness of an instruction across
an irreducible loop.
Fix this problem by clearing the value set at loop entries that contain
an irreducible loop.
bug:
28252896
Change-Id: I68823cb88dceb4c2b4545286ba54fd0c958a48b0
Mathieu Chartier [Wed, 11 May 2016 02:32:30 +0000 (02:32 +0000)]
Merge changes from topic 'native_unloads' into nyc-dev
* changes:
Fix libarttest to be non debug
Change test 136 to use dlopen
Revert "Revert "Remove double unloading hack""
Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""
Mathieu Chartier [Thu, 5 May 2016 22:31:12 +0000 (15:31 -0700)]
Fix libarttest to be non debug
Previously both libarttest and libarttestd had debug enabled. This
made it hard to know which one was loaded (couldn't look at
kIsDebugBuild).
Fixes test 136 with ART_TEST_RUN_TEST_NDEBUG configuration.
Bug:
28406866
(cherry picked from commit
48b2b3e57e0510f549e9dc5c5a61f50eec697cf5)
Change-Id: I92983f71374b211f96f5b346fec326ea8543f876
Aart Bik [Tue, 10 May 2016 22:43:27 +0000 (22:43 +0000)]
Merge "Break the debug cycle!" into nyc-dev
Mathieu Chartier [Thu, 5 May 2016 18:09:58 +0000 (11:09 -0700)]
Change test 136 to use dlopen
dlopen self to prevent the native libary being closed from
DestroyJavaVM. We need this since it is the library currently
executing code.
Bug:
28406866
(cherry picked from commit
06fd2cff238cbdd8f6ceb4a85273c5a7fd0db023)
Change-Id: Ib23f09a97184abb69a142057b0ccb9d476f69c95
Mathieu Chartier [Tue, 10 May 2016 17:11:48 +0000 (10:11 -0700)]
Revert "Revert "Remove double unloading hack""
This reverts commit
e9cae49599856fe737cee87783438d2c5dabccfe.
Bug:
28406866
(cherry picked from commit
c0f2e678e45ff191f90651117f4e238caa521b80)
Change-Id: I806cec1a6baab8722262082a6d3db1ac3734a8ab
Mathieu Chartier [Tue, 10 May 2016 17:12:00 +0000 (10:12 -0700)]
Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""
This reverts commit
624b68ecbe67dd91cb50f588fbfa2243def47f1e.
Bug:
28406866
(cherry picked from commit
33bae7d52debe898879fc034a5524b1b165dbd88)
Change-Id: I4d6d6791b286cfeecaeebc388684ee8d3c44a920
Dimitry Ivanov [Tue, 10 May 2016 20:09:37 +0000 (20:09 +0000)]
Merge "Initialize native loader before starting runtime" into nyc-dev
Aart Bik [Thu, 5 May 2016 22:10:42 +0000 (15:10 -0700)]
Break the debug cycle!
Rationale:
When entering the path that implements method invocation,
it is possible for the interpreter and JIT to cycle around
trying to interpret or compile a method, never making a
decision. This bug fix avoids such cycling with a minimum
of extra runtime overhead.
BUG=
28537292
(cherry picked from commit
0122320f86ae004aa195d76814c52564d84ee632)
Change-Id: Ied47e0089a8c674a1504f1718f1a3a667863ada3
Alex Light [Tue, 10 May 2016 19:44:40 +0000 (19:44 +0000)]
Merge "Make all java.lang.reflect.Constructor methods handle proxies." into nyc-dev
Dimitry Ivanov [Mon, 9 May 2016 23:26:13 +0000 (16:26 -0700)]
Initialize native loader before starting runtime
Loading public libraries before everything else
to prevent situation when libssl.so gets into
libopenjdk.so load group which then prevented
from unloading by a global library referencing
the very same libssl.so
Bug: http://b/
28449304
Change-Id: I3bbff3cc6926c2377ae5cb5b7b5b5d6e26ea4470
(cherry picked from commit
c544f34bfed4273b38e5c3769c627e0c3e9c5d73)
Alex Light [Mon, 9 May 2016 23:25:11 +0000 (16:25 -0700)]
Make all java.lang.reflect.Constructor methods handle proxies.
Bug:
28676926
Change-Id: If5e7f1c886334ce0ea2e3e2b64616eddf69c9377
(cherry picked from commit
36a95bcf9de9f90b49eee6c18c9b3b57487d806a)
Alex Light [Mon, 9 May 2016 22:31:18 +0000 (15:31 -0700)]
Fix issue with Constructor proxies.
Bug:
28659889
Change-Id: I4307916c79e7b56608c3ff5c9bbe83e175254f28
(cherry picked from commit
52c9da0925c67265bf353f5a66b7cb5541a88046)
Vladimir Marko [Tue, 10 May 2016 12:31:23 +0000 (13:31 +0100)]
Reduce memory usage of SSA Phi elimination and make it faster.
Use an ArenaBitVector instead of an ArenaSet<> that leaks
its allocated memory on clear(). We were also erroneously
using the O(n) helper ContainsElement() for the ArenaSet<>
instead of the O(log n) ArenaSet<>::find() which made the
methods with large number of processed Phis also very slow
to compile in addition to the enormous memory usage.
Bug:
28684584
(cherry picked from commit
c9ef168bfabd118d112a054dffe2c27d4d4db4fc)
Change-Id: I6115006259a9f697ea70e31d4478966fc601e24b
Vladimir Marko [Mon, 9 May 2016 19:23:34 +0000 (20:23 +0100)]
Attribute arena allocations previously marked as STL.
Bug:
28603175
Bug:
28684584
(cherry picked from commit
3ea5a97d27468cec846d958c38d0d706ef7ec67e)
Change-Id: I7f1bd22e7710cca74f4b10fd13cb8fa2c3b1b318
Vladimir Marko [Tue, 10 May 2016 13:19:41 +0000 (13:19 +0000)]
Merge "Fix ProtoId ordering check in DexFileVerifier." into nyc-dev
TreeHugger Robot [Tue, 10 May 2016 12:39:12 +0000 (12:39 +0000)]
Merge "ART: Fix dominance for irreducible loops" into nyc-dev
David Brazdil [Fri, 6 May 2016 11:46:21 +0000 (12:46 +0100)]
ART: Fix dominance for irreducible loops
Computation of dominance was broken in the presence of irreducible
loops because the algorithm assumed that back edges are always
dominated by their respective headers and a fix-point iteration is
therefore unnecessary.
This is not true for irreducible loops, forcing us to revisit their
loop headers and all dependent blocks. This patch adds a fix-point
iteration if a back edge not dominated by its header is found.
Bug:
28611485
Change-Id: If84044e49d5b9c682949648033d2861628d7fe05
(cherry picked from commit
3f4a522cc39f5c651e7c718196e989bc81d8c6ef)
Vladimir Marko [Tue, 3 May 2016 16:17:50 +0000 (17:17 +0100)]
Fix ProtoId ordering check in DexFileVerifier.
The code previously checked for kNoDexIndex16 as the type
list terminator. This is incorrect as we should not actually
see the kNoDexIndex16 in type lists in supported dex files.
To make sure that we don't see kNoDexIndex16, check the size
of the arrays with documented limits, i.e. type-ids and
proto-ids, see dex_file.h. In the ProtoId ordering check,
DCHECK() that we don't encounter kNoDexIndex16 and verify
that the previous list is not longer if the current list's
elements match.
Bug:
28580925
(cherry picked from commit
0ca8add2ae34c26291694ecc784d64f0cc1c1380)
Change-Id: Ied6dcbd8d04e3dfef5695dbd9b3a30a079038b2b
Vladimir Marko [Tue, 10 May 2016 11:01:10 +0000 (11:01 +0000)]
Merge "Fix index checks for error strings in DexFileVerifier." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 10:44:26 +0000 (10:44 +0000)]
Merge "Optimizing: LoadString may not have any side effects." into nyc-dev
Vladimir Marko [Tue, 5 Apr 2016 10:18:49 +0000 (11:18 +0100)]
Optimizing: LoadString may not have any side effects.
LoadString does not have any side effects if the string is
known to be in the dex cache or it's a boot image string
referenced directly, as specified by the string load kind.
We need to clear the side effects for these cases to avoid
a DCHECK() failure when such LoadString instruction ends up
between a ClinitCheck and an instruction to which we want to
merge that ClinitCheck. This may happen as a consequence of
inlining, LICM and DCE as shown by a regression test.
Bug:
27929914
(cherry picked from commit
ace7a000a433ce4ecf94f30adea39c01a76fa936)
Change-Id: Iaf9c63b6e58aae1e246b43ca52eea0b47a6ad565
TreeHugger Robot [Tue, 10 May 2016 09:25:18 +0000 (09:25 +0000)]
Merge "Relax the DCHECK in load store elimination." into nyc-dev
Vladimir Marko [Tue, 3 May 2016 15:31:52 +0000 (16:31 +0100)]
Fix index checks for error strings in DexFileVerifier.
Bug:
28552165
(cherry picked from commit
59399abce0223e74af00193436e39e109d98dacb)
Change-Id: Ic7d687fbb20d5bd68a606c40fe60007b05f1c59b
Nicolas Geoffray [Wed, 4 May 2016 13:00:12 +0000 (14:00 +0100)]
Relax the DCHECK in load store elimination.
The DCHECK was too strong, as we could come from a field or array
get on null, instead of null directly.
bug:
27831001
(cherry picked from commit
65fef30952bb92acec7ed36f7f431d93f7ce88b3)
Change-Id: Ia3ba1235e95408d66349a02fc438df9c2cf9e255
Aart Bik [Tue, 5 Apr 2016 00:28:59 +0000 (17:28 -0700)]
Workaround invokesuper underspecified behavior.
The verifier allows invokesuper on a class unrelated
to the referring class. However, the runtime uses the vtable of
the super class of the referring class to lookup the ArtMethod.
Since the receiver has no relation to the referring class, this lead
to either jumping to a wrong method, or "luckily" throw a
NoSuchMethodError if the vtable index is out of bounds of the super
class of the referring class.
This changes the runtime behavior to always throw NoSuchMethodError
when hitting such invokesuper.
Also, we make the verifier consistent with the runtime by treating
such calls unresolved.
bug=
27627004
(cherry picked from commit
f663e341c550d1aa6f8f587d0ae0dbf7d254ff55)
Change-Id: Ibec5a1e3a3320c474e1e0e5634a9ef62ea734cdf
Richard Uhler [Mon, 9 May 2016 15:50:29 +0000 (15:50 +0000)]
Merge "Hold a ClassLoader reference in NativeAllocationRegistry." into nyc-dev
TreeHugger Robot [Mon, 9 May 2016 09:15:46 +0000 (09:15 +0000)]
Merge "Fix braino when parsing invoke transition weight." into nyc-dev
Nicolas Geoffray [Fri, 6 May 2016 15:52:36 +0000 (16:52 +0100)]
Fix braino when parsing invoke transition weight.
bug:
27865109
Change-Id: I73e2763216b5596f601c456076c3b01c1dd000da
Alex Light [Sat, 7 May 2016 00:36:36 +0000 (17:36 -0700)]
Fix test for verification of clinit method
Bug:
28605638
Change-Id: Idbf2d59c20b7dda1efb9aa61bce2cefbe2c0040a
(cherry picked from commit
0ed0521a7f55b2efef8e71d0802893aa1d5b83e2)
TreeHugger Robot [Fri, 6 May 2016 23:38:12 +0000 (23:38 +0000)]
Merge "Make <clinit> verification stronger for v37+." into nyc-dev
TreeHugger Robot [Fri, 6 May 2016 21:57:11 +0000 (21:57 +0000)]
Merge "Fix libart tests on target" into nyc-dev
Alex Light [Fri, 6 May 2016 17:39:06 +0000 (10:39 -0700)]
Make <clinit> verification stronger for v37+.
Preserve the verification behavior of M for v35 dex files. v37+ get
stronger behavior
Bug:
28605638
Change-Id: If1ff4abcc61e0945f924fe4e10e173c03b4cd1a9
(cherry picked from commit
f0ecae7730b6c0145e0176cc619bdfba48201105)
Dimitry Ivanov [Fri, 6 May 2016 00:24:28 +0000 (17:24 -0700)]
Fix libart tests on target
1. Add libart/d.so to the list of additional public libraries
2. Fix java.library.path to include /system/lib(64)? for tests
run by dalvikvm
Bug: http://b/
28449304
Change-Id: I11f2dc22e445389160d6f7ed6743bb9664cf3745
(cherry picked from commit
90d48f28af67ab44d755363bf92d57a1b3e72a29)
David Sehr [Fri, 6 May 2016 19:29:35 +0000 (12:29 -0700)]
Remove a common subexpression from profman output
Change-Id: I12fa4a36f4e9d980a720bb52c6b736ffc91a6700
David Brazdil [Thu, 5 May 2016 10:27:03 +0000 (11:27 +0100)]
Stop populating irreducible loop at header
Recent CL modified the (previously exponential) algorithm for
populating irreducible loops so as to not visit blocks multiple times.
However, the new condition for an early exit did not take into account
that it is not necessary to visit predecessors of the loop header.
The algorithm remains correct but does unnecessary work.
Bug:
27856014
Change-Id: If72f8be82e79838f0dd9678082a3bbaabb51e43b
(cherry picked from commit
5a620590e5cf6d6817693edffd661371555de88b)
David Sehr [Thu, 5 May 2016 20:39:43 +0000 (13:39 -0700)]
Add braces per the coding convention
Bug:
28599906
Change-Id: Ie2cb4f6865b7756ceaf65c400a4090fc9423232a
David Sehr [Thu, 5 May 2016 16:02:38 +0000 (09:02 -0700)]
Limit profman log spam with time threshold
Bug:
28599906
Change-Id: Ibe1001da94c7916761c8f3b4b5dbacd8cf3809a7
Nicolas Geoffray [Thu, 5 May 2016 08:03:20 +0000 (08:03 +0000)]
Merge "Revert "(dl)Close native libraries on unload"" into nyc-dev
Nicolas Geoffray [Thu, 5 May 2016 08:02:57 +0000 (08:02 +0000)]
Revert "(dl)Close native libraries on unload"
Failures on test 136.
Bug: http://b/
28406866
This reverts commit
35f01195c4cf6e3c6fbb8b51f5a41b26132b4bdd.
Change-Id: I0c581e6f1aeb61285d3b132dbd9508e611ee4258
Dimitry Ivanov [Wed, 4 May 2016 22:22:06 +0000 (22:22 +0000)]
Merge "(dl)Close native libraries on unload" into nyc-dev
TreeHugger Robot [Wed, 4 May 2016 14:34:57 +0000 (14:34 +0000)]
Merge "Do not look at dead phis during SsaRedundantPhiElimination." into nyc-dev
Nicolas Geoffray [Wed, 4 May 2016 11:05:56 +0000 (12:05 +0100)]
Do not look at dead phis during SsaRedundantPhiElimination.
Otherwise, we may replace a dead loop phi with its incoming input.
This broke an assumption during liveness analysis in the presence
of irreducible loops.
bug:
28256552
(cherry picked from commit
05b3fa02ed8ef62841a92cd96526ba3a06bf1f63)
Change-Id: I297c8fbd9a2414dd852aa932595f7b42d8f1a584
TreeHugger Robot [Wed, 4 May 2016 12:17:15 +0000 (12:17 +0000)]
Merge "Check if a class is verified before visiting profiling info." into nyc-dev
Nicolas Geoffray [Wed, 4 May 2016 08:51:24 +0000 (09:51 +0100)]
Check if a class is verified before visiting profiling info.
The call to IsNative expects non-retired classes, and we know
we don't have any profiling info for non-verified classes anyway.
bug:
28542527
(cherry picked from commit
022dd86f9c1fd63dfd7e052a876289387393a78f)
Change-Id: I247ce08b6996bdae526a5e106dacdbb7b70504af
TreeHugger Robot [Wed, 4 May 2016 10:22:00 +0000 (10:22 +0000)]
Merge "Put a handle on the String object." into nyc-dev
Nicolas Geoffray [Tue, 3 May 2016 13:04:02 +0000 (14:04 +0100)]
Put a handle on the String object.
Otherwise, a GC could occur in the loop below, and the String
be moved (note that there was already one for the Class object to
protect for that same problem).
bug:
27561834
(cherry picked from commit
a96f316f6f0526c91c6c102a267df6b1e4df39da)
Change-Id: I89c093dd67982abb3502975097a337c7e3816360
TreeHugger Robot [Tue, 3 May 2016 23:53:52 +0000 (23:53 +0000)]
Merge "ART: Dump more OatDexFile data in oatdump" into nyc-dev
Dimitry Ivanov [Tue, 3 May 2016 22:05:41 +0000 (15:05 -0700)]
(dl)Close native libraries on unload
Dlclose native libraries when VM unloads a classloader. This
change is made to avoid leakage of adress space and RSS for
mapped but unreachable native libraries.
Bug: http://b/
28406866
Change-Id: Iccaa87210908872c2013506d8a310955c1e3d888
Alex Light [Tue, 3 May 2016 01:51:34 +0000 (18:51 -0700)]
Fix vtable corruption.
Due to failing to keep track of superclass implementations of
interface methods we could end up in situations where methods were
placed onto a class's vtable multiple times. This could cause virtual
and interface dispatches on subclasses to fail by causing corruption
of the subclass's vtable and iftable.
Bug:
28333278
(cherry picked from commit
d6c2bfaff8850a9a02ee9b75cf8c96eadd8d5c69)
Change-Id: I37d9740ca912daf37cdf9ff82697bbc5db46177a
Richard Uhler [Tue, 3 May 2016 20:05:50 +0000 (13:05 -0700)]
Hold a ClassLoader reference in NativeAllocationRegistry.
So that the native library isn't unloaded before we have a chance to
call the freeFunction.
Bug:
28406866
Change-Id: Iafe4fdc68482b68a4b14d10880fa15dcbb65adf2
Andreas Gampe [Sat, 30 Apr 2016 00:52:07 +0000 (17:52 -0700)]
ART: Dump more OatDexFile data in oatdump
Add some stats about the enclosed dex file and type table when
dumping an oat file.
Bug:
28251566
Change-Id: I80c14e85d68cd1e3e4c64b7b9d86059d5ac8a6ad
Narayan Kamath [Tue, 3 May 2016 11:31:00 +0000 (11:31 +0000)]
Merge "DexFile: Add an API to query oat file status." into nyc-dev
Narayan Kamath [Mon, 2 May 2016 12:14:48 +0000 (13:14 +0100)]
DexFile: Add an API to query oat file status.
Adds DexFile.getDexFileStatus(path), which returns an opaque,
human-readable string representation of the oat file status. This
representation isn't guaranteed to be stable and can change from
release to release.
bug:
27494108
Change-Id: I5fc42225ae65eb19dcd0c619a40cf674b34fc49c
Dimitry Ivanov [Fri, 29 Apr 2016 18:14:25 +0000 (11:14 -0700)]
Fix check_jni_compiler tests
Test needs to initialize nativeloader on runtime->Start(),
and reset it when runtime is stopped.
Bug: http://b/
28449304
Change-Id: I0ba946fe5fc2817dff73154e3191444106dfcb08
(cherry picked from commit
5edb063fc050bad66fe4ae41c93f6d08b0ccccfe)
Dimitry Ivanov [Thu, 28 Apr 2016 23:29:22 +0000 (16:29 -0700)]
Supply librarySearchPath to PathClassLoader
PathClassLoader needs librarySearchPath in order to
be able to find native libraries.
The java.library.path property is no longer implicitly
applied to all basedexclassloaders, and needs to be
passed explicitly.
Bug: http://b/
28449304
Change-Id: Id5b4273553d783c0f7a964f72ecb2c99f3aeaf6f
(cherry picked from commit
3a79b6389df39928823a7a8e862c2f647a1cd164)
Dimitry Ivanov [Mon, 2 May 2016 21:20:00 +0000 (21:20 +0000)]
Merge "Reset NativeLoader on DestroyJavaVM" into nyc-dev
Dimitry Ivanov [Fri, 29 Apr 2016 23:02:38 +0000 (16:02 -0700)]
Reset NativeLoader on DestroyJavaVM
Native loader keeps vector of weak references
to classloader. ResetNativeLoader instructs
it to clear this vector once JavaVM is
destroyed.
Bug: http://b/
28453840
Change-Id: I45e38c45268a741d86ec686266b13fde7d5fb9a2
Mathieu Chartier [Sat, 30 Apr 2016 01:52:04 +0000 (01:52 +0000)]
Merge "Fix profile saver to use base dex location" into nyc-dev
Hans Boehm [Sat, 30 Apr 2016 00:37:45 +0000 (00:37 +0000)]
Merge "Correct monitor pool synchronization" into nyc-dev
Andreas Gampe [Fri, 29 Apr 2016 23:13:53 +0000 (23:13 +0000)]
Merge "ART: Disambiguate access-checks mode from lock-counting" into nyc-dev
Andreas Gampe [Fri, 29 Apr 2016 23:04:50 +0000 (23:04 +0000)]
Merge "ART: Fix Mac build" into nyc-dev
Andreas Gampe [Fri, 29 Apr 2016 22:04:49 +0000 (15:04 -0700)]
ART: Fix Mac build
Fix Mac build after
fc6898769ae1ef91ec3e41c0a273401213cb82cd.
Bug:
28423466
Change-Id: I6942bc86f1b0819d84bced5499afb0a4d235a39e
Jeff Hao [Fri, 29 Apr 2016 21:07:48 +0000 (21:07 +0000)]
Merge "Add ability to see if a dex file is backed by an oat file." into nyc-dev
Mathieu Chartier [Fri, 29 Apr 2016 19:03:56 +0000 (12:03 -0700)]
Fix profile saver to use base dex location
Previously we were using the dex location. This only matches the
base location for the main dex file, and resulted in only the
main dex file to have classes recorded.
Bug:
28463739
Change-Id: I0117352150c7244dd048338dbb677abdd4554eb0
Hans Boehm [Wed, 27 Apr 2016 22:04:24 +0000 (15:04 -0700)]
Correct monitor pool synchronization
The previous implementation allowed a thread looking up a monitor
to see an uninitialized monitor_chunks_ list if the list had
just been resized. The obvious small fix would be to replace the
relaxed load in LookupMonitor with an acquire load. But the
extra fence (on ARM) may involve an appreciable performance hit.
This instead redesigns the data structure to avoid the race in
LookupMonitor, along with the need to use atomics there at all. The
down side is a little more address arithmetic in LookupMonitor(),
a mild decrease in the limit on the total number of monitors, and
use of one extra page, since we now always reserve space for the
first page worth of monitor chunk pointers.
To me, the new algorithm feels cleaner and easier to reason about.
Although this problem was externally reported, it seems unlikely
that it was responsible for frequent failures. It could only
be triggered when the monitor chunk list was resized, which should
be quite rare.
Bug:
28385279
Change-Id: I433155d91702878f6b114480eda1fbf09706f623
(cherry picked from commit
a319f4dbeea00701a0d12dc39b7bf0a5323f6b2a)
Richard Uhler [Fri, 29 Apr 2016 19:51:13 +0000 (19:51 +0000)]
Merge "Deduplicate simple roots in hprof." into nyc-dev