OSDN Git Service

android-x86/art.git
9 years agoART: Fix StubTest Interface Trampoline test
Andreas Gampe [Wed, 21 May 2014 22:37:53 +0000 (15:37 -0700)]
ART: Fix StubTest Interface Trampoline test

The imt conflict test does not actually need a proper conflict,
as we do not invoke through a lookup.

Added simple check for art_quick_invoke_interface_trampoline_with_access_check.
Only non-failure testing, as failure requires a properly setup frame etc.

Change-Id: I173dac04db950bd23f62eaf13341a7b19802e5e8

9 years agoMerge "Change heap transitions + hspace compation to use VLOG(heap)"
Mathieu Chartier [Tue, 2 Sep 2014 19:56:48 +0000 (19:56 +0000)]
Merge "Change heap transitions + hspace compation to use VLOG(heap)"

9 years agoChange heap transitions + hspace compation to use VLOG(heap)
Mathieu Chartier [Tue, 2 Sep 2014 19:33:25 +0000 (12:33 -0700)]
Change heap transitions + hspace compation to use VLOG(heap)

VLOG(gc) is spammy since it is enabled.

(cherry picked from commit 8bd2961b385c870953e650c253a04ee24b76809b)

Change-Id: Id75256cdc6a9802818bb56f77533cca88ace42a6

9 years agoMerge "ART: Fix typo"
Andreas Gampe [Tue, 2 Sep 2014 17:43:07 +0000 (17:43 +0000)]
Merge "ART: Fix typo"

9 years agoART: Fix typo
Andreas Gampe [Tue, 2 Sep 2014 17:22:20 +0000 (10:22 -0700)]
ART: Fix typo

Bug: 17327877

(cherry picked from commit b373ba1bf7e67d4dd8286df08065ac76aa8ac1ee)

Change-Id: I6132a8afb4b69c8d22a01b477f6f324c789ed666

9 years agoMerge "ART: Fix dex file verifier type-list handling"
Andreas Gampe [Tue, 2 Sep 2014 16:23:23 +0000 (16:23 +0000)]
Merge "ART: Fix dex file verifier type-list handling"

9 years agoART: Fix dex file verifier type-list handling
Andreas Gampe [Fri, 29 Aug 2014 23:07:49 +0000 (16:07 -0700)]
ART: Fix dex file verifier type-list handling

It is rare, but valid, to have an empty type list.

Bug: 17327877

(cherry picked from commit 277a7c7b4bb9c421380592fd3998d2e79e4035b3)

Change-Id: Ib3a8ff3e5ccd8fe7c04b1e97485bf3e6de72aa4d

9 years agoMerge "Revert "Revert "ART: Prepare for ELF64."""
Nicolas Geoffray [Tue, 2 Sep 2014 08:12:44 +0000 (08:12 +0000)]
Merge "Revert "Revert "ART: Prepare for ELF64."""

9 years agoRevert "Revert "ART: Prepare for ELF64.""
Nicolas Geoffray [Tue, 2 Sep 2014 08:12:09 +0000 (08:12 +0000)]
Revert "Revert "ART: Prepare for ELF64.""

Fix was commited in "Fix frame size issue with 64-bit"

This reverts commit 7eebd95bddc7c6866ba29010d28b4f8251b43242.

Change-Id: I799b7fcab14ae24471d2f9d6d3a5e5cedd4aa7b8

9 years agoMerge "Fix frame size issue with 64-bit"
Narayan Kamath [Mon, 1 Sep 2014 15:55:16 +0000 (15:55 +0000)]
Merge "Fix frame size issue with 64-bit"

9 years agoMerge "Revert "ART: Prepare for ELF64.""
Nicolas Geoffray [Mon, 1 Sep 2014 15:14:16 +0000 (15:14 +0000)]
Merge "Revert "ART: Prepare for ELF64.""

9 years agoRevert "ART: Prepare for ELF64."
Nicolas Geoffray [Mon, 1 Sep 2014 15:13:00 +0000 (15:13 +0000)]
Revert "ART: Prepare for ELF64."

Build fails on arm64 with error message:
art/compiler/elf_writer_quick.cc:1083:1: error: the frame size of 2016 bytes is larger than 1728 bytes [-Werror=frame-larger-than=]

This reverts commit 45b8f1ab2782d02830c77751f883456de799dfb6.

Change-Id: I61b2e5f27ba4b2b32eacaec51fb5e5ed12fd8066

9 years agoMerge "Add native memory accounting through custom allocator."
Mathieu Chartier [Sat, 30 Aug 2014 01:58:53 +0000 (01:58 +0000)]
Merge "Add native memory accounting through custom allocator."

