OSDN Git Service

android-x86/art.git
10 years agoError when taking the modulo of the length of an array
Brian Carlstrom [Thu, 27 Mar 2014 23:54:27 +0000 (16:54 -0700)]
Error when taking the modulo of the length of an array

Bug: 13679511
Change-Id: I4c694a9d85727af8095091c42f1ac00a78ba4ea2

10 years agoMerge "Fix CopyRegInfo to keep live/dirty flags of new registers."
Bill Buzbee [Thu, 27 Mar 2014 22:56:48 +0000 (22:56 +0000)]
Merge "Fix CopyRegInfo to keep live/dirty flags of new registers."

10 years agoFix CopyRegInfo to keep live/dirty flags of new registers.
Chao-ying Fu [Thu, 27 Mar 2014 21:17:28 +0000 (14:17 -0700)]
Fix CopyRegInfo to keep live/dirty flags of new registers.

CopyRegInfo should not change live/dirty flags of new registgers.
Otherwise, it will lead to incorrectly clobbering these live registers
that are not live actually, and then allocating them to another usage.

Change-Id: Ia9f055b33a11a6d70c0aca1a9fe8639ecfb09464
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
10 years agoMerge "Change sticky GC ergonomics to use GC throughput."
Mathieu Chartier [Thu, 27 Mar 2014 22:35:27 +0000 (22:35 +0000)]
Merge "Change sticky GC ergonomics to use GC throughput."

10 years agoChange sticky GC ergonomics to use GC throughput.
Mathieu Chartier [Thu, 27 Mar 2014 17:55:04 +0000 (10:55 -0700)]
Change sticky GC ergonomics to use GC throughput.

The old sticky ergonomics used partial/full GC when the bytes until
the footprint limit was < min free. This was suboptimal. The new
sticky GC ergonomics do partial/full GC when the throughput
of the current sticky GC iteration is <= mean throughput of the
partial/full GC.

Total GC time on FormulaEvaluationActions.EvaluateAndApplyChanges.
Before: 26.4s
After: 24.8s
No benchmark score change measured.

Bug: 8788501

Change-Id: I90000305e93fd492a8ef5a06ec9620d830eaf90d

10 years agoMerge "Remove bogus DCHECK."
Ian Rogers [Thu, 27 Mar 2014 21:36:12 +0000 (21:36 +0000)]
Merge "Remove bogus DCHECK."

10 years agoRemove bogus DCHECK.
Ian Rogers [Thu, 27 Mar 2014 21:27:09 +0000 (14:27 -0700)]
Remove bogus DCHECK.

Bug: 13637540
Change-Id: I39f19443156cf5bdc26e3eeb0bb501a850d40dca

10 years agoMerge "Fix x86 master build failure."
buzbee [Thu, 27 Mar 2014 19:24:15 +0000 (19:24 +0000)]
Merge "Fix x86 master build failure."

10 years agoFix x86 master build failure.
buzbee [Thu, 27 Mar 2014 18:22:43 +0000 (11:22 -0700)]
Fix x86 master build failure.

Replace bogus DCHECKs with logic matching pre-cleanup code.
Register pairs are considered temp, promoted, dirty or live if
either register of the pair meets criteria.

Change-Id: If2df891fdd1e3351d4cbe72aaf2a2ac5b34b2110

10 years agoMerge "Support inlining with breakpoint"
Sebastien Hertz [Thu, 27 Mar 2014 15:42:30 +0000 (15:42 +0000)]
Merge "Support inlining with breakpoint"

10 years agoMerge "Last patch for running tests on ARM64"
Andreas Gampe [Thu, 27 Mar 2014 15:25:32 +0000 (15:25 +0000)]
Merge "Last patch for running tests on ARM64"

10 years agoSupport inlining with breakpoint
Sebastien Hertz [Thu, 20 Mar 2014 15:40:17 +0000 (16:40 +0100)]
Support inlining with breakpoint

When installing/uninstalling a breakpoint in a method, we fully or selectively
deoptimize/undeoptimize depending on whether the method can be inlined. When
the method can be inlined, it requires full deoptimization. Otherwise, it only
requires selective deoptimization.

We add sanity check to control we are in a consistent state each time we add or
remove a breakpoint. We also add some comments to better describe the process
of deoptimization for breakpoint.

Bug: 12187616
Change-Id: Id15adc6e5e2fe783c83c925cbcd19ae02431b7e0

