OSDN Git Service

android-x86/art.git
9 years agoART: Increase run-test 114 Java-level timeout
Andreas Gampe [Thu, 15 Jan 2015 16:02:22 +0000 (08:02 -0800)]
ART: Increase run-test 114 Java-level timeout

Increase the timeout to be larger than the run-test timeout. That
way ART will dump all threads when running the test on the host.

Change-Id: I842b056bba650e5c7c3293376a48d48b7468e73d

9 years agoMerge "ART: Allow scoped adjustments to log verbosity"
Andreas Gampe [Thu, 15 Jan 2015 15:53:01 +0000 (15:53 +0000)]
Merge "ART: Allow scoped adjustments to log verbosity"

9 years agoART: Allow scoped adjustments to log verbosity
Andreas Gampe [Thu, 15 Jan 2015 03:53:31 +0000 (19:53 -0800)]
ART: Allow scoped adjustments to log verbosity

Add ScopedLogSeverity to adjust the logging level.

Suppress warnings by default in gtests. Suppress errors in instances
where errors are expected.

Change-Id: If3ef865813e9505ab60bc90baed63ff11d90afbb

9 years agoMerge "Disable test for NDEBUG, it uses libarttest.so."
Nicolas Geoffray [Thu, 15 Jan 2015 08:44:56 +0000 (08:44 +0000)]
Merge "Disable test for NDEBUG, it uses libarttest.so."

9 years agoDisable test for NDEBUG, it uses libarttest.so.
Nicolas Geoffray [Thu, 15 Jan 2015 08:42:47 +0000 (08:42 +0000)]
Disable test for NDEBUG, it uses libarttest.so.

Change-Id: Ie275583aec421f3a40663ff44388a73e890ff894

9 years agoMerge "ART: Mac build fix for unused constant"
Andreas Gampe [Thu, 15 Jan 2015 04:10:37 +0000 (04:10 +0000)]
Merge "ART: Mac build fix for unused constant"

9 years agoART: Mac build fix for unused constant
Andreas Gampe [Thu, 15 Jan 2015 04:09:14 +0000 (20:09 -0800)]
ART: Mac build fix for unused constant

Change-Id: I77e70c877e8a3608555f128e0edf8784db178e86

9 years agoMerge "ART: Host timeout Mac build fix."
Andreas Gampe [Thu, 15 Jan 2015 02:39:45 +0000 (02:39 +0000)]
Merge "ART: Host timeout Mac build fix."

9 years agoART: Host timeout Mac build fix.
Andreas Gampe [Thu, 15 Jan 2015 02:35:01 +0000 (18:35 -0800)]
ART: Host timeout Mac build fix.

Mac fix for unsupported SIGRTMIN introduced in commit
038bb2252ed1d7132f45006507e389b7ba1617ce.

Bug: 18933933
Change-Id: I502cda51802d67f089c09240d89f71166ed56c6d

9 years agoMerge "ART: Simple structural class check"
Andreas Gampe [Thu, 15 Jan 2015 00:47:45 +0000 (00:47 +0000)]
Merge "ART: Simple structural class check"

9 years agoART: Simple structural class check
Andreas Gampe [Fri, 7 Nov 2014 00:52:58 +0000 (16:52 -0800)]
ART: Simple structural class check

Adds a simple check to class-loading when the embedded dex file in
an oat file and the dex file on the class path where we found the
class do not match.

We require that the number of methods and fields do not change, as
that will almost certainly mean that quickened and other compiled
offsets are wrong now. This is a reasonably lightweight change, but
we should investigate a full comparison including name and type of
members.

Bug: 17937814
Bug: 18708951

(cherry picked from commit 15a33b3f88546bce85dcb9d28caf200da51154d7)

Change-Id: Icb9638bebd369ab23822817f4a97c8dd8625fea5

9 years agoMerge "ART: dex2oat flag for HGraphVisualizer dump file"
David Brazdil [Thu, 15 Jan 2015 00:02:31 +0000 (00:02 +0000)]
Merge "ART: dex2oat flag for HGraphVisualizer dump file"

9 years agoMerge "ART: Clean assembler_test disassemblies"
Andreas Gampe [Wed, 14 Jan 2015 23:27:23 +0000 (23:27 +0000)]
Merge "ART: Clean assembler_test disassemblies"

