OSDN Git Service

android-x86/art.git
9 years agoFix sigchainlib's implementation of sigaction
Dmitriy Ivanov [Tue, 6 Jan 2015 22:55:26 +0000 (14:55 -0800)]
Fix sigchainlib's implementation of sigaction

  Correctly handles the case when old_action == new_action

Bug: 18740478
Change-Id: I97092318439e4f6f0a2513d4336496c72f8c5599
(cherry picked from commit 797a29b334f2d311135602bf5204ae8b890f4a14)

9 years agoMerge "Fix frequent gcstress ThreadStress crash"
Mathieu Chartier [Tue, 6 Jan 2015 22:31:47 +0000 (22:31 +0000)]
Merge "Fix frequent gcstress ThreadStress crash"

9 years agoFix frequent gcstress ThreadStress crash
Mathieu Chartier [Tue, 6 Jan 2015 22:17:57 +0000 (14:17 -0800)]
Fix frequent gcstress ThreadStress crash

Calling IdentityHashCode before PrettyTypeOf was causing occasional
stale root errors since IdentityHashCode can cause thread suspension.

Cleaned up VisitLocks.

Bug: 18766916
Change-Id: I7679539877e48a8c9aadb8a34718404ebce98d25

9 years agoMerge "ART: Fix leak in codegen_test"
Andreas Gampe [Tue, 6 Jan 2015 22:20:39 +0000 (22:20 +0000)]
Merge "ART: Fix leak in codegen_test"

9 years agoMerge "Don't allow suspension from FindLocksAtDexPc"
Mathieu Chartier [Tue, 6 Jan 2015 22:16:05 +0000 (22:16 +0000)]
Merge "Don't allow suspension from FindLocksAtDexPc"

9 years agoART: Fix leak in codegen_test
Andreas Gampe [Tue, 6 Jan 2015 22:13:52 +0000 (14:13 -0800)]
ART: Fix leak in codegen_test

Make sure the InstructionSetFeatures isn't leaked.

Change-Id: Ide25773500c1513ecb204a380bb0a95513ff7276

9 years agoDon't allow suspension from FindLocksAtDexPc
Mathieu Chartier [Sat, 20 Dec 2014 02:41:47 +0000 (18:41 -0800)]
Don't allow suspension from FindLocksAtDexPc

Transitioning to suspended from runnable sometimes runs dump
checkpoints in ThreadStress which can cause deadlocks. This happens
since FindLocksAtDexPC runs the verifier which calls
AllowThreadSuspension. This results in a blocked thread which holds
the monitor lock, and if another thread tries to do a monitor enter,
it deadlocks while holding the mutator lock (assuming the GC is
suspending all).

The fix for avoiding this deadlock is not calling
AllowThreadSuspension from FindLocksAtDexPc.

Bug: 18576985
Change-Id: I7e5faaf3bbbd5b5f680de95d53c33b5106705b0c

9 years agoMerge "Mute common case DexFile.isDexOptNeeded log spam"
Brian Carlstrom [Tue, 6 Jan 2015 20:33:52 +0000 (20:33 +0000)]
Merge "Mute common case DexFile.isDexOptNeeded log spam"

9 years agoMute common case DexFile.isDexOptNeeded log spam
Brian Carlstrom [Tue, 6 Jan 2015 20:05:34 +0000 (12:05 -0800)]
Mute common case DexFile.isDexOptNeeded log spam

Bug: 18914409
Change-Id: I885f1aa87c48ff25353d44b720c7cff24ed01e45

9 years agoMerge "ART: Remove LowestSetBit and IsPowerOfTwo"
Andreas Gampe [Tue, 6 Jan 2015 16:54:43 +0000 (16:54 +0000)]
Merge "ART: Remove LowestSetBit and IsPowerOfTwo"

9 years agoMerge "ART: Remove unused parts of x86 assemblers"
Andreas Gampe [Tue, 6 Jan 2015 16:54:15 +0000 (16:54 +0000)]
Merge "ART: Remove unused parts of x86 assemblers"

9 years agoMerge "ART: Fix divide-by-zero for ARM"
Andreas Gampe [Tue, 6 Jan 2015 16:53:10 +0000 (16:53 +0000)]
Merge "ART: Fix divide-by-zero for ARM"

9 years agoART: Fix divide-by-zero for ARM
Andreas Gampe [Tue, 6 Jan 2015 03:30:59 +0000 (19:30 -0800)]
ART: Fix divide-by-zero for ARM

