OSDN Git Service

android-x86/art.git
9 years agoMerge "Improve detection of lifetime holes."
Nicolas Geoffray [Tue, 30 Sep 2014 12:53:06 +0000 (12:53 +0000)]
Merge "Improve detection of lifetime holes."

9 years agoImprove detection of lifetime holes.
Nicolas Geoffray [Mon, 29 Sep 2014 11:00:40 +0000 (12:00 +0100)]
Improve detection of lifetime holes.

The check concluding that the next use was in a successor
was too conservative: two blocks following each other
in terms of liveness are not necessarily predecessor/sucessor.

Change-Id: Ideec98046c812aa5fb63781141b5fde24c706d6d

9 years agoMerge "Revert "Enable computed goto interpreter on the host""
Sebastien Hertz [Tue, 30 Sep 2014 12:06:19 +0000 (12:06 +0000)]
Merge "Revert "Enable computed goto interpreter on the host""

9 years agoRevert "Enable computed goto interpreter on the host"
Sebastien Hertz [Tue, 30 Sep 2014 10:00:11 +0000 (12:00 +0200)]
Revert "Enable computed goto interpreter on the host"

This reverts commit 66d9bdb94f21106aaaa31a8fd686098672075e04.

Bug: 17716550
Change-Id: Ib404242c86e96e8edf019a2dcc14f0f8294b79e8

9 years agoMerge "ART: Fix movnti assembler"
Ian Rogers [Tue, 30 Sep 2014 06:15:29 +0000 (06:15 +0000)]
Merge "ART: Fix movnti assembler"

9 years agoMerge "ART: Better IllegalAccessException message"
Andreas Gampe [Mon, 29 Sep 2014 18:40:54 +0000 (18:40 +0000)]
Merge "ART: Better IllegalAccessException message"

9 years agoART: Better IllegalAccessException message
Andreas Gampe [Tue, 23 Sep 2014 17:38:30 +0000 (10:38 -0700)]
ART: Better IllegalAccessException message

Bug: 17618578
Bug: 17614623
Change-Id: I0e3f15e676acd6ed5844fc86e136f75cc335372d

9 years agoMerge "ART: Deprecate CompilationUnit's code_item"
Ian Rogers [Mon, 29 Sep 2014 18:31:02 +0000 (18:31 +0000)]
Merge "ART: Deprecate CompilationUnit's code_item"

9 years agoMerge "ART: More verifier error output"
Andreas Gampe [Mon, 29 Sep 2014 18:29:17 +0000 (18:29 +0000)]
Merge "ART: More verifier error output"

9 years agoMerge "ART: Do a pre-pass for monitor_enter dex pc search"
Andreas Gampe [Mon, 29 Sep 2014 18:29:04 +0000 (18:29 +0000)]
Merge "ART: Do a pre-pass for monitor_enter dex pc search"

9 years agoMerge "Reduce scope of MIR analysis attributes."
Ian Rogers [Mon, 29 Sep 2014 18:24:23 +0000 (18:24 +0000)]
Merge "Reduce scope of MIR analysis attributes."

9 years agoART: Deprecate CompilationUnit's code_item
Razvan A Lupusoru [Thu, 11 Sep 2014 22:24:59 +0000 (15:24 -0700)]
ART: Deprecate CompilationUnit's code_item

The code_item field is tracked in both the CompilationUnit and the MIRGraph.
However, the existence of this field in CompilationUnit promotes bad practice
because it creates assumption only a single code_item can be part of method.

This patch deprecates this field and updates MIRGraph methods to make it
easy to get same information as before. Part of this is the update to
interface GetNumDalvikInsn which ensures to count all code_items in MIRGraph.

Some dead code was also removed because it was not friendly to these updates.

Change-Id: Ie979be73cc56350321506cfea58f06d688a7fe99
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
9 years agoReduce scope of MIR analysis attributes.
Ian Rogers [Mon, 29 Sep 2014 17:49:11 +0000 (10:49 -0700)]
Reduce scope of MIR analysis attributes.

MIR analaysis attributes are only used in MIRGraph::AnalyzeBlock. Reduce the
scope to just the file that defines that function.
Reduce the size of the attributes from int32 to int16.
Remove the use of #defines in favor of enums.

Change-Id: I45ba3aa08beae67240507917b584d537a029838e

9 years agoART: Fix movnti assembler
Razvan A Lupusoru [Tue, 23 Sep 2014 21:54:32 +0000 (14:54 -0700)]
ART: Fix movnti assembler