9 years agoMerge "ART: Dump all threads on test timeout"
Andreas Gampe [Wed, 14 Jan 2015 23:27:04 +0000 (23:27 +0000)]
Merge "ART: Dump all threads on test timeout"

9 years agoART: Dump all threads on test timeout
Andreas Gampe [Wed, 14 Jan 2015 03:48:14 +0000 (19:48 -0800)]
ART: Dump all threads on test timeout

Use SIGRTMIN+2 as a special signal to dump all threads similar to
SIGQUIT. Use nested timeouts to enforce a test timeout and dump
the threads in a deadlock.

Bug: 18933933
Change-Id: I4209047eeca07ff360d7c19922d5b5da64fd69a5

9 years agoMerge "ART: Fix indentation in Mips backend"
Andreas Gampe [Wed, 14 Jan 2015 20:19:09 +0000 (20:19 +0000)]
Merge "ART: Fix indentation in Mips backend"

9 years agoART: Fix indentation in Mips backend
Andreas Gampe [Wed, 14 Jan 2015 20:09:25 +0000 (12:09 -0800)]
ART: Fix indentation in Mips backend

Fix the indentation to be standard.

Change-Id: I39a16716be3429dfef6df0a585e24423b46363a2

9 years agoART: Clean assembler_test disassemblies
Andreas Gampe [Wed, 14 Jan 2015 20:03:36 +0000 (12:03 -0800)]
ART: Clean assembler_test disassemblies

Add a flag. Enable commented-out code.

Change-Id: Ife17b72f2b93c128992d757e58b0e51431a3edf8

9 years agoMerge "ART: Change ternary location for timeout"
Andreas Gampe [Wed, 14 Jan 2015 17:17:53 +0000 (17:17 +0000)]
Merge "ART: Change ternary location for timeout"

9 years agoART: Change ternary location for timeout
Andreas Gampe [Wed, 14 Jan 2015 17:06:32 +0000 (09:06 -0800)]
ART: Change ternary location for timeout

Make the decision for timeout length in the constant, not at the
use site.

Bug: 18964791
Change-Id: I73e6ef5e1c23fd515eaa61ba68236698d3e5c81a

9 years agoMerge "Use unique_ptr to track ownership of dex files."
Richard Uhler [Wed, 14 Jan 2015 16:00:55 +0000 (16:00 +0000)]
Merge "Use unique_ptr to track ownership of dex files."

9 years agoMerge "Remove constant moves after emitting them in parallel resolver."
Nicolas Geoffray [Wed, 14 Jan 2015 14:49:38 +0000 (14:49 +0000)]
Merge "Remove constant moves after emitting them in parallel resolver."

9 years agoRemove constant moves after emitting them in parallel resolver.
Nicolas Geoffray [Wed, 14 Jan 2015 10:45:05 +0000 (10:45 +0000)]
Remove constant moves after emitting them in parallel resolver.

This fixes the case where a constant move requires a scratch
register. Note that there is no backend that needs this for now,
but X86 might with the move to hard float.

Change-Id: I37f6b8961b48f2cf6fbc0cd281e70d58466d018e

9 years agoMerge "Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd."
Vladimir Marko [Wed, 14 Jan 2015 10:56:30 +0000 (10:56 +0000)]
Merge "Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd."

9 years agoMerge "Implement ParallelMoveResolver::Swap for doubles on arm."
Nicolas Geoffray [Wed, 14 Jan 2015 10:31:28 +0000 (10:31 +0000)]
Merge "Implement ParallelMoveResolver::Swap for doubles on arm."

9 years agoImplement ParallelMoveResolver::Swap for doubles on arm.
Nicolas Geoffray [Tue, 13 Jan 2015 18:04:41 +0000 (18:04 +0000)]
Implement ParallelMoveResolver::Swap for doubles on arm.

Currently reserve a global register DTMP for these operations.

Change-Id: Ie88b4696af51834492fd062082335bc2e1137be2

9 years agoFix wide volatile IGET/IPUT on ARM without atomic ldrd/strd.
Vladimir Marko [Tue, 13 Jan 2015 17:34:28 +0000 (17:34 +0000)]
Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd.

If ldrd/strd isn't atomic, IPUT_WIDE uses ldrexd+strexd and
we need to record the safepoint for the ldrexd rather than
strexd. IGET_WIDE was simply missing the memory barrier.

Bug: 18993519
Change-Id: I4e9270b994f413c1a047c1c4bb9cce5f29e42cb4

