OSDN Git Service

android-x86/art.git
10 years agoMerge "Some more ARM64 tests that are invalid at the moment"
Andreas Gampe [Thu, 20 Mar 2014 03:42:42 +0000 (03:42 +0000)]
Merge "Some more ARM64 tests that are invalid at the moment"

10 years agoSome more ARM64 tests that are invalid at the moment
Andreas Gampe [Thu, 20 Mar 2014 03:41:16 +0000 (20:41 -0700)]
Some more ARM64 tests that are invalid at the moment

Change-Id: I7e5a3c093bb0b0fd04ef588946f8b843993f6d4e

10 years agoMerge "Parts of ARM64 should not be enabled, yet"
Andreas Gampe [Thu, 20 Mar 2014 03:00:17 +0000 (03:00 +0000)]
Merge "Parts of ARM64 should not be enabled, yet"

10 years agoParts of ARM64 should not be enabled, yet
Andreas Gampe [Thu, 20 Mar 2014 02:51:17 +0000 (19:51 -0700)]
Parts of ARM64 should not be enabled, yet

The managed register test exercises tests that are supposed to hold
in the final product, but the infrastructure is not at that point yet.

Change-Id: I32bee942a13819620d9f6b1c0d9a8a14c9951764

10 years agoMerge "Fix test-art 083-compiler-regressions with work around"
Brian Carlstrom [Thu, 20 Mar 2014 01:56:39 +0000 (01:56 +0000)]
Merge "Fix test-art 083-compiler-regressions with work around"

10 years agoFix test-art 083-compiler-regressions with work around
Brian Carlstrom [Thu, 20 Mar 2014 01:34:17 +0000 (18:34 -0700)]
Fix test-art 083-compiler-regressions with work around

(cherry picked from commit cac04f21b35152c3f6e5c09b6699685255491b4a)

Change-Id: I99f66c7531a61f36328db607a961137a6345cbe0

10 years agoMerge "Make test-art pass with heap reference poisoning enabled."
Hiroshi Yamauchi [Thu, 20 Mar 2014 01:10:26 +0000 (01:10 +0000)]
Merge "Make test-art pass with heap reference poisoning enabled."

10 years agoMerge "AArch64: Add arm64 runtime support."
Andreas Gampe [Thu, 20 Mar 2014 00:20:21 +0000 (00:20 +0000)]
Merge "AArch64: Add arm64 runtime support."

10 years agoAArch64: Add arm64 runtime support.
Stuart Monteith [Wed, 12 Mar 2014 13:32:32 +0000 (13:32 +0000)]
AArch64: Add arm64 runtime support.

Adds support for arm64 to ART. Assembler stubs are sufficient for
down calls into interpreter. JNI compiler and generics are not finished.

Basic Generic JNI functionality.

Change-Id: I4a07c79d1e037b9f5746673480e32cf456867b82

10 years agoMerge "Optimize stack overflow handling."
Mathieu Chartier [Wed, 19 Mar 2014 22:58:23 +0000 (22:58 +0000)]
Merge "Optimize stack overflow handling."

10 years agoMerge "Fix Quick compiler "out of registers""
buzbee [Wed, 19 Mar 2014 22:45:41 +0000 (22:45 +0000)]
Merge "Fix Quick compiler "out of registers""

10 years agoFix Quick compiler "out of registers"
buzbee [Wed, 19 Mar 2014 19:28:16 +0000 (12:28 -0700)]
Fix Quick compiler "out of registers"

There are a few places in the Arm backend that expect to be
able to survive on a single temp register - in particular
entry code generation and argument passing.  However, in the
case of a very large frame and floating point ld/st, the
existing code could end up using 2 temps.

In short, if there is a displacement overflow we try to use
indexed load/store instructions (slightly more efficient).
However, there are none for floating point - so we ended up
burning yet another register to construct a direct pointer.
This CL detects this case and doesn't try to use the indexed
load/store mechanism for floats.

Fix for https://code.google.com/p/android/issues/detail?id=67349

Change-Id: I1ea596ea660e4add89fd4fddb8cbf99a54fbd343

10 years agoOptimize stack overflow handling.
Mathieu Chartier [Wed, 19 Mar 2014 17:17:28 +0000 (10:17 -0700)]
Optimize stack overflow handling.

We now subtract the frame size from the stack pointer for methods
which have a frame smaller than a certain size. Also changed code to
use slow paths instead of launchpads.

Delete kStackOverflow launchpad since it is no longer needed.