9 years agoAdd native memory accounting through custom allocator.
Mathieu Chartier [Mon, 25 Aug 2014 20:08:22 +0000 (13:08 -0700)]
Add native memory accounting through custom allocator.

Added a custom allocator that lets you pass in a special tag which
specifices where the allocation came from. This is used when
dumping. The performance overhead is low since each allocation only
does a atomic add/sub for each allocation/free.

The measurements are dumped to traces.txt during SIGQUIT.

Example output:
I/art     (27274): AllocatorTagHeap active=120 max=120 total=168
I/art     (27274): AllocatorTagMonitorList active=1572 max=6240 total=11724
I/art     (27274): AllocatorTagClassTable active=185208 max=185208 total=268608
I/art     (27274): AllocatorTagInternTable active=430368 max=430368 total=436080
I/art     (27274): AllocatorTagMaps active=5616 max=6168 total=34392
I/art     (27274): AllocatorTagLOS active=1024 max=1536 total=2044
I/art     (27274): AllocatorTagSafeMap active=0 max=51936 total=533688
I/art     (27274): AllocatorTagLOSMaps active=144 max=1248 total=5760
I/art     (27274): AllocatorTagReferenceTable active=10944 max=11840 total=19136
I/art     (27274): AllocatorTagHeapBitmap active=32 max=40 total=56
I/art     (27274): AllocatorTagHeapBitmapLOS active=8 max=8 total=8
I/art     (27274): AllocatorTagVerifier active=0 max=18844 total=1073156
I/art     (27274): AllocatorTagModUnionCardSet active=5300 max=5920 total=56020
I/art     (27274): AllocatorTagModUnionReferenceArray active=24864 max=24864 total=24864
I/art     (27274): AllocatorTagJNILibrarires active=320 max=320 total=320
I/art     (27274): AllocatorTagOatFile active=1400 max=1400 total=5852

Change-Id: Ibb470ef2e9c9a24563bb46422d46a55799704d82

(cherry picked from commit 5369c40f75fdcb1be7a7c06db212ce965c83a164)

9 years agoMerge "ART: Fix accidental "1""
Andreas Gampe [Sat, 30 Aug 2014 01:16:09 +0000 (01:16 +0000)]
Merge "ART: Fix accidental "1""

9 years agoART: Fix accidental "1"
Andreas Gampe [Sat, 30 Aug 2014 01:15:04 +0000 (18:15 -0700)]
ART: Fix accidental "1"

Should have been "0".

Change-Id: I9ad3cf1e6be6d0fcf4c8f3700ddeec4e6d5ce167

9 years agoMerge "ART: Initialize fields of ParsedOptions"
Andreas Gampe [Sat, 30 Aug 2014 00:28:46 +0000 (00:28 +0000)]
Merge "ART: Initialize fields of ParsedOptions"

9 years agoFix frame size issue with 64-bit
Brian Carlstrom [Fri, 29 Aug 2014 23:20:48 +0000 (16:20 -0700)]
Fix frame size issue with 64-bit

Change-Id: Ib2f33dfb79952ba39f2d7e5303a2a2e6c4b0a0f6

9 years agoMerge "ART: Address issues with kIntrinsicMinMaxDouble for x86"
Ian Rogers [Fri, 29 Aug 2014 23:09:47 +0000 (23:09 +0000)]
Merge "ART: Address issues with kIntrinsicMinMaxDouble for x86"

9 years agoMerge "ART: Update CFG dumper to handle extended better"
Ian Rogers [Fri, 29 Aug 2014 23:04:06 +0000 (23:04 +0000)]
Merge "ART: Update CFG dumper to handle extended better"

9 years agoART: Initialize fields of ParsedOptions
Andreas Gampe [Fri, 29 Aug 2014 23:01:25 +0000 (16:01 -0700)]
ART: Initialize fields of ParsedOptions

Avoids certain paths where we touched uninitialized fields.

Bug: 17330858
Change-Id: Ia68161b12eefefacad6fc524f487f8e2caf6342a

9 years agoMerge "Fix master-art-host build by removing flakey test (temporarily)"
Dave Allison [Fri, 29 Aug 2014 21:20:05 +0000 (21:20 +0000)]
Merge "Fix master-art-host build by removing flakey test (temporarily)"

9 years agoMerge "ART: Prepare for ELF64."
Brian Carlstrom [Fri, 29 Aug 2014 21:17:50 +0000 (21:17 +0000)]
Merge "ART: Prepare for ELF64."

9 years agoFix master-art-host build by removing flakey test (temporarily)
Dave Allison [Fri, 29 Aug 2014 21:09:19 +0000 (14:09 -0700)]
Fix master-art-host build by removing flakey test (temporarily)