There was an infinite loop in the code generation for a divide
by literal zero.

Bug: 18887754
Change-Id: Ibd481918d3c6d7bc62fdd1a6807042009f561d95

9 years agoART: Remove LowestSetBit and IsPowerOfTwo
Andreas Gampe [Tue, 6 Jan 2015 16:28:12 +0000 (08:28 -0800)]
ART: Remove LowestSetBit and IsPowerOfTwo

Remove those functions from Mir2Lir and replace with functionality
from utils.h.

Change-Id: Ieb67092b22d5d460b5241c7c7931c15b9faf2815

9 years agoART: Remove unused parts of x86 assemblers
Andreas Gampe [Tue, 6 Jan 2015 15:47:10 +0000 (07:47 -0800)]
ART: Remove unused parts of x86 assemblers

These functions are neither used nor functional.

Change-Id: Ib6d0761388a45662ad9448ceb2c539c6f0b77f23

9 years agoMerge "Improve Thumb disassembler for LDR/STR/PUSH/POP/BKPT."
Vladimir Marko [Tue, 6 Jan 2015 12:27:54 +0000 (12:27 +0000)]
Merge "Improve Thumb disassembler for LDR/STR/PUSH/POP/BKPT."

9 years agoMerge "Look at instruction set features when generating volatiles code"
Calin Juravle [Tue, 6 Jan 2015 12:10:48 +0000 (12:10 +0000)]
Merge "Look at instruction set features when generating volatiles code"

9 years agoImprove Thumb disassembler for LDR/STR/PUSH/POP/BKPT.
Vladimir Marko [Mon, 5 Jan 2015 15:17:01 +0000 (15:17 +0000)]
Improve Thumb disassembler for LDR/STR/PUSH/POP/BKPT.

Disassemble 16-bit Thumb PUSH, POP, BKPT.

Clean up 32-bit load/store to handle all cases (including
previously unrecognized indexed load/store) in one place;
this also fixes LDRSH erroneously disassembled as LDRSB.

Recognize more UNDEFINED instructions and other minor
cleanup.

Change-Id: Ifdd177745b70e3f774cc0469deb81191b035f51b

9 years agoMerge "ART: Add imgdiag_test test dependency"
Andreas Gampe [Tue, 6 Jan 2015 00:30:53 +0000 (00:30 +0000)]
Merge "ART: Add imgdiag_test test dependency"

9 years agoMerge "ART: Reorder entrypoint argument order"
Andreas Gampe [Mon, 5 Jan 2015 19:26:08 +0000 (19:26 +0000)]
Merge "ART: Reorder entrypoint argument order"

9 years agoMerge "Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile."
Calin Juravle [Mon, 5 Jan 2015 18:30:49 +0000 (18:30 +0000)]
Merge "Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile."

9 years agoOpt Compiler: ARM64: Add support for rem-float, rem-double and volatile.
Serban Constantinescu [Mon, 5 Jan 2015 16:08:49 +0000 (16:08 +0000)]
Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile.

Add support for rem-float, rem-double and volatile memory accesses
using acquire-release and memory barriers.

Change-Id: I96a24dff66002c3b772c3d8e6ed792e3cb59048a
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
9 years agoLook at instruction set features when generating volatiles code
Calin Juravle [Fri, 19 Dec 2014 17:22:29 +0000 (17:22 +0000)]
Look at instruction set features when generating volatiles code

Change-Id: Ia882405719fdd60b63e4102af7e085f7cbe0bb2a

9 years agoMerge "Fix braino in x64 assembler."
Nicolas Geoffray [Mon, 5 Jan 2015 09:16:00 +0000 (09:16 +0000)]
Merge "Fix braino in x64 assembler."

9 years agoMerge "ART: Cut filename for DumpCFG"
Andreas Gampe [Fri, 2 Jan 2015 20:07:10 +0000 (20:07 +0000)]
Merge "ART: Cut filename for DumpCFG"

9 years agoMerge "ART: Ensure FP GET/PUT doesn't use Core register"
Bill Buzbee [Fri, 2 Jan 2015 19:21:24 +0000 (19:21 +0000)]
Merge "ART: Ensure FP GET/PUT doesn't use Core register"

9 years agoMerge "Implement LogLineLowStack() properly."
Vladimir Marko [Fri, 2 Jan 2015 16:22:06 +0000 (16:22 +0000)]
Merge "Implement LogLineLowStack() properly."