ARM optimizations:
One less move per stack overflow check (without fault handler for
stack overflows). Use ldr pc instead of ldr r12, b r12.
Code size (boot.oat):
Before: 58405348
After: 57803236

TODO: X86 doesn't have the case for large frames. This could case an
incoming signal to go past the end of the stack (unlikely however).

Change-Id: Ie3a5635cd6fb09de27960e1f8cee45bfae38fb33

10 years agoMake test-art pass with heap reference poisoning enabled.
Hiroshi Yamauchi [Wed, 19 Mar 2014 19:57:56 +0000 (12:57 -0700)]
Make test-art pass with heap reference poisoning enabled.

Heap reference poisoning is currently interpreter only. This change
disables one compiler driver test that actually invokes compiled code
if heap reference poisoning is enabled.

Bug: 12687968
Change-Id: Ia9516f4067d84e9a4de50d9ff44cfbe38f282d16

10 years agoMerge "Run Java tests with the optimizing compiler."
Nicolas Geoffray [Wed, 19 Mar 2014 08:52:14 +0000 (08:52 +0000)]
Merge "Run Java tests with the optimizing compiler."

10 years agoRun Java tests with the optimizing compiler.
Nicolas Geoffray [Tue, 18 Mar 2014 17:59:20 +0000 (17:59 +0000)]
Run Java tests with the optimizing compiler.

Also fix a vector.reserve -> vector.resize braino, and build
a GC map that dex2oat expects.

Change-Id: I6acf2f90a4c32f90b79bf7709bf2e43931b98757

10 years agoMerge "Fix stack overflow for mutual recursion."
Mathieu Chartier [Tue, 18 Mar 2014 20:46:21 +0000 (20:46 +0000)]
Merge "Fix stack overflow for mutual recursion."

10 years agoFix stack overflow for mutual recursion.
Brian Carlstrom [Fri, 14 Mar 2014 01:10:08 +0000 (18:10 -0700)]
Fix stack overflow for mutual recursion.

There was an error where we would have a pc that was in the method
which generated the stack overflow. This didn't work however
because the stack overflow check was before we stored the method in
the stack. The result was that the stack overflow handler had a PC
which wasnt necessarily in the method at the top of the stack. This
is now fixed by always restoring the link register before branching
to the throw entrypoint.

Slight code size regression on ARM/Mips (unmeasured). Regression on ARM
is 4 bytes of code per stack overflow check. Some of this regression is
mitigated by having one less GC safepoint.

Also adds test case for StackOverflowError issue (from bdc).

Tests passing: ARM, X86, Mips
Phone booting: ARM

Bug: https://code.google.com/p/android/issues/detail?id=66411
Bug: 12967914
Change-Id: I96fe667799458b58d1f86671e051968f7be78d5d

(cherry-picked from c0f96d03a1855fda7d94332331b94860404874dd)

10 years agoMerge "Use the card table to speed up the GSS collector."
Hiroshi Yamauchi [Tue, 18 Mar 2014 18:29:22 +0000 (18:29 +0000)]
Merge "Use the card table to speed up the GSS collector."

10 years agoMerge "Early inlining of simple methods."
Vladimir Marko [Tue, 18 Mar 2014 16:27:20 +0000 (16:27 +0000)]
Merge "Early inlining of simple methods."

10 years agoEarly inlining of simple methods.
Vladimir Marko [Thu, 2 Jan 2014 16:40:37 +0000 (16:40 +0000)]
Early inlining of simple methods.

Inlining "special" methods: empty methods, methods returning
constants or their arguments, simple getters and setters.

Bug: 8164439
Change-Id: I8c7fa9c14351fbb2470000b378a22974daaef236

10 years agoMerge "Fix lint error, and Makefile that could be confused with local files."
Nicolas Geoffray [Tue, 18 Mar 2014 12:00:54 +0000 (12:00 +0000)]
Merge "Fix lint error, and Makefile that could be confused with local files."

10 years agoFix lint error, and Makefile that could be confused with local files.
Nicolas Geoffray [Tue, 18 Mar 2014 11:58:24 +0000 (11:58 +0000)]
Fix lint error, and Makefile that could be confused with local files.

Change-Id: I780cc0d6593eadd6f82e1126d7ad445894af666c

10 years agoMerge "Plug new optimizing compiler in compilation pipeline."
Nicolas Geoffray [Tue, 18 Mar 2014 11:25:25 +0000 (11:25 +0000)]
Merge "Plug new optimizing compiler in compilation pipeline."

10 years agoPlug new optimizing compiler in compilation pipeline.
Nicolas Geoffray [Mon, 17 Mar 2014 10:20:19 +0000 (10:20 +0000)]
Plug new optimizing compiler in compilation pipeline.