Change-Id: I8c97e7a5339a6f7f5984a58ee1a7b41eab3cb2b1

9 years agoMerge "Fix mac build and signal test"
Dave Allison [Fri, 29 Aug 2014 20:09:53 +0000 (20:09 +0000)]
Merge "Fix mac build and signal test"

9 years agoFix mac build and signal test
Dave Allison [Fri, 29 Aug 2014 19:29:34 +0000 (12:29 -0700)]
Fix mac build and signal test

Change-Id: I58311285db9095ca6339ce29a9f15e841b7c822d

9 years agoMerge "Fix mips build for nested signal handler"
Dave Allison [Fri, 29 Aug 2014 18:29:06 +0000 (18:29 +0000)]
Merge "Fix mips build for nested signal handler"

9 years agoFix mips build for nested signal handler
Dave Allison [Fri, 29 Aug 2014 18:05:17 +0000 (11:05 -0700)]
Fix mips build for nested signal handler

Bug: 17006816

(cherry picked from commit 5a18dde067daeb55f1368d5791c61e315bfa1d99)

Change-Id: Ia538e30012fed46cefba33092395c5361c571062

9 years agoMerge "Fix segfault if running without image."
Brian Carlstrom [Fri, 29 Aug 2014 18:02:02 +0000 (18:02 +0000)]
Merge "Fix segfault if running without image."

9 years agoMerge "Fix signal chain to allow for signal() call to be used"
Dave Allison [Fri, 29 Aug 2014 17:39:38 +0000 (17:39 +0000)]
Merge "Fix signal chain to allow for signal() call to be used"

9 years agoFix segfault if running without image.
Alex Light [Fri, 29 Aug 2014 17:28:25 +0000 (10:28 -0700)]
Fix segfault if running without image.

Bug: 17325091
Change-Id: I343099543ce0abf02219da84d61d9ce2dfc47980

9 years agoART: Prepare for ELF64.
Tong Shen [Wed, 27 Aug 2014 17:39:02 +0000 (10:39 -0700)]
ART: Prepare for ELF64.

Make ElfWriterQuick a template class. No functionality change.

Change-Id: I62b60dc9795c4795027e80f0bee6b54622ea49e9

9 years agoART: Address issues with kIntrinsicMinMaxDouble for x86
Razvan A Lupusoru [Thu, 14 Aug 2014 05:49:57 +0000 (13:49 +0800)]
ART: Address issues with kIntrinsicMinMaxDouble for x86

This patch fixes the following issues:
- Makes sure that invoke-static/range is considered for analysis
path that decides whether base of code register is needed.
- Invalidates the code pointer register in intrinsic implementations
of min/max for FP since generated code has diamond shape and Quick
does not correctly handle control flow merges.
- Reverts the clobbering of base of code register from constant
loading path since it reduces performance in linear code that
needs the register.
- Ensures that no assumption is made on whether base of code register
exists in cases like 64-bit where rip register may be used.

Change-Id: I96463ae1197e5cfa2a8bd3571163b38fb338a340
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
Signed-off-by: Haitao Feng <haitao.feng@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
9 years agoART: Update CFG dumper to handle extended better
Razvan A Lupusoru [Fri, 22 Aug 2014 22:39:50 +0000 (15:39 -0700)]
ART: Update CFG dumper to handle extended better

Change-Id: I0df8ece13deadf247a425beac0c08b2be5d773f9
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
9 years agoMerge "ART: Check for no gaps only when we will have an immune region"
Andreas Gampe [Fri, 29 Aug 2014 08:21:35 +0000 (08:21 +0000)]
Merge "ART: Check for no gaps only when we will have an immune region"

9 years agoMerge "Fix Mac build"
Brian Carlstrom [Fri, 29 Aug 2014 05:29:14 +0000 (05:29 +0000)]
Merge "Fix Mac build"

9 years agoFix Mac build
Brian Carlstrom [Fri, 29 Aug 2014 05:17:13 +0000 (22:17 -0700)]
Fix Mac build

Bug: 17000769,16875245
Change-Id: Id5ff133e0c6c56db6972a187773c7e873b7062ee

9 years agoART: Check for no gaps only when we will have an immune region
Andreas Gampe [Wed, 27 Aug 2014 18:01:09 +0000 (11:01 -0700)]
ART: Check for no gaps only when we will have an immune region

In dex2oat, for example, this is not necessary. This CL enables running
dex2oat under valgrind.

Change-Id: Ia25c7bfb4903a613c80f4685030970b2a48e24f9