9 years agoMerge "Remove whitespace."
Nicolas Geoffray [Wed, 14 Jan 2015 09:41:29 +0000 (09:41 +0000)]
Merge "Remove whitespace."

9 years agoRemove whitespace.
Nicolas Geoffray [Wed, 14 Jan 2015 09:40:32 +0000 (09:40 +0000)]
Remove whitespace.

Change-Id: I82f51cff87765a3aeeb861d2ae64978f2e762c73

9 years agoMerge "Skip r1 on arm if first parameter is a long."
Nicolas Geoffray [Wed, 14 Jan 2015 09:27:13 +0000 (09:27 +0000)]
Merge "Skip r1 on arm if first parameter is a long."

9 years agoMerge "JDWP: fix deadlock with GC"
Sebastien Hertz [Wed, 14 Jan 2015 08:37:47 +0000 (08:37 +0000)]
Merge "JDWP: fix deadlock with GC"

9 years agoMerge "Fix bootclasspath string initialization"
Sebastien Hertz [Wed, 14 Jan 2015 08:37:37 +0000 (08:37 +0000)]
Merge "Fix bootclasspath string initialization"

9 years agoMerge "ART: Fix mips typo"
Andreas Gampe [Wed, 14 Jan 2015 06:17:41 +0000 (06:17 +0000)]
Merge "ART: Fix mips typo"

9 years agoART: Fix mips typo
Andreas Gampe [Wed, 14 Jan 2015 06:16:40 +0000 (22:16 -0800)]
ART: Fix mips typo

Use the supplied memcmp16 assembly implementation.

Change-Id: I5a7d0b4d8c39cfbbc99720e151fd99d79cdbe0c4

9 years agoMerge "ART: Only give Clang warning when Clang is active"
Andreas Gampe [Wed, 14 Jan 2015 06:07:54 +0000 (06:07 +0000)]
Merge "ART: Only give Clang warning when Clang is active"

9 years agoMerge "ART: Introduce Mips32 R6"
Andreas Gampe [Wed, 14 Jan 2015 05:47:25 +0000 (05:47 +0000)]
Merge "ART: Introduce Mips32 R6"

9 years agoART: Introduce Mips32 R6
Andreas Gampe [Wed, 14 Jan 2015 00:41:53 +0000 (16:41 -0800)]
ART: Introduce Mips32 R6

Add an instruction-set feature for Mips R6. Currently restricted
to the interpreter.

Change-Id: Ic6d888e135bc87340229a0543dd94d0c1e863edd

9 years agoART: Only give Clang warning when Clang is active
Andreas Gampe [Wed, 14 Jan 2015 02:12:36 +0000 (18:12 -0800)]
ART: Only give Clang warning when Clang is active

Do not pollute output with Clang warning if we were supposed to
compile with Clang.

Change-Id: I1ee764dcfe0581e09a350cb01fdf0ba06dd18b56

9 years agoMerge "ART: Hprof cleanup"
Andreas Gampe [Wed, 14 Jan 2015 01:39:53 +0000 (01:39 +0000)]
Merge "ART: Hprof cleanup"

9 years agoUse unique_ptr to track ownership of dex files.
Richard Uhler [Tue, 23 Dec 2014 17:48:51 +0000 (09:48 -0800)]
Use unique_ptr to track ownership of dex files.

Bug: 18809837
Change-Id: Ie571eae8fc19ee9207390cff5c7e2a38071b126a

9 years agoMerge "ART: Use jalr instead of jr for Mips"
Andreas Gampe [Wed, 14 Jan 2015 00:26:20 +0000 (00:26 +0000)]
Merge "ART: Use jalr instead of jr for Mips"

9 years agoJDWP: fix deadlock with GC
Sebastien Hertz [Tue, 13 Jan 2015 21:48:34 +0000 (22:48 +0100)]
JDWP: fix deadlock with GC

This CL fixes a deadlock where JDWP thread and running GC thread are
waiting for each other. Here is the sequence of the deadlock:
1. GC thread disables access to weak global references, then releases
   mutator lock.
2. JDWP thread takes mutator lock exclusively after suspending all
   threads.
3. GC thread waits for shared mutator lock which is held by JDWP
   thread.
4. JDWP thread clears weak global references but need to wait for GC
   thread to re-enable access to them.

