OSDN Git Service
Narayan Kamath [Mon, 16 Nov 2015 12:31:28 +0000 (12:31 +0000)]
Move arrayCopy / identityHashCode from OpenJdkJvm to System.
These functions are only ever called as the JNI implementation of
System.arrayCopy (and never directly from native code) so it's
cleaner to keep them as part of System's native implementation.
Moreover, this change fixes issues in debug mode where taking the
address of a function in a different shared library (potentially
compiled with different compilation flags) generates incorrect
code.
Change-Id: I0da147b9917eb1bb418d3f253fb2bfad46e53e0c
Yi Kong [Fri, 6 Nov 2015 13:33:22 +0000 (13:33 +0000)]
Increase the size of Class class
to match the size of java.lang.Class.class after adding isFinalizable method.
Change-Id: Iabc74be9ce7fb7cc5a7c59d54d0b59bc6fe611c2
Narayan Kamath [Mon, 16 Nov 2015 10:47:39 +0000 (10:47 +0000)]
Merge "Remove implementation of Unsafe_getAddress." into mnc-dr-enso-dev
Yi Kong [Mon, 16 Nov 2015 10:24:00 +0000 (10:24 +0000)]
Merge "Add libxxavacore to the list of run-test dependencies." into mnc-dr-enso-dev
Narayan Kamath [Fri, 13 Nov 2015 11:31:49 +0000 (11:31 +0000)]
Remove implementation of Unsafe_getAddress.
Change-Id: I68fa1a02a47ac5bf7e5880ccb154d460747938f7
Narayan Kamath [Mon, 16 Nov 2015 10:17:35 +0000 (10:17 +0000)]
Add libxxavacore to the list of run-test dependencies.
Change-Id: I74978454d37a029008e51157a4de37851873c9ec
Yi Kong [Wed, 11 Nov 2015 12:04:04 +0000 (12:04 +0000)]
Build libxxavacore library for gtests
It is a dependency for exception_test, jni_compiler_test,
reflection_test and stub_test.
Change-Id: I0a4ed85762091617842901f9bd590d24fe39ec7b
Narayan Kamath [Thu, 12 Nov 2015 14:20:30 +0000 (14:20 +0000)]
Merge mnc changes into mnc-dr
Przemyslaw Szczepaniak [Tue, 13 Oct 2015 14:25:21 +0000 (15:25 +0100)]
Silence "No verification for method calling String.<init>"
Changed message severity from warning to debug. This issue
is benign.
Bug:
24558132
Change-Id: I27ad0fe68df6a5a0bbd3bc06d4510395e10e7a85
Przemyslaw Szczepaniak [Mon, 12 Oct 2015 15:34:14 +0000 (16:34 +0100)]
Fix Constructor#serializationCopy
Added new Constructor#newInstanceFromSerialization
method that's used to implement #newInstance on
Constructor instances created by the #serializationCopy.
+ Restored ArtField::GetOffset missing DCHECK and
fixed debug build use of GetOffset to GetOffsetDuringLinking
in the class_linker.cc.
Bug:
24764403
Change-Id: I74bdf6a850bf9770ec51bf9a4421541d505de8ad
Brian Carlstrom [Tue, 29 Sep 2015 00:47:53 +0000 (17:47 -0700)]
Revert "Fix another source of undeterministic inlining." DO NOT MERGE
This reverts commit
bd7eef17de5f3d25f411702f9f260a96455b4cf7.
Bug:
24467386
Bug:
20037935
(cherry picked from commit
39becb96f0c2ba1823ca0cf046e9f12344f9f3bd)
Change-Id: I3ebdc669dc3085570bb534dce710712bf3ed25e2
Narayan Kamath [Thu, 1 Oct 2015 11:34:52 +0000 (12:34 +0100)]
Remove bogus reference to HAVE_POSIX_CLOCKS.
This is no longer defined, and we can assume that POSIX clocks
are available.
bug:
24556944
Change-Id: I14081aafa29f0fe2f9409307bbfef7d521c02f63
Przemyslaw Szczepaniak [Wed, 23 Sep 2015 07:48:00 +0000 (08:48 +0100)]
Sprinkle attribute unused / noreturn wherever necessary.
Change-Id: I32b646edc2617aa7c2f5e3b1fa39d1fcc1f2ab39
Narayan Kamath [Thu, 12 Nov 2015 11:49:06 +0000 (11:49 +0000)]
Merge lmp changes into mnc.
Most merge conflicts are due to changes in the string representation.
They have been resolved in favour of "mnc-dev" since we've changed
the string representation there. Other changes relate to the
fact that there are now two jars in libcore (core-oj and core-libart).
Change-Id: I1fcc6e5f8dab8d1954dcddca0493563e7677d433
Przemyslaw Szczepaniak [Wed, 7 Oct 2015 09:49:18 +0000 (10:49 +0100)]
Add Android System#arraycopy fast specializations.
Re-added System#arraycopy specializations that are
really fast for small arrays. They were introduced
originally in b/
7103825.
Change-Id: Ie8c995852810ad555fe73743d4d40ec45d8d6bbe
Przemyslaw Szczepaniak [Wed, 30 Sep 2015 16:43:23 +0000 (17:43 +0100)]
Fix runtime/mirror/object_test.cc
Change-Id: I7b7adba8febe26347ef6c5955db18ae2e3b8e167
Przemyslaw Szczepaniak [Wed, 30 Sep 2015 13:55:02 +0000 (14:55 +0100)]
Fix class_linker_test
Bad Throwable field name in the test.
Change-Id: I48f5b3f9aaaa073443058a0c0a7db2327e8a1445
Przemyslaw Szczepaniak [Wed, 30 Sep 2015 16:41:38 +0000 (17:41 +0100)]
Fix build, missed one method name change.
Change-Id: I619dc66d596f970417eb1319db8ed17c32edaa4d
Przemyslaw Szczepaniak [Wed, 30 Sep 2015 13:40:33 +0000 (14:40 +0100)]
Fix for gtest missing core classes, attempt 2
common_runtime_test loads both core-libart and
core-oj
Change-Id: I8a4d5750b99aed2e500cad89b841a57fe9c1ca69
Narayan Kamath [Wed, 30 Sep 2015 14:30:19 +0000 (14:30 +0000)]
Revert "Fix for gtest missing core classes."
This reverts commit
fa5480de6eca7f43b147c696bdb2936dc48d75d7.
Change-Id: Ifa9851f4f90af6093ed0bca852c55b3026fcd554
Przemyslaw Szczepaniak [Wed, 30 Sep 2015 13:40:33 +0000 (14:40 +0100)]
Fix for gtest missing core classes.
common_runtime_test loads both core-libart and
core-oj
Change-Id: I5b814e4dcf9f6162c47b4eb5e7890a32e59c2cef
Narayan Kamath [Wed, 9 Sep 2015 17:41:55 +0000 (18:41 +0100)]
Rename native library.
Change-Id: Ie9da5051fc71c512cc8205ae6baf3da040b34ecb
Narayan Kamath [Mon, 7 Sep 2015 10:41:37 +0000 (11:41 +0100)]
Fix cpplint issues.
Change-Id: I03399f92ce36a69539ee4e0509a884ea0a639ad4
Przemyslaw Szczepaniak [Thu, 20 Aug 2015 14:46:16 +0000 (15:46 +0100)]
Add missing JVM_IsNaN function.
Change-Id: If8d41db8c48b94446d079ba10f9c12ab463e5fea
Narayan Kamath [Thu, 13 Aug 2015 16:33:24 +0000 (17:33 +0100)]
Remove signal handling stubs.
No longer in use.
Change-Id: I5af42541d7fee84f9d10f116645d0632c1e6148f
Przemyslaw Szczepaniak [Wed, 5 Aug 2015 08:41:25 +0000 (09:41 +0100)]
Fixed arm64 string compareto&indexof asm code.
Change-Id: I4a419fe3d3a2d8dc3055961bded1dc4ae456c1ea
Przemyslaw Szczepaniak [Tue, 4 Aug 2015 08:09:17 +0000 (09:09 +0100)]
Fixed x86 art_quick_string_compareto asm code.
Change-Id: Icdca857776cb541c3db9ad6aeceaa882193edd9f
Przemyslaw Szczepaniak [Tue, 4 Aug 2015 12:19:12 +0000 (13:19 +0100)]
Fix sun.misc.Unsafe#(get|set)(Float|Double)
Unsafe was suffering from implicity cast from
double/float to int32_t/int64_t in unsafe setters and
getters. Fixes few tests.
Change-Id: Ia3ad1b71bc6fd1a0d9fc8e15fdec44497cd73ff5
Przemyslaw Szczepaniak [Fri, 31 Jul 2015 15:30:08 +0000 (16:30 +0100)]
Fix asm for String#indexOf/compareTo intrinsics
Fixed code for arm arch, it's still broken
on remaining architectures (will be done soon in
following CLs).
OpenJdk string lacks offset and length fields and requires
user to fetch the length from array object.
Change-Id: I682911e4ee72d9597e8a9735ac414c837569eb8e
Przemyslaw Szczepaniak [Thu, 30 Jul 2015 16:13:42 +0000 (17:13 +0100)]
Re-add intrinsics for String#charAt/isEmpty/length
OpenJdk String lacks offset and length fields, intrinsics
had to be modified to set the offset to 0 and pull length
from the value array.
Change-Id: I1375b84ab4d2851af6743adf5b2bc76a982b68ee
Przemyslaw Szczepaniak [Thu, 23 Jul 2015 08:30:35 +0000 (09:30 +0100)]
Use offset in sun.misc.Unsafe#copyMemoryTo/FromArray
Change-Id: I4b6a89d1949b687d91712c236b31636fe0cde122
Przemyslaw Szczepaniak [Fri, 3 Jul 2015 12:54:00 +0000 (13:54 +0100)]
Implement JVM_FindLibraryEntry
Change-Id: Ib0a0f877212ecee3b7ca9f14acb199bd7e47ff19
Przemyslaw Szczepaniak [Tue, 30 Jun 2015 10:05:37 +0000 (11:05 +0100)]
Add Object::Get/SetField methods for 8 and 16 bit fields.
For simplicity new methods lack support for transactions.
Those new netods are used to implement sun.misc.Unsafe.get/set
methods for 8/16 bit wide primitives. Those methods are used
by the java primitive serialization/deserialization methods.
Change-Id: Iaa133b32beac996642f691e1611536f5fd11a260
Piotr Jastrzebski [Tue, 19 May 2015 11:15:00 +0000 (12:15 +0100)]
Update layout of Class.class.
Change-Id: I50d809aebdd54ac668f05544de86b39dc3601e68
Piotr Jastrzebski [Tue, 19 May 2015 11:15:00 +0000 (12:15 +0100)]
A few more string related changes.
- Remove implementation of String::SetOffset (always zero).
- Update the class layout : one less static reference field.
Change-Id: I16e9c560659c6c5c608d14e31880ba27fec1b929
Piotr Jastrzebski [Tue, 19 May 2015 11:15:00 +0000 (12:15 +0100)]
Return false from GenInlined** for intrinsics that we don't implement.
We will generate incorrect code otherwise.
Change-Id: I1949c9ecb06ec5aa0f1ac6680f5df31ecd1a1945
Piotr Jastrzebski [Thu, 7 May 2015 08:44:22 +0000 (09:44 +0100)]
Revert "Combine image string char arrays into single array"
This reverts commit
23c1d0ca7ab63f4adad88631bddefb769d0dcc2c.
We cannot use this change unless the OpenJdk string class is
modified to keep track of the char array offset and length.
Change-Id: Ic20cea3f5731734d1eb7c3560dfacf612778cfcc
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Track renaming of a couple of fields.
Change-Id: I8585eba6da868c751eb28f8becb06d2a0a0f3af5
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Update class_linker_test to account for annotationType.
Change-Id: If15b27381c0f3dd220d16e59bf93e6ba8e9f81a5
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Remove native registration of a new classes.
Change-Id: Iea060b2fb2133f2c7c84b7fde887e591507c02fc
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Add an implementation of Constructor.newInstance0.
Change-Id: Id3e67e24fc1da54f52b6d4af2cead71b3d84db7e
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Implement some more of sun.misc.Unsafe.
Change-Id: If005462fb188472c0177fb95b3045d78536042f9
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Track changes to the layout of java.lang.Throwable.
The stack trace is now stored in an object called |backtrace|.
Change-Id: Icb3f43fed7bc13ecd9124b0e012fef33b7cdbe50
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Update class layout for j.l.ref.Reference.
One additional vtable entry.
Change-Id: I34c951739def06a9e27c0b44f8a7e83613541537
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Update the layout for Class.class.
We now have 3 static integer fields representing bitmasks
for the modifiers (SYNTHETIC, ENUM, ANNOTATION) etc.
Change-Id: Ie26b932c285626c064a3c7f4ae773c8c386005d6
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Temporarily disable StubTest.compareto.
The corresponding intrinsic isn't enabled yet.
Change-Id: I6fe1edc170812494dc9cd7c851a3b703c8155f15
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Update runtime to work with the OpenJdk String.
The key difference here is that the OpenJdk String class
does not maintain an offset or a count field into its backing
char[] array. The offset is assumed to be zero, and the count
is always array.length.
Change-Id: I8b0518642f440cd38d24d9b90c575b7110233cc5
Piotr Jastrzebski [Thu, 7 May 2015 08:41:00 +0000 (09:41 +0100)]
Temporarily remove intrinsics code.
They were disabled in a previous change and need to be re-implemented.
Change-Id: I1ab42fd4216e0df56c6fc390fb68c80e115e4b4e
Piotr Jastrzebski [Tue, 5 May 2015 15:19:00 +0000 (16:19 +0100)]
Update the size of Class.class.
Change-Id: I8e1f224d6d25cdffe561865e107549b7f7cd2e5a
Piotr Jastrzebski [Tue, 5 May 2015 15:19:00 +0000 (16:19 +0100)]
Update the number of direct methods in j.l.reflect.Proxy.
Change-Id: I868ac35f2587cc164872c1e0f6c67fc0d44a576c
Piotr Jastrzebski [Tue, 5 May 2015 11:54:00 +0000 (12:54 +0100)]
DirectByteBuffer: Track renaming of field.
address -> effectiveDirectAddress.
Change-Id: I484f91621a36fdcad1ebd591bde3faa877cfbeac
Piotr Jastrzebski [Tue, 5 May 2015 11:54:00 +0000 (12:54 +0100)]
Unsafe: Add native implementations for new methods.
Change-Id: I9324deffa068d9e5d9e581363cec6c7fae969537
Piotr Jastrzebski [Mon, 27 Apr 2015 10:49:00 +0000 (11:49 +0100)]
String: account for the hash32 field.
Also temporarily disable intrinsics for now.
Change-Id: I8158962efeba6e4ccb39cc147bff782aace3ffbc
Piotr Jastrzebski [Fri, 24 Apr 2015 08:18:00 +0000 (09:18 +0100)]
Load libopenjdkjavacore in addition to libjavacore.
Change-Id: I205f055838adefc7350ae65401310f7d2192f562
Piotr Jastrzebski [Fri, 24 Apr 2015 08:18:00 +0000 (09:18 +0100)]
Add an ART implementation of jvm.h
Change-Id: Icce4ec04f614979fbe07ebd2e96399116b5d2afa
Piotr Jastrzebski [Tue, 17 Feb 2015 16:49:14 +0000 (16:49 +0000)]
Add core-oj to the list of boot libraries.
With some of java classes packed in core-oj instead of core-libart
we need to use core-oj in runtime.
Change-Id: Ic6d5e48517b284fc626c157234b2d50b49a07196
Calin Juravle [Fri, 16 Oct 2015 15:28:46 +0000 (16:28 +0100)]
Fix in reference type propagation
We miss updating the type of objects if their nullability gets updated
first.
Bug:
25008765
(cherry picked from commit
83853392e26b2aa48328bb90c9f9c57b32c280dc)
Change-Id: I81aa759d96008251d74f941494abe74aa4b52bdc
Mathieu Chartier [Fri, 16 Oct 2015 01:19:01 +0000 (18:19 -0700)]
Parse runtime compiler options for JIT
For the case where the CppDefines do not match the device the JIT is
running on.
Sample logcat output to prove it works:
JIT instruction set variant krait
JIT instruction set features default
Bug:
24982714
(cherry picked from commit
085fc87e7ea42989a4a00cacb0c9c3a6d2590af6)
Change-Id: I1f4991a5d7cdc6101d1b0ecbcb39fb26dd20180a
Andreas Gampe [Wed, 9 Sep 2015 00:42:59 +0000 (17:42 -0700)]
ART: Add missing GetInterfaceMethodIfProxy
Add missing uses of GetInterfaceMethodIfProxy in reflection code.
Add a test case for a JNI call to a proxy method.
Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=2973
Bug:
23886441
(cherry picked from commit
e80673245c0433a71a4930e460be5dc0920885b2)
Change-Id: I5b66b64b5561fcee15d0314707d67e8abc02ce5b
Andreas Gampe [Mon, 14 Sep 2015 22:34:38 +0000 (15:34 -0700)]
ART: Decrease dex2oat watchdog timeout
Keep the dex2oat watchdog timeout lower than the package manager
timeout, so that dex2oat kills itself before the system server
watchdog kills the system because of the long installation.
Bug:
23629410
(cherry picked from commit
540138ae55ac1909606a436d7f52e20146c56657)
Change-Id: I425b19ab305cfaa43f6bddc3a892be892acaf513
Mathieu Chartier [Thu, 8 Oct 2015 22:17:15 +0000 (15:17 -0700)]
DO NOT MERGE Add locking to prevent races between setting class methods and marking
There was a race condition between VisitNativeRoots and threads which were
updating the lengths and pointers of the direct or virtual methods of classes.
For example:
The thread doing VisitNativeRoots could see a null pointer with a non 0 length if
another thread had changed the length but not the pointer.
The fix is already in master, do not merge.
Bug:
24270063
Change-Id: Id7280b9507b95703820aedb6c5fee49966dabe27
Andreas Gampe [Thu, 8 Oct 2015 18:11:58 +0000 (18:11 +0000)]
Merge "ART: Do not abort on exception in CreatePeer" into mnc-dr-dev
Andreas Gampe [Thu, 8 Oct 2015 18:09:23 +0000 (18:09 +0000)]
Merge "ART: Clean up less in dex2oat" into mnc-dr-dev
Andreas Gampe [Thu, 1 Oct 2015 23:47:26 +0000 (16:47 -0700)]
ART: Do not abort on exception in CreatePeer
Different parts of CreatePeer may throw an exception, especially
the Thread constructor. Do not abort in such a case, but return
and report a failure to attach/create a thread.
Bug:
24200698
Change-Id: I06f2c997f0451c71f791d1f12bea6f8ee65e8ab2
Brian Carlstrom [Tue, 29 Sep 2015 00:47:53 +0000 (17:47 -0700)]
Revert "Fix another source of undeterministic inlining." DO NOT MERGE
This reverts commit
bd7eef17de5f3d25f411702f9f260a96455b4cf7.
Bug:
24467386
Bug:
20037935
Change-Id: I04d1d0ffc67661370e4c17911d3b2b105d053bc1
Andreas Gampe [Thu, 17 Sep 2015 21:03:21 +0000 (14:03 -0700)]
ART: Clean up less in dex2oat
In non-debug builds, clean up even less. We already did not shut
down the runtime. Also skipping the compiler driver and the
verification results removes all major points of destructor
performance.
Tested with a common large app on Nexus 9. Time between dex2oat timing
message and executable exit (log from immediately-after log echo)
[w/o swap, w/ swap].
Before: 2.409s / 48.774s
After: 0.132s / 0.188s
Bug:
24199200
Change-Id: I5d8c17f8e28796545cfbb3887c07c92905f9b48d
(cherry picked from commit
3f30e1219dd76f78bb9b6504e696a04a3dfae564)
Andreas Gampe [Sat, 29 Aug 2015 01:15:27 +0000 (18:15 -0700)]
ART: Weaken size check in hprof
Dumping the heap is a two-phase process. In the first phase, all
objects are visited to fill the header tables. In the second phase,
the tables are written out and the heap is visited again to write
the object records.
Deleting global references doesn't require the mutator lock. So it
is possible to delete a global ref in-between the first and the
second phase. This leads to a smaller set of object records. The
result is still safe, as the object's class etc. is still in the
header tables, and the object won't be deleted, so will still be
dumped by itself.
Bug:
23521263
Change-Id: I019c29b13ceb9f13e362c742662f1546d52c37a0
Andreas Gampe [Fri, 14 Aug 2015 21:07:43 +0000 (14:07 -0700)]
ART: Relax verifier aput checking
When checking on a null array, the cases of aput and aput-wide are
shared between integral and floating point types. Be careful to not
reject a valid program.
Bug:
21867457
Bug:
23201502
(cherry picked from commit
4bf4c78a6e8b7da7cf306e1dd17ff5a55d0c6c98)
Change-Id: I6c54a389c06e40a2dae00995aa16ff08a089e512
Andreas Gampe [Wed, 12 Aug 2015 17:48:12 +0000 (10:48 -0700)]
ART: Change UninitializedThis tracking in the verifier
Only relying on register types is error-prone. For example, we may
inadvertently reject correct code when the constructor terminates
abnormally.
Bug:
20843113
(cherry picked from commit
f10b6e109bfb595b6752d1b59db680694ac1684d)
(cherry picked from commit
af31802e5b74f5b9b8d3aadbaaf48cfde14ff7d1)
Change-Id: I8826cd167780df25a6166740f183d216483fa550
Goran Jakovljevic [Tue, 28 Jul 2015 12:26:12 +0000 (14:26 +0200)]
[MIPS] Avoid using odd numbered fp registers
Don't use odd numbered fp registers for single precision data on
MIPS32r6 (64-bit FPU).
Bug:
23050326
Change-Id: I35cc19df091149773411e2336b01c170929376bc
(cherry picked from commit
fc8156a3df88e259c892d50bf23f7c4f11531844)
Serguei Katkov [Mon, 10 Aug 2015 06:59:02 +0000 (12:59 +0600)]
ART: Fix Quick's DCE+GVN
DCE_GVN does not take into account the following case:
mov a, b
...
mov c, b
when optimization tries to replace a with c it must ensure that
for all uses of a there is no new definition of c before use.
Otherwise that use will incorrectly substituted with new c instead
of original b.
Bug:
23102860
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
2f2f17399f6bdfc5ec94a875152c31ef79620520)
Change-Id: I1f08c99cedbe4fd1b96cad11f17d60ab551c7cf7
Andreas Gampe [Tue, 11 Aug 2015 00:15:32 +0000 (17:15 -0700)]
ART: Change UnresolvedMergedType merge
Change to use IsUnresolvedTypes.
Bug:
22881413
Change-Id: Ic27b97b475b28a5bdf994ea5178767e0efb0e752
Andreas Gampe [Fri, 7 Aug 2015 15:29:13 +0000 (08:29 -0700)]
Nicolas Geoffray [Sat, 8 Aug 2015 01:13:03 +0000 (18:13 -0700)]
Fix a bug in the register allocator around pair allocation.
We may get hints that do not work with the current implementation
of register pairs, which forces the allocation of (low + 1)
for the high register. For example, if the hint is EBX, we will
allocate ESP for the high register.
bug:
23043730
(cherry picked from commit
f29758111e71a7d14f3e52d78773561a5d59961f)
Change-Id: Ib395e36616017a87d3055218d72417f4e9ff6501
Roland Levillain [Fri, 7 Aug 2015 11:22:28 +0000 (12:22 +0100)]
Tighten default inlining settings when using the space filter.
(cherry picked from commit
a215b95d03cfe713018a245553b74d7eeee813df
and amended)
Bug:
21868508
Change-Id: Ic83813a966cef18e59447083926bf033aa587154
Serguei Katkov [Wed, 5 Aug 2015 11:03:30 +0000 (17:03 +0600)]
ART: Fix the simplifier for add/sub
Instruction simplifier for add/sub should not proceed with floats
because that might cause the incorrect behavior with signed zero.
Bug:
23001681
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
115b53f609e74672fa93eea1845bb17340d5112a)
Change-Id: I9928724c4158b3961e32e376b9203fe01ba2e442
Pavel Vyssotski [Fri, 31 Jul 2015 07:03:17 +0000 (13:03 +0600)]
ART: x86_64 RoundDouble/Float intrinsics should initialize out value.
x86_64 RoundDouble intrinsic should initialize output register for the case of
"inPlusPointFive >= maxLong" as expected. The same for the RoundFloat intrinsic.
Fixed also the out register type in CreateSSE41FPToIntLocations provoking
a DCHECK failure.
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
(cherry picked from commit
9ca257196b46fd7629bce0b338580e571e4113a8)
Bug:
22973442
Change-Id: If974e79d33311587d0b541a01ca8a4c9c11b9468
Mathieu Chartier [Thu, 30 Jul 2015 18:41:04 +0000 (11:41 -0700)]
Don't dump stack when deleting an invalid local ref
Bug:
21724724
Change-Id: Ifa99df9ee9f3265038a0c0f7944e834e42c498d4
Calin Juravle [Wed, 29 Jul 2015 14:58:48 +0000 (15:58 +0100)]
Allow for fine tuning the inliner.
Bug:
21868508
(cherry picked and squashed from commits
ec74835a7e4f2660250a2f3f9508cbbe5269e49a and
0941b9d48a9a8c6d80a1af7a0d0fc9f80fe2b9a1)
Change-Id: I1750e6bea20321d04680132281a6c2924531c5ae
Mingyao Yang [Wed, 22 Jul 2015 22:56:34 +0000 (15:56 -0700)]
HDeoptimize should hold values live in env.
Values that are not live in compiled code anymore may still be needed in
interpreter, due to code motion, etc.
(cherry-picked from commit
718493c6c3c8e380663cb8a94e57ce160a6c473f)
Bug:
22665511
Change-Id: I8b85833c5c462f8fe36f86d6026a51b07563995a
Fredrik Roubert [Mon, 27 Jul 2015 22:14:08 +0000 (00:14 +0200)]
Bugfix: Java char is 16 bits, can not be treated as boolean.
Using SetFieldBooleanVolatile() and SetFieldBoolean() happens to work
for char values that only use the lower 8 bits, but is a mistake that
was introduced by the "Add AccessibleObject and Field to mirror" commit:
https://android.googlesource.com/platform/art/+/
daaf326
(cherry picked from commit
3152c82b0d33e5fb0a4aa964ea58451c72734444)
Bug:
22772717
Change-Id: Iec02ba3084c992ea239ecef688d7d29c7e21ae16
Andreas Gampe [Fri, 24 Jul 2015 21:24:38 +0000 (21:24 +0000)]
Merge "ART: Change the stack dump format to be in line with debuggerd" into mnc-dev
Andreas Gampe [Thu, 23 Jul 2015 21:37:18 +0000 (14:37 -0700)]
ART: Change the stack dump format to be in line with debuggerd
Make offsets 16 digits on 64-bit platforms.
Add the ability to provide the build fingerprint, and print it in
the traces output.
Bug:
22693991
Change-Id: Ibd3d3b3bd65dce84acfb97a487807d6f280a9508
Vladimir Marko [Wed, 22 Jul 2015 16:50:37 +0000 (17:50 +0100)]
ART: Fix Quick/Optimizing suspend check assumption mismatch.
Quick's SuspendCheckElimination (SCE) expects that every
method contains a suspend check and it eliminates suspend
checks in loops containing an invoke. Optimizing eliminates
the suspend check from leaf methods, so the combination of
a Quick-compiled loop calling an Optimizing-compiled leaf
method can lead to missing suspend checks and potentially
leading to ANRs.
Enable Quick's kLeafOptimization flag to remove suspend
checks from leaf methods and disable Quick's SCE. This
aligns the suspend check placement for the two backends
and avoids the broken combination.
Currently, all methods containing a try-catch are compiled
with Quick, so it's relatively easy to create a regression
test. However, this test will not be valid when Optimizing
starts supporting try-catch.
Bug:
22657404
(cherry picked from commit
d29e8487ff1774b6eb5f0e18d854415c1ee8f6b0)
Change-Id: I733c38bf68bfc2c618f2f2e6b59f8b0e015d7be1
Mathieu Chartier [Tue, 21 Jul 2015 20:34:45 +0000 (20:34 +0000)]
Merge "Don't check code pointer for proxies in ArtMethod::GetQuickFrameInfo" into mnc-dev
Mathieu Chartier [Sat, 18 Jul 2015 02:53:47 +0000 (19:53 -0700)]
Don't check code pointer for proxies in ArtMethod::GetQuickFrameInfo
(cherry picked from commit
7c0fe5e99d1d150b3072a3ae4cd0f0362fe32834)
Bug:
22541058
Change-Id: Id084a69ccd9835147ec71df6bb759e0f1b5e6fbf
Mathieu Chartier [Sat, 18 Jul 2015 01:46:32 +0000 (18:46 -0700)]
Get non proxy method for StackDumpVisitor
Fixes failing DCHECK.
(cherry picked from commit
ef76c3fa57ddf3f7ca32e118f599da8cb4eb1560)
Bug:
22553459
Change-Id: I6fe1012f9a5f8d29cb98bf25e3a279da51c5e1c0
Nicolas Geoffray [Fri, 17 Jul 2015 10:11:09 +0000 (11:11 +0100)]
Reduce space filter threshold to 128.
In order to get closer to our code increase limit.
Bug:
21868508
(cherry picked from commit
432bf3d525dd0736c91238d69e29b4db6a2f7b80)
Change-Id: Iab19fe99a8a869b0fb841bac317016e4a3dc00e2
Nicolas Geoffray [Fri, 17 Jul 2015 08:54:20 +0000 (08:54 +0000)]
Merge "ART: Boolean simplifier fix" into mnc-dev
Serguei Katkov [Wed, 15 Jul 2015 09:32:09 +0000 (15:32 +0600)]
ART: Boolean simplifier fix
Boolean simplifier should not remove condition instruction
if it has side effects.
(cherry picked from commit
108ceb48edea654c544b483c302212e43d79a472)
Change-Id: I00dd595da1bba0f027f5c8647035e9fd8ba62ee1
Serguei Katkov [Tue, 14 Jul 2015 13:04:48 +0000 (19:04 +0600)]
ART: DCE should know that array-length can throw NPE
array-length can throw NPE so it should be taking into account.
Bug:
22521944
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
b016c6dd3c30b04104a0a43dc294ce93e5f63874)
Change-Id: I6232430a02f9e6d156ad2aae0eb5a630118c0e79
Christopher Ferris [Mon, 13 Jul 2015 20:19:56 +0000 (20:19 +0000)]
Merge "Fix cfi information for x86." into mnc-dev
Christopher Ferris [Mon, 13 Jul 2015 19:21:00 +0000 (12:21 -0700)]
Fix cfi information for x86.
With this change, I can now enable debug malloc fully.
Bug:
19071092
Change-Id: Iabfb18505feffb480504a8bbfbac60dd219ed48a
Roland Levillain [Mon, 13 Jul 2015 12:33:04 +0000 (13:33 +0100)]
Re-enable run-test 449-checker-bce on MIPS64.
(cherry picked from commit
c3f73f788a2f46e4007433bd3ed3dce64e2f5f33)
Bug:
21555893
Change-Id: I92e11637cc1f8f694e4d4138512cbcf47e22a249
Roland Levillain [Mon, 13 Jul 2015 12:32:04 +0000 (12:32 +0000)]
Merge "Initialize pDeoptimize quick entry pointer for Mips." into mnc-dev
Douglas Leung [Mon, 13 Jul 2015 09:55:45 +0000 (10:55 +0100)]
Initialize pDeoptimize quick entry pointer for Mips.
This fixes art test 449-checker-bce.
(cherry picked from commit
2e8bf554574516e0e6a9b10ccd9f13bf56189795)
Bug:
21555893
Change-Id: I9a87c430168ea35984289b0b4a417aa0c659b6d5
Nicolas Geoffray [Mon, 13 Jul 2015 09:27:05 +0000 (09:27 +0000)]
Merge "Return an invalid StackMap when none can be found." into mnc-dev
Nicolas Geoffray [Fri, 10 Jul 2015 09:56:40 +0000 (10:56 +0100)]
Return an invalid StackMap when none can be found.
bug:
22389275
Partial cherry-pick of:
https://android-review.googlesource.com/#/c/151853
(commit
e12997fbce8e22431be58cac9db2535f7b4a7ac3)
Change-Id: Ia30b817be1b50d97243ba32967eeee359ed679c4
Mathieu Chartier [Sat, 11 Jul 2015 01:26:41 +0000 (18:26 -0700)]
Fix proxy handling in FindDeclaredVirtualMethod
Added missing GetInterfaceMethodIfProxy and test.
Fixed formatting.
Bug:
22411819
https://code.google.com/p/android-developer-preview/issues/detail?id=2635
(cherry picked from commit
72156e28fd6bc72ac965b29446f8801b2e82f2fd)
Change-Id: I3eece9c72091bb9d0262aacf0a75ec6908b5f4d2
Andreas Gampe [Thu, 9 Jul 2015 18:30:14 +0000 (11:30 -0700)]
ART: Change merges with Undefined to Undefined
The result of a merge with an Undefined type should be Undefined.
Conflicts are allowed to be copied around, but Undefined registers
should not be touched at all, except to be written into.
Add a success test case (the register isn't used) and a fail test
case (the register is tried to be copied).
Bug:
22331663
Bug:
22371999
(cherry picked from commit
97a1ff353f254b6e46c7501fe3f0e3254c2517b4)
Change-Id: I9697ce31c1d2ab5aee0433dcf1253bcca79c2983