OSDN Git Service

android-x86/art.git
10 years agoMerge "Fix tracing."
Ian Rogers [Thu, 10 Jul 2014 06:37:47 +0000 (06:37 +0000)]
Merge "Fix tracing."

10 years agoFix tracing.
Ian Rogers [Thu, 10 Jul 2014 06:16:06 +0000 (23:16 -0700)]
Fix tracing.

Change-Id: If6837270baec694c00cc1884bae0f1842d49da75

10 years agoMerge "Move thread state to art::Atomic."
Ian Rogers [Thu, 10 Jul 2014 04:38:36 +0000 (04:38 +0000)]
Merge "Move thread state to art::Atomic."

10 years agoMove thread state to art::Atomic.
Ian Rogers [Thu, 10 Jul 2014 04:12:06 +0000 (21:12 -0700)]
Move thread state to art::Atomic.

Leaves the CAS operations as relaxed although art::Atomic treats relaxed CAS
as a strong CAS when not compiling with clang.

Change-Id: I6d37c22173540d166b624385e52e4ad05e592adc

10 years agoMerge "Move another field away from android_atomic_cas."
Ian Rogers [Thu, 10 Jul 2014 03:36:51 +0000 (03:36 +0000)]
Merge "Move another field away from android_atomic_cas."

10 years agoMove another field away from android_atomic_cas.
Ian Rogers [Thu, 10 Jul 2014 01:00:50 +0000 (18:00 -0700)]
Move another field away from android_atomic_cas.

Change-Id: If63aa2811e06ec401a601286a3bacb62a0da96ad

10 years agoMerge "art: fix host dex2oat runtime args"
Colin Cross [Thu, 10 Jul 2014 06:10:48 +0000 (06:10 +0000)]
Merge "art: fix host dex2oat runtime args"

10 years agoart: fix host dex2oat runtime args
Colin Cross [Thu, 10 Jul 2014 05:14:12 +0000 (22:14 -0700)]
art: fix host dex2oat runtime args

The runtime arguments need to be prefixed with -Xmx or -Xms.
This only worked before because DEX2OAT_XMS, etc. were blank
due to bugs in build/, which resulted in --runtime-arg --runtime-arg
and anything starting with -- as the argument to --runtime-arg is
silently ignored.

Change-Id: I18607a6fd8d0004466404045f8dc4495eb6ab275

10 years agoMerge "Revert "Add implicit null and stack checks for x86""
Dave Allison [Thu, 10 Jul 2014 01:55:25 +0000 (01:55 +0000)]
Merge "Revert "Add implicit null and stack checks for x86""

10 years agoRevert "Add implicit null and stack checks for x86"
Dave Allison [Thu, 10 Jul 2014 01:54:57 +0000 (01:54 +0000)]
Revert "Add implicit null and stack checks for x86"

It breaks cross compilation with x86_64.

This reverts commit 34e826ccc80dc1cf7c4c045de6b7f8360d504ccf.

Change-Id: I34ba07821fc0a022fda33a7ae21850957bbec5e7

10 years agoAdd implicit null and stack checks for x86
Dave Allison [Thu, 29 May 2014 15:20:04 +0000 (08:20 -0700)]
Add implicit null and stack checks for x86

This adds compiler and runtime changes for x86
implicit checks.  32 bit only.

Both host and target are supported.
By default, on the host, the implicit checks are null pointer and
stack overflow.  Suspend is implemented but not switched on.

Change-Id: I88a609e98d6bf32f283eaa4e6ec8bbf8dc1df78a

10 years agoMerge "Remove legacy CAS implementations from mutex."
Ian Rogers [Thu, 10 Jul 2014 01:37:50 +0000 (01:37 +0000)]
Merge "Remove legacy CAS implementations from mutex."

10 years agoRemove legacy CAS implementations from mutex.
Ian Rogers [Wed, 9 Jul 2014 06:50:26 +0000 (23:50 -0700)]
Remove legacy CAS implementations from mutex.

Removes the use of __sync_bool_compare_and_swap and android_atomic_cas and uses
intention revealing atomic operations from art::Atomic (which will eventually
give way to std::atomic).

Change-Id: Iea44e1923f6706ec04b5459fe25427282c189a7e

10 years agoMerge "ART: Check slow_paths_.Size() every time"
Ian Rogers [Wed, 9 Jul 2014 20:31:18 +0000 (20:31 +0000)]
Merge "ART: Check slow_paths_.Size() every time"