To avoid that situation, we ensure the JDWP thread does not attempt
to delete weak global references while holding the mutator
exclusively so GC thread is not blocked.

Bug: 18995321
Change-Id: Ia7e82f463c27ffdcfd730c3117337a6a33d111e7

9 years agoART: dex2oat flag for HGraphVisualizer dump file
David Brazdil [Tue, 13 Jan 2015 21:21:31 +0000 (21:21 +0000)]
ART: dex2oat flag for HGraphVisualizer dump file

This patch adds a new '--dump-cfg=<file>' flag to dex2oat which
specifies the file that HGraphVisualizer will store its output into.
Until now the graph was dumped to 'art.cfg' in the current working
directory. To make Checker work with run-test, the output directory
needs to be customizable.

Change-Id: I4a940f7708b88deea5a0e51d13aed13e52199349

9 years agoFix bootclasspath string initialization
Sebastien Hertz [Tue, 13 Jan 2015 09:10:40 +0000 (10:10 +0100)]
Fix bootclasspath string initialization

When running the runtime with an image without explicitly specifying
the bootclasspath (with the -Xbootclasspath option), we construct it
from the location of DEX files loaded from the image.

This allows to fix the JDWP test ClassPathsTest#testClassPaths001 on
the host where the bootclasspath is not explicitly specified on the
command line.

Bug: 18812378
Change-Id: I726eafd8b9e59dc9513beeb7082cf086fe89c4b1

9 years agoART: Use jalr instead of jr for Mips
Andreas Gampe [Tue, 13 Jan 2015 19:32:32 +0000 (11:32 -0800)]
ART: Use jalr instead of jr for Mips

Use the jalr instruction instead of jr in stubs and compiled code.

Change-Id: Idacc5167a5bb0113dc2e7716e4767e5ed07b5e0b

9 years agoMerge "Follow up on CL 122665."
Hiroshi Yamauchi [Tue, 13 Jan 2015 19:21:10 +0000 (19:21 +0000)]
Merge "Follow up on CL 122665."

9 years agoFollow up on CL 122665.
Hiroshi Yamauchi [Mon, 12 Jan 2015 20:11:05 +0000 (12:11 -0800)]
Follow up on CL 122665.

We now do the two-step memory protection strategy (first protect the
from space with PROT_READ and later protect it with PROT_NONE) only if
the from space is a rosalloc space (excluding the more common bump
pointer space case). This strengthens the GC verification for the bump
pointer space case as we avoid the case where mutators run while the
from space is PROT_READ rather than PROT_NONE.

Add a command line flag to override the minimum interval for the
hspace compaction for OOM and set it to zero in the gcstress/gcverify
run-tests to run the hspace compaction more frequently in tests.

Fix some comments.

Bug: 18960494
Change-Id: I518b011e026f578e53c4ec269cfb82865b0fae68

9 years agoMerge "Revert "ART: dex2oat flag for HGraphVisualizer dump file""
Andreas Gampe [Tue, 13 Jan 2015 19:11:25 +0000 (19:11 +0000)]
Merge "Revert "ART: dex2oat flag for HGraphVisualizer dump file""

9 years agoRevert "ART: dex2oat flag for HGraphVisualizer dump file"
Andreas Gampe [Tue, 13 Jan 2015 19:11:14 +0000 (19:11 +0000)]
Revert "ART: dex2oat flag for HGraphVisualizer dump file"

Breaks compilation of tests.

This reverts commit 54953dfdcb3bb8896d8af2d20adef84fb740ce77.

Change-Id: I868b876c3130be61f1169c5fccdffc0368bee11e

9 years agoMerge "ART: dex2oat flag for HGraphVisualizer dump file"
David Brazdil [Tue, 13 Jan 2015 18:31:51 +0000 (18:31 +0000)]
Merge "ART: dex2oat flag for HGraphVisualizer dump file"

9 years agoSkip r1 on arm if first parameter is a long.
Nicolas Geoffray [Tue, 13 Jan 2015 11:42:13 +0000 (11:42 +0000)]
Skip r1 on arm if first parameter is a long.

Change-Id: I16d927ee0a0b55031ade4c92c0095fd74e18ed5b

9 years agoART: dex2oat flag for HGraphVisualizer dump file
David Brazdil [Tue, 13 Jan 2015 18:07:00 +0000 (18:07 +0000)]
ART: dex2oat flag for HGraphVisualizer dump file