10 years agoMerge "Handle Array::Memmove within the same array properly."
Ian Rogers [Thu, 27 Mar 2014 15:18:37 +0000 (15:18 +0000)]
Merge "Handle Array::Memmove within the same array properly."

10 years agoHandle Array::Memmove within the same array properly.
Ian Rogers [Thu, 27 Mar 2014 05:53:56 +0000 (22:53 -0700)]
Handle Array::Memmove within the same array properly.

Motivated by discussions in:
  https://android-review.googlesource.com/#/c/88940/
memcpy can't be relied upon to be a forward copy for overlapping regions of
memory.

Change-Id: I409f75e97204250546bf0b8082e2b62026bddedc

10 years agoLast patch for running tests on ARM64
Andreas Gampe [Wed, 26 Mar 2014 21:53:21 +0000 (14:53 -0700)]
Last patch for running tests on ARM64

This allows all run-tests to succeed with the interpreter+GenJNI
setup.

Change-Id: I45734e7e57340439369a613ef4329e3be2c0c4c9

10 years agoMerge "Reflection tidying."
Ian Rogers [Thu, 27 Mar 2014 15:00:08 +0000 (15:00 +0000)]
Merge "Reflection tidying."

10 years agoMerge "Optimize easy multiply and easy div remainder."
Bill Buzbee [Thu, 27 Mar 2014 13:08:19 +0000 (13:08 +0000)]
Merge "Optimize easy multiply and easy div remainder."

10 years agoMerge "Refactor deoptimization support in debugger"
Sebastien Hertz [Thu, 27 Mar 2014 07:46:58 +0000 (07:46 +0000)]
Merge "Refactor deoptimization support in debugger"

10 years agoMerge "Do not suspend current thread to build stacktrace from DDMS"
Sebastien Hertz [Thu, 27 Mar 2014 07:42:07 +0000 (07:42 +0000)]
Merge "Do not suspend current thread to build stacktrace from DDMS"

10 years agoDo not suspend current thread to build stacktrace from DDMS
Sebastien Hertz [Tue, 25 Mar 2014 16:53:48 +0000 (17:53 +0100)]
Do not suspend current thread to build stacktrace from DDMS

Avoids a failing CHECK in ThreadList::SuspendThreadByThreadId in the case we
try to suspend the current thread.

Bug: 12985512
Change-Id: I9434400a3625319855dd3841d8889117e57784e5

10 years agoMerge "Fix alloc tracker locking issue"
Sebastien Hertz [Thu, 27 Mar 2014 07:36:59 +0000 (07:36 +0000)]
Merge "Fix alloc tracker locking issue"

10 years agoReflection tidying.
Ian Rogers [Thu, 27 Mar 2014 06:52:41 +0000 (23:52 -0700)]
Reflection tidying.

Move out arguments to the right and make pointer not reference types.
Remove unused unbox for argument routine.
Simplify convert primitive routine for the case of identical types.

Change-Id: I6456331b0f3f3e5f0b2c361a9f50b4ed1c9462a3

10 years agoOptimize easy multiply and easy div remainder.
Zheng Xu [Tue, 25 Mar 2014 14:25:52 +0000 (14:25 +0000)]
Optimize easy multiply and easy div remainder.

Update OpRegRegShift and OpRegRegRegShift to use RegStorage parameters.
Add special cases for *0 and *1. Add more easy multiply special cases for
Arm.
Reuse easy multiply in SmallLiteralDivRem() to support remainder cases.

Change-Id: Icd76a993d3ac8d4988e9653c19eab4efca14fad0

10 years agoMerge "Continuing register cleanup"
buzbee [Thu, 27 Mar 2014 03:22:33 +0000 (03:22 +0000)]
Merge "Continuing register cleanup"

10 years agoContinuing register cleanup
buzbee [Fri, 7 Mar 2014 17:46:20 +0000 (09:46 -0800)]
Continuing register cleanup

Ready for review.

Continue the process of using RegStorage rather than
ints to hold register value in the top layers of codegen.
Given the huge number of changes in this CL, I've attempted
to minimize the number of actual logic changes.  With this
CL, the use of ints for registers has largely been eliminated
except in the lowest utility levels.  "Wide" utility routines
have been updated to take a single RegStorage rather than
a pair of ints representing low and high registers.

Upcoming CLs will be smaller and more targeted.  My expectations:
   o Allocate float double registers as a single double rather than
     a pair of float single registers.
   o Refactor to push code which assumes long and double Dalvik
     values are held in a pair of register to the target dependent
     layer.
   o Clean-up of the xxx_mir.h files to reduce the amount of #defines
     for registers.  May also do a register renumbering to bring all
     of our targets' register naming more consistent.  Possibly
     introduce a target-independent float/non-float test at the
     RegStorage level.