10 years agoART: Check slow_paths_.Size() every time
Chao-ying Fu [Tue, 8 Jul 2014 00:13:52 +0000 (17:13 -0700)]
ART: Check slow_paths_.Size() every time

This patch fixes a bug, when a new slow path is created
during slowpath->Compile().

Change-Id: I4896a82781102694c25f4483112c6de3c56e072c
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
10 years agoMerge "x86_64: enable Peek and Poke intrinsics"
Ian Rogers [Wed, 9 Jul 2014 15:26:09 +0000 (15:26 +0000)]
Merge "x86_64: enable Peek and Poke intrinsics"

10 years agoMerge "x86_64: GenInlinedCas must use wide rl_src_offset under 64-bit targets"
Ian Rogers [Wed, 9 Jul 2014 20:24:26 +0000 (20:24 +0000)]
Merge "x86_64: GenInlinedCas must use wide rl_src_offset under 64-bit targets"

10 years agox86_64: GenInlinedCas must use wide rl_src_offset under 64-bit targets
Chao-ying Fu [Wed, 9 Jul 2014 18:32:31 +0000 (11:32 -0700)]
x86_64: GenInlinedCas must use wide rl_src_offset under 64-bit targets

This patch fixes to use wide rl_src_offset for int and long types
under 64-bit targets, and fixes movzx8 and movsx8 to use r8_form
on the second register only.

Change-Id: Ib8c0756609100f9bc5c228f1eb391421416f3af6
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
10 years agoMerge "Add notion of released vs empty pages to ROSAlloc."
Mathieu Chartier [Thu, 10 Jul 2014 00:32:52 +0000 (00:32 +0000)]
Merge "Add notion of released vs empty pages to ROSAlloc."

10 years agoAdd notion of released vs empty pages to ROSAlloc.
Mathieu Chartier [Tue, 24 Jun 2014 21:48:59 +0000 (14:48 -0700)]
Add notion of released vs empty pages to ROSAlloc.

A notion of released vs empty pages helps get a more accurate view of
how much memory was released during heap trimming. Otherwise we get
that the same pages possibly get madvised multiple times without
getting dirtied.

Also enabled heap trimming of rosalloc spaces even when we care about
jank. This is safe to do since the trimming process only acquires
locks for short periods of time.

Dalvik PSS reduces from ~52M to ~50M after boot on N4.

Bug: 9969166

Change-Id: I4012e0a2554f413d18efe1a0371fe18d1edabaa9

10 years agoMerge "Add implicit null and stack checks for x86"
Dave Allison [Thu, 10 Jul 2014 00:16:22 +0000 (00:16 +0000)]
Merge "Add implicit null and stack checks for x86"

10 years agoMerge "Move card table away from android_atomic_cas."
Ian Rogers [Thu, 10 Jul 2014 00:09:25 +0000 (00:09 +0000)]
Merge "Move card table away from android_atomic_cas."

10 years agoMove card table away from android_atomic_cas.
Ian Rogers [Wed, 9 Jul 2014 05:55:18 +0000 (22:55 -0700)]
Move card table away from android_atomic_cas.

For x86 use byte CAS operations for byte CAS.
Fix bug in ModifyCardsAtomic where CAS was 32-bit instead of 64-bit.

Change-Id: Ieb3fe695b4699750abf04642b0abe94103976817

10 years agoMerge "Allow method tracing for run-test"
Ian Rogers [Wed, 9 Jul 2014 18:58:43 +0000 (18:58 +0000)]
Merge "Allow method tracing for run-test"

10 years agoMerge "Fix method tracing from command-line"
Ian Rogers [Wed, 9 Jul 2014 18:52:43 +0000 (18:52 +0000)]
Merge "Fix method tracing from command-line"

10 years agox86_64: enable Peek and Poke intrinsics
Alexei Zavjalov [Tue, 8 Jul 2014 09:27:17 +0000 (16:27 +0700)]
x86_64: enable Peek and Poke intrinsics

This implements intrinsics for:
Memory.peekByte/Short/Int/Long()
Memory.pokeByte/Short/Int/Long()