This patch adds a new flag to dex2oat which allows to specify the
name of the file that HGraphVisualizer will store its output into.
Until now the graph was dumped to "art.cfg" in the current working
directory. To make Checker work with run-test, the output directory
needs to be customizable.

Change-Id: I395c518b987e594e89e5e80f202a96befa41ac20

9 years agoART: Hprof cleanup
Andreas Gampe [Sat, 10 Jan 2015 08:26:17 +0000 (00:26 -0800)]
ART: Hprof cleanup

Refactor things a bit to make it easier to stream.

Add a simple test that dumps the heap and runs hprov-conf on it.

Change-Id: I79a9ad37d4cf41fa8d63d039586aa80394d96005

9 years agoMerge "Fix error in JobjectComparator"
Mathieu Chartier [Mon, 12 Jan 2015 22:26:25 +0000 (22:26 +0000)]
Merge "Fix error in JobjectComparator"

9 years agoFix error in JobjectComparator
Mathieu Chartier [Mon, 12 Jan 2015 22:24:14 +0000 (14:24 -0800)]
Fix error in JobjectComparator

Was comparing class hash code vs object hash code.

Change-Id: I6427809876462100249809b6f9c5e996c0741cf1

9 years agoMerge "Revert "ART: Implement hard float for X86""
Vladimir Marko [Mon, 12 Jan 2015 18:21:37 +0000 (18:21 +0000)]
Merge "Revert "ART: Implement hard float for X86""

9 years agoRevert "ART: Implement hard float for X86"
Vladimir Marko [Mon, 12 Jan 2015 18:21:07 +0000 (18:21 +0000)]
Revert "ART: Implement hard float for X86"

This reverts commit 59b9cf7ec0ccc13df91be0bd5c723b8c52410739.

Change-Id: I08333b528032480def474286dc368d916a07e17f

9 years agoMerge "ART: Implement hard float for X86"
Vladimir Marko [Mon, 12 Jan 2015 18:19:45 +0000 (18:19 +0000)]
Merge "ART: Implement hard float for X86"

9 years agoART: Implement hard float for X86
Mark Mendell [Fri, 9 Jan 2015 19:44:36 +0000 (14:44 -0500)]
ART: Implement hard float for X86

Use XMM0-XMM3 as parameter registers for float/double on X86.  X86_64
already uses XMM0-XMM7 for parameters.

Change the 'hidden' argument register from XMM0 to XMM7 to avoid a
conflict.

This change was requested to simplify the Optimizing compiler
implementation.

Change-Id: I89ba8ade99b9a8a5b1ad1ee5f5cbfd33d656bfaa
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
9 years agoMerge "Fix handling of long argument spanning register/memory."
Nicolas Geoffray [Mon, 12 Jan 2015 14:10:24 +0000 (14:10 +0000)]
Merge "Fix handling of long argument spanning register/memory."

9 years agoFix handling of long argument spanning register/memory.
Nicolas Geoffray [Thu, 8 Jan 2015 14:52:29 +0000 (14:52 +0000)]
Fix handling of long argument spanning register/memory.

Comment in arm_lir.h says:
 * If a 64-bit argument would span the register/memory argument
 * boundary, it will instead be fully passed in the frame.

This change implements such logic for all platforms. We still need
to pass the low part in register as well because I haven't ported
the jni compilers (x86 and mips) to it.

Once the jni compilers are updated, we can remove the register
assignment.

Note that this greatly simplifies optimizing's register allocator
by not having to understand a long spanning register and memory.

Change-Id: I59706ca5d47269fc46e5489ac99bd6576e87e7f3

9 years agoMerge "Move code around in OptimizingCompiler::Compile to reduce stack space."
Nicolas Geoffray [Mon, 12 Jan 2015 10:46:18 +0000 (10:46 +0000)]
Merge "Move code around in OptimizingCompiler::Compile to reduce stack space."

9 years agoMove code around in OptimizingCompiler::Compile to reduce stack space.
Nicolas Geoffray [Fri, 9 Jan 2015 14:53:50 +0000 (14:53 +0000)]
Move code around in OptimizingCompiler::Compile to reduce stack space.

Also fix an (intentional) memory leak, by allocating the CodeGenerator
on the heap instead of the arena: they construct an Assembler object
that requires destruction.

BUG:18787334

Change-Id: I8cf0667cb70ce5b14d4ac334bd4487a562635f1b