9 years agoImplement LogLineLowStack() properly.
Vladimir Marko [Fri, 2 Jan 2015 14:23:26 +0000 (14:23 +0000)]
Implement LogLineLowStack() properly.

Avoid stack-based buffers used by the log formatting in
__android_log_print().

Move the VLOG(threads) in Thread::InitStackHwm() after the
low stack check as it's not safe to actually log before
that; even the StringPrintf() is using a stack-based buffer.

Bug: 18830897
Change-Id: I13b2166438e871c52ab91dabfe98f2200fd7c1cf

9 years agoMerge "ART: New types of Checker assertions"
David Brazdil [Wed, 31 Dec 2014 16:16:29 +0000 (16:16 +0000)]
Merge "ART: New types of Checker assertions"

9 years agoART: New types of Checker assertions
David Brazdil [Fri, 19 Dec 2014 11:17:21 +0000 (11:17 +0000)]
ART: New types of Checker assertions

Checker now supports positive out-of-order assertions (CHECK-DAG),
which are useful for matching dependency graphs, and negative
assertions (CHECK-NOT) to test element removal.

ConstantFolding tests are rewritten using -DAG checks and Inliner
tests are added.

Change-Id: I5afb665f532b24683624b6d21ef4377cb441d731

9 years agoMerge "ART: Refactored VisualizerPrinter visitor pattern"
David Brazdil [Tue, 30 Dec 2014 10:36:02 +0000 (10:36 +0000)]
Merge "ART: Refactored VisualizerPrinter visitor pattern"

9 years agoART: Reorder entrypoint argument order
Andreas Gampe [Thu, 18 Dec 2014 02:43:01 +0000 (18:43 -0800)]
ART: Reorder entrypoint argument order

Shuffle the ArtMethod* referrer backwards for easier removal.

Clean up ARM & MIPS assembly code.

Change some macros to make future changes easier.

Change-Id: Ie2862b68bd6e519438e83eecd9e1611df51d7945

9 years agoMerge "Update oat version to 053."
Andreas Gampe [Mon, 29 Dec 2014 16:04:04 +0000 (16:04 +0000)]
Merge "Update oat version to 053."

9 years agoART: Refactored VisualizerPrinter visitor pattern
David Brazdil [Mon, 29 Dec 2014 15:35:02 +0000 (15:35 +0000)]
ART: Refactored VisualizerPrinter visitor pattern

This patch refactors the visitor pattern in HGraphVisualizerPrinter
to output instruction-specific details.

Change-Id: Icfed9cd844b973025337a6bb584e1bc88f1ddd58

9 years agoUpdate oat version to 053.
Chenfu Bao [Mon, 29 Dec 2014 08:10:45 +0000 (16:10 +0800)]
Update oat version to 053.

Oat version in class OatHeader had increased to 052,
but commit 2bcb3b228bc418bcc7fdc3d58d0a0da422a0b6d5
(changeID I8cef1c6cc9cb2faa052167a3437e81b4c2cbefa7)
changed it back to 045.

Change-Id: I5bf7b995c9d99a536f6356d9fd5b5e746a933f2e
Signed-off-by: Chenfu Bao <emailwrong@gmail.com>
9 years agoART: Add imgdiag_test test dependency
Andreas Gampe [Sat, 20 Dec 2014 07:12:25 +0000 (23:12 -0800)]
ART: Add imgdiag_test test dependency

The test depends on the binaries. Make sure they are done before we
run the test.

Change-Id: I76e6458b725ba99746772223b2fe961080d1662b

9 years agoART: Cut filename for DumpCFG
Andreas Gampe [Fri, 19 Dec 2014 23:30:11 +0000 (15:30 -0800)]
ART: Cut filename for DumpCFG

If the name/path is too long, we'd silently fail dumping. Cut the
name when it's too long, and write an error message if we still
fail opening.

Change-Id: Id439a3367a8fdb50027959dd8c183913d074e669

9 years agoMerge "ART: Fix verification of constructors."
Andreas Gampe [Mon, 22 Dec 2014 21:47:15 +0000 (21:47 +0000)]
Merge "ART: Fix verification of constructors."

9 years agoMerge "ART: Fix common_compiler_test assumptions"
Andreas Gampe [Mon, 22 Dec 2014 21:45:47 +0000 (21:45 +0000)]
Merge "ART: Fix common_compiler_test assumptions"

9 years agoART: Fix common_compiler_test assumptions
Andreas Gampe [Mon, 22 Dec 2014 21:43:33 +0000 (13:43 -0800)]
ART: Fix common_compiler_test assumptions