Also rename accessors to ART's conventions.

Change-Id: I344807055b98aa4b27215704ec362191464acecc

10 years agoMerge "ART change: Script is using function(), which is bash specific."
Nicolas Geoffray [Tue, 18 Mar 2014 08:55:39 +0000 (08:55 +0000)]
Merge "ART change: Script is using function(), which is bash specific."

10 years agoMerge "Fix comment typo."
Ian Rogers [Mon, 17 Mar 2014 23:55:16 +0000 (23:55 +0000)]
Merge "Fix comment typo."

10 years agoFix comment typo.
Ian Rogers [Mon, 17 Mar 2014 23:51:53 +0000 (16:51 -0700)]
Fix comment typo.

Change-Id: Ib03f4e5dbdf380f9c94f7a18c1ea755b03c1fe3e

10 years agoMerge "Quick typo fix in the 4GB lowmem code"
Andreas Gampe [Mon, 17 Mar 2014 20:05:40 +0000 (20:05 +0000)]
Merge "Quick typo fix in the 4GB lowmem code"

10 years agoQuick typo fix in the 4GB lowmem code
Andreas Gampe [Mon, 17 Mar 2014 19:57:08 +0000 (12:57 -0700)]
Quick typo fix in the 4GB lowmem code

Change-Id: I3371776b0468cd8690e3811c7a1e57f5444e9d8f

10 years agoMerge "AArch64: Add memory allocation in low 4GB"
Andreas Gampe [Mon, 17 Mar 2014 18:33:38 +0000 (18:33 +0000)]
Merge "AArch64: Add memory allocation in low 4GB"

10 years agoMerge "Test code generation for field accesses."
Ian Rogers [Mon, 17 Mar 2014 18:33:12 +0000 (18:33 +0000)]
Merge "Test code generation for field accesses."

10 years agoAArch64: Add memory allocation in low 4GB
Stuart Monteith [Wed, 12 Mar 2014 12:44:01 +0000 (12:44 +0000)]
AArch64: Add memory allocation in low 4GB

MAP_32BIT is implemented for only x86_64. Other 64bit platforms
don't have an equivalent.

This is a unsophisticated implemention of a scheme using msync and
MAP_FIXED to reproduce the functionality of MAP_32BIT.

Adds MAP_FIXED to RemapAtEnd, as the address used for the new mmap
doesn't get located correctly without it on aarch64.

Add MemMap::next_mem_pos_ to store last position. Add a safety assert.

Change-Id: I61871ff7fc327554c43e1d7f448c3d376490f1ea

10 years agoART change: Script is using function(), which is bash specific.
Nicolas Geoffray [Mon, 17 Mar 2014 18:26:00 +0000 (18:26 +0000)]
ART change: Script is using function(), which is bash specific.

Change-Id: Ieb2a9674c95aafadbdb26c060f186f3f2d0f5e15

10 years agoTest code generation for field accesses.
Ian Rogers [Mon, 17 Mar 2014 17:33:19 +0000 (10:33 -0700)]
Test code generation for field accesses.

Bug: 11549140
Change-Id: I33e6fa16a7b53b61807395eb41b9c0483654137b

10 years agoMerge "Class initialization check elimination."
Vladimir Marko [Mon, 17 Mar 2014 15:07:45 +0000 (15:07 +0000)]
Merge "Class initialization check elimination."

10 years agoClass initialization check elimination.
Vladimir Marko [Fri, 17 Jan 2014 17:49:33 +0000 (17:49 +0000)]
Class initialization check elimination.

Also, move null check elimination temporaries to the
ScopedArenaAllocator and reuse the same variables in the
class initialization check elimination.

Change-Id: Ic746f95427065506fa6016d4931e4cb8b34937af

10 years agoMerge "Fix debugger crash in native method frames."
Sebastien Hertz [Mon, 17 Mar 2014 08:23:53 +0000 (08:23 +0000)]
Merge "Fix debugger crash in native method frames."

10 years agoFix debugger crash in native method frames.
Sebastien Hertz [Tue, 11 Mar 2014 14:26:35 +0000 (15:26 +0100)]
Fix debugger crash in native method frames.

The main crash happens when we try to read (StackFrame::GetValues) or write
(StackFrame::SetValues) values in native frames. We use the method's vmap to
know where Dalvik registers live but native methods don't have vmap. The fix
is to reply with the OPAQUE_FRAME error which indicates local values are not
accessible in the frame.