Change-Id: I6da6250f262dfd7aded35c2e3ade2d0916bd73cb
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
10 years agoFix method tracing from command-line
Sebastien Hertz [Tue, 17 Dec 2013 09:42:03 +0000 (10:42 +0100)]
Fix method tracing from command-line

Transitions current thread to the new kWaitingForMethodTracingStart thread
state when starting method tracing.

Ensures there is a current thread when method tracing is stopped due to runtime
shutdown. If the current thread has been detached, we now re-attach it.
Note: we only do this if method tracing has been activated from command-line.

Fixes instrumentation when forcing interpreter mode (-Xint) with method tracing
enabled.

Removes unused parameter from UnsafeLogFatalForThreadSuspendAllTimeout.

Bug: https://code.google.com/p/android/issues/detail?id=72094
Bug: 11683397
Change-Id: I70f000fb46ddd95d6ad51ea0a8eee77697a045e9

10 years agoAllow method tracing for run-test
Sebastien Hertz [Wed, 9 Jul 2014 13:59:05 +0000 (15:59 +0200)]
Allow method tracing for run-test

Adds "--trace" option to enable method tracing.

Bug: 11683397
Change-Id: I20a6b25c71067eafd848db26f13d62cfdb9a6159

10 years agoMerge "CW on Master: Propagate or throw exception when no class found happens in...
Brian Carlstrom [Wed, 9 Jul 2014 23:50:28 +0000 (23:50 +0000)]
Merge "CW on Master: Propagate or throw exception when no class found happens in interpreter."

10 years agoCW on Master: Propagate or throw exception when no class found happens in interpreter.
Sean Wan [Wed, 9 Jul 2014 19:08:29 +0000 (12:08 -0700)]
CW on Master: Propagate or throw exception when no class found happens in interpreter.

The old behavior is a check fail which causes zygote process crash.

This is particular a problem for CW in which webview is not used, and
this stops CW system start.

(cherry picked from commit 41a71f3db62e5bccb162a2b18ed3801e00ff6f87)

Change-Id: Iabe091ebe4bbdd86d931ac6c06abd089f1338d59

10 years agoMerge "Use the icu4c headers from the new location."
Elliott Hughes [Wed, 9 Jul 2014 22:54:14 +0000 (22:54 +0000)]
Merge "Use the icu4c headers from the new location."

10 years agoUse the icu4c headers from the new location.
Elliott Hughes [Wed, 9 Jul 2014 22:31:20 +0000 (15:31 -0700)]
Use the icu4c headers from the new location.

Change-Id: I6ca56e8f9909bf3644a5f79f2d705547ddba6d03

10 years agoMerge "ART: Add simple tests for inlining of CAS"
Andreas Gampe [Wed, 9 Jul 2014 22:18:27 +0000 (22:18 +0000)]
Merge "ART: Add simple tests for inlining of CAS"

10 years agoART: Add simple tests for inlining of CAS
Andreas Gampe [Wed, 9 Jul 2014 04:33:47 +0000 (21:33 -0700)]
ART: Add simple tests for inlining of CAS

Add simple test cases for the inlining of CAS in the quick compiler to
run-test 082. The tests are not multi-threaded and will just establish
that the baseline behavior is correct. For extensive evaluation consider
tests available in libcore.

Change-Id: I9f463599e48ab7abc725769dda84758c9c6a76c2

10 years agoMerge "Add easy way to ensure the next allocation does GC."
Mathieu Chartier [Wed, 9 Jul 2014 22:10:01 +0000 (22:10 +0000)]
Merge "Add easy way to ensure the next allocation does GC."

10 years agoAdd easy way to ensure the next allocation does GC.
Mathieu Chartier [Wed, 9 Jul 2014 00:46:19 +0000 (17:46 -0700)]
Add easy way to ensure the next allocation does GC.

Added a class called ScopedHeapFill which changes the bytes allocated
counter to be equal to the growth limit. This causes the next
allocation to do a GC and possibly generate an OOM error. This is
useful for tests which need GC to happen at specific point.

Change-Id: Ibd8f3d5928b58534c5165ba7c296980002aa2c28

10 years agoMerge "Remove incorrect check for sa_mask in signal chaining"
Dave Allison [Wed, 9 Jul 2014 21:45:13 +0000 (21:45 +0000)]
Merge "Remove incorrect check for sa_mask in signal chaining"