JNI-compiled methods now do not have mapping tables or GC maps,
not even zero-sized. Update the code in common_compiler_test.

Bug: 18596910
Change-Id: If22bf1b2e369273148f060b0b1ffc02b2b1ef608

9 years agoART: Fix verification of constructors.
Stephen Kyle [Wed, 17 Dec 2014 17:10:02 +0000 (17:10 +0000)]
ART: Fix verification of constructors.

Summary:

A constructor must call its superclass constructor. However, if one
replaces the invoke-direct superclass.<init>() instruction with a
variety of instructions, the verifier would NOT complain that the
superclass constructor hadn't been called.

Detailed explanation:

This was because if we are verifying the return-void insn of a
constructor, then we check that the register line doesn't contain a
register with an UninitializedThis type. With a method like follows:

Class.<init>()V:
  return-void

Then we hit the return-void, see the UninitializedThis, and fail the
method. However, with a method like follows:

Class.<init>()V:
  nop
  return-void

Any insn that continues or branches onto a return-void instruction will
mark all of the registers as Conflict. This meant that the check in
return-void for an UninitializedThis residing the register line would
_always_ pass if there were any insns before it - the entire line had
been set to Conflict.

The fix is to bring the check for an UninitializedThis forward to the
point just before we set all registers to Conflict, if we're about to
hit a return-void insn in a constructor. It still needs to be done
again in the verification of return-void itself, to avoid the solo
return-void case.

This patch also deals with the case where the only remaining
UninitializedThis reference is overwritten, to avoid a method like the
following from getting through verification:

Class.<init>()V:
  const/4 v0, 0
  return-void

Bug: 18800943

Change-Id: I2e317261844d3b6c78e35228669f3da173316570
Fuzzed-With: https://android-review.googlesource.com/#/c/119463/

9 years agoMerge "ART: Mac build fix"
Andreas Gampe [Mon, 22 Dec 2014 21:07:46 +0000 (21:07 +0000)]
Merge "ART: Mac build fix"

9 years agoART: Mac build fix
Andreas Gampe [Mon, 22 Dec 2014 21:06:44 +0000 (13:06 -0800)]
ART: Mac build fix

Unused parameter on Mac.

Bug: 18596910
Change-Id: If0fab0b58173997d584fcdce195361d792f1098d

9 years agoMerge "ART: Do not compile swap file functionality on Mac"
Andreas Gampe [Mon, 22 Dec 2014 19:33:15 +0000 (19:33 +0000)]
Merge "ART: Do not compile swap file functionality on Mac"

9 years agoART: Do not compile swap file functionality on Mac
Andreas Gampe [Fri, 19 Dec 2014 20:04:06 +0000 (12:04 -0800)]
ART: Do not compile swap file functionality on Mac

Bug: 18596910

(cherry picked from commit 8a9f0049821803051201edebc6d9a0f0639756c3)

Change-Id: Ic06429f41840ce318cfaa837efecc69c2076440e

9 years agoMerge "ART: Swap-space in the compiler"
Andreas Gampe [Mon, 22 Dec 2014 18:30:07 +0000 (18:30 +0000)]
Merge "ART: Swap-space in the compiler"

9 years agoART: Swap-space in the compiler
Andreas Gampe [Tue, 9 Dec 2014 00:59:43 +0000 (16:59 -0800)]
ART: Swap-space in the compiler

Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.

Bug: 18596910

(cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9)

Change-Id: I131448f3907115054a592af73db86d2b9257ea33

9 years agoMerge "ART: Do not JNI abort on nullptr GetObjectRefType"
Andreas Gampe [Mon, 22 Dec 2014 17:43:36 +0000 (17:43 +0000)]
Merge "ART: Do not JNI abort on nullptr GetObjectRefType"

9 years agoART: Do not JNI abort on nullptr GetObjectRefType
Andreas Gampe [Sat, 20 Dec 2014 08:08:35 +0000 (00:08 -0800)]
ART: Do not JNI abort on nullptr GetObjectRefType

A nullptr is a valid input, as it is different from a null reference.

Bug: 18820997
Change-Id: Ibda8907ba13b20d2055049492a356ffdf4ddc714

9 years agoMerge "ART: Use interpret-only for vmSafeMode"
Andreas Gampe [Sat, 20 Dec 2014 07:25:59 +0000 (07:25 +0000)]
Merge "ART: Use interpret-only for vmSafeMode"