We prevent from dereferencing null code item which causes some crashes too.
This happens when we compute the line table (Method::LineTable) and variable
table (Method::VariableTable) of methods without code: native, proxy and
abstract methods. We do not expect to encounter abstract methods though. We
take care of these kinds of method when mangling/demangling local value slots.

We also fix the location's pc of native and proxy frames where it must be -1
(as 8-byte value). We'll use this property to detect such frames in the JDWP
tests.

Bug: 13366758
Change-Id: I78e3263fbf2681b5573571c846390d52b9193849

10 years agoMerge "Fix reg type merging in the verifier"
Sebastien Hertz [Mon, 17 Mar 2014 07:34:49 +0000 (07:34 +0000)]
Merge "Fix reg type merging in the verifier"

10 years agoMerge "include <float.h> for DBL_MAX and DBL_MIN"
Brian Carlstrom [Sun, 16 Mar 2014 01:46:07 +0000 (01:46 +0000)]
Merge "include <float.h> for DBL_MAX and DBL_MIN"

10 years agoinclude <float.h> for DBL_MAX and DBL_MIN
Brian Carlstrom [Fri, 14 Mar 2014 23:11:43 +0000 (16:11 -0700)]
include <float.h> for DBL_MAX and DBL_MIN

(cherry picked from commit 8ab83604ac129a654e54d2d000cc47203394e30b)

Change-Id: Id4b3000324908028dc6557a69195064d4a7fb233

10 years agoMerge "Remove duplicated register load in function call to quick entry."
Bill Buzbee [Sat, 15 Mar 2014 16:23:55 +0000 (16:23 +0000)]
Merge "Remove duplicated register load in function call to quick entry."

10 years agoMerge "ARM: Do not allocate temp registers in MulLong if possible."
Bill Buzbee [Sat, 15 Mar 2014 16:23:34 +0000 (16:23 +0000)]
Merge "ARM: Do not allocate temp registers in MulLong if possible."

10 years agoMerge "Fix build."
Brian Carlstrom [Sat, 15 Mar 2014 00:57:39 +0000 (00:57 +0000)]
Merge "Fix build."

10 years agoUse the card table to speed up the GSS collector.
Hiroshi Yamauchi [Fri, 7 Mar 2014 21:59:08 +0000 (13:59 -0800)]
Use the card table to speed up the GSS collector.

Scan only dirty cards, as opposed to the whole space, to find
references from the non-moving spaces to the bump pointer spaces at
bump pointer space only collections.

With this change, the Ritz MemAllocTest speeds up by 8-10% on host and
2-3% on N4. The Ritz EvaluateFibonacci speeds up by 8% and its average
pause time is reduced by 43% on N4.

Bug: 11650816
Change-Id: I1eefe75776bc37e24673b301ffa65a25f9bd4cde

10 years agoMerge "Make MemMap::MapAnonymous() fail if the requested address is not available."
Brian Carlstrom [Fri, 14 Mar 2014 23:44:59 +0000 (23:44 +0000)]
Merge "Make MemMap::MapAnonymous() fail if the requested address is not available."

10 years agoMake MemMap::MapAnonymous() fail if the requested address is not available.
Hiroshi Yamauchi [Thu, 13 Mar 2014 22:10:27 +0000 (15:10 -0700)]
Make MemMap::MapAnonymous() fail if the requested address is not available.

Change MapAnonymous() so that a requested address vs. actual map
address mismatch will cause a failure. The existing MapAnonymous()
call sites do not check this. This should prevent potential rare case
bugs where mmap does not happen to map a region at an specified
address.

There's a potential bug that if MapAnonymous() does not guarantee the
requested address (and there's a gap between the image/oat files and
the zygote/malloc space), then GC could in theory allocate a large
object space in the gap. This would break the GC notion of the immune
space. This change will prevent this by causing all non-moving spaces
to be (really) adjacent, with no gaps in between, which CL 87711
missed.

Change-Id: Id4adb0e30adbad497334d7e00def4c0c66b15719

10 years agoMerge "Remove unused variable and tidy test #includes."
Ian Rogers [Fri, 14 Mar 2014 21:39:56 +0000 (21:39 +0000)]
Merge "Remove unused variable and tidy test #includes."

10 years agoRemove unused variable and tidy test #includes.
Ian Rogers [Fri, 14 Mar 2014 21:37:59 +0000 (14:37 -0700)]
Remove unused variable and tidy test #includes.

Change-Id: I0eaeea0d50f66302d632aab400cfa48dc301ef69