9 years agoFix signal chain to allow for signal() call to be used
Dave Allison [Thu, 28 Aug 2014 23:12:40 +0000 (16:12 -0700)]
Fix signal chain to allow for signal() call to be used

Bug: 17320614
Change-Id: Ia917307fb1b593644f524518e11e295b3c64be01

9 years agoMerge "Fix incorect variable name."
Brian Carlstrom [Thu, 28 Aug 2014 23:27:53 +0000 (23:27 +0000)]
Merge "Fix incorect variable name."

9 years agoFix incorect variable name.
Alex Light [Thu, 28 Aug 2014 23:23:48 +0000 (16:23 -0700)]
Fix incorect variable name.

Bug: 16875245
Change-Id: Idd0f7ac677568a53569308a67f1ad613584949a5

9 years agoMerge "Change /dalvik-cache to be owned by root."
Brian Carlstrom [Thu, 28 Aug 2014 23:17:01 +0000 (23:17 +0000)]
Merge "Change /dalvik-cache to be owned by root."

9 years agoMerge "Honor the read barrier option in IRT::Get()."
Hiroshi Yamauchi [Thu, 28 Aug 2014 23:02:45 +0000 (23:02 +0000)]
Merge "Honor the read barrier option in IRT::Get()."

9 years agoMerge "Fix issue with Thread.setName hanging after Thread.start"
Brian Carlstrom [Thu, 28 Aug 2014 22:44:30 +0000 (22:44 +0000)]
Merge "Fix issue with Thread.setName hanging after Thread.start"

9 years agoFix issue with Thread.setName hanging after Thread.start
Brian Carlstrom [Thu, 28 Aug 2014 06:43:46 +0000 (23:43 -0700)]
Fix issue with Thread.setName hanging after Thread.start

When suspending a thread by peer the invariant that only attached threads are
suspended must be maintained. Add a ThreadList::Contains check which requires
making this method non-static.
Add some extra thread logging.

Bug: 17302037

(cherry picked from commit 37c16453a92bbf1a47f042000318a1b60381017d)

Change-Id: I51832785d4b4b431e035318e75635f442e89a1fb

9 years agoHonor the read barrier option in IRT::Get().
Hiroshi Yamauchi [Thu, 28 Aug 2014 22:29:26 +0000 (15:29 -0700)]
Honor the read barrier option in IRT::Get().

Bug: 12687968
Change-Id: Ia69570d57542891a873213e00242953825a1458d

9 years agoMerge "Move the glibc unlimited stack hack into GetThreadStack."
Elliott Hughes [Thu, 28 Aug 2014 22:25:34 +0000 (22:25 +0000)]
Merge "Move the glibc unlimited stack hack into GetThreadStack."

9 years agoMerge "Fix an assert failure in art::DumpNativeStack()."
Hiroshi Yamauchi [Thu, 28 Aug 2014 22:19:37 +0000 (22:19 +0000)]
Merge "Fix an assert failure in art::DumpNativeStack()."

9 years agoFix an assert failure in art::DumpNativeStack().
Hiroshi Yamauchi [Thu, 28 Aug 2014 21:55:56 +0000 (14:55 -0700)]
Fix an assert failure in art::DumpNativeStack().

When ThreadList::SuspendAll() times out (and aborts),
UnsafeLogFatalForThreadSuspendAllTimeout() will call
art::DumpNativeStack() but it does not have the mutator lock
shared-locked (as it failed while trying to exclusive-lock the mutator
lock) and the AssertSharedHeld() on the mutator lock fails. It's an
assert failure nested in an time-out abort.

This change avoids it by letting it print the native method frame info
only if the thread has a shared lock on the mutator lock, as opposed
to asserting that it has a shared lock.

Change-Id: I17851ebcaa37f4f67086c15243a2cffea3997a02

9 years agoMerge "Quick compiler: Fix MIPS build"
buzbee [Thu, 28 Aug 2014 21:11:05 +0000 (21:11 +0000)]
Merge "Quick compiler: Fix MIPS build"

9 years agoQuick compiler: Fix MIPS build
buzbee [Thu, 28 Aug 2014 20:48:56 +0000 (13:48 -0700)]
Quick compiler: Fix MIPS build

In debug builds, the Quick compiler frequently runs a sanity checker
over the register pool.  Among other things, it attempts to verify
consistent representation of register pairs.  However, a register's
"wide" flag is meaningful only when the register pair is associated
with a Dalvik wide value (sreg != INVALID_SREG) rather than a temp
wide value.

The MIPS build was tripping over this bad assertion.  Fixed here.

Note related cl/105461

Change-Id: Id726ff1ea0f5cbcc8dba6fa3aacb3fd4fc043a63