9 years agoART: Use interpret-only for vmSafeMode
Andreas Gampe [Fri, 19 Dec 2014 17:53:27 +0000 (09:53 -0800)]
ART: Use interpret-only for vmSafeMode

Set the compiler filter when the zygote tells us that the app is
in vmSafeMode. This ensures that secondary dex files will also be
compiled interpret-only.

Bug: 18812762

(cherry picked from commit 44893692bfb25ceb5c7c5b2e5c606948fbdea298)

Change-Id: Idb61870beebe2eeb5b11554f95ea6a725c77f16a

9 years agoMerge "Add heap task processor"
Mathieu Chartier [Sat, 20 Dec 2014 02:01:01 +0000 (02:01 +0000)]
Merge "Add heap task processor"

9 years agoAdd heap task processor
Mathieu Chartier [Thu, 18 Dec 2014 01:56:03 +0000 (17:56 -0800)]
Add heap task processor

The heap task processor processes async tasks which may be delayed.
The motivation for this change is preventing deadlocks which
can occur when the daemon threads get suspended by GetThreadStack.

Other improvements, reduces daemon thread count by one.
Cleaner pending transition VS heap trimming logic.

Bug: 18739541

Change-Id: Idab52b2d9661a6385cada74b93ff297ddc55fc78

9 years agoMerge "Fix running out of temps when storing invoke-interface result."
Vladimir Marko [Fri, 19 Dec 2014 22:54:57 +0000 (22:54 +0000)]
Merge "Fix running out of temps when storing invoke-interface result."

9 years agoFix running out of temps when storing invoke-interface result.
Vladimir Marko [Fri, 19 Dec 2014 19:27:26 +0000 (19:27 +0000)]
Fix running out of temps when storing invoke-interface result.

On ARM, after emitting invoke-interface we didn't have any
free temps to use for storing the result, so we would crash
if the result was an unpromoted dalvik register with stack
location too far from SP.

Bug: 18769895

(cherry picked from commit d6bd06c713e8ec69de96510ef57bdf7adb4781ed)

Change-Id: Id88f6f3788eaf6ecbc7bd68880b445423f6e4f94

9 years agoMerge "Pass the real capacity to CreateRosAlloc."
Hiroshi Yamauchi [Fri, 19 Dec 2014 20:16:12 +0000 (20:16 +0000)]
Merge "Pass the real capacity to CreateRosAlloc."

9 years agoMerge "Move two members out of MIRGraph::temp_::ssa."
Vladimir Marko [Fri, 19 Dec 2014 18:17:26 +0000 (18:17 +0000)]
Merge "Move two members out of MIRGraph::temp_::ssa."

9 years agoMove two members out of MIRGraph::temp_::ssa.
Vladimir Marko [Fri, 19 Dec 2014 18:11:35 +0000 (18:11 +0000)]
Move two members out of MIRGraph::temp_::ssa.

It turns out they are used outside the SSA transformation
by the x86 back-end.

This is a partial revert of
  https://android-review.googlesource.com/120571

Change-Id: Ia5cb2988ab0625d8519901124bd4fc184d5f0886

9 years agoMerge "ART: Implement FP packed reduce for x86"
Bill Buzbee [Fri, 19 Dec 2014 17:59:51 +0000 (17:59 +0000)]
Merge "ART: Implement FP packed reduce for x86"

9 years agoMerge "Clean up dead loops before suspend check elimination."
Vladimir Marko [Fri, 19 Dec 2014 16:21:08 +0000 (16:21 +0000)]
Merge "Clean up dead loops before suspend check elimination."

9 years agoMerge "Clean up post-opt passes, perform only those we need."
Vladimir Marko [Fri, 19 Dec 2014 15:34:09 +0000 (15:34 +0000)]
Merge "Clean up post-opt passes, perform only those we need."

9 years agoClean up dead loops before suspend check elimination.
Vladimir Marko [Fri, 19 Dec 2014 10:29:51 +0000 (10:29 +0000)]
Clean up dead loops before suspend check elimination.

Get rid of BasicBlock::KillUnreachable() and just Kill()
unreachable blocks from the DFS order calculation.

Bug: 18718277
Change-Id: Icaf7b9c2320530e950f87e1e2e2bd1fa5f53cb98

9 years agoMerge "Clean up MIRGraph::CanThrow()."
Vladimir Marko [Fri, 19 Dec 2014 14:32:07 +0000 (14:32 +0000)]
Merge "Clean up MIRGraph::CanThrow()."