Change-Id: I646de7392bdec94595dd2c6f76e0f1c4331096ff

10 years agoMerge "Less redundant verification."
Mathieu Chartier [Thu, 27 Mar 2014 01:03:10 +0000 (01:03 +0000)]
Merge "Less redundant verification."

10 years agoLess redundant verification.
Mathieu Chartier [Wed, 26 Mar 2014 22:15:57 +0000 (15:15 -0700)]
Less redundant verification.

~3 less objects verified per object scanned in the GC. Helps the
irogers dogfood experience.

Change-Id: I6efeab7842a6c702adecef73fb573c19291fecf2

10 years agoMerge "Relaxed memory barriers for x86"
Ian Rogers [Wed, 26 Mar 2014 23:25:14 +0000 (23:25 +0000)]
Merge "Relaxed memory barriers for x86"

10 years agoMerge "Add valgrind support to large object map space."
Mathieu Chartier [Wed, 26 Mar 2014 23:21:33 +0000 (23:21 +0000)]
Merge "Add valgrind support to large object map space."

10 years agoRelaxed memory barriers for x86
Razvan A Lupusoru [Wed, 26 Feb 2014 01:41:08 +0000 (17:41 -0800)]
Relaxed memory barriers for x86

X86 provides stronger memory guarantees and thus the memory barriers can be
optimized. This patch ensures that all memory barriers for x86 are treated
as scheduling barriers. And in cases where a barrier is needed (StoreLoad case),
an mfence is used.

Change-Id: I13d02bf3f152083ba9f358052aedb583b0d48640
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
10 years agoAdd valgrind support to large object map space.
Mathieu Chartier [Wed, 26 Mar 2014 19:53:19 +0000 (12:53 -0700)]
Add valgrind support to large object map space.

Added valgrind support to large object map space.

Bug: 7392044
Change-Id: I1456f46414e1fa59ebcc2190ec00576dae26d623

10 years agoMerge "Reuse promoted register temporarily"
Ian Rogers [Wed, 26 Mar 2014 22:07:11 +0000 (22:07 +0000)]
Merge "Reuse promoted register temporarily"

10 years agoReuse promoted register temporarily
Yevgeny Rouban [Tue, 18 Mar 2014 08:55:16 +0000 (15:55 +0700)]
Reuse promoted register temporarily

AtomicLong (x86) is implemented as an intrinsic, which uses
the cmpxchng8b instruction.
This instruction requires 4 physical registers plus 2 more used for
the memory operand. On x86 we have only 4 temporaries. The code tried
to solve this by using MarkTemp utility, but this was not meant to be
used with promoted registers. The problem is that MarkTemp does not
spill anything and as a result we can lose VR.

If the registers are promoted this patch just reuses the values pushed
on the stack.

Change-Id: Ifec9183e2483cf704d0d1166a1004a9aa07b4f1d
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
10 years agoMerge "Add GC mode for stressing testing heap transitions."
Mathieu Chartier [Wed, 26 Mar 2014 16:51:02 +0000 (16:51 +0000)]
Merge "Add GC mode for stressing testing heap transitions."

10 years agoMerge "x86 GenLongRegOrMemOp should be aware about xmm to core reg conversion"
Bill Buzbee [Wed, 26 Mar 2014 13:28:02 +0000 (13:28 +0000)]
Merge "x86 GenLongRegOrMemOp should be aware about xmm to core reg conversion"

10 years agoRefactor deoptimization support in debugger
Sebastien Hertz [Fri, 21 Mar 2014 16:44:46 +0000 (17:44 +0100)]
Refactor deoptimization support in debugger

This CL prepares breakpoint support for inlined methods where we'll have to
deoptimize everything.

We move deoptimization-related information to Dbg class only (deoptimization
request queue, full deoptimization event count and deoptimization lock). We
replace MethodInstrumentionRequest by DeoptimizationRequest. This is used to
know which kind of deoptimization is required for a particular event.

It also simplifies lock ordering a bit during event setup: we no longer need to
hold the deoptimization lock while holding the breakpoint lock. Moreover, the
deoptimization lock should be held only after the event list lock.

Bug: 12187616
Change-Id: Iff13f004adaeb25e5d609238bacce0b9720510e6