Movnti was receiving rex prefix before its opcode. Additionally,
the 64-bit version was missing the rex.w prefix.

Change-Id: Ie5c3bbe109765a0b990cafeeea1ee30329daabd0
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
9 years agoART: More verifier error output
Andreas Gampe [Tue, 16 Sep 2014 02:02:30 +0000 (19:02 -0700)]
ART: More verifier error output

Add some debug output on verifier abort.

Change-Id: I4a84ff1d8e1bad689addca287a989639e7111b97

9 years agoART: Do a pre-pass for monitor_enter dex pc search
Andreas Gampe [Thu, 18 Sep 2014 20:16:38 +0000 (13:16 -0700)]
ART: Do a pre-pass for monitor_enter dex pc search

In case the method does not have any monitor_enter instructions,
it is unnecessary to run the full verifier. Speeds up stack dumps
and works around b/17514582.

Bug: 17514582
Change-Id: I5201bfbb9fb6cad49596b4c72e71983b58d9f20c

9 years agoMerge "Fix a bug in the insertion of parallel move."
Nicolas Geoffray [Mon, 29 Sep 2014 10:59:34 +0000 (10:59 +0000)]
Merge "Fix a bug in the insertion of parallel move."

9 years agoFix a bug in the insertion of parallel move.
Nicolas Geoffray [Mon, 29 Sep 2014 09:33:25 +0000 (10:33 +0100)]
Fix a bug in the insertion of parallel move.

To make sure we do not connect interval siblings in the
same parallel move, I added a new field in MoveOperands
that tells for which instruction this move is for.
A parallel move should not contains moves for the same instructions.

The checks revealed a bug when connecting siblings, where
we would choose the wrong parallel move.

Change-Id: I70f27ec120886745c187071453c78da4c47c1dd2

9 years agoMerge "Fix test now that instructions can die at instruction entry."
Nicolas Geoffray [Mon, 29 Sep 2014 08:47:31 +0000 (08:47 +0000)]
Merge "Fix test now that instructions can die at instruction entry."

9 years agoFix test now that instructions can die at instruction entry.
Nicolas Geoffray [Mon, 29 Sep 2014 08:46:03 +0000 (09:46 +0100)]
Fix test now that instructions can die at instruction entry.

Change-Id: I816279c55d12de8e69ac0b6c88730bd676c03335

9 years agoMerge "Register allocator: refine instructions liveness."
Nicolas Geoffray [Sat, 27 Sep 2014 11:56:12 +0000 (11:56 +0000)]
Merge "Register allocator: refine instructions liveness."

9 years agoRegister allocator: refine instructions liveness.
Nicolas Geoffray [Thu, 25 Sep 2014 13:39:26 +0000 (14:39 +0100)]
Register allocator: refine instructions liveness.

Add support for instructions that die at the beginning
of another instruction. Before, an instruction needed
to stay alive during the instruction, so the register
allocator was not able not reuse the register.

Change-Id: I5f11a80b0a20778227229eb797816edcc6365297

9 years agoMerge "Optimize get/set reflection performance"
Mathieu Chartier [Sat, 27 Sep 2014 02:55:11 +0000 (02:55 +0000)]
Merge "Optimize get/set reflection performance"

9 years agoOptimize get/set reflection performance
Mathieu Chartier [Fri, 26 Sep 2014 21:32:37 +0000 (14:32 -0700)]
Optimize get/set reflection performance

Speedups mostly from reducing how often access checks are needed,
and adding more inlining, and adding templates.

Field_getInt from ~850ns -> 350ns.
Field_setInt from ~900ns -> 370ns.

Bug: 14063288

(cherry picked from commit ffc788cb7b5b9f53734d7bb8af2d5e45d885546b)

Change-Id: I2441581ff3478c6ae43b6aa49939ff3f07555ec8

9 years agoMerge "Fix broken runtime SetStatsEnabled logic"
Mathieu Chartier [Fri, 26 Sep 2014 23:19:48 +0000 (23:19 +0000)]
Merge "Fix broken runtime SetStatsEnabled logic"

9 years agoFix broken runtime SetStatsEnabled logic
Mathieu Chartier [Fri, 26 Sep 2014 00:03:12 +0000 (17:03 -0700)]
Fix broken runtime SetStatsEnabled logic