9 years agoClean up MIRGraph::CanThrow().
Vladimir Marko [Thu, 18 Dec 2014 17:01:02 +0000 (17:01 +0000)]
Clean up MIRGraph::CanThrow().

Merge with the code from CombineBlocks().

Change-Id: I73c71286acba1b6042f85f0bd19c525450ce9c05

9 years agoClean up post-opt passes, perform only those we need.
Vladimir Marko [Thu, 18 Dec 2014 17:05:58 +0000 (17:05 +0000)]
Clean up post-opt passes, perform only those we need.

Change-Id: If802074d780d91151d236ef52236b6f33ca47258

9 years agoMerge "Fixed CanBeMoved for field access"
Calin Juravle [Fri, 19 Dec 2014 10:51:16 +0000 (10:51 +0000)]
Merge "Fixed CanBeMoved for field access"

9 years agoFixed CanBeMoved for field access
Calin Juravle [Fri, 19 Dec 2014 10:50:19 +0000 (10:50 +0000)]
Fixed CanBeMoved for field access

Change-Id: I36a1f4a468f3701e0608d71f64d64049c54aec18

9 years agoMerge "[optimizing compiler] Add support for volatile"
Calin Juravle [Fri, 19 Dec 2014 10:11:25 +0000 (10:11 +0000)]
Merge "[optimizing compiler] Add support for volatile"

9 years ago[optimizing compiler] Add support for volatile
Calin Juravle [Tue, 16 Dec 2014 17:02:57 +0000 (17:02 +0000)]
[optimizing compiler] Add support for volatile

- for backends: arm, x86, x86_64
- added necessary instructions to assemblies
- clean up code gen for field set/get
- fixed InstructionDataEquals for some instructions
- fixed comments in compiler_enums

* 003-opcode test verifies basic volatile functionality

Change-Id: I144393efa312dfb2c332cb84056b00edffee338a

9 years agoPass the real capacity to CreateRosAlloc.
Hiroshi Yamauchi [Fri, 19 Dec 2014 05:19:24 +0000 (21:19 -0800)]
Pass the real capacity to CreateRosAlloc.

Bug: 18808732
Change-Id: Id563eb22e8d571c0ef032628b6ba2f3d357fd002

9 years agoMerge "Only dump suspend all histogram if we have samples"
Mathieu Chartier [Fri, 19 Dec 2014 02:32:37 +0000 (02:32 +0000)]
Merge "Only dump suspend all histogram if we have samples"

9 years agoOnly dump suspend all histogram if we have samples
Mathieu Chartier [Fri, 19 Dec 2014 02:24:39 +0000 (18:24 -0800)]
Only dump suspend all histogram if we have samples

Helps fix gcstress ThreadStress.

Bug: 18576985
Change-Id: Ibebc0fed8a21e7b149f4b6e5154fb86deddcc68f

9 years agoMerge "ART: Fix oatdump"
Andreas Gampe [Fri, 19 Dec 2014 01:43:30 +0000 (01:43 +0000)]
Merge "ART: Fix oatdump"

9 years agoFix braino in x64 assembler.
Nicolas Geoffray [Thu, 18 Dec 2014 20:25:18 +0000 (20:25 +0000)]
Fix braino in x64 assembler.

We need to compare the low bits, not the register directly.

Change-Id: I0a8f3901bacbc6002f904543bac9a2fbd7972305

9 years agoMerge "Fix Thumb2 Emit16BitAddSub() to keep full immediate."
Vladimir Marko [Thu, 18 Dec 2014 20:02:38 +0000 (20:02 +0000)]
Merge "Fix Thumb2 Emit16BitAddSub() to keep full immediate."

9 years agoFix Thumb2 Emit16BitAddSub() to keep full immediate.
Vladimir Marko [Thu, 18 Dec 2014 19:56:49 +0000 (19:56 +0000)]
Fix Thumb2 Emit16BitAddSub() to keep full immediate.

Change-Id: I2d4b44752150669119ead16e99f7d7a945d2e88f

9 years agoMerge "Revert "Don't block quick callee saved registers for optimizing.""
Nicolas Geoffray [Thu, 18 Dec 2014 17:46:12 +0000 (17:46 +0000)]
Merge "Revert "Don't block quick callee saved registers for optimizing.""

9 years agoRevert "Don't block quick callee saved registers for optimizing."
Nicolas Geoffray [Thu, 18 Dec 2014 17:45:56 +0000 (17:45 +0000)]
Revert "Don't block quick callee saved registers for optimizing."