10 years agoFix alloc tracker locking issue
Sebastien Hertz [Wed, 26 Mar 2014 09:57:20 +0000 (10:57 +0100)]
Fix alloc tracker locking issue

Fixes a lock level violation where we attempt to take the thread list lock
while already holding the alloc tracker lock. We now avoid holding the alloc
tracker lock when updating allocation entrypoints.

Bug: 13646642
Change-Id: Iab505dae67d0c754031fe30d50a7cbd5e4ba5785

10 years agox86 GenLongRegOrMemOp should be aware about xmm to core reg conversion
Serguei Katkov [Tue, 25 Mar 2014 03:51:15 +0000 (10:51 +0700)]
x86 GenLongRegOrMemOp should be aware about xmm to core reg conversion

GenLongRegOrMemOp function expects arithmetic on core regs but does not
ensure that operand in core reg.

The patch adds the conversion if it is required.

Change-Id: Ibb6928b8cc2c63ede1a20d6ee45d9a64884231b6
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoMerge "Fix host gtests compiled with gcc"
Brian Carlstrom [Tue, 25 Mar 2014 23:56:15 +0000 (23:56 +0000)]
Merge "Fix host gtests compiled with gcc"

10 years agoFix host gtests compiled with gcc
Brian Carlstrom [Tue, 25 Mar 2014 23:23:56 +0000 (16:23 -0700)]
Fix host gtests compiled with gcc

(cherry picked from commit d016e1fab648093706f85cc78b63da0f3f487733)

Change-Id: I5d2b8061278fd5a477ec87395fca435a3da801a3

10 years agoAdd GC mode for stressing testing heap transitions.
Mathieu Chartier [Tue, 25 Mar 2014 22:58:50 +0000 (15:58 -0700)]
Add GC mode for stressing testing heap transitions.

The stress testing mode does repeated heap transitions when the heap
gets a process state update. In between each transition, the heap
waits for a specified number of time.

Change-Id: Ie3f43835e539fa8da147f77b4623a432a0d858c2

10 years agoMerge "Add missing debugger root visiting."
Mathieu Chartier [Tue, 25 Mar 2014 21:49:35 +0000 (21:49 +0000)]
Merge "Add missing debugger root visiting."

10 years agoAdd missing debugger root visiting.
Mathieu Chartier [Tue, 25 Mar 2014 16:29:43 +0000 (09:29 -0700)]
Add missing debugger root visiting.

Bug: 13634574
Change-Id: I2a76f6c43f1d0ad1922f06deb40a71ff651129fd

10 years agoMerge "Fix imm5 and shift_type detection"
Dmitriy Ivanov [Tue, 25 Mar 2014 19:33:06 +0000 (19:33 +0000)]
Merge "Fix imm5 and shift_type detection"

10 years agoMerge "Fix missing link line for libgtest_host."
Tim Murray [Tue, 25 Mar 2014 18:49:20 +0000 (18:49 +0000)]
Merge "Fix missing link line for libgtest_host."

10 years agoFix imm5 and shift_type detection
Dmitriy Ivanov [Tue, 25 Mar 2014 17:31:04 +0000 (10:31 -0700)]
Fix imm5 and shift_type detection

Bug: 13628315
Change-Id: I8ff044cc18721b7ea50c75c796a2fb63a1e189f9

10 years agoMerge "Trampoline and assembly fixes for ARM64"
Andreas Gampe [Tue, 25 Mar 2014 14:58:31 +0000 (14:58 +0000)]
Merge "Trampoline and assembly fixes for ARM64"

10 years agoMerge "An argument is handled incorrectly for add-int/lit8 during optimization phase"
Bill Buzbee [Tue, 25 Mar 2014 14:29:50 +0000 (14:29 +0000)]
Merge "An argument is handled incorrectly for add-int/lit8 during optimization phase"

10 years agoMerge "Small update to CFG printing using DOT"
Bill Buzbee [Tue, 25 Mar 2014 14:29:33 +0000 (14:29 +0000)]
Merge "Small update to CFG printing using DOT"

10 years agoAn argument is handled incorrectly for add-int/lit8 during optimization phase
nikolay serdjuk [Tue, 25 Mar 2014 05:21:29 +0000 (12:21 +0700)]
An argument is handled incorrectly for add-int/lit8 during optimization phase

Dalvik instruction 'add-int/lit8' stores a constant in the third parameter.
But during optimization phase the compiler reads the constant from the
second parameter. This is incorrect because it leads to wrong decision that
no array bound checks are needed in our test case. As a consequence it
fails with SIGSEGV because of accessing elements which are beyond the bounds.