Previously, Runtime::SetStatsEnabled wouldn't take stats_enabled_
into account when deciding whether or not to increment / decrement
teh stats enabled counter. This resulted in counter underflows and
other errors which caused some CTS tests to fail.

Also added some locking to prevent race conditions.

Bug: 17360878

(cherry picked from commit a98ffd745bbecb2e84a492194950c0b94966546b)

Change-Id: I21d241a58d35bd6a607aa2305c6da81720bd0886

9 years agoMerge "Fix make test exclusion bugs."
Ian Rogers [Fri, 26 Sep 2014 23:01:45 +0000 (23:01 +0000)]
Merge "Fix make test exclusion bugs."

9 years agoFix make test exclusion bugs.
Ian Rogers [Fri, 26 Sep 2014 22:55:25 +0000 (15:55 -0700)]
Fix make test exclusion bugs.

Change-Id: I439c3670a01096355c50774c628d6b0f6cb6c397

9 years agoMerge "Only include test targets if test-art* or build-art* is being built."
Ian Rogers [Fri, 26 Sep 2014 22:47:47 +0000 (22:47 +0000)]
Merge "Only include test targets if test-art* or build-art* is being built."

9 years agoOnly include test targets if test-art* or build-art* is being built.
Ian Rogers [Fri, 26 Sep 2014 22:31:20 +0000 (15:31 -0700)]
Only include test targets if test-art* or build-art* is being built.

Change-Id: I229ba2a77d993b2c14acf9a76e102ef76b0aeba6

9 years agoMerge "Change heap base address"
Mathieu Chartier [Fri, 26 Sep 2014 19:59:52 +0000 (19:59 +0000)]
Merge "Change heap base address"

9 years agoChange heap base address
Mathieu Chartier [Fri, 26 Sep 2014 18:37:42 +0000 (11:37 -0700)]
Change heap base address

Moved to 300 MB to allow room for other people who wish to use the
low 1 GB.

Bug: 17671634

(cherry picked from commit 23fb122b57c52ab1db98708a4e15765b46b26405)

Change-Id: Icb2784fc92cb5c46edb6e3a9de2d8383e012a07c

9 years agoMerge "Fix verifier crash in GetQuickFieldAccess()."
Hiroshi Yamauchi [Fri, 26 Sep 2014 18:36:01 +0000 (18:36 +0000)]
Merge "Fix verifier crash in GetQuickFieldAccess()."

9 years agoFix verifier crash in GetQuickFieldAccess().
Hiroshi Yamauchi [Fri, 26 Sep 2014 17:43:59 +0000 (10:43 -0700)]
Fix verifier crash in GetQuickFieldAccess().

Bug: 17671806
Change-Id: Ifb603f6f55a94826d656a4c73a7e328d74f6dac9

9 years agoMerge "ART Runtime: Add movw $xx,yy fault handling"
Ian Rogers [Fri, 26 Sep 2014 16:57:30 +0000 (16:57 +0000)]
Merge "ART Runtime: Add movw $xx,yy fault handling"

9 years agoMerge "Elimination of redundant instructuion"
Ian Rogers [Fri, 26 Sep 2014 16:53:58 +0000 (16:53 +0000)]
Merge "Elimination of redundant instructuion"

9 years agoMerge "Fix CallStaticVoidMethodA for testEverything"
Ian Rogers [Fri, 26 Sep 2014 16:43:28 +0000 (16:43 +0000)]
Merge "Fix CallStaticVoidMethodA for testEverything"

9 years agoMerge "Fix some more pedantic compiler warnings."
Ian Rogers [Fri, 26 Sep 2014 16:15:00 +0000 (16:15 +0000)]
Merge "Fix some more pedantic compiler warnings."

9 years agoFix CallStaticVoidMethodA for testEverything
Marcus Oakland [Wed, 24 Sep 2014 14:23:06 +0000 (15:23 +0100)]
Fix CallStaticVoidMethodA for testEverything

The android.jni.cts.JniCTest#testEverything and
android.jni.cts.JniCppTest#testEverything CTS test were failing
because of a SIGABRT caused by a call to ScopedCheck::AbortF
from ScopedCheck::CheckInstance when CheckJNI::CallStaticVoidMethodA
was invoked. This was due to the CheckJNI::CallMethodA method being
called with the jobject obj parameter being passed jclass c, and the
jclass c parameter being passed nullptr. This problem was rectified
by swapping these two parameters, and the CTS tests then passed.