9 years agoChange /dalvik-cache to be owned by root.
Alex Light [Wed, 27 Aug 2014 22:37:23 +0000 (15:37 -0700)]
Change /dalvik-cache to be owned by root.

Also prune the dalvik-cache during startup if we need to generate or
relocate an image.

Bug: 17000769,16875245

Change-Id: I29a70215a2207bc4e0db02ab751d32a68edf4b66

9 years agoMerge "Filling hole between subclass and superclass."
Mathieu Chartier [Thu, 28 Aug 2014 19:15:12 +0000 (19:15 +0000)]
Merge "Filling hole between subclass and superclass."

9 years agoFilling hole between subclass and superclass.
Fred Shih [Tue, 26 Aug 2014 00:24:27 +0000 (17:24 -0700)]
Filling hole between subclass and superclass.

Subclasses no longer need to be 4-byte aligned at the end. Any gaps
between a superclass and its subclasses will be filled in by halfword
or byte fields if possible.

Refactored the alignment and shuffling methods to use a priority queue
in order to reduce the amount of logic when laying out objects.

Change-Id: Ifed71af534e0c5e77bb14555c44b973fe66df6da

9 years agoMerge "Prevent exception bugs in class linker"
Mathieu Chartier [Thu, 28 Aug 2014 18:49:08 +0000 (18:49 +0000)]
Merge "Prevent exception bugs in class linker"

9 years agoPrevent exception bugs in class linker
Mathieu Chartier [Wed, 27 Aug 2014 22:28:28 +0000 (15:28 -0700)]
Prevent exception bugs in class linker

There were some places that could throw exceptions but still succeed.
This caused the allocation entrypoints to occasionally allocate a
heap object with a pending exception.
Also added some additional AssertNoExceptionPending.

Bug: 17164348

(cherry picked from commit 58c016c3f85d6d5496cea25325778de3a8d9a3ac)

Change-Id: Id9918fa8f1a5d713b847cb95cdade925ff80a826

9 years agoMove the glibc unlimited stack hack into GetThreadStack.
Elliott Hughes [Thu, 28 Aug 2014 17:24:44 +0000 (10:24 -0700)]
Move the glibc unlimited stack hack into GetThreadStack.

Optional cleanup that was previously a TODO.

Bug: 17111575
Change-Id: I7c20dbf1fdbcaf4604d7b55552930c10e166539d

9 years agoMerge "Avoid null pointer dereference when sending JDWP packets"
Sebastien Hertz [Thu, 28 Aug 2014 17:16:05 +0000 (17:16 +0000)]
Merge "Avoid null pointer dereference when sending JDWP packets"

9 years agoMerge "Actually ask the pthread implementation for the stack guard size."
Elliott Hughes [Thu, 28 Aug 2014 16:58:34 +0000 (16:58 +0000)]
Merge "Actually ask the pthread implementation for the stack guard size."

9 years agoActually ask the pthread implementation for the stack guard size.
Elliott Hughes [Wed, 27 Aug 2014 18:47:01 +0000 (11:47 -0700)]
Actually ask the pthread implementation for the stack guard size.

(cherry-pick 307091dc306c34ce9e4ee6cc3b467807b3a3bd12.)

Bug: 17111575
Change-Id: I23919b1e8aeff627a65daf57f1109bec60b196cc

9 years agoAvoid null pointer dereference when sending JDWP packets
Sebastien Hertz [Thu, 28 Aug 2014 16:50:36 +0000 (18:50 +0200)]
Avoid null pointer dereference when sending JDWP packets

Bug: 16218394

Change-Id: Id0ab09401b01f3041ea36013330a000d7702d8fa

9 years agoMerge "Ensure proxy constructor is in dex cache"
Sebastien Hertz [Thu, 28 Aug 2014 16:50:17 +0000 (16:50 +0000)]
Merge "Ensure proxy constructor is in dex cache"

9 years agoEnsure proxy constructor is in dex cache
Sebastien Hertz [Wed, 27 Aug 2014 13:32:56 +0000 (15:32 +0200)]
Ensure proxy constructor is in dex cache

Bug: 17262039

Change-Id: I879341fa9c66f18ec64d6d4bf6a222a452c27739

9 years agoMerge "Fix gcstress and gcverify test targets"
Ian Rogers [Wed, 27 Aug 2014 23:12:35 +0000 (23:12 +0000)]
Merge "Fix gcstress and gcverify test targets"

9 years agoFix gcstress and gcverify test targets
Alex Light [Wed, 27 Aug 2014 23:08:57 +0000 (16:08 -0700)]
Fix gcstress and gcverify test targets

Make the build system look at the right variables to determine if these
should be on.

Change-Id: Iede993714eee773716cdc99181b10b280e96ca2a