Change-Id: I653892514934046d31a9e4d206d9d95ebb6267ab
Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
10 years agoMerge "Refactor image writer reference visiting logic."
Mathieu Chartier [Tue, 25 Mar 2014 01:13:52 +0000 (01:13 +0000)]
Merge "Refactor image writer reference visiting logic."

10 years agoRefactor image writer reference visiting logic.
Mathieu Chartier [Mon, 24 Mar 2014 23:54:46 +0000 (16:54 -0700)]
Refactor image writer reference visiting logic.

Now uses Object::VisitReferences.

Change-Id: I5a4557e10796d6f34596f2e8796ad9382121c567

10 years agoTrampoline and assembly fixes for ARM64
Andreas Gampe [Mon, 24 Mar 2014 23:45:44 +0000 (16:45 -0700)]
Trampoline and assembly fixes for ARM64

Trampolines need a jump, not a call. Expose br in the ARM64
assembler to allow this.

The resolution trampoline is called with the Quick ABI, and will
continue to a Quick ABI function. Then the method pointer must be
in x0.

Change-Id: I4e383b59d6c40a659d324a7faef3fadf0c890178

10 years agoMerge "Refactor object reference visiting logic."
Mathieu Chartier [Mon, 24 Mar 2014 23:39:22 +0000 (23:39 +0000)]
Merge "Refactor object reference visiting logic."

10 years agoRefactor object reference visiting logic.
Mathieu Chartier [Tue, 18 Feb 2014 22:37:05 +0000 (14:37 -0800)]
Refactor object reference visiting logic.

Refactored the reference visiting logic to be in mirror::Object
instead of MarkSweep.

Change-Id: I773249478dc463d83b465e85c2402320488577c0

10 years agoMerge "Fixes to mem_map wraparound and ARM64 quick_invoke assembly"
Andreas Gampe [Mon, 24 Mar 2014 18:53:17 +0000 (18:53 +0000)]
Merge "Fixes to mem_map wraparound and ARM64 quick_invoke assembly"

10 years agoMerge "Avoid strerror until we are sure there is an error"
Andreas Gampe [Mon, 24 Mar 2014 18:27:39 +0000 (18:27 +0000)]
Merge "Avoid strerror until we are sure there is an error"

10 years agoAvoid strerror until we are sure there is an error
Brian Carlstrom [Mon, 24 Mar 2014 06:47:25 +0000 (23:47 -0700)]
Avoid strerror until we are sure there is an error

Change-Id: I8f0c5a9cb1b07bfffd5ce9f9ca33f53c8834e9f5

10 years agoMerge "Refactor and optimize GC code."
Mathieu Chartier [Mon, 24 Mar 2014 16:52:54 +0000 (16:52 +0000)]
Merge "Refactor and optimize GC code."

10 years agoRefactor and optimize GC code.
Mathieu Chartier [Thu, 20 Mar 2014 19:41:23 +0000 (12:41 -0700)]
Refactor and optimize GC code.

Fixed the reference cache mod union table, and re-enabled it by
default. Added a boolean flag to count how many null objects,
immune, fast path, slow path objects we marked.

Slight speedup in mark stack processing, large speedup in image mod
union table scanning.
EvaluateAndApplyChanges Before:
Process mark stack time for full GC only:
12.464089s, 12.357870s, 12.538028s
Time spent marking mod image union table ~240ms.
After:
Process mark stack time: 12.299375s, 12.217142s, 12.187076s
Time spent marking mod image union table ~40ms.

TODO: Refactor reference visiting logic into mirror::Object.

Change-Id: I91889ded9d3f2bf127bc0051c1b1ff77e792e94f

10 years agoFixes to mem_map wraparound and ARM64 quick_invoke assembly
Andreas Gampe [Sat, 22 Mar 2014 00:25:57 +0000 (17:25 -0700)]
Fixes to mem_map wraparound and ARM64 quick_invoke assembly

There are only 6 free GPRs for passing in a non-static invoke. This
corrupted one register for long-signature methods.

The wrap-around did not actually wrap around correctly.

Change-Id: I62658dadeb83bb22960b9455e211d26ffaa20f6f

10 years agoMerge "Deduplicate the code that hardcodes the array header layout."
Hiroshi Yamauchi [Fri, 21 Mar 2014 23:30:33 +0000 (23:30 +0000)]
Merge "Deduplicate the code that hardcodes the array header layout."