Change-Id: I025cfd85ab55eb3eadb287b56846d9d42f5b7e5e
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
9 years agoMerge "ART: Fix mac build"
Andreas Gampe [Fri, 26 Sep 2014 07:17:36 +0000 (07:17 +0000)]
Merge "ART: Fix mac build"

9 years agoART: Fix mac build
Andreas Gampe [Fri, 26 Sep 2014 06:13:47 +0000 (23:13 -0700)]
ART: Fix mac build

Change-Id: I5821cf4d5b8f4142912c9cd3524a6aaa4b4a397c

9 years agoFix some more pedantic compiler warnings.
Ian Rogers [Fri, 26 Sep 2014 00:36:39 +0000 (17:36 -0700)]
Fix some more pedantic compiler warnings.

Argument name shadows field name.
Lack of case statements for kMips64.

Change-Id: Ib3ca16f79a4d44ae80ef32f22cc79cbe9527f4f1

9 years agoMerge "Fix Class::IsInSamePackage to not read beyond the end of a StringPiece."
Ian Rogers [Thu, 25 Sep 2014 23:53:21 +0000 (23:53 +0000)]
Merge "Fix Class::IsInSamePackage to not read beyond the end of a StringPiece."

9 years agoFix Class::IsInSamePackage to not read beyond the end of a StringPiece.
Ian Rogers [Thu, 25 Sep 2014 22:35:37 +0000 (15:35 -0700)]
Fix Class::IsInSamePackage to not read beyond the end of a StringPiece.

Fix length of string piece to be size_type rather than int because expecting
negatively sized strings is a bad idea and we should use unsigned types to
defensively guard against mistakes.
Remove max_size and capacity since the return type is inconsistent between
Google and the STL, and we don't need the functions.
Add a bound check in libartd to operator[] accesses.

Change-Id: I1b87a03d8fbd95e7dbb106745e304d1083898075

9 years agoMerge "Some optimizations for the array alloc path."
Hiroshi Yamauchi [Thu, 25 Sep 2014 22:59:28 +0000 (22:59 +0000)]
Merge "Some optimizations for the array alloc path."

9 years agoSome optimizations for the array alloc path.
Hiroshi Yamauchi [Thu, 25 Sep 2014 18:46:46 +0000 (11:46 -0700)]
Some optimizations for the array alloc path.

- Force Array::Alloc() to be inlined.
- Simplify the array size overflow check.
- Turn fill_usable into a template parameter.
- Remove a branch in Array::DataOffset() and avoid
  Primitive::ComponentSize(), which has a switch, in the array alloc
  path.
- Strength reductions in the array size computation by using component
  size shifts instead of component sizes. Store component size shift
  in the upper 16 bits of primitive_type field.
- Speedup: ~4% (3435->3284) in MemAllocTest on N4.

Bug: 9986565

Change-Id: I4b142ffac4ab8b5b915836f1660a949d6442344c

9 years agoMerge "Reduce IndirectReferenceTable memory usage"
Mathieu Chartier [Thu, 25 Sep 2014 22:30:08 +0000 (22:30 +0000)]
Merge "Reduce IndirectReferenceTable memory usage"

9 years agoReduce IndirectReferenceTable memory usage
Mathieu Chartier [Thu, 25 Sep 2014 22:27:43 +0000 (15:27 -0700)]
Reduce IndirectReferenceTable memory usage

Changed the slot side table and the main table to be a single
table, reduced number of slots per reference from 4 to 3 to make
the IrtEntry a power of 2 size.

Before:
20848 kB: Dalvik Other

After:
16760 kB: Dalvik Other

Bug: 17643507

(cherry picked from commit a1de6b93426cfc66a64eb1b57303348aab5e766d)

Change-Id: I362475235a887c60eff6870bb10051a6be3d5814

9 years agoART Runtime: Add movw $xx,yy fault handling
Mark Mendell [Thu, 25 Sep 2014 19:13:39 +0000 (15:13 -0400)]
ART Runtime: Add movw $xx,yy fault handling

Handle a movw $xx,yy instruction in the segmentation violation fault
handler.  This can be detected by a 0x66 prefix byte for the move
immediate instruction, using this to set the size of the immediate
value.

This test case shows up in 122-npe using my private backend changes.