9 years agoMerge "ART: Change temporaries to positive names"
Bill Buzbee [Wed, 27 Aug 2014 21:33:14 +0000 (21:33 +0000)]
Merge "ART: Change temporaries to positive names"

9 years agoMerge "Handle nested signals"
Dave Allison [Wed, 27 Aug 2014 21:18:03 +0000 (21:18 +0000)]
Merge "Handle nested signals"

9 years agoHandle nested signals
Dave Allison [Tue, 26 Aug 2014 18:07:58 +0000 (11:07 -0700)]
Handle nested signals

This allows for signals to be raised inside the ART signal handler.
This can occur when the JavaStackTraceHandler attempts to generate
a stack trace and something goes wrong.

It also fixes an issue where the fault manager was not being
correctly shut down inside the signal chaining code.  In this
case the signal handler was not restored to the original.

Bug: 17006816
Bug: 17133266

(cherry picked from commit fabe91e0d558936ac26b98d2b4ee1af08f58831d)

Change-Id: I10730ef52d5d8d34610a5293253b3be6caf4829e

9 years agoMerge "Really fix tests."
Brian Carlstrom [Wed, 27 Aug 2014 19:01:17 +0000 (19:01 +0000)]
Merge "Really fix tests."

9 years agoReally fix tests.
Alex Light [Wed, 27 Aug 2014 18:13:47 +0000 (11:13 -0700)]
Really fix tests.

Remove extra line in Android.run-test.mk.
Update junit code in 082 and 021.
Set correct bootclasspath for --no-image.
Make host core.art depend on dex files being installed.
Make 118 pass in the correct bootclasspath.

Bug: 17290452

Change-Id: I415eddfa3632ec7eda927abe95925202de193749

9 years agoMerge "Various run-test makefile fixes."
Ian Rogers [Wed, 27 Aug 2014 18:11:01 +0000 (18:11 +0000)]
Merge "Various run-test makefile fixes."

9 years agoVarious run-test makefile fixes.
Ian Rogers [Wed, 27 Aug 2014 17:54:11 +0000 (10:54 -0700)]
Various run-test makefile fixes.

Reduce number of test combinations based on global flags, rather than just
specific tests, to keep known broken list as small as possible.
Fix dist goal known broken definition.
Fix naming of rules in define-test-art-run-test to match the make target.
Undefine more variables after use.

Change-Id: I4b4eadd37fc1f816bc61d78c5866bfcee7b60244

9 years agoMerge "Fix builds where dist_goal is defined."
Ian Rogers [Wed, 27 Aug 2014 03:40:19 +0000 (03:40 +0000)]
Merge "Fix builds where dist_goal is defined."

9 years agoFix builds where dist_goal is defined.
Ian Rogers [Wed, 27 Aug 2014 03:39:04 +0000 (20:39 -0700)]
Fix builds where dist_goal is defined.

Change-Id: I93b3fb468cf760aa84d792b2651cdde366fc6033

9 years agoMerge "Fix test build targets."
Ian Rogers [Wed, 27 Aug 2014 03:01:34 +0000 (03:01 +0000)]
Merge "Fix test build targets."

9 years agoFix test build targets.
Ian Rogers [Wed, 27 Aug 2014 02:59:52 +0000 (19:59 -0700)]
Fix test build targets.

Missing includes for libarttest.
Missed merge for adding IMAGE_TYPES to known broken tests.

Change-Id: I64227b3410bac9a1de8e0efd3b89eab78cd3cf5b

9 years agoART: Change temporaries to positive names
Razvan A Lupusoru [Sat, 7 Jun 2014 00:04:52 +0000 (17:04 -0700)]
ART: Change temporaries to positive names

Changes compiler temporaries to have positive names. The numbering now
puts them above the code VRs (locals + ins, in that order). The patch also
introduces APIs to query the number of temporaries, locals and ins.

The compiler temp infrastructure suffered from several issues
which are also addressed by this patch:
-There is no longer a queue of compiler temps. This would be polluted
with Method* when post opts were called multiple times.
-Sanity checks have been added to allow requesting of temps from BE
and to prevent temps after frame is committed.
-None of the structures holding temps can overflow because they are
allocated to allow holding maximum temps. Thus temps can be requested
by BE with no problem.
-Since the queue of compiler temps is no longer maintained, it is no
longer possible to refer to a temp that has invalid ssa (because it
was requested before ssa was run).
-The BE can now request temps after all ME allocations and it is guaranteed
to actually receive them.
-ME temps are now treated like normal VRs in all cases with no special
handling. Only the BE temps are handled specially because there are no
references to them from MIRs.
-Deprecated and removed several fields in CompilationUnit that saved
register information and updated callsites to call the new interface from
MIRGraph.