X64 has one libcore test failing, and codegen_test on
arm is failing.

This reverts commit 6004796d6c630696127df2494dcd4f30d1367a34.

Change-Id: I20e00431fa18e11ce4c0cb6fffa91977fa8e9b4f

9 years agoMerge "Fix Thumb2 assembler to emit 16-bit add/sub SP, #imm."
Vladimir Marko [Thu, 18 Dec 2014 15:53:02 +0000 (15:53 +0000)]
Merge "Fix Thumb2 assembler to emit 16-bit add/sub SP, #imm."

9 years agoMerge "Explicitly compile core.oat with the Quick compiler."
Nicolas Geoffray [Thu, 18 Dec 2014 15:50:20 +0000 (15:50 +0000)]
Merge "Explicitly compile core.oat with the Quick compiler."

9 years agoMerge "Don't block quick callee saved registers for optimizing."
Nicolas Geoffray [Thu, 18 Dec 2014 15:49:52 +0000 (15:49 +0000)]
Merge "Don't block quick callee saved registers for optimizing."

9 years agoDon't block quick callee saved registers for optimizing.
Nicolas Geoffray [Mon, 15 Dec 2014 00:01:18 +0000 (00:01 +0000)]
Don't block quick callee saved registers for optimizing.

This change builds on:
https://android-review.googlesource.com/#/c/118983/

- Also fix x86_64 assembler bug triggered by this change.
- Fix (and improve) x86's backend byte register usage.
- Fix a bug in baseline register allocator: a fixed
  out register must prevent inputs from allocating it.

Change-Id: I4883862e29b4e4b6470f1823cf7eab7e7863d8ad

9 years agoFix Thumb2 assembler to emit 16-bit add/sub SP, #imm.
Vladimir Marko [Tue, 16 Dec 2014 17:41:59 +0000 (17:41 +0000)]
Fix Thumb2 assembler to emit 16-bit add/sub SP, #imm.

Also allow 16-bit add rN, SP, #imm.

Change-Id: I50100ad0b0e19a1c855a2319615e86d7a2b66a69

9 years agoMerge "When inlining, also look whether we can allocate registers."
Nicolas Geoffray [Thu, 18 Dec 2014 12:59:03 +0000 (12:59 +0000)]
Merge "When inlining, also look whether we can allocate registers."

9 years agoWhen inlining, also look whether we can allocate registers.
Nicolas Geoffray [Wed, 17 Dec 2014 23:21:58 +0000 (23:21 +0000)]
When inlining, also look whether we can allocate registers.

arm and x86 currently don't allocate registers for floating point
and long operations, so we can't inline methods with these operations.

Change-Id: I11e4b97ddbe90f4978f2abe1081fb0f849acb811

9 years agoMerge "Use correct handle scope offset from StackVisitor"
Sebastien Hertz [Thu, 18 Dec 2014 08:43:14 +0000 (08:43 +0000)]
Merge "Use correct handle scope offset from StackVisitor"

9 years agoUse correct handle scope offset from StackVisitor
Sebastien Hertz [Wed, 17 Dec 2014 19:02:50 +0000 (20:02 +0100)]
Use correct handle scope offset from StackVisitor

Bug: 18785293
Change-Id: I10e144cffac00978e3c84d43a30caccd61559b27

9 years agoMerge "Cleanup JDWP event matching"
Sebastien Hertz [Thu, 18 Dec 2014 08:16:26 +0000 (08:16 +0000)]
Merge "Cleanup JDWP event matching"

9 years agoMerge "Fix a race condition during the rosalloc verification."
Hiroshi Yamauchi [Thu, 18 Dec 2014 05:34:54 +0000 (05:34 +0000)]
Merge "Fix a race condition during the rosalloc verification."

9 years agoART: Fix oatdump
Andreas Gampe [Thu, 18 Dec 2014 04:40:11 +0000 (20:40 -0800)]
ART: Fix oatdump

Refactor and modify cmdline.h to allow oatdump to run without a
Runtime.

Bug: 18789891
Change-Id: I1d7a1585e3672d04e58dbac9a4d4bd835c1c9143

9 years agoMerge "Fix concurrent GC ergonomics"
Mathieu Chartier [Thu, 18 Dec 2014 03:51:42 +0000 (03:51 +0000)]
Merge "Fix concurrent GC ergonomics"