Change-Id: If224a9dd0084f50c91da418808cbe2d491308600
Category: Device Enablement
Domain: AOSP.ART-Quick
Origin: Internal
Upstream-Candidate: yes
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
9 years agoMerge "Implement method calls using relative BL on ARM."
Vladimir Marko [Thu, 25 Sep 2014 18:08:03 +0000 (18:08 +0000)]
Merge "Implement method calls using relative BL on ARM."

9 years agoImplement method calls using relative BL on ARM.
Vladimir Marko [Fri, 1 Aug 2014 18:04:18 +0000 (19:04 +0100)]
Implement method calls using relative BL on ARM.

Store the linker patches with each CompiledMethod instead of
keeping them in CompilerDriver. Reorganize oat file creation
to apply the patches as we're writing the method code. Add
framework for platform-specific relative call patches in the
OatWriter. Implement relative call patches for ARM.

Change-Id: Ie2effb3d92b61ac8f356140eba09dc37d62290f8

9 years agoMerge "Make the script bash because it uses PIPESTATUS."
Nicolas Geoffray [Thu, 25 Sep 2014 16:37:24 +0000 (16:37 +0000)]
Merge "Make the script bash because it uses PIPESTATUS."

9 years agoMake the script bash because it uses PIPESTATUS.
Nicolas Geoffray [Thu, 25 Sep 2014 15:40:07 +0000 (16:40 +0100)]
Make the script bash because it uses PIPESTATUS.

Change-Id: Idc85935e0d9eebc96faed5112b5a0af8cf53192c

9 years agoMerge "Make suspend checks note have side effects."
Nicolas Geoffray [Thu, 25 Sep 2014 15:37:26 +0000 (15:37 +0000)]
Merge "Make suspend checks note have side effects."

9 years agoMake suspend checks note have side effects.
Nicolas Geoffray [Thu, 25 Sep 2014 15:33:42 +0000 (16:33 +0100)]
Make suspend checks note have side effects.

Also adjust gtests.

Change-Id: I5e1a3e53115812b45ec7f4b6f50ba468fa7ac6b1

9 years agoMerge "Optimize suspend checks in optimizing compiler."
Nicolas Geoffray [Thu, 25 Sep 2014 13:37:06 +0000 (13:37 +0000)]
Merge "Optimize suspend checks in optimizing compiler."

9 years agoMerge "Optimizing compiler: remove unnecessary `explicit' keywords."
Roland Levillain [Thu, 25 Sep 2014 13:28:27 +0000 (13:28 +0000)]
Merge "Optimizing compiler: remove unnecessary `explicit' keywords."

9 years agoMerge "Optimizing compiler: check inputs & uses definitions in CFG."
Roland Levillain [Thu, 25 Sep 2014 12:41:09 +0000 (12:41 +0000)]
Merge "Optimizing compiler: check inputs & uses definitions in CFG."

9 years agoOptimizing compiler: remove unnecessary `explicit' keywords.
Roland Levillain [Thu, 25 Sep 2014 11:15:20 +0000 (12:15 +0100)]
Optimizing compiler: remove unnecessary `explicit' keywords.

Change-Id: I5927fd92d53308c81e14edbd6e7d1c943bfa085b

9 years agoOptimize suspend checks in optimizing compiler.
Nicolas Geoffray [Wed, 24 Sep 2014 17:10:46 +0000 (18:10 +0100)]
Optimize suspend checks in optimizing compiler.

- Remove the ones added during graph build (they were added
  for the baseline code generator).
- Emit them at loop back edges after phi moves, so that the test
  can directly jump to the loop header.
- Fix x86 and x86_64 suspend check by using cmpw instead of cmpl.

Change-Id: I6fad5795a55705d86c9e1cb85bf5d63dadfafa2a

9 years agoMerge "Deprecate GrowableArray, use ArenaVector instead."
Vladimir Marko [Thu, 25 Sep 2014 11:23:21 +0000 (11:23 +0000)]
Merge "Deprecate GrowableArray, use ArenaVector instead."

9 years agoOptimizing compiler: check inputs & uses definitions in CFG.
Roland Levillain [Thu, 25 Sep 2014 09:10:38 +0000 (10:10 +0100)]
Optimizing compiler: check inputs & uses definitions in CFG.

Ensure each input and each use of an instruction is defined
in a block of the control-flow graph.

Change-Id: If4a83b02825230329b0b4fd84255dcb7c3219684

9 years agoMerge "ART: Reject branch/switch/throw to move-result."
Ian Rogers [Thu, 25 Sep 2014 01:55:35 +0000 (01:55 +0000)]
Merge "ART: Reject branch/switch/throw to move-result."