10 years agoDeduplicate the code that hardcodes the array header layout.
Hiroshi Yamauchi [Fri, 21 Mar 2014 23:18:30 +0000 (16:18 -0700)]
Deduplicate the code that hardcodes the array header layout.

Get rid of HeaderSize() in array-inl.h and use DataOffset() instead.

Bug: 12687968
Change-Id: Ic81cf3fa6bb9b2440d351a73f5fd6a2d6908d15b

10 years agoMerge "Revoke rosalloc thread-local buffers at the checkpoint."
Hiroshi Yamauchi [Fri, 21 Mar 2014 23:25:42 +0000 (23:25 +0000)]
Merge "Revoke rosalloc thread-local buffers at the checkpoint."

10 years agoMerge "Don't return null for null utf in AllocFromModifiedUtf8."
Mathieu Chartier [Fri, 21 Mar 2014 22:49:00 +0000 (22:49 +0000)]
Merge "Don't return null for null utf in AllocFromModifiedUtf8."

10 years agoDon't return null for null utf in AllocFromModifiedUtf8.
Mathieu Chartier [Fri, 21 Mar 2014 21:09:35 +0000 (14:09 -0700)]
Don't return null for null utf in AllocFromModifiedUtf8.

If you pass in a null utf string it should not be the same behavior
as out of memory.

This previously caused serious problems in:
https://android-review.googlesource.com/#/c/80768/

Change-Id: I9dfb710b57f6cc91064812f52a3db64254769461

10 years agoMerge "Fix sign problem, implement low-mem mmap wraparound"
Andreas Gampe [Fri, 21 Mar 2014 21:43:34 +0000 (21:43 +0000)]
Merge "Fix sign problem, implement low-mem mmap wraparound"

10 years agoRevoke rosalloc thread-local buffers at the checkpoint.
Hiroshi Yamauchi [Thu, 20 Mar 2014 23:15:37 +0000 (16:15 -0700)]
Revoke rosalloc thread-local buffers at the checkpoint.

In the mark sweep collector, rosalloc thread-local buffers were
revoked during the pause. Now, they are revoked at the thread
checkpoint, as opposed to during the pause, which appears to help
reduce the pause time.

In Ritz MemAllocTest, the average sticky pause time went down ~20%
(925 us -> 724 us).

Bug: 13394464
Bug: 9986565
Change-Id: I104992a11b46d59264c0b9aa2db82b1ccf2826bc

10 years agoFix sign problem, implement low-mem mmap wraparound
Andreas Gampe [Fri, 21 Mar 2014 18:44:43 +0000 (11:44 -0700)]
Fix sign problem, implement low-mem mmap wraparound

A signed value comparison meant that on 64b systems comparisons
were false when pointers > 2GB were in use (as happens in long-running
tests). Fix this to be uint.

Implement a simple wrap-around in the MAP_32BIT emulation code.

Change-Id: I09870b4755f2dca676e42e701fbb6f6eb4bb95d0

10 years agoMerge "Improvements to Field.get/set."
Ian Rogers [Fri, 21 Mar 2014 18:43:36 +0000 (18:43 +0000)]
Merge "Improvements to Field.get/set."

10 years agoImprovements to Field.get/set.
Ian Rogers [Fri, 21 Mar 2014 18:21:29 +0000 (11:21 -0700)]
Improvements to Field.get/set.

Avoid unnecessary repeated computation in Field.get/set.
Refactor FromReflectedField and FromReflectedMethod into common helpers in
mirror::ArtField and mirror::ArtMethod, and make use of thereby avoiding
transitions through JNI.
Avoid JNI use from within FromReflectedField and FromReflectedMethod.
Tidy up Field.get/set wrt moving collector support.
Bug: 12189533

Change-Id: I643ab3474bade4abac3a3ae2b6e373b2bb0891c8

10 years agoMerge "Move saved SSA map to ScopedArenaAllocator to save memory."
Vladimir Marko [Fri, 21 Mar 2014 17:48:07 +0000 (17:48 +0000)]
Merge "Move saved SSA map to ScopedArenaAllocator to save memory."

10 years agoMerge "Refactor the garbage collector driver (GarbageCollector::Run)."
Hiroshi Yamauchi [Fri, 21 Mar 2014 17:47:50 +0000 (17:47 +0000)]
Merge "Refactor the garbage collector driver (GarbageCollector::Run)."

10 years agoMove saved SSA map to ScopedArenaAllocator to save memory.
Vladimir Marko [Fri, 21 Mar 2014 17:10:58 +0000 (17:10 +0000)]
Move saved SSA map to ScopedArenaAllocator to save memory.