Change-Id: Ia8b1fec9384a1a83017800a59e5b0498dfb2698c
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
9 years agoMerge changes Id3113019,I89c26a90
Ian Rogers [Wed, 27 Aug 2014 01:05:55 +0000 (01:05 +0000)]
Merge changes Id3113019,I89c26a90

* changes:
  Add run-test support for running without a working patchoat/dex2oat
  Support booting without functioning boot.oat/art patchoat.

9 years agoMerge "Reduce interpret-only compile time."
Mathieu Chartier [Wed, 27 Aug 2014 00:37:27 +0000 (00:37 +0000)]
Merge "Reduce interpret-only compile time."

9 years agoMerge "ART: Added dirty flag to optimizations"
Ian Rogers [Wed, 27 Aug 2014 00:36:31 +0000 (00:36 +0000)]
Merge "ART: Added dirty flag to optimizations"

9 years agoAdd run-test support for running without a working patchoat/dex2oat
Alex Light [Mon, 25 Aug 2014 20:25:56 +0000 (13:25 -0700)]
Add run-test support for running without a working patchoat/dex2oat

Also add it to the test-art target.

Bug: 17262039

Change-Id: Id31130194c46df66fc48852d6f8884f14cb08db4

9 years agoMerge "ART: Add capability for a pass to have options"
Ian Rogers [Wed, 27 Aug 2014 00:26:00 +0000 (00:26 +0000)]
Merge "ART: Add capability for a pass to have options"

9 years agoART: Add capability for a pass to have options
Razvan A Lupusoru [Thu, 3 Jul 2014 01:16:51 +0000 (18:16 -0700)]
ART: Add capability for a pass to have options

This patch adds capability to have pass options. These are needed when a pass
has multiple flags that can be tweaked. The user is now allowed to pass those
options via command line.

Since passes are treated as singletons and they are immutable, the overridden
options provided by user are set on the compilation unit. Doing this way also
allows a selectivity system to tweak the option per compilation instead of
doing it globally (due to the single pass existing).

The following command line flags have been added:
--print-pass-options - This prints all passes that have options along with
their defaults.
--pass-options= - This is used to pass the overridden options in format of
PassName:PassOption:PassOptionSetting

Change-Id: Ib5156f5d2ff51a0c64c4ea0fa050bd2170663417
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
9 years agoART: Added dirty flag to optimizations
Jean Christophe Beyler [Fri, 18 Jul 2014 22:33:57 +0000 (15:33 -0700)]
ART: Added dirty flag to optimizations

- Added a dirty flag to the PassMEDataHolder and use it to determine
    if we want to perform the post-optimization passes or not.

Change-Id: I59a85f5198f9224d5fe8893397bfaf68a978d8f1
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
9 years agoSupport booting without functioning boot.oat/art patchoat.
Alex Light [Sat, 23 Aug 2014 00:49:35 +0000 (17:49 -0700)]
Support booting without functioning boot.oat/art patchoat.

Bug: 17000769

Change-Id: I89c26a905af12ea288742368c2c038afd57a879a

9 years agoMerge "Use loops to build combinations of run-tests."
Ian Rogers [Tue, 26 Aug 2014 23:37:01 +0000 (23:37 +0000)]
Merge "Use loops to build combinations of run-tests."

9 years agoUse loops to build combinations of run-tests.
Ian Rogers [Tue, 19 Aug 2014 23:52:36 +0000 (16:52 -0700)]
Use loops to build combinations of run-tests.

Add a JNI force copy test.
Split tracing from GC, relocation from prebuilding.
As the combinations of tests is sufficiently large to cause make serious work,
only build rules for tests that will be executed. Default to small number of
tests rather than full. Use ART_TEST_FULL=true to override.

Change-Id: Ic25431f29071b840d2e2295be6853511c0b52cfa

9 years agoMerge "ART: Add non-temporal store support"
Ian Rogers [Tue, 26 Aug 2014 22:55:27 +0000 (22:55 +0000)]
Merge "ART: Add non-temporal store support"

9 years agoReduce interpret-only compile time.
Mathieu Chartier [Tue, 19 Aug 2014 21:29:46 +0000 (14:29 -0700)]
Reduce interpret-only compile time.

Before:
39.04user 5.18system 0:29.24elapsed 151%CPU (0avgtext+0avgdata 164176maxresident)k
38.87user 5.16system 0:29.14elapsed 151%CPU (0avgtext+0avgdata 164144maxresident)k