9 years agoMerge "Fix "const-class v0, I" for libartd.so"
Ian Rogers [Thu, 25 Sep 2014 01:20:05 +0000 (01:20 +0000)]
Merge "Fix "const-class v0, I" for libartd.so"

9 years agoMerge "ART: Update for split native bridge initialization"
Andreas Gampe [Wed, 24 Sep 2014 22:00:11 +0000 (22:00 +0000)]
Merge "ART: Update for split native bridge initialization"

9 years agoART: Reject branch/switch/throw to move-result.
Stephen Kyle [Mon, 22 Sep 2014 12:53:15 +0000 (13:53 +0100)]
ART: Reject branch/switch/throw to move-result.

move-result* instructions must occur after invoke instructions,
however it was still possible to branch or switch to a move-result*
instruction with creative DEX manipulation. The verifier now rejects
this situation, as well as having a move-result* instruction as the
first instruction in a try block's handler. This now ensures that
move-result* must happen dynamically after an invoke, not just
statically.

Change-Id: Ida97852f4051310fdaf38bed1d6e1c5a541c85c5
Signed-off-by: Stephen Kyle <stephen.kyle@arm.com>
9 years agoMerge "Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded"
Brian Carlstrom [Wed, 24 Sep 2014 16:35:50 +0000 (16:35 +0000)]
Merge "Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded"

9 years agoRestore kReasonLogging for kDexoptNeeded and kPatchoatNeeded
Brian Carlstrom [Tue, 23 Sep 2014 20:53:28 +0000 (13:53 -0700)]
Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded

Bug: 17565501

(cherry picked from commit 63582f211b7123d02f18dfa7075f6758ccb2b07c)

Change-Id: Ie1196191d92286e543ed099c7d1ea4712802912d

9 years agoFix "const-class v0, I" for libartd.so
Logan Chien [Tue, 23 Sep 2014 15:01:47 +0000 (23:01 +0800)]
Fix "const-class v0, I" for libartd.so

This CL fixes the verification of "const-class v0, I"
by adding HasClassVirtual() to PrimitiveType.

Without this CL, the DCHECK for HasClass() in RegType::GetClass()
will raise an assertion failure, since the verifier is trying to get
the class object for the dex cache.

This issue can be reproduced by running the CTS
dot.junit.opcodes.const_class.Main_testN2 with libartd.so.

Change-Id: I605a3fcf7dd9d63e1f739fbb3153d0367911bb3e

9 years agoMerge "ART: Refactor elf_writer_quick for elf section order"
Andreas Gampe [Wed, 24 Sep 2014 07:34:13 +0000 (07:34 +0000)]
Merge "ART: Refactor elf_writer_quick for elf section order"

9 years agoART: Refactor elf_writer_quick for elf section order
Andreas Gampe [Wed, 24 Sep 2014 05:58:07 +0000 (22:58 -0700)]
ART: Refactor elf_writer_quick for elf section order

This writes ELF sections in approximate order (debug sections are
currently out-of-order) to avoid incompletely written files
appearing OK to ART loading code.

Bug: 17622827

(cherry picked from commit 3c5ec99e156632a734c2359642ae928102850597)

Change-Id: I812fd42fcf2823dbfaf5891bf101d3b59406f263

9 years agoMerge "dex2oat should truncate files opened from file descriptors"
Brian Carlstrom [Wed, 24 Sep 2014 07:17:45 +0000 (07:17 +0000)]
Merge "dex2oat should truncate files opened from file descriptors"

9 years agodex2oat should truncate files opened from file descriptors
Brian Carlstrom [Wed, 24 Sep 2014 04:13:28 +0000 (21:13 -0700)]
dex2oat should truncate files opened from file descriptors

Bug: 17622827

(cherry picked from commit aa93129ca54cc897fdc2c8ddd0a7136f7b5632ed)

Change-Id: I5467d488b4a57f7be35c72c16775df5bd5d69a52

9 years agoART: Update for split native bridge initialization
jgu21 [Wed, 10 Sep 2014 10:57:17 +0000 (06:57 -0400)]
ART: Update for split native bridge initialization

Change-Id: I0b93da93251c6b4638de786bf98cf99df07c3fc2

9 years agoMerge "Optimizing compiler: ensure loop header dominates loop's blocks."
Roland Levillain [Tue, 23 Sep 2014 17:13:54 +0000 (17:13 +0000)]
Merge "Optimizing compiler: ensure loop header dominates loop's blocks."