10 years agoRemove incorrect check for sa_mask in signal chaining
Dave Allison [Wed, 9 Jul 2014 01:07:18 +0000 (18:07 -0700)]
Remove incorrect check for sa_mask in signal chaining

This removes an incorrect check using the sa_mask field of the
sigaction structure when chaining to a user's signal handler.
The check prevented a user's handler being called when sa_mask
was set.

Thanks to primiano@ for the excellent bug report.

Bug: 16005022
Change-Id: I0548003f4fc3b1889a6859091e603ead4a9b0607

10 years agoMerge "Add patchoat tool to Art."
Brian Carlstrom [Mon, 7 Jul 2014 22:41:10 +0000 (22:41 +0000)]
Merge "Add patchoat tool to Art."

10 years agoAdd patchoat tool to Art.
Alex Light [Thu, 12 Jun 2014 18:26:29 +0000 (11:26 -0700)]
Add patchoat tool to Art.

Add a new executable called patchoat to art. This tool takes already
compiled images and oat files and changes their base address, acting as
a cheap form of relocation.

Add a --include-patch-information flag to dex2oat and code to add
required patch information to oat files created with the quick compiler.

Bug: 15358152

Change-Id: Ie0c580db45bb14ec180deb84930def6c3628d97d

10 years agoMerge "ART: Add HADDPS/HADDPD/SHUFPS/SHUFPD instruction generation"
Ian Rogers [Mon, 7 Jul 2014 18:18:03 +0000 (18:18 +0000)]
Merge "ART: Add HADDPS/HADDPD/SHUFPS/SHUFPD instruction generation"

10 years agoMerge "Only allow whitelisted exceptions during dex2oat resolving."
Mathieu Chartier [Mon, 7 Jul 2014 16:47:12 +0000 (16:47 +0000)]
Merge "Only allow whitelisted exceptions during dex2oat resolving."

10 years agoOnly allow whitelisted exceptions during dex2oat resolving.
Mathieu Chartier [Sat, 28 Jun 2014 00:19:04 +0000 (17:19 -0700)]
Only allow whitelisted exceptions during dex2oat resolving.

Previously we would clear any exceptions even though we only want
to clear NoClassDefFound and IncompatibleClassChangeError exceptions.
This meant that out of memory exceptions would incorrectly get
cleared resulting in excessively long dex2oat times when you ran out
of memory.

Bug: 15936401
Change-Id: Iba3911f2c689b8c8d7d41e8c36546f027c08e9d7

10 years agoMerge "Fix a compile assert name with inverted meaning."
Vladimir Marko [Wed, 9 Jul 2014 09:38:31 +0000 (09:38 +0000)]
Merge "Fix a compile assert name with inverted meaning."

10 years agoFix a compile assert name with inverted meaning.
Vladimir Marko [Tue, 8 Jul 2014 16:49:09 +0000 (17:49 +0100)]
Fix a compile assert name with inverted meaning.

Change-Id: I50cc9a8b88c19e1ce7bc5b34cc4b7d650b2f052d

10 years agoMerge "Workaround for invalid monitor-exit catch ranges."
Vladimir Marko [Wed, 9 Jul 2014 08:39:39 +0000 (08:39 +0000)]
Merge "Workaround for invalid monitor-exit catch ranges."

10 years agoWorkaround for invalid monitor-exit catch ranges.
Vladimir Marko [Tue, 8 Jul 2014 17:06:45 +0000 (18:06 +0100)]
Workaround for invalid monitor-exit catch ranges.

Avoid bogus exception edges from monitor-exit to a
catch handler that does exactly the same monitor-exit.

Bug: 15745363
Change-Id: I2b8b44b313c470557714744bdfb7beaef2cd2246

10 years agoMerge "Fix local reference leaks in debugger and use a cache."
Mathieu Chartier [Tue, 8 Jul 2014 16:51:57 +0000 (16:51 +0000)]
Merge "Fix local reference leaks in debugger and use a cache."

10 years agoFix local reference leaks in debugger and use a cache.
Mathieu Chartier [Fri, 27 Jun 2014 17:20:14 +0000 (10:20 -0700)]
Fix local reference leaks in debugger and use a cache.

Changed alloc record stack trace element to use jmethodID instead of
JNI weak global references. Added code to delete the local ref
created in AllocRecord::SetType.

Bug: 15886342
External bug: https://code.google.com/p/android/issues/detail?id=72330