After:
36.26user 3.25system 0:27.00elapsed 146%CPU (0avgtext+0avgdata 162592maxresident)k
36.25user 3.28system 0:26.28elapsed 150%CPU (0avgtext+0avgdata 162688maxresident)k

Disabled implicit stack protection for the compiler, this reduces page faults.

Added support for not timing every method compilation and verification. NanoTime is
slow and adds ~2 seconds of real time. This is currently enabled since people want
to know which methods are slow to compile.

Bug: 16853450

Change-Id: I349ffb3f36db8c437137387aa6914dc17d743f09

9 years agoART: Add non-temporal store support
Jean Christophe Beyler [Fri, 25 Jul 2014 19:32:18 +0000 (12:32 -0700)]
ART: Add non-temporal store support

Added non-temporal store support as a hint from the ME.
Added the implementation of the memory barrier
extended instruction that supports non-temporal stores
by explicitly serializing all previous store-to-memory instructions.

Change-Id: I8205a92083f9725253d8ce893671a133a0b6849d
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
9 years agoMerge "Fix race condition in TransitionCollector."
Mathieu Chartier [Tue, 26 Aug 2014 18:03:03 +0000 (18:03 +0000)]
Merge "Fix race condition in TransitionCollector."

9 years agoFix race condition in TransitionCollector.
Mathieu Chartier [Sat, 23 Aug 2014 20:56:03 +0000 (13:56 -0700)]
Fix race condition in TransitionCollector.

There was a minor race condition that could happen if multiple
threads called TransitionCollector at the same time. Starting out
in CMS:

Thread 1: TransitionCollector(SS).
Thread 2: TransitionCollector(CMS) sees that it is already CMS so
has copying_transition == false. But then thread 2 changes to SS.
Thread 1 resumes but incorrectly doesn't check the
disable_moving_gc_count_ possibly resulting in errors if
disable_moving_gc_count_ != 0 due to JNI since we are going from
SS -> CMS and are goign to move objects.

(cherry picked from commit de2233bbf64c7dde96513a729f6a97aebc2f0424)

Change-Id: I2fdda85f7cb7cbb0df3d1466a3c74853c5304c1b

9 years agoMerge "ART: Improve error message on oat writer failure"
Andreas Gampe [Tue, 26 Aug 2014 17:55:56 +0000 (17:55 +0000)]
Merge "ART: Improve error message on oat writer failure"

9 years agoART: Improve error message on oat writer failure
Andreas Gampe [Tue, 22 Jul 2014 05:56:08 +0000 (22:56 -0700)]
ART: Improve error message on oat writer failure

Try to log the pending exception to help resolve issues.

Bug: 16406811
Change-Id: I035ae9e59a5ee02b9e90c35c0644ec088d3c7d12

9 years agoMerge "Fix usage of literals within a macro."
Ian Rogers [Tue, 26 Aug 2014 17:36:09 +0000 (17:36 +0000)]
Merge "Fix usage of literals within a macro."

9 years agoFix usage of literals within a macro.
Ian Rogers [Tue, 26 Aug 2014 17:34:09 +0000 (10:34 -0700)]
Fix usage of literals within a macro.

Macs handle arguments in macros as $num meaning literals must be $$num.

Change-Id: Ia30c7ef4e089561e9f23f353d7080e800b117d70

9 years agoMerge "Map heap maps at a lower address."
Mathieu Chartier [Tue, 26 Aug 2014 17:17:09 +0000 (17:17 +0000)]
Merge "Map heap maps at a lower address."

9 years agoMap heap maps at a lower address.
Mathieu Chartier [Mon, 25 Aug 2014 23:32:41 +0000 (16:32 -0700)]
Map heap maps at a lower address.

We now map the heap mmaps at a lower address in case the app needs
larger continuous address space.

Bug: 16502380

(cherry picked from commit 18bacb60e09fa8aa20ae0a1d7a4a8968d4913fb0)

Change-Id: I66447f853e439448c72923e2d1c657c94c5f1543

9 years agoMerge "ART: kSuper also has IncompatibleClassChangeError"
Andreas Gampe [Tue, 26 Aug 2014 17:11:38 +0000 (17:11 +0000)]
Merge "ART: kSuper also has IncompatibleClassChangeError"

9 years agoART: kSuper also has IncompatibleClassChangeError
Andreas Gampe [Tue, 26 Aug 2014 03:55:01 +0000 (20:55 -0700)]
ART: kSuper also has IncompatibleClassChangeError

When resolving methods, kSuper can also have
IncompatibleClassChangeError.

Bug: 17266767

(cherry picked from commit 9cb8d7a9a5013dd1e6734d9643573a4750d869e2)

Change-Id: I5fafe03ad578f605825a3d0c89f1254a4a385b76