9 years agoMerge "JDWP: allow VirtualMachine.Resume on partial suspension"
Sebastien Hertz [Mon, 12 Jan 2015 08:14:54 +0000 (08:14 +0000)]
Merge "JDWP: allow VirtualMachine.Resume on partial suspension"

9 years agoMerge "ART: Fixed subsequent CHECK-NOTs Checker bug"
David Brazdil [Sat, 10 Jan 2015 02:42:33 +0000 (02:42 +0000)]
Merge "ART: Fixed subsequent CHECK-NOTs Checker bug"

9 years agoMerge "ART: Increase dump checkpoint timeout on the host"
Andreas Gampe [Sat, 10 Jan 2015 02:06:04 +0000 (02:06 +0000)]
Merge "ART: Increase dump checkpoint timeout on the host"

9 years agoMerge "[WIP] Fix a rosalloc verification crash."
Hiroshi Yamauchi [Sat, 10 Jan 2015 01:58:16 +0000 (01:58 +0000)]
Merge "[WIP] Fix a rosalloc verification crash."

9 years agoART: Increase dump checkpoint timeout on the host
Andreas Gampe [Sat, 10 Jan 2015 01:54:51 +0000 (17:54 -0800)]
ART: Increase dump checkpoint timeout on the host

Increase the dump checkpoint timeout on the host, as addr2line is
used and may put more strain onto the system.

Bug: 18964791
Change-Id: I9c1e9c1289fddfce25854e4425194882628bcf21

9 years ago[WIP] Fix a rosalloc verification crash.
Hiroshi Yamauchi [Sat, 10 Jan 2015 01:48:00 +0000 (17:48 -0800)]
[WIP] Fix a rosalloc verification crash.

Bug: 18960494
Change-Id: Ia7a11f06b3fc8207f6304ae881539251d6b1de24

9 years agoMerge "Clean up some #ifdefs."
Elliott Hughes [Fri, 9 Jan 2015 23:23:36 +0000 (23:23 +0000)]
Merge "Clean up some #ifdefs."

9 years agoClean up some #ifdefs.
Elliott Hughes [Fri, 9 Jan 2015 23:16:16 +0000 (15:16 -0800)]
Clean up some #ifdefs.

Only the Mac doesn't have POSIX clocks. (And it still doesn't, a decade
later.)

glibc gained pthread_setname_np in 2.12.

Only the Mac doesn't have prctl.

Change-Id: I218e409f7e133736e15fb68e8a254cdc5799d667

9 years agoMerge "ART: Fix prefix issues in Addr2line dump"
Andreas Gampe [Fri, 9 Jan 2015 23:13:30 +0000 (23:13 +0000)]
Merge "ART: Fix prefix issues in Addr2line dump"

9 years agoART: Fix prefix issues in Addr2line dump
Andreas Gampe [Fri, 9 Jan 2015 23:05:46 +0000 (15:05 -0800)]
ART: Fix prefix issues in Addr2line dump

The code incorrectly wrote the prefix twice for overly long lines.

Bug: 18933933
Change-Id: I4bc7c2cde435bd966276ca2dae6a5d060aa2d0f3

9 years agoMerge "Change hprof to use streaming"
Mathieu Chartier [Fri, 9 Jan 2015 23:05:08 +0000 (23:05 +0000)]
Merge "Change hprof to use streaming"

9 years agoChange hprof to use streaming
Mathieu Chartier [Fri, 9 Jan 2015 00:28:08 +0000 (16:28 -0800)]
Change hprof to use streaming

Previously, we compute the whole hprof dump in memory resulting in
> 50MB of memory usage for some apps (such as maps). This could
cause the app to get killed by the low memory killer.

The solution works by doing the dump in 2 passes.
The first pass calculates the size of the dump.
The second pass starts by sending the DDMS header with the correct
size, then does the rest of the hprof dump by streaming and sending
data one HprofRecord at a time.

Bug: 18921793
Change-Id: I7dd9f5cfe49799ba268095c994a8c2eb1fe493df

9 years agoMerge "ART: Added comments, fixed typos in Checker"
David Brazdil [Fri, 9 Jan 2015 19:21:16 +0000 (19:21 +0000)]
Merge "ART: Added comments, fixed typos in Checker"

9 years agoART: Added comments, fixed typos in Checker
David Brazdil [Wed, 7 Jan 2015 21:19:50 +0000 (21:19 +0000)]
ART: Added comments, fixed typos in Checker