Change-Id: Id18e765820baad02246768dc9d633aada60f4fed

10 years agoMerge "Add kIntrinsicIsStatic flag for System.arraycopy()."
Vladimir Marko [Tue, 8 Jul 2014 16:42:47 +0000 (16:42 +0000)]
Merge "Add kIntrinsicIsStatic flag for System.arraycopy()."

10 years agoAdd kIntrinsicIsStatic flag for System.arraycopy().
Vladimir Marko [Tue, 8 Jul 2014 16:34:04 +0000 (17:34 +0100)]
Add kIntrinsicIsStatic flag for System.arraycopy().

Change-Id: I40ffb07e62474f418eabb7361f129c633022666c

10 years agoMerge "Fix style issue."
Vladimir Marko [Tue, 8 Jul 2014 16:24:12 +0000 (16:24 +0000)]
Merge "Fix style issue."

10 years agoFix style issue.
Vladimir Marko [Tue, 8 Jul 2014 16:21:32 +0000 (17:21 +0100)]
Fix style issue.

Change-Id: Ifc73dd4331d91be8c6c5eed2159ec1733fa84995

10 years agoMerge "Check invoke type for intrinsic method invokes."
Vladimir Marko [Tue, 8 Jul 2014 16:06:12 +0000 (16:06 +0000)]
Merge "Check invoke type for intrinsic method invokes."

10 years agoCheck invoke type for intrinsic method invokes.
Vladimir Marko [Thu, 3 Jul 2014 16:28:33 +0000 (17:28 +0100)]
Check invoke type for intrinsic method invokes.

Bug: 16017877
Change-Id: I931c0b19b500a042bc9235aa18212c4ab5240745

10 years agoMerge "BaseMutex::IsExclusiveHeld should only be called on self."
Ian Rogers [Tue, 8 Jul 2014 06:04:43 +0000 (06:04 +0000)]
Merge "BaseMutex::IsExclusiveHeld should only be called on self."

10 years agoBaseMutex::IsExclusiveHeld should only be called on self.
Ian Rogers [Tue, 8 Jul 2014 04:38:36 +0000 (21:38 -0700)]
BaseMutex::IsExclusiveHeld should only be called on self.

Fix issue in Thread::DumpState of lock dumping calling IsExclusiveHeld on a
thread that isn't self causing intermittent crashes of ThreadStress oat test.

Bug: 15446488
Change-Id: I86924397a4e21ce10a95ea2a737d7bfbcb8ffe28

10 years agoMerge "JNI dlsym lookup fixes."
Ian Rogers [Tue, 8 Jul 2014 06:04:28 +0000 (06:04 +0000)]
Merge "JNI dlsym lookup fixes."

10 years agoJNI dlsym lookup fixes.
Ian Rogers [Tue, 8 Jul 2014 04:44:06 +0000 (21:44 -0700)]
JNI dlsym lookup fixes.

Thread* self is passed on all architectures apart from ARM and ARM64.
On x86 restore ebx correctly. Pass self in correct register on x86-64.
Ensure methods are compiled in jni_compiler_test even if the generic JNI
trampoline is present.

Change-Id: If5fdb1de97b78ac5a5cf8d0915c5b82311f23eb9

10 years agoMerge "Enable compiler testing for ARM64 and x86-64."
Ian Rogers [Tue, 8 Jul 2014 05:51:03 +0000 (05:51 +0000)]
Merge "Enable compiler testing for ARM64 and x86-64."

10 years agoEnable compiler testing for ARM64 and x86-64.
Ian Rogers [Tue, 8 Jul 2014 04:37:04 +0000 (21:37 -0700)]
Enable compiler testing for ARM64 and x86-64.

Change-Id: Ica1e43b3cf07de8d4ae2b69f7a8b35205fe32a83

10 years agoFix dex file dependencies for oat tests.
Ian Rogers [Mon, 7 Jul 2014 23:05:18 +0000 (16:05 -0700)]
Fix dex file dependencies for oat tests.

The initial prerequisit used as an argument to "cp" wasn't set causing dex2oat
to attempt to compile dex2oat. Make the setting of host and target dex
dependencies more explicit in build-art-test-dex and update the test rules
appropriately.

Change-Id: I4f591f817537043bcb0328c7623fe7e2f0830b60