9 years agoFix a race condition during the rosalloc verification.
Hiroshi Yamauchi [Wed, 17 Dec 2014 23:49:56 +0000 (15:49 -0800)]
Fix a race condition during the rosalloc verification.

Since an exiting thread could revoke its thread-local runs without
holding the mutator lock, when rosalloc verification is running at a
pause, the thread could concurrently modify runs and cause a race
condition/verification check failure.

Now an exiting thread acquires the mutator lock when it revokes its
thread-local runs, which should avoid the race condition.

Bug: 18734151
Bug: 18577084
Change-Id: Ic8af558b96dff6fb6f5ace65351e2824a6ff4629

9 years agoMerge "ART: Punt to the interpreter for VerifiedMethod errors"
Andreas Gampe [Thu, 18 Dec 2014 02:57:43 +0000 (02:57 +0000)]
Merge "ART: Punt to the interpreter for VerifiedMethod errors"

9 years agoART: Punt to the interpreter for VerifiedMethod errors
Andreas Gampe [Wed, 17 Dec 2014 22:35:46 +0000 (14:35 -0800)]
ART: Punt to the interpreter for VerifiedMethod errors

In case that the GC map can't be created (because of size restrictions),
do not fail the class. Instead punt to the interpreter.

Bug: 17791183

(cherry picked from commit f535c69f115c61ffadca1bd2706244d0aa30f9aa)

Change-Id: I348bb306dbfc85c235fa93c0c527fba6627551fe

9 years agoFix concurrent GC ergonomics
Mathieu Chartier [Wed, 17 Dec 2014 02:49:31 +0000 (18:49 -0800)]
Fix concurrent GC ergonomics

Fixed a race with the gc_request_pending_ boolean which would cause
two concurrent GCs to start in a row in most cases. This broke sticky
CMS ergonomics since the second GC was a sticky CMS which started way
too early resulting in low throughput. Since the throughput was low,
it switch to partial / full for the next iteration.

The race happened as follows, allocating thread would request
concurrent GC which woke up the daemon thread. The daemon thread
cleared the gc_request_pending_ boolean, but before we set the
concurrent_start_bytes_ to max in to prevent more request, the
allocating thread would call RequestConcurrentGC again. This caused
the next WaitForConcurrentGCRequest to return right away and a
concurrent GC to occur earlier than necessary.

Changed the allocation rate ergonomics to use allocation rate
during the GC instead of allocation rate inbetween GCs, this is
better since the allocation rate may become slower if the GC steals
mutator time, resulting in concurrent GCs starting a bit earlier
than they need to.

Fixed a bug in GrowForUtilization where we didn't use the adjusted
max_free when we shrank down the heap, this caused the sticky CMS to
occasionally shrink the heap more than necessary.

EvaluateAndApplyChanges:
Before: ~12.6s GC time
After: ~7.75s GC time

Change-Id: I354bc825b3c44ccfbfe867af0d437b17fe1fe022

9 years agoMerge "Add thread suspend histogram"
Mathieu Chartier [Thu, 18 Dec 2014 00:17:22 +0000 (00:17 +0000)]
Merge "Add thread suspend histogram"

9 years agoAdd thread suspend histogram
Mathieu Chartier [Wed, 17 Dec 2014 22:56:47 +0000 (14:56 -0800)]
Add thread suspend histogram

Helps measure time to suspend.
Example output (maps after a few seconds):
suspend all histogram:  Sum: 2.806ms 99% C.I. 2us-1090.560us Avg: 43.843us Max: 1126us

Change-Id: I7bd9dd3b401fb3e3059e8718556d60910e541611

9 years agoMerge "Add a new imgdiag tool to diff boot.art/core.art against a process"
Igor Murashkin [Wed, 17 Dec 2014 22:04:19 +0000 (22:04 +0000)]
Merge "Add a new imgdiag tool to diff boot.art/core.art against a process"

9 years agoMerge "Add systrace events to monitors and thread suspension"
Mathieu Chartier [Wed, 17 Dec 2014 19:13:39 +0000 (19:13 +0000)]
Merge "Add systrace events to monitors and thread suspension"

9 years agoAdd systrace events to monitors and thread suspension
Mathieu Chartier [Wed, 17 Dec 2014 18:13:30 +0000 (10:13 -0800)]
Add systrace events to monitors and thread suspension

Added systrace events to SuspendThreadByPeer, SuspendThreadByThreadId
and monitor contention.

Bug: 18379850
Bug: 17470248
Change-Id: I29eaf97c67361a6c6b437940b8729600d78696df