Bug: 13564922
Change-Id: I917d451267ca6fceb2f6b2ff33b872ee8c209893

10 years agoMerge "Free Arenas from the ArenaStack before running codegen."
Vladimir Marko [Fri, 21 Mar 2014 16:10:12 +0000 (16:10 +0000)]
Merge "Free Arenas from the ArenaStack before running codegen."

10 years agoMerge "Fix method index for GDB information"
Andreas Gampe [Fri, 21 Mar 2014 15:15:31 +0000 (15:15 +0000)]
Merge "Fix method index for GDB information"

10 years agoFix method index for GDB information
Mark Mendell [Fri, 21 Mar 2014 15:00:18 +0000 (08:00 -0700)]
Fix method index for GDB information

This was pointed out to me by Vladimir Marko.  Just use the correct
value.

Change-Id: Ia0948ef9fb313acdd714fc23420328b2e21569eb
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoFree Arenas from the ArenaStack before running codegen.
Vladimir Marko [Fri, 21 Mar 2014 14:21:20 +0000 (14:21 +0000)]
Free Arenas from the ArenaStack before running codegen.

Since the ArenaStack is used only by the MIRGraph and not by
the memory hungry codegen, freeing the ArenaStack's Arenas
just before running the codegen should reduce the compiler's
peak memory usage.

Bug: 13564922
Change-Id: I1cb49d367e4e81d71a03cac89b3739ed61e4f966

10 years agoMerge "Support inlining detection from debugger."
Sebastien Hertz [Fri, 21 Mar 2014 14:19:17 +0000 (14:19 +0000)]
Merge "Support inlining detection from debugger."

10 years agoSupport inlining detection from debugger.
Sebastien Hertz [Fri, 21 Mar 2014 10:31:51 +0000 (11:31 +0100)]
Support inlining detection from debugger.

In the context of the compiler, every method and field should be resolved. The
InlineMethodAnalyser uses that property so we don't inline unresolved methods
or methods accessing unresolved fields. In the context of the debugger, this is
not true. We may install a breakpoint in a method that's never been resolved
yet for instance.

This CL weaks that property so we can detect getter/setter methods can be
inlined even if they're not resolved yet. To differentiate both contexts, we
pass a null inline method pointer to InlineMethodAnalyser::AnalyseIGetMethod.

Bug: 12187616
Change-Id: I247f315b9abd6b065d5a7ec4116de15a6cce7649

10 years agoMerge "Fix and clean up intrinsic Math.abs(long)."
Vladimir Marko [Fri, 21 Mar 2014 13:18:33 +0000 (13:18 +0000)]
Merge "Fix and clean up intrinsic Math.abs(long)."

10 years agoFix and clean up intrinsic Math.abs(long).
Vladimir Marko [Thu, 20 Mar 2014 17:38:43 +0000 (17:38 +0000)]
Fix and clean up intrinsic Math.abs(long).

On ARM, make sure we don't clobber a register that we still
need for the next insn. On x86, don't free a source register
for temps if it's overlapping a result register as that
would allow the sign_reg temporary to alias with the result.

Change-Id: I785f2f607900ae8ceb2fa0b8f3eefafdf6fab5c7

10 years agoMerge "Fix issue parsing implicit_checks property"
Dave Allison [Fri, 21 Mar 2014 00:00:05 +0000 (00:00 +0000)]
Merge "Fix issue parsing implicit_checks property"

10 years agoFix issue parsing implicit_checks property
Dave Allison [Thu, 20 Mar 2014 21:45:17 +0000 (14:45 -0700)]
Fix issue parsing implicit_checks property

It was missing the initial value.

Change-Id: Id7554c9286947791a46358b0c07339e4d0eac1ee

10 years agoFix missing link line for libgtest_host.
Tim Murray [Thu, 20 Mar 2014 22:20:58 +0000 (15:20 -0700)]
Fix missing link line for libgtest_host.

bug 13435344

Change-Id: If4197ddb97b235c731e4c771968eae46483d55b3

10 years agoMerge "Fix RecordFree to take signed parameters."
Mathieu Chartier [Thu, 20 Mar 2014 22:54:25 +0000 (22:54 +0000)]
Merge "Fix RecordFree to take signed parameters."

10 years agoMerge "Add Heap::RunningOnValgrind and call it from the spaces."
Mathieu Chartier [Thu, 20 Mar 2014 22:54:09 +0000 (22:54 +0000)]
Merge "Add Heap::RunningOnValgrind and call it from the spaces."