10 years agoMerge "ART: Intrinsic implementation for java.lang.System.arraycopy."
Ian Rogers [Tue, 8 Jul 2014 05:29:19 +0000 (05:29 +0000)]
Merge "ART: Intrinsic implementation for java.lang.System.arraycopy."

10 years agoART: Intrinsic implementation for java.lang.System.arraycopy.
DaniilSokolov [Wed, 25 Jun 2014 00:34:00 +0000 (17:34 -0700)]
ART: Intrinsic implementation for java.lang.System.arraycopy.

Implements intrinsic for  java.lang.System.arraycopy(char[], int, char[], int, int) -
this method is internal to android class libraries and used in such classes as StringBuffer and
StringBuilder. It is not possible to call it from application code. The intrinsic for
this method is implemented as inline method (assembly code is generated manually).

The intrinsic is x86 32 bit only.

Change-Id: Id1b1e0a20d5f6d5f5ebfe1fdc2447b6d8a515432
Signed-off-by: Daniil Sokolov <daniil.y.sokolov@intel.com>
10 years agoMerge "Fix dex file dependencies for oat tests."
Ian Rogers [Tue, 8 Jul 2014 02:15:36 +0000 (02:15 +0000)]
Merge "Fix dex file dependencies for oat tests."

10 years agoMerge "Add make rule to debug interpreter-only mode"
Sebastien Hertz [Fri, 4 Jul 2014 09:07:47 +0000 (09:07 +0000)]
Merge "Add make rule to debug interpreter-only mode"

10 years agoAdd make rule to debug interpreter-only mode
Sebastien Hertz [Fri, 4 Jul 2014 08:53:22 +0000 (10:53 +0200)]
Add make rule to debug interpreter-only mode

Adds "use-artd-interpret-only" make rule to run interpreter-only mode with
libartd.so.

Change-Id: Ib9fbcdbdcc79a89900ee751b5dc2ad554f834127

10 years agoMerge "Aarch64: fix bug and enable register promotion."
Andreas Gampe [Mon, 7 Jul 2014 15:51:50 +0000 (15:51 +0000)]
Merge "Aarch64: fix bug and enable register promotion."

10 years agoAarch64: fix bug and enable register promotion.
Matteo Franchin [Mon, 7 Jul 2014 12:35:14 +0000 (13:35 +0100)]
Aarch64: fix bug and enable register promotion.

Iteration over arguments in invoke implementation was not correct
for wide arguments.

Change-Id: I46c7edcbfc9e32ded0e9a535fab3d333905bcf41

10 years agoMerge "Revert "ART: Key-Value Store in Oat header""
Nicolas Geoffray [Wed, 9 Jul 2014 07:58:38 +0000 (07:58 +0000)]
Merge "Revert "ART: Key-Value Store in Oat header""

10 years agoRevert "ART: Key-Value Store in Oat header"
Nicolas Geoffray [Wed, 9 Jul 2014 07:58:10 +0000 (07:58 +0000)]
Revert "ART: Key-Value Store in Oat header"

Broke arm64 build.

This reverts commit c87d27b25994da8670d82a8f7bad6327b693bfff.

Change-Id: I4c2ade295d2b5aa77fc3ad810e0e859629a5bf09

10 years agoMerge "Adds PGO_GEN and PGO_USE for libart and libart-compiler."
Ian Rogers [Wed, 9 Jul 2014 07:46:42 +0000 (07:46 +0000)]
Merge "Adds PGO_GEN and PGO_USE for libart and libart-compiler."

10 years agoMerge "X86 Backend support for vectorized float and byte 16x16 operations"
Ian Rogers [Wed, 9 Jul 2014 07:44:21 +0000 (07:44 +0000)]
Merge "X86 Backend support for vectorized float and byte 16x16 operations"

10 years agoX86 Backend support for vectorized float and byte 16x16 operations
Udayan Banerji [Wed, 9 Jul 2014 02:59:43 +0000 (19:59 -0700)]
X86 Backend support for vectorized float and byte 16x16 operations

Add support for reserving vector registers for the duration of vector loop.
Add support for 16x16 multiplication, shifts, and add reduce.

Changed the vectorization implementation to be able to use the dataflow
elements for SSA recreation and fixed a few implementation details.

Change-Id: I2f358f05f574fc4ab299d9497517b9906f234b98
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Olivier Come <olivier.come@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
10 years agoMerge "x86_64: Clean-up after cmp-long fix"
Ian Rogers [Wed, 9 Jul 2014 07:22:15 +0000 (07:22 +0000)]
Merge "x86_64: Clean-up after cmp-long fix"