Change-Id: I1ff12940035845c1a586d4df826efc794088bdc9

9 years agoMerge "Fix HandleScope with wrong thread error"
Mathieu Chartier [Fri, 9 Jan 2015 18:02:23 +0000 (18:02 +0000)]
Merge "Fix HandleScope with wrong thread error"

9 years agoFix HandleScope with wrong thread error
Mathieu Chartier [Fri, 9 Jan 2015 17:46:49 +0000 (09:46 -0800)]
Fix HandleScope with wrong thread error

Possibly fixes
+art F  5127  6995 art/runtime/handle_scope-inl.h:43]
Check failed: top_handle_scope == this
(top_handle_scope=0x2b449293c770, this=0x2b4492d6a0a8)
Seen in tests. A possible cause was that the thread dumping stacks
was running checkpoints on a suspended thread but putting a
HandleScope on that thread instead of itself. This isn't safe if the
suspended thread is doing HandleScope stuff in a non runnable state.

Change-Id: Icdaadabca5aff8d380d5cc9570b9e899fe790a62

9 years agoMerge "ART: Use addr2line on the host for DumpNativeStack"
Andreas Gampe [Fri, 9 Jan 2015 17:56:16 +0000 (17:56 +0000)]
Merge "ART: Use addr2line on the host for DumpNativeStack"

9 years agoART: Use addr2line on the host for DumpNativeStack
Andreas Gampe [Fri, 9 Jan 2015 04:11:09 +0000 (20:11 -0800)]
ART: Use addr2line on the host for DumpNativeStack

Use addr2line to attempt some better debug output for unexpected
signals in tests. This prints the demangled function name, source
file and line number (including inlined frames) when possible.

Bug: 18933933
Change-Id: I4b98d0cc7bef5cdc63c7ee0882629b363778afe2

9 years agoMerge "Remove back-door bootclasspath option from Runtime"
Richard Uhler [Fri, 9 Jan 2015 15:57:36 +0000 (15:57 +0000)]
Merge "Remove back-door bootclasspath option from Runtime"

9 years agoJDWP: allow VirtualMachine.Resume on partial suspension
Sebastien Hertz [Fri, 9 Jan 2015 13:51:41 +0000 (14:51 +0100)]
JDWP: allow VirtualMachine.Resume on partial suspension

Allows to resume multiple threads with a single VirtualMachine.Resume
command. When some threads are suspended for an event by the debugger
with a suspend count of 1 (other threads are running), a debugger can
resume them all this way.

Bug: 18924933
Change-Id: I81543df8228d56a4cf201e59885015880650f202

9 years agoMerge "Don't overwrite a register input."
Nicolas Geoffray [Fri, 9 Jan 2015 08:50:32 +0000 (08:50 +0000)]
Merge "Don't overwrite a register input."

9 years agoDon't overwrite a register input.
Nicolas Geoffray [Fri, 9 Jan 2015 08:48:29 +0000 (08:48 +0000)]
Don't overwrite a register input.

`addr` is a register input, which can survive the current instruction,
therefore we can't overwrite it.

Change-Id: I6eaa60e5f91c2b7b9b31673457d2a0d63474e587

9 years agoMerge "ART: Relax java_vm_ext test"
Andreas Gampe [Fri, 9 Jan 2015 01:01:10 +0000 (01:01 +0000)]
Merge "ART: Relax java_vm_ext test"

9 years agoART: Relax java_vm_ext test
Andreas Gampe [Fri, 9 Jan 2015 00:43:13 +0000 (16:43 -0800)]
ART: Relax java_vm_ext test

Bionic gives more than the requested stack size in some cases, see
change-id I7037ac8273ebe54dd19b1561c7a376819049124c. In that case,
attaching a thread with STACK_MIN may actually succeed.

Bug: 18908062
Change-Id: Ibb3f5c7a7399c01ec2032a133896cf91327370ed

9 years agoMerge "Add clamp growth limit"
Mathieu Chartier [Fri, 9 Jan 2015 00:12:28 +0000 (00:12 +0000)]
Merge "Add clamp growth limit"

9 years agoAdd clamp growth limit
Mathieu Chartier [Thu, 8 Jan 2015 19:28:13 +0000 (11:28 -0800)]
Add clamp growth limit