9 years agoMerge "Enable computed goto interpreter on the host"
Sebastien Hertz [Tue, 23 Sep 2014 14:27:33 +0000 (14:27 +0000)]
Merge "Enable computed goto interpreter on the host"

9 years agoDeprecate GrowableArray, use ArenaVector instead.
Vladimir Marko [Mon, 22 Sep 2014 13:50:02 +0000 (14:50 +0100)]
Deprecate GrowableArray, use ArenaVector instead.

Purge GrowableArray from Quick and Portable.
Remove GrowableArray<T>::Iterator.

Change-Id: I92157d3a6ea5975f295662809585b2dc15caa1c6

9 years agoMerge "Support for saving and restoring live registers in a slow path."
Nicolas Geoffray [Tue, 23 Sep 2014 13:36:28 +0000 (13:36 +0000)]
Merge "Support for saving and restoring live registers in a slow path."

9 years agoSupport for saving and restoring live registers in a slow path.
Nicolas Geoffray [Fri, 19 Sep 2014 10:01:00 +0000 (11:01 +0100)]
Support for saving and restoring live registers in a slow path.

And use it in suspend check slow paths.

Change-Id: I79caf28f334c145a36180c79a6e2fceae3990c31

9 years agoEnable computed goto interpreter on the host
Sebastien Hertz [Thu, 28 Aug 2014 16:25:09 +0000 (18:25 +0200)]
Enable computed goto interpreter on the host

We disabled the computed goto interpreter when compiling with clang because of
compilation issues. Since we compile with clang on the host, we used the
switch-based interpreter.

Now clang is able to compile the computed goto interpreter, we can use it by
default on the host.

Change-Id: Ifa2a2d3c171b1116ecd3b3f213382c3c85e93f66

9 years agoMerge "Fix code generation with materialized conditions."
Nicolas Geoffray [Tue, 23 Sep 2014 11:25:56 +0000 (11:25 +0000)]
Merge "Fix code generation with materialized conditions."

9 years agoFix code generation with materialized conditions.
Nicolas Geoffray [Mon, 22 Sep 2014 14:51:11 +0000 (15:51 +0100)]
Fix code generation with materialized conditions.

Change-Id: I8630af3c13fc1950d3fa718d7488407b00898796

9 years agoOptimizing compiler: ensure loop header dominates loop's blocks.
Roland Levillain [Tue, 23 Sep 2014 09:50:22 +0000 (10:50 +0100)]
Optimizing compiler: ensure loop header dominates loop's blocks.

Change-Id: I6b2f1fdaac9f91dc5d9901cc2ad4c83745e90e70

9 years agoMerge "Add loop- and phi-related checks in the optimizing compiler."
Roland Levillain [Tue, 23 Sep 2014 09:02:32 +0000 (09:02 +0000)]
Merge "Add loop- and phi-related checks in the optimizing compiler."

9 years agoMerge "Add ScopedAssertNoThreadSuspension"
Mathieu Chartier [Mon, 22 Sep 2014 21:40:06 +0000 (21:40 +0000)]
Merge "Add ScopedAssertNoThreadSuspension"

9 years agoAdd loop- and phi-related checks in the optimizing compiler.
Roland Levillain [Mon, 22 Sep 2014 16:13:44 +0000 (17:13 +0100)]
Add loop- and phi-related checks in the optimizing compiler.

- Ensure the pre-header block is first in the list of
  predecessors of a loop header.
- Ensure the loop header has only two predecessors and that
  only the second one is the back edge.
- Ensure there is only one back edge per loop.
- Ensure the first input of a phi is not itself.
- Ensure the number of phi inputs is the same as the number
  of its predecessors.
- Ensure phi input at index I either comes from the Ith
  predecessor or from a block that dominates this
  predecessor.

Change-Id: I4db5c68cfbc9b74d2d03125753d0143ece625378

9 years agoMerge "Also remove environment links to removed instructions."
Nicolas Geoffray [Mon, 22 Sep 2014 14:22:08 +0000 (14:22 +0000)]
Merge "Also remove environment links to removed instructions."

9 years agoAlso remove environment links to removed instructions.
Nicolas Geoffray [Mon, 22 Sep 2014 11:27:27 +0000 (12:27 +0100)]
Also remove environment links to removed instructions.

Change-Id: I505163fb8683269c7d3fe21b34df92337d244552