10 years agox86_64: Clean-up after cmp-long fix
Serguei Katkov [Tue, 24 Jun 2014 06:23:17 +0000 (13:23 +0700)]
x86_64: Clean-up after cmp-long fix

The patch adresses the coments from review done by Ian Rogers.
Clean-up of assembler.

Change-Id: I9dbb350dfc6645f8a63d624b2b785233529459a9
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoMerge "Clean-up call_x86.cc"
Ian Rogers [Wed, 9 Jul 2014 07:15:44 +0000 (07:15 +0000)]
Merge "Clean-up call_x86.cc"

10 years agoClean-up call_x86.cc
Serguei Katkov [Fri, 4 Jul 2014 20:09:32 +0000 (03:09 +0700)]
Clean-up call_x86.cc

Also adds some DCHECKs and fixes for the bugs found by them.

Change-Id: I455bbfe2c6018590cf491880cd9273edbe39c4c7
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoMerge "ART: Fix FP promotion"
Andreas Gampe [Wed, 9 Jul 2014 05:29:07 +0000 (05:29 +0000)]
Merge "ART: Fix FP promotion"

10 years agoART: Fix FP promotion
Andreas Gampe [Wed, 9 Jul 2014 04:10:55 +0000 (21:10 -0700)]
ART: Fix FP promotion

A previous CL changed != by mistake to ==, causing incorrect
promotion results for ARM32.

Change-Id: I62572e3e86d38a55be7043196027563735010b30

10 years agoMerge "Make dex2oat heap size product configurable [art]"
Brian Carlstrom [Wed, 9 Jul 2014 04:07:52 +0000 (04:07 +0000)]
Merge "Make dex2oat heap size product configurable [art]"

10 years agoMerge "ART: Key-Value Store in Oat header"
Andreas Gampe [Tue, 8 Jul 2014 19:16:24 +0000 (19:16 +0000)]
Merge "ART: Key-Value Store in Oat header"

10 years agoART: Key-Value Store in Oat header
Andreas Gampe [Thu, 26 Jun 2014 23:11:07 +0000 (16:11 -0700)]
ART: Key-Value Store in Oat header

Allows the storage of string-string pairs in the oat header. The
first significant use of this is storing the implicit-check flags,
so that an oat file can be rejected if it doesn't agree with the
current runtime.

Bump the oat version as the header structure changes.

Change-Id: I15a1c16886e6b8fa7b881c918c19c1efa5c7c00f

10 years agoMake dex2oat heap size product configurable [art]
Brian Carlstrom [Tue, 8 Jul 2014 17:34:02 +0000 (10:34 -0700)]
Make dex2oat heap size product configurable [art]

Bug: 15919420
Change-Id: I1b4f3256f6352b2d3e268991406def9e8efab945

10 years agoAdds PGO_GEN and PGO_USE for libart and libart-compiler.
Dehao Chen [Tue, 8 Jul 2014 17:00:56 +0000 (10:00 -0700)]
Adds PGO_GEN and PGO_USE for libart and libart-compiler.

PGO_GEN=device_path is used to build an instrumented binary. The profile will be stored in the specified path in device.
PGO_USE=host_path is used to build an PGO-optimized binary. The profile should be pre-stored in the specified path in host.

Bug: 16153819
Change-Id: Ib56f8707df009f290608ca66f669db06e65815c1

10 years agoMerge "Whitelist another exception during dex2oat resolving."
Brian Carlstrom [Wed, 9 Jul 2014 05:14:21 +0000 (05:14 +0000)]
Merge "Whitelist another exception during dex2oat resolving."

10 years agoWhitelist another exception during dex2oat resolving.
Brian Carlstrom [Wed, 9 Jul 2014 05:01:08 +0000 (22:01 -0700)]
Whitelist another exception during dex2oat resolving.

Bug: 15936401
Bug: 16162780
Change-Id: I7389edc8cdacd5e3c2cc7d86bbd56e8c503c34b0

10 years agoMerge "ART: Do not emit load when inlining unused Thread.currentThread()"
Andreas Gampe [Wed, 9 Jul 2014 01:46:39 +0000 (01:46 +0000)]
Merge "ART: Do not emit load when inlining unused Thread.currentThread()"