Clamp growth limit shrinks the space memmaps to the current growth
limit. This reduces virtual memory usage for apps with small heaps.

Bug: 18387825
Bug: 17131630

Change-Id: I4a8fdc335d2c40492e991708adabcc46299efb7d

9 years agoMerge "ART: Refactored regex code in Checker"
David Brazdil [Thu, 8 Jan 2015 22:20:26 +0000 (22:20 +0000)]
Merge "ART: Refactored regex code in Checker"

9 years agoART: Refactored regex code in Checker
David Brazdil [Wed, 31 Dec 2014 11:49:30 +0000 (11:49 +0000)]
ART: Refactored regex code in Checker

This patch refactors how Checker constructs regular expressions which
it uses to parse tests and verify compiler output. It also replaces
all occurrences of the '[0-9]+' ID-matching expression with the '\d+'
shorthand.

Change-Id: I5f854a25707e44ed2fa1673ff084990e8f43e4a2

9 years agoMerge "ART: Fixed formatting in HGraphVisualizerPrinter"
David Brazdil [Thu, 8 Jan 2015 21:50:01 +0000 (21:50 +0000)]
Merge "ART: Fixed formatting in HGraphVisualizerPrinter"

9 years agoART: Fixed subsequent CHECK-NOTs Checker bug
David Brazdil [Thu, 8 Jan 2015 01:49:53 +0000 (01:49 +0000)]
ART: Fixed subsequent CHECK-NOTs Checker bug

Matching a group of CHECK-NOT lines caused Checker to crash due to
incorrectly overwriting the varState variable. The second use of the
variable was renamed and a regression test added.

Change-Id: I1a879cf5368acca6b5092f69a9caa47b89a79532

9 years agoMerge "ART: Fix Mac build"
Andreas Gampe [Thu, 8 Jan 2015 19:37:26 +0000 (19:37 +0000)]
Merge "ART: Fix Mac build"

9 years agoART: Fix Mac build
Andreas Gampe [Thu, 8 Jan 2015 19:32:22 +0000 (11:32 -0800)]
ART: Fix Mac build

Fix Mac build after change-id Id2710d2fd44b7c3b3335973a9288979a5793638b.

Bug: 18933933
Change-Id: Ib0bb5082908d5dff33ef8f8a69d82c07406c176d

9 years agoART: Fixed formatting in HGraphVisualizerPrinter
David Brazdil [Thu, 8 Jan 2015 19:28:33 +0000 (19:28 +0000)]
ART: Fixed formatting in HGraphVisualizerPrinter

Change-Id: I06d9bb0fc03e13cfc49f2b4da07a0ee2d09a339a

9 years agoMerge "Add VerifyObject to StackHandleScope::SetReference"
Mathieu Chartier [Thu, 8 Jan 2015 18:54:45 +0000 (18:54 +0000)]
Merge "Add VerifyObject to StackHandleScope::SetReference"

9 years agoMerge "Implement double and float support for arm in register allocator."
Nicolas Geoffray [Thu, 8 Jan 2015 18:52:33 +0000 (18:52 +0000)]
Merge "Implement double and float support for arm in register allocator."

9 years agoRemove back-door bootclasspath option from Runtime
Richard Uhler [Fri, 2 Jan 2015 21:28:22 +0000 (13:28 -0800)]
Remove back-door bootclasspath option from Runtime

The 'bootclasspath' option allowed users of the Runtime to load their
own boot class path DexFiles and pass them directly to the Runtime as
an option. This obscures the fact that the Runtime must take ownership
of the boot class path DexFiles.

This change removes the use of the bootclasspath option by dex2oat and
the common runtime tests. For dex2oat, we use the existing
-Xbootclasspath option instead, and introduce a new
-Xbootclasspath-locations option to override the dex locations for the
loaded boot class path dex files. For the common runtime tests, we
simply use -Xbootclasspath.

Bug: 18809837
Change-Id: Idfcd4885390bf0f3dc350993756dd337220def73

9 years agoAdd VerifyObject to StackHandleScope::SetReference
Mathieu Chartier [Thu, 8 Jan 2015 17:41:25 +0000 (09:41 -0800)]
Add VerifyObject to StackHandleScope::SetReference

Helps catch GC bugs. Also moved some of the HandleScope logic to the
inl file.

Bug: 13054004
Change-Id: I81b9dd717092b6a467fcd28b4df0089ec075dd44