9 years agoMerge "Fix a bug in the handling of moves in register allocator."
Nicolas Geoffray [Mon, 22 Sep 2014 10:56:06 +0000 (10:56 +0000)]
Merge "Fix a bug in the handling of moves in register allocator."

9 years agoFix a bug in the handling of moves in register allocator.
Nicolas Geoffray [Mon, 22 Sep 2014 10:51:51 +0000 (11:51 +0100)]
Fix a bug in the handling of moves in register allocator.

Change-Id: Iaf1f34b0bece4f252290a97c3b73cc06e365985a

9 years agoMerge "Optimize JDWP stack local values access"
Sebastien Hertz [Mon, 22 Sep 2014 10:30:36 +0000 (10:30 +0000)]
Merge "Optimize JDWP stack local values access"

9 years agoElimination of redundant instructuion
Anton Shamin [Mon, 22 Sep 2014 09:43:51 +0000 (16:43 +0700)]
Elimination of redundant instructuion

Elimination of storing offset in phys register (while it's already
stored in ECX by default) from two address shift operation.

Change-Id: Iaf9abde65f505ab855f73f9da7bd13fa46c64fbb
Signed-off-by: Anton Shamin <anton.shamin@intel.com>
9 years agoOptimize JDWP stack local values access
Sebastien Hertz [Mon, 1 Sep 2014 15:07:11 +0000 (17:07 +0200)]
Optimize JDWP stack local values access

The StackFrame.GetValues and StackFrame.SetValues JDWP commands can refer to
multiple variables at the same time in a given frame. However we used to walk
the stack until getting to the requested frame for each variable.

Now, we walk the stack only once until getting to the frame so the context is
initialized. Then we read/write value for each variable from this context.

Bug: 17343501
Bug: 15680615

Change-Id: I2a4128f29a3c5856b994e280037c0a09eb48c5c8

9 years agoMerge "Do not hold breakpoint lock when running the verifier"
Sebastien Hertz [Mon, 22 Sep 2014 09:10:17 +0000 (09:10 +0000)]
Merge "Do not hold breakpoint lock when running the verifier"

9 years agoMerge "Add adb root to test-art-target, required by adb remount."
Nicolas Geoffray [Mon, 22 Sep 2014 08:31:34 +0000 (08:31 +0000)]
Merge "Add adb root to test-art-target, required by adb remount."

9 years agoMerge "Fix JDWP crash when reporting exception"
Sebastien Hertz [Mon, 22 Sep 2014 08:15:52 +0000 (08:15 +0000)]
Merge "Fix JDWP crash when reporting exception"

9 years agoFix JDWP crash when reporting exception
Sebastien Hertz [Fri, 19 Sep 2014 10:07:51 +0000 (12:07 +0200)]
Fix JDWP crash when reporting exception

The exception's throw location may be null so we need to handle that
case. Also fixes a memset issue.

Bug: 17571297
(cherry picked from commit bbb63897d7f2d99219cb50721fe530521e08ddff)

Change-Id: Iedebb58f9460c5f04913c269200e51161bda1ba9

9 years agoDo not hold breakpoint lock when running the verifier
Sebastien Hertz [Thu, 18 Sep 2014 14:03:34 +0000 (16:03 +0200)]
Do not hold breakpoint lock when running the verifier

When setting a breakpoint, we need to know whether the method may be
inlined. We run the method verifier but that may cause thread
suspension. Therefore we must not hold any lock at this time. The
issue is we do hold the breakpoint lock so we fails a check in debug
mode.

This CL ensures we don't hold the breakpoint lock when running the
method verifier to detect inlining.

Bug: 17562442
Change-Id: Ia6b128fc8917ce00025b68ae4ac62fb2a1f154e6

9 years agoMerge "Dump kernel/native stacks of pure native threads."
Christopher Ferris [Sun, 21 Sep 2014 23:19:37 +0000 (23:19 +0000)]
Merge "Dump kernel/native stacks of pure native threads."

9 years agoDump kernel/native stacks of pure native threads.
Christopher Ferris [Sat, 20 Sep 2014 00:23:59 +0000 (17:23 -0700)]
Dump kernel/native stacks of pure native threads.

Bug: 16463406

(cherry picked from commit 7da37cca5a5f71a0cd2442b2a119f76fa62e84b5)

Change-Id: I22a26d4ec4e3048ddcfd668eee4fccd8b2b3b727