10 years agoMerge "Only allow instance-of to improve knowledge of a type for downcasts."
Ian Rogers [Wed, 9 Jul 2014 00:37:32 +0000 (00:37 +0000)]
Merge "Only allow instance-of to improve knowledge of a type for downcasts."

10 years agoOnly allow instance-of to improve knowledge of a type for downcasts.
Ian Rogers [Tue, 8 Jul 2014 06:53:08 +0000 (23:53 -0700)]
Only allow instance-of to improve knowledge of a type for downcasts.

Previous "not upcast" test could improve a type to an impossible type that
following a merge back with the original register would lead to conflict
(and subsequent verifier errors).
Modify UpdateRegisters so that the work line will be updated if merging
causes changes in the fall-through case.

Bug: 15808277
Issue: https://code.google.com/p/android/issues/detail?id=72093
Change-Id: Ib16cae8506246177e902825af036d5a397ad0dac

10 years agoART: Do not emit load when inlining unused Thread.currentThread()
Andreas Gampe [Tue, 8 Jul 2014 18:03:59 +0000 (11:03 -0700)]
ART: Do not emit load when inlining unused Thread.currentThread()

When the result is not used, do not emit the load. This avoids
uninitialized registers leading to size-check errors.

Change-Id: I212392ffea7243720f120b2f12679df286106a02

10 years agoMerge "ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an...
Andreas Gampe [Tue, 8 Jul 2014 19:18:27 +0000 (19:18 +0000)]
Merge "ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception"

10 years agoART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception
Elena Sayapina [Fri, 20 Jun 2014 09:58:37 +0000 (16:58 +0700)]
ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception

Thread should release monitor_lock_ Mutex (which guards shared structures behind Java monitor)
in Monitor::Wait before throwing any exception. Otherwise the thread may be suspended by GC
during that time still holding the lock. This may cause deadlock during GC in case
some other thread needs to acquire the monitor_lock_. The other thread can't be suspended
by GC then waiting for exclusive lock and "thread suspend timeout" occurs.

Change-Id: Id02f45052e1cfc01e676a43434125817564d7874
Signed-off-by: Elena Sayapina <elena.v.sayapina@intel.com>
10 years agoMerge "Remove Dbg::VisitRoots()."
Hiroshi Yamauchi [Tue, 8 Jul 2014 19:10:46 +0000 (19:10 +0000)]
Merge "Remove Dbg::VisitRoots()."

10 years agoRemove Dbg::VisitRoots().
Hiroshi Yamauchi [Mon, 7 Jul 2014 20:07:08 +0000 (13:07 -0700)]
Remove Dbg::VisitRoots().

We replace the GC strong roots with JNI.

jdwp_test passes.

Bug: 12687968
Change-Id: I841f1aaa5dffa784ca25953a251600f70df273b2

10 years agoMerge "Do not attempt to compile on architectures we do not support."
Nicolas Geoffray [Fri, 4 Jul 2014 09:00:17 +0000 (09:00 +0000)]
Merge "Do not attempt to compile on architectures we do not support."

10 years agoDo not attempt to compile on architectures we do not support.
Nicolas Geoffray [Fri, 4 Jul 2014 08:43:26 +0000 (09:43 +0100)]
Do not attempt to compile on architectures we do not support.

Change-Id: I431edff0a753a7fa37c79bdf7ab918d6747667a4

10 years agoMerge "More checks in JNI RegisterNatives"
Sebastien Hertz [Fri, 4 Jul 2014 08:11:20 +0000 (08:11 +0000)]
Merge "More checks in JNI RegisterNatives"

10 years agoMore checks in JNI RegisterNatives
Sebastien Hertz [Thu, 3 Jul 2014 07:39:53 +0000 (09:39 +0200)]
More checks in JNI RegisterNatives

Throws NoSuchMethodError (and returns JNI_ERR) when given method name, method
signature or native function is null.

Bug: https://code.google.com/p/android/issues/detail?id=72293
Bug: 15886341
Change-Id: I1c0582d54031eaa58a6025a2417d65090a2a622a

10 years agoMerge "x86_64: Turn on promotion optimization"
Andreas Gampe [Fri, 4 Jul 2014 05:36:52 +0000 (05:36 +0000)]
Merge "x86_64: Turn on promotion optimization"