10 years agoMerge "x86-64 disassembler support."
Ian Rogers [Fri, 14 Mar 2014 21:17:17 +0000 (21:17 +0000)]
Merge "x86-64 disassembler support."

10 years agox86-64 disassembler support.
Ian Rogers [Fri, 14 Mar 2014 21:06:14 +0000 (14:06 -0700)]
x86-64 disassembler support.

Change-Id: I0ae39ae1ffdae2500ff368354f9e4702445176f0

10 years agoFix build.
Robert Craig [Fri, 14 Mar 2014 17:48:45 +0000 (13:48 -0400)]
Fix build.

Patch helps fix the following build breakage.

art/runtime/native/dalvik_system_Zygote.cc:173:3: error: unknown type name 'rlimit'
  rlimit rlim;

Change-Id: I5f6fb29ae71e8819dcdb42eee986f896d856f712
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
10 years agoMerge "Use quick generic JNI calls based on compiler driver options."
Ian Rogers [Fri, 14 Mar 2014 20:43:01 +0000 (20:43 +0000)]
Merge "Use quick generic JNI calls based on compiler driver options."

10 years agoMerge "Work-around GCC polymorphism problems."
Ian Rogers [Fri, 14 Mar 2014 20:31:37 +0000 (20:31 +0000)]
Merge "Work-around GCC polymorphism problems."

10 years agoWork-around GCC polymorphism problems.
Ian Rogers [Fri, 14 Mar 2014 20:29:43 +0000 (13:29 -0700)]
Work-around GCC polymorphism problems.

Change-Id: Ica1d8e6840cdd9ba493405e66c1728b5da9540a2

10 years agoUse quick generic JNI calls based on compiler driver options.
Ian Rogers [Fri, 14 Mar 2014 20:20:26 +0000 (13:20 -0700)]
Use quick generic JNI calls based on compiler driver options.

Change-Id: Ic70f4b9b5759eb11b35677c0039fb00eb1c4c506

10 years agoMerge "64bit build fix."
Ian Rogers [Fri, 14 Mar 2014 19:01:17 +0000 (19:01 +0000)]
Merge "64bit build fix."

10 years ago64bit build fix.
Ian Rogers [Fri, 14 Mar 2014 19:00:39 +0000 (12:00 -0700)]
64bit build fix.

Change-Id: I8c597217955d12b215bdcf1d92ca5fab9a7ed6e0

10 years agoARM: Do not allocate temp registers in MulLong if possible.
Zheng Xu [Thu, 13 Mar 2014 13:40:30 +0000 (13:40 +0000)]
ARM: Do not allocate temp registers in MulLong if possible.

Just use rl_result if we have enough registers and it is *not* either operand.

Change-Id: I5a6f3ec09653b97e41bbc6dce823aa8534f98a13

10 years agoRemove duplicated register load in function call to quick entry.
Zheng Xu [Thu, 13 Mar 2014 18:00:21 +0000 (18:00 +0000)]
Remove duplicated register load in function call to quick entry.

CallRuntimeHelperRegLocation() will load parameter to registers for native call, but
GenConversionCall() duplicates the work before it call CallRuntimeHelperRegLocation().