10 years agoAdd Heap::RunningOnValgrind and call it from the spaces.
Mathieu Chartier [Thu, 20 Mar 2014 22:40:37 +0000 (15:40 -0700)]
Add Heap::RunningOnValgrind and call it from the spaces.

Makes it easier to disable valgrind support.

Change-Id: I1bde792f1b76a2dd968fa03c6142e92fcc3670b0

10 years agoFix RecordFree to take signed parameters.
Mathieu Chartier [Thu, 20 Mar 2014 22:12:30 +0000 (15:12 -0700)]
Fix RecordFree to take signed parameters.

RecordFree can get negative bytes allocated when background
compaction foreground transitions occur. This caused a DCHECK to
fail on debug builds. Also did some refactoring in
PreProcessReferences.

Bug: 13568814
Change-Id: I57543f1c78544a94f1d241459698b736dba8cfa8

10 years agoMerge "64bit: make runtime offsets more deterministic."
Ian Rogers [Thu, 20 Mar 2014 21:49:56 +0000 (21:49 +0000)]
Merge "64bit: make runtime offsets more deterministic."

10 years ago64bit: make runtime offsets more deterministic.
Ian Rogers [Thu, 20 Mar 2014 15:10:17 +0000 (08:10 -0700)]
64bit: make runtime offsets more deterministic.

STL implementations vary causing offsets not to be consistent. Place member
variables we care about the offsets of at the start of Runtime.

Change-Id: I3ad7fe606cb99bcdd884a8fdbdd06bd7e047cd84

10 years agoMerge "Fix a libartd.so boot DCHECK failure with the GSS collector."
Hiroshi Yamauchi [Thu, 20 Mar 2014 21:11:23 +0000 (21:11 +0000)]
Merge "Fix a libartd.so boot DCHECK failure with the GSS collector."

10 years agoMerge "HACK: force target art executables to be compiled for 32-bit"
Colin Cross [Thu, 20 Mar 2014 20:37:15 +0000 (20:37 +0000)]
Merge "HACK: force target art executables to be compiled for 32-bit"

10 years agoFix a libartd.so boot DCHECK failure with the GSS collector.
Hiroshi Yamauchi [Thu, 20 Mar 2014 20:31:37 +0000 (13:31 -0700)]
Fix a libartd.so boot DCHECK failure with the GSS collector.

Bug: 11650816
Change-Id: Ibbdf1e66d2c1afe92351ee7a0ca84702bd07035d

10 years agoSmall update to CFG printing using DOT
Razvan A Lupusoru [Wed, 19 Mar 2014 21:27:59 +0000 (14:27 -0700)]
Small update to CFG printing using DOT

-Ensures to print all non-null basic blocks in MIR graph.
-Prints links from exceptions to catch targets.

Change-Id: I98fe46cd1c39cf59c46e6bccf967612defaa4f3b
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
10 years agoHACK: force target art executables to be compiled for 32-bit
Colin Cross [Thu, 20 Mar 2014 19:55:13 +0000 (12:55 -0700)]
HACK: force target art executables to be compiled for 32-bit

64-bit dex2oat doesn't support 32-bit targets yet, force all
art executables to compile 32-bit for now.

Change-Id: If69f0a45e55104a5e915a9c58afa9009aa68b71c

10 years agoRefactor the garbage collector driver (GarbageCollector::Run).
Hiroshi Yamauchi [Thu, 20 Mar 2014 19:03:02 +0000 (12:03 -0700)]
Refactor the garbage collector driver (GarbageCollector::Run).

Bug: 12687968

Change-Id: Ifc9ee86249f7938f51495ea1498cf0f7853a27e8

10 years agoMerge "Make all gc maps with 0 entries identical."
Vladimir Marko [Thu, 20 Mar 2014 17:38:29 +0000 (17:38 +0000)]
Merge "Make all gc maps with 0 entries identical."

10 years agoMerge "Clean up intrinsic Math.abs(float/double)."
Vladimir Marko [Thu, 20 Mar 2014 17:37:38 +0000 (17:37 +0000)]
Merge "Clean up intrinsic Math.abs(float/double)."

10 years agoMake all gc maps with 0 entries identical.
Vladimir Marko [Thu, 20 Mar 2014 15:08:57 +0000 (15:08 +0000)]
Make all gc maps with 0 entries identical.

Change-Id: Ie4fee22ffed07d23d103f52e4ab39ef083678d85