Instructions generated before patch:
      0xf731007e: f8d9e25c ldr.w   lr, [r9, #604]  ; pF2l
      0xf7310082: ee180a10 vmov.f32 r0, s16
      0xf7310086: ee180a10 vmov.f32 r0, s16
      0xf731008a: 47f0     blx     lr
After:
      0xf739707e: f8d9e25c ldr.w   lr, [r9, #604]  ; pF2l
      0xf7397082: ee180a10 vmov.f32 r0, s16
      0xf7397086: 47f0     blx     lr

Change-Id: I1868aefa4703a0f8133eaac707f5b80f01293cb8

10 years agoMerge "Refactor reflective method invocation."
Ian Rogers [Fri, 14 Mar 2014 18:29:45 +0000 (18:29 +0000)]
Merge "Refactor reflective method invocation."

10 years agoRefactor reflective method invocation.
Ian Rogers [Fri, 14 Mar 2014 06:45:53 +0000 (23:45 -0700)]
Refactor reflective method invocation.

Move invocation code out of JNI internal into reflection, including ArgArray
code. Make reflective invocation use the ArgArray to build arguments rather
than allocating a jvalue[] and unboxing arguments into that.
Move reflection part of jni_internal_test into reflection_test.
Make greater use of fast JNI.

Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057

10 years agoMerge "Refactor reference code into mirror namespace."
Mathieu Chartier [Fri, 14 Mar 2014 17:16:15 +0000 (17:16 +0000)]
Merge "Refactor reference code into mirror namespace."

10 years agoRefactor reference code into mirror namespace.
Mathieu Chartier [Thu, 13 Mar 2014 19:22:56 +0000 (12:22 -0700)]
Refactor reference code into mirror namespace.

Added two new files: mirror/reference.h and mirror/reference-inl.h.

Change-Id: Ibe3ff6379aef7096ff130594535b7f7c0b7dabce

10 years agoFix reg type merging in the verifier
Sebastien Hertz [Fri, 14 Mar 2014 16:58:54 +0000 (17:58 +0100)]
Fix reg type merging in the verifier

Fixes bad merging of float, long and double reg types with constant types. Adds
merging tests in reg_type_test.

Bug: https://code.google.com/p/android/issues/detail?id=66434
Bug: 13464407
Change-Id: I56761f5f5562b742d0ef9cc66b58d55f7b668949

10 years agoMerge "Add dependency for operations with x86 FPU stack"
Bill Buzbee [Fri, 14 Mar 2014 15:51:35 +0000 (15:51 +0000)]
Merge "Add dependency for operations with x86 FPU stack"

10 years agoMerge "Remove small duplicate code in Generic JNI handling, add comments"
Andreas Gampe [Fri, 14 Mar 2014 15:32:12 +0000 (15:32 +0000)]
Merge "Remove small duplicate code in Generic JNI handling, add comments"

10 years agoRemove small duplicate code in Generic JNI handling, add comments
Andreas Gampe [Fri, 14 Mar 2014 14:52:20 +0000 (07:52 -0700)]
Remove small duplicate code in Generic JNI handling, add comments

Change-Id: Ib276fa63b6a00480eaaff6c352d37917c61e966c

10 years agoMerge "mips has no sa_restorer."
Narayan Kamath [Fri, 14 Mar 2014 13:04:07 +0000 (13:04 +0000)]
Merge "mips has no sa_restorer."

10 years agomips has no sa_restorer.
Narayan Kamath [Fri, 14 Mar 2014 12:53:43 +0000 (12:53 +0000)]
mips has no sa_restorer.

This change should be a no-op, because we're not using
it anyway. FaultManager doesn't seem designed for inheritance,
so I can't put this in an arch specific subclass.

Change-Id: I2eaabdf2a77ef558c59139344f8654cf3ccafa86

10 years agoMerge "Fix path for arch/mips/fault_handler_mips.cc"
Brian Carlstrom [Fri, 14 Mar 2014 03:30:54 +0000 (03:30 +0000)]
Merge "Fix path for arch/mips/fault_handler_mips.cc"

10 years agoFix path for arch/mips/fault_handler_mips.cc
Brian Carlstrom [Fri, 14 Mar 2014 03:27:42 +0000 (20:27 -0700)]
Fix path for arch/mips/fault_handler_mips.cc

Change-Id: I4af53b2d1f34641e2c5b68474f80f88613a51bbe

10 years agoAdd dependency for operations with x86 FPU stack
Serguei Katkov [Wed, 12 Mar 2014 08:56:54 +0000 (15:56 +0700)]
Add dependency for operations with x86 FPU stack

Load Hoisting optimization can re-order operations with
FPU stack due to no dependency set.

Patch adds resource dependency between these operations.

Change-Id: Iccce98c8f3c565903667c03803884d9de1281ea8
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoMerge "Avoid bus error from reading unaligned 64-bit literal"
Brian Carlstrom [Fri, 14 Mar 2014 01:25:11 +0000 (01:25 +0000)]
Merge "Avoid bus error from reading unaligned 64-bit literal"

10 years agoMerge "Fix heap trimming logic."
Mathieu Chartier [Thu, 13 Mar 2014 22:46:42 +0000 (22:46 +0000)]
Merge "Fix heap trimming logic."

10 years agoFix heap trimming logic.
Mathieu Chartier [Thu, 13 Mar 2014 21:46:09 +0000 (14:46 -0700)]
Fix heap trimming logic.

The new heap trimming logic introduced in the c/84301 was not very
good since the heap trim would get avoided since the daemon thread
was coming to the heap trimming code before the scheduled time.

The new logic is to do the heap trim if the last heap trim occurred
more than kHeapTrimWait ns ago.

Change-Id: I9d0e6766bf0c68e5f7fb15fb059140e1f1264216

10 years agoMerge "Fixes for Generic JNI"
Andreas Gampe [Thu, 13 Mar 2014 22:21:55 +0000 (22:21 +0000)]
Merge "Fixes for Generic JNI"

10 years agoFixes for Generic JNI
Andreas Gampe [Thu, 13 Mar 2014 01:07:19 +0000 (18:07 -0700)]
Fixes for Generic JNI

This fixes some linking issues and native code retrieval errors.
All host tests are functional with this change.

Make ArtMethod::GetFrameSizeInBytes() templated to bypass the
embedded sanity check. Necessary for fix-up decision.

Add ArtMethod metadata fix-up code to ClassLinker::LinkCode.
Necessitates new parameters to access the shorty and compute
the frame size.

Fix handling the JNI dlsym lookup stub in the generic JNI code.

Change-Id: I4173b0fbb1ba5b1bcbee1bb340cfdd08a54767e5

10 years agoAvoid bus error from reading unaligned 64-bit literal
Brian Carlstrom [Thu, 13 Mar 2014 22:12:11 +0000 (15:12 -0700)]
Avoid bus error from reading unaligned 64-bit literal

Change-Id: I5932f130e6a8d31e09ef615e8544ff0e1073ede9

10 years agoMerge "Implicit null/suspend checks (oat version bump)"
Dave Allison [Thu, 13 Mar 2014 19:24:47 +0000 (19:24 +0000)]
Merge "Implicit null/suspend checks (oat version bump)"

10 years agoImplicit null/suspend checks (oat version bump)
Dave Allison [Fri, 21 Feb 2014 00:06:36 +0000 (16:06 -0800)]
Implicit null/suspend checks (oat version bump)

This adds the ability to use SEGV signals
to throw NullPointerException exceptions from Java code rather
than having the compiler generate explicit comparisons and
branches.  It does this by using sigaction to trap SIGSEGV and when triggered
makes sure it's in compiled code and if so, sets the return
address to the entry point to throw the exception.

It also uses this signal mechanism to determine whether to check
for thread suspension.  Instead of the compiler generating calls
to a function to check for threads being suspended, the compiler
will now load indirect via an address in the TLS area.  To trigger
a suspend, the contents of this address are changed from something
valid to 0.  A SIGSEGV will occur and the handler will check
for a valid instruction pattern before invoking the thread
suspension check code.

If a user program taps SIGSEGV it will prevent our signal handler
working.  This will cause a failure in the runtime.

There are two signal handlers at present.  You can control them
individually using the flags -implicit-checks: on the runtime
command line.  This takes a string parameter, a comma
separated set of strings.  Each can be one of:

none        switch off
null        null pointer checks
suspend     suspend checks
all         all checks

So to switch only suspend checks on, pass:
-implicit-checks:suspend

There is also -explicit-checks to provide the reverse once
we change the default.

For dalvikvm, pass --runtime-arg -implicit-checks:foo,bar

The default is -implicit-checks:none

There is also a property 'dalvik.vm.implicit_checks' whose value is the same
string as the command option.  The default is 'none'.  For example to switch on
null checks using the option:

setprop dalvik.vm.implicit_checks null

It only works for ARM right now.

Bumps OAT version number due to change to Thread offsets.

Bug: 13121132
Change-Id: If743849138162f3c7c44a523247e413785677370

10 years agoMerge "Allow patching between dex files in the boot classpath."
Jeff Hao [Thu, 13 Mar 2014 17:55:43 +0000 (17:55 +0000)]
Merge "Allow patching between dex files in the boot classpath."

10 years agoMerge "Refactor immune region logic into its own file."
Mathieu Chartier [Thu, 13 Mar 2014 17:20:47 +0000 (17:20 +0000)]
Merge "Refactor immune region logic into its own file."

10 years agoRefactor immune region logic into its own file.
Mathieu Chartier [Thu, 13 Mar 2014 00:42:10 +0000 (17:42 -0700)]
Refactor immune region logic into its own file.

Added immune_region.cc/.h in the collector directory. Changed the
functionality to no longer assume spaces are added to immune region
in ascending order.

Change-Id: Id1d643b3849ad2695e8a151dbbb74a5035644472

10 years agoMerge "Fix debugger crashes in presence of proxy objects."
Sebastien Hertz [Thu, 13 Mar 2014 16:16:13 +0000 (16:16 +0000)]
Merge "Fix debugger crashes in presence of proxy objects."

10 years agoMerge "Implement FINAL/OVERRIDE for clang."
Ian Rogers [Thu, 13 Mar 2014 16:13:20 +0000 (16:13 +0000)]
Merge "Implement FINAL/OVERRIDE for clang."

10 years agoImplement FINAL/OVERRIDE for clang.
Ian Rogers [Thu, 13 Mar 2014 16:02:55 +0000 (09:02 -0700)]
Implement FINAL/OVERRIDE for clang.

Separate declaration from definition in certain places to work-around issues
with clang.
Remove bogus lock annotation at definition in compilers.cc that is already
present at the declaration.
Remove duplicate definition of ClassReference.

Change-Id: I5368057bb36319a259110b2198610d9d2b2e5041

10 years agoMerge "Fix thread suspension assertion in debugger."
Sebastien Hertz [Thu, 13 Mar 2014 16:12:08 +0000 (16:12 +0000)]
Merge "Fix thread suspension assertion in debugger."

10 years agoFix thread suspension assertion in debugger.
Sebastien Hertz [Thu, 13 Mar 2014 15:17:40 +0000 (16:17 +0100)]
Fix thread suspension assertion in debugger.

Updates Dbg::GetThreadGroup to ensure we do call EndAssertNoThreadSuspension
after StartAssertNoThreadSuspension and not returning in the middle. Note this
only happens in debug mode where this assertion is enabled.

Also add missing thread safety annotations.

Bug: 13425576
Change-Id: Idb9f32d289038b77771369c1283774676ff433c7

10 years agoMerge "Use LIRSlowPath for intrinsics, improve String.indexOf()."
Vladimir Marko [Thu, 13 Mar 2014 16:00:35 +0000 (16:00 +0000)]
Merge "Use LIRSlowPath for intrinsics, improve String.indexOf()."

10 years agoUse LIRSlowPath for intrinsics, improve String.indexOf().
Vladimir Marko [Thu, 13 Mar 2014 14:11:28 +0000 (14:11 +0000)]
Use LIRSlowPath for intrinsics, improve String.indexOf().

Rewrite intrinsic launchpads to use the LIRSlowPath.
Improve String.indexOf for constant chars by avoiding
the check for code points over 0xFFFF.

Change-Id: I7fd5583214c5b4ab9c38ee36c5d6f003dd6345a8

10 years agoMerge "Bump up stack overflow region for 64bit."
Ian Rogers [Thu, 13 Mar 2014 15:19:04 +0000 (15:19 +0000)]
Merge "Bump up stack overflow region for 64bit."

10 years agoFix debugger crashes in presence of proxy objects.
Sebastien Hertz [Thu, 13 Mar 2014 10:52:31 +0000 (11:52 +0100)]
Fix debugger crashes in presence of proxy objects.

Fix ClassHelper::NumDirectInterfaces to use IfTable::Count instead of the
iftable array's length (which is twice the interface count). This happens when
processing ReferenceType::Interfaces command and was causing a crash.

Return ABSENT_INFORMATION error code when we're asked for the source file of a
proxy class. Otherwise we call ClassHelper::GetSourceFile which expect the
class has a corresponding ClassDef item in the DEX file which is not true for
proxy classes.

Add new proxy_test to check ClassHelper works correctly with proxy classes.

Bug: 13426918
Change-Id: I5c1212b1a697dd7dc1ab18e99552ee113c533a5a

10 years agoMerge "ART's intrinsic for String.indexOf use the incorrect register"
Bill Buzbee [Thu, 13 Mar 2014 13:33:19 +0000 (13:33 +0000)]
Merge "ART's intrinsic for String.indexOf use the incorrect register"

10 years agoMerge "Add dex2oat --print-pass-names and --disable-passes= options."
Vladimir Marko [Thu, 13 Mar 2014 12:10:49 +0000 (12:10 +0000)]
Merge "Add dex2oat --print-pass-names and --disable-passes= options."

10 years agoMerge "Move inline method detection to runtime."
Vladimir Marko [Thu, 13 Mar 2014 10:33:35 +0000 (10:33 +0000)]
Merge "Move inline method detection to runtime."

10 years agoMerge "Fix non-{arm, x86} builds."
Nicolas Geoffray [Thu, 13 Mar 2014 10:30:13 +0000 (10:30 +0000)]
Merge "Fix non-{arm, x86} builds."

10 years agoFix non-{arm, x86} builds.
Nicolas Geoffray [Thu, 13 Mar 2014 10:28:41 +0000 (10:28 +0000)]
Fix non-{arm, x86} builds.

Change-Id: If4c13775f8e1fd0fd26b4a731f3011c77b0bfed1

10 years agoMerge "Fix virt-specifiers outside class definition errors."
Nicolas Geoffray [Thu, 13 Mar 2014 09:59:19 +0000 (09:59 +0000)]
Merge "Fix virt-specifiers outside class definition errors."