OSDN Git Service

android-x86/art.git
8 years agoBlacklist test on host.
Nicolas Geoffray [Tue, 31 May 2016 10:06:18 +0000 (11:06 +0100)]
Blacklist test on host.

Bug: 28901232
Bug: 28950284
Change-Id: Ia94e5280a92c80b202c98ef074c61c85ffd24d90

8 years agoMerge "Reduce TLAB size"
Mathieu Chartier [Sat, 28 May 2016 00:44:21 +0000 (00:44 +0000)]
Merge "Reduce TLAB size"

8 years agoReduce TLAB size
Mathieu Chartier [Fri, 27 May 2016 20:50:59 +0000 (13:50 -0700)]
Reduce TLAB size

Prevent pathological cases like threads fighting for TLABs and doing
back to back GC for alloc each allocation.

No performance change on angler, before:
EEAC: 1161, 1171, 1211
MemAllocTest: 1005, 971, 1148

After:
EEAC: 1173, 1175, 1163
MemAllocTest: 1003, 908, 803

There is also a mysterious speed up on volantis:
EEAC: 1563, 1553, 1543
MemAllocTest: 1474, 1486, 1485

After:
EEAC: 709, 714, 709
MemAllocTest: 664, 684, 655

Bug: 28976163

Change-Id: I564908badf395b6f948aa2dafcb66fe353fc1eba

8 years agoMerge "Revert "ART: Blacklist a libcore test for investigation""
Richard Uhler [Fri, 27 May 2016 15:55:32 +0000 (15:55 +0000)]
Merge "Revert "ART: Blacklist a libcore test for investigation""

8 years agoMerge "Disable stack assertions in non-compiled code."
Nicolas Geoffray [Fri, 27 May 2016 09:41:20 +0000 (09:41 +0000)]
Merge "Disable stack assertions in non-compiled code."

8 years agoDisable stack assertions in non-compiled code.
Nicolas Geoffray [Fri, 27 May 2016 09:38:14 +0000 (10:38 +0100)]
Disable stack assertions in non-compiled code.

bug:28769520

Change-Id: Ib9e8a1ae1e7c8a4a9e49173cec80466c40b9f472

8 years agoMerge "Forbid JVM_O_DELETE in JVM_Open"
Przemyslaw Szczepaniak [Fri, 27 May 2016 09:10:43 +0000 (09:10 +0000)]
Merge "Forbid JVM_O_DELETE in JVM_Open"

8 years agoMerge "Partial fragment deoptimization"
Mingyao Yang [Thu, 26 May 2016 22:49:55 +0000 (22:49 +0000)]
Merge "Partial fragment deoptimization"

8 years agoRevert "ART: Blacklist a libcore test for investigation"
Richard Uhler [Thu, 26 May 2016 21:06:59 +0000 (21:06 +0000)]
Revert "ART: Blacklist a libcore test for investigation"

This reverts commit fc3bb5c83d92d45011bef71ac62621f9707ee179.

The test is now fixed.

Bug: 28826195
Change-Id: I2fb9bb5250f834f8535ec392a209cbc84de8781c

8 years agoMerge "Don't use dlopen on host for already loaded oat files."
Richard Uhler [Thu, 26 May 2016 20:52:54 +0000 (20:52 +0000)]
Merge "Don't use dlopen on host for already loaded oat files."

8 years agoMerge "Remove SetStateUnsafe in Debugger::Disconnected."
Hiroshi Yamauchi [Thu, 26 May 2016 20:30:34 +0000 (20:30 +0000)]
Merge "Remove SetStateUnsafe in Debugger::Disconnected."

8 years agoPartial fragment deoptimization
Mingyao Yang [Mon, 23 May 2016 19:29:39 +0000 (12:29 -0700)]
Partial fragment deoptimization

We used to do either single frame deoptimization, or full fragment
deoptimization which deoptimizes all the frames in a fragment.
This change allows some methods to be not deoptimizeable, likely due
to some kind of optimization. So we need another deoptimization mode
that unwinds partial fragment. Deoptimizations are now generalized into
either full or partial fragment. A full fragment deoptimization will
deopt all frames in the fragment, and then returns from the invoke stub
to enter interpreter. A partial fragment deoptimization will deopt a
single frame, or all frames up to the method that's not deoptimizeable,
and then jumps to the interpreter bridge.

Currently code not deoptimizeable is the code in boot image since the
code may not be compiled with debuggable flag.

Bug: 28769520
Change-Id: I875c694791cc8ebd5121abcd92ce7b0db95aca38

8 years agoRemove SetStateUnsafe in Debugger::Disconnected.
Hiroshi Yamauchi [Tue, 24 May 2016 21:55:40 +0000 (14:55 -0700)]
Remove SetStateUnsafe in Debugger::Disconnected.

The debugger thread has the exclusive mutator lock and doen't need to
switch to runnable while updating instrumentation.

This avoids a spurious failure of the DCHECK in the jdwp test.

Bug: 25262836

Change-Id: Ibfd0bc3936a877fd264396fcc4cc1af8d19a1645

8 years agoForbid JVM_O_DELETE in JVM_Open
Przemyslaw Szczepaniak [Thu, 26 May 2016 14:52:36 +0000 (15:52 +0100)]
Forbid JVM_O_DELETE in JVM_Open

Bug: 28901232
Change-Id: Icf1f9b85163f478f380c76042bcc0ff6910cc1ce

8 years agoMerge "Prune class path classes from profile"
Mathieu Chartier [Thu, 26 May 2016 16:18:59 +0000 (16:18 +0000)]
Merge "Prune class path classes from profile"

8 years agoPrune class path classes from profile
Mathieu Chartier [Wed, 25 May 2016 22:05:59 +0000 (15:05 -0700)]
Prune class path classes from profile

Fixes a theoretical case where classes not in the app, but in the in
the class path could have been included in the image. The dex caches
for these classes are not properly handled and need to be pruned.
Not including the classes in the image classes makes sure the that
class linker automatically prunes them and frees the dex cache with
the explicit garbage collection.

Bug: 28452385

(cherry picked from commit 8d26c5967674d2eab21f65eeac9f1adcf88fce38)

Change-Id: Ic33076f0a76cf1ae727c61a340ceaadf9e7e7d08

8 years agoMerge "Fix OatWriter to update the header checksum correctly."
Treehugger Robot [Thu, 26 May 2016 12:56:08 +0000 (12:56 +0000)]
Merge "Fix OatWriter to update the header checksum correctly."

8 years agoFix OatWriter to update the header checksum correctly.
Vladimir Marko [Wed, 25 May 2016 11:49:49 +0000 (12:49 +0100)]
Fix OatWriter to update the header checksum correctly.

Make sure we update the checksum with dex file data, type
lookup tables and thunks produced by the relative patcher.

Bug: 28874264

(cherry picked from commit 7eef3397eda243186a982737aa79c65d5eb95edc)

Change-Id: I8c5535ab54a625109bddc85bdf84e48c43883a52

8 years agoMerge "Fix profile saver reference point when calculating the sleep time"
Treehugger Robot [Thu, 26 May 2016 10:57:18 +0000 (10:57 +0000)]
Merge "Fix profile saver reference point when calculating the sleep time"

8 years agoFix profile saver reference point when calculating the sleep time
Calin Juravle [Wed, 25 May 2016 17:09:53 +0000 (18:09 +0100)]
Fix profile saver reference point when calculating the sleep time

It is wrong to use last_time_ns_saver_woke_up_ as a reference. We should
use sleep_start.

Bug: 28953776

(cherry picked from commit dc85bd757e7f27c38143536a9f4fa4c2c7d07272)

Change-Id: I400502c76a0423190826bbf1bd8e552cf591ebc3

8 years agoMerge "ART: Print jit memory use only if we have samples"
Aart Bik [Wed, 25 May 2016 23:02:39 +0000 (23:02 +0000)]
Merge "ART: Print jit memory use only if we have samples"

8 years agoMerge "Fix oat_writer to use WriteData which updates checksum."
Treehugger Robot [Wed, 25 May 2016 19:26:43 +0000 (19:26 +0000)]
Merge "Fix oat_writer to use WriteData which updates checksum."

8 years agoDon't use dlopen on host for already loaded oat files.
Richard Uhler [Tue, 24 May 2016 22:04:22 +0000 (15:04 -0700)]
Don't use dlopen on host for already loaded oat files.

Because the behavior of dlopen on the host is different then the
target in that case, and it causes tests to fail.

Bug: 28826195

Change-Id: Id202bbac3318bade89a4133a9bcb1ee01e8b6182

8 years agoMerge changes I5c891dc1,Ie717089d
Richard Uhler [Wed, 25 May 2016 18:17:53 +0000 (18:17 +0000)]
Merge changes I5c891dc1,Ie717089d

* changes:
  Base isDexOptNeeded result on OatFileAssistant::IsUpToDate.
  Only compile dex files if they are not up to date.

8 years agoFix oat_writer to use WriteData which updates checksum.
Jeff Hao [Mon, 23 May 2016 21:30:44 +0000 (14:30 -0700)]
Fix oat_writer to use WriteData which updates checksum.

OatWriter was using WriteFully in some places instead.

Bug: 28874264

(cherry-picked from commit 5e7cbde3100b0bfb58277accc9d71a94636ea727)

Change-Id: I7dac3ad0597c210ba6e12e0cc1670277d7a28fc7

8 years agoMerge "Avoid long sleep in ProfileSaver"
Treehugger Robot [Wed, 25 May 2016 16:26:51 +0000 (16:26 +0000)]
Merge "Avoid long sleep in ProfileSaver"

8 years agoAvoid long sleep in ProfileSaver
Brian Carlstrom [Wed, 25 May 2016 02:45:30 +0000 (19:45 -0700)]
Avoid long sleep in ProfileSaver

This was due to subtracting a >20s number of nanos from the constant for 20s.

Bug: 28880120

(cherry picked from commit 8f15335d96eef7a3bcdd4f2b309a727791b67e68)

Change-Id: Ied5f2a4264e4e0035e1ce8719eda9c57c8482443

8 years agoMerge "Remove bogus DCHECK."
Treehugger Robot [Wed, 25 May 2016 15:05:01 +0000 (15:05 +0000)]
Merge "Remove bogus DCHECK."

8 years agoRemove bogus DCHECK.
Nicolas Geoffray [Wed, 25 May 2016 13:52:37 +0000 (14:52 +0100)]
Remove bogus DCHECK.

bug:28771056
Change-Id: I43a1d99623adc2393d7004927ef1651654ef137c

8 years agoMerge "Put boot class loader classes and strings in dex cache of app images."
Treehugger Robot [Wed, 25 May 2016 13:00:17 +0000 (13:00 +0000)]
Merge "Put boot class loader classes and strings in dex cache of app images."

8 years agoPut boot class loader classes and strings in dex cache of app images.
Nicolas Geoffray [Tue, 26 Apr 2016 17:30:31 +0000 (18:30 +0100)]
Put boot class loader classes and strings in dex cache of app images.

The reason for b/28295348 was that an ArtMethod of the boot image was
in the app image dex cache, but the declaring class of that
boot image method was not.

Since objects of boot images don't need fixups, the comparisons for
FixupStrings and FixupResolvedTypes was always false for them.

bug:28295348

(cherry picked from commit 1df3b55abea375671b79e3f4e6851be757a2d8a7)

Change-Id: I257b68089878ac9ab9f6fc78f726f9fb322dd884

8 years agoMerge "Apply String.equals() optimizations on arm, arm64 and x86-64."
Treehugger Robot [Wed, 25 May 2016 11:39:28 +0000 (11:39 +0000)]
Merge "Apply String.equals() optimizations on arm, arm64 and x86-64."

8 years agoApply String.equals() optimizations on arm, arm64 and x86-64.
Vladimir Marko [Tue, 24 May 2016 18:30:45 +0000 (19:30 +0100)]
Apply String.equals() optimizations on arm, arm64 and x86-64.

This is a follow-up to
    https://android-review.googlesource.com/174192

Change-Id: Ie71197df22548d6eb0ca773de6f19fcbb975f065

8 years agoMerge "Fix broken DCHECK"
Mathieu Chartier [Wed, 25 May 2016 01:27:59 +0000 (01:27 +0000)]
Merge "Fix broken DCHECK"

8 years agoFix broken DCHECK
Mathieu Chartier [Wed, 25 May 2016 00:41:21 +0000 (17:41 -0700)]
Fix broken DCHECK

Dex cache may now contain references into boot image. Only check
classes that are actually in the application image.

Bug: 28295348

(cherry picked from commit 55accd5725442026c8c32dc773b1cd12a65f90f6)

Change-Id: Ic585e444f60734768a5499ccaf14d68bf3685d50

8 years agoBase isDexOptNeeded result on OatFileAssistant::IsUpToDate.
Richard Uhler [Tue, 24 May 2016 22:42:37 +0000 (15:42 -0700)]
Base isDexOptNeeded result on OatFileAssistant::IsUpToDate.

So that it is consistent with when ART will try to run dex2oat.

Bug: 28826195

(cherry picked from commit 10267549f5ea8acc07ea6163a87c9b4b8ea62be4)

Change-Id: I5c891dc1a5a42ff7e0a4d3e66e9ecca37da743f2

8 years agoOnly compile dex files if they are not up to date.
Richard Uhler [Tue, 17 May 2016 17:34:52 +0000 (10:34 -0700)]
Only compile dex files if they are not up to date.

Instead of trying to compile them all the time, and relying on file
permissions to keep us from overwriting up-to-date dex files with
different compiler filters.

Bug: 27641809
Bug: 28639246
Bug: 28826195
Change-Id: Ie717089d58517427b6f9a522b48146761c57a1a9

8 years agoMerge "Add methods with samples during launch to profile"
Mathieu Chartier [Wed, 25 May 2016 00:07:39 +0000 (00:07 +0000)]
Merge "Add methods with samples during launch to profile"

8 years agoAdd methods with samples during launch to profile
Mathieu Chartier [Wed, 18 May 2016 15:51:52 +0000 (08:51 -0700)]
Add methods with samples during launch to profile

For the snapshot taken after application launch we look at all of
the methods with one or more samples.

Bug: 28750506

(cherry picked from commit c600eaa1089342db81ac1869437199efc1f6053b)

Change-Id: Id8de4ee61c3f0b7594e638049fdd9d0848b49684

8 years agoMerge "Don't update checksum if data ptr is null."
Treehugger Robot [Tue, 24 May 2016 22:51:14 +0000 (22:51 +0000)]
Merge "Don't update checksum if data ptr is null."

8 years agoDon't update checksum if data ptr is null.
Jeff Hao [Tue, 24 May 2016 02:17:04 +0000 (19:17 -0700)]
Don't update checksum if data ptr is null.

Passing a nullptr to adler32 resets it to its initial value.

Bug: 28874264

(cherry-picked from commit 2c6b49498e2f084ce217fcd3327103eadc1e0c37)

Change-Id: I9ac1b66004d4028a67aca18057c03ba9fb494041

8 years agoMerge "Increase test timeouts"
Mathieu Chartier [Tue, 24 May 2016 20:38:52 +0000 (20:38 +0000)]
Merge "Increase test timeouts"

8 years agoMerge "Fix minor issues that prevented DexFuzz to run on host."
Aart Bik [Tue, 24 May 2016 19:48:56 +0000 (19:48 +0000)]
Merge "Fix minor issues that prevented DexFuzz to run on host."

8 years agoMerge "Fix misc-macro-parentheses warnings."
Treehugger Robot [Tue, 24 May 2016 18:19:35 +0000 (18:19 +0000)]
Merge "Fix misc-macro-parentheses warnings."

8 years agoMerge "Fix bug in verifier: soft fail was hiding hard fail."
Aart Bik [Tue, 24 May 2016 17:54:11 +0000 (17:54 +0000)]
Merge "Fix bug in verifier: soft fail was hiding hard fail."

8 years agoIncrease test timeouts
Mathieu Chartier [Tue, 24 May 2016 17:24:53 +0000 (10:24 -0700)]
Increase test timeouts

Increased for strace to 30 min. Increased other places by 100% to
help prevent random timeouts on overloaded machines.

Change-Id: I9dd4def34513062723ae6744eabc2bacc68b4e0f

8 years agoMerge "Remove no-op call to android_update_LD_LIBRARY_PATH"
Treehugger Robot [Tue, 24 May 2016 17:37:34 +0000 (17:37 +0000)]
Merge "Remove no-op call to android_update_LD_LIBRARY_PATH"

8 years agoMerge "Compile JNI stubs for verify-profile and interpret-only."
Treehugger Robot [Tue, 24 May 2016 17:30:07 +0000 (17:30 +0000)]
Merge "Compile JNI stubs for verify-profile and interpret-only."

8 years agoFix minor issues that prevented DexFuzz to run on host.
Aart Bik [Fri, 20 May 2016 17:45:57 +0000 (10:45 -0700)]
Fix minor issues that prevented DexFuzz to run on host.

BUG=27036745

Change-Id: I8715efb9219f25c6b8ae2d14c5bdcfd83f881d40

8 years agoFix bug in verifier: soft fail was hiding hard fail.
Aart Bik [Mon, 23 May 2016 21:58:49 +0000 (14:58 -0700)]
Fix bug in verifier: soft fail was hiding hard fail.

Rationale:
Dexfuzzing found a situation where a soft fail (modifying
a final field) was hiding a hard fail (type error on that
field), which caused a crash in the compiler later on.
Also added a crash-before/pass-after regression test,
so we don't add the return by accident later.

BUG=28908555

Change-Id: I0cdc400be22a2d9eb00db8c8c6b25a85fbdac993

8 years agoRemove no-op call to android_update_LD_LIBRARY_PATH
Dimitry Ivanov [Tue, 24 May 2016 00:16:55 +0000 (17:16 -0700)]
Remove no-op call to android_update_LD_LIBRARY_PATH

With linker-namespaces enabled for all target sdk versions
the call to android_update_LD_LIBRARY_PATH is no longer needed.

Bug: http://b/26040253
Bug: http://b/27702070
Change-Id: I77c27c10a435e223824e1b69f727d0bc37a26306
(cherry picked from commit 1bd15f0311b6d7c5b28cf70914831006a9ef64c3)

8 years agoCompile JNI stubs for verify-profile and interpret-only.
Vladimir Marko [Mon, 23 May 2016 14:32:42 +0000 (15:32 +0100)]
Compile JNI stubs for verify-profile and interpret-only.

This is the intended behavior to have a good JNI transition
performance.

Bug: 28902384

(cherry picked from commit 8c185bf0c6f18a5349bc87a7e3751ba06d90f461)

Change-Id: I52767909b916ada3c619206c8838b85bff5ac316

8 years agoMerge "Enforce class definition ordering rules in v37 Dex files."
Roland Levillain [Tue, 24 May 2016 10:26:42 +0000 (10:26 +0000)]
Merge "Enforce class definition ordering rules in v37 Dex files."

8 years agoART: Print jit memory use only if we have samples
Pavel Vyssotski [Tue, 17 May 2016 10:37:53 +0000 (16:37 +0600)]
ART: Print jit memory use only if we have samples

Otherwise we got crashes on sigquit/shutdown trying to dump
JIT statistics when the histograms are empty.

Change-Id: Iac3ab5b51121f9bb5656f6ef71af785706541288
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
8 years agoMerge "Avoid the need for the black color for the baker-style read barrier."
Treehugger Robot [Mon, 23 May 2016 18:52:23 +0000 (18:52 +0000)]
Merge "Avoid the need for the black color for the baker-style read barrier."

8 years agoAvoid the need for the black color for the baker-style read barrier.
Hiroshi Yamauchi [Tue, 22 Dec 2015 19:09:18 +0000 (11:09 -0800)]
Avoid the need for the black color for the baker-style read barrier.

We used to set marked-through non-moving objects to black to
distinguish between an unmarked object and a marked-through
object (both would be white without black). This was to avoid a rare
case where a marked-through (white) object would be incorrectly set to
gray for a second time (and left gray) after it's marked
through (white/unmarked -> gray/marked -> white/marked-through ->
gray/incorrect). If an object is left gray, the invariant would be
broken that all objects are white when GC isn't running. Also, we
needed to have an extra pass over non-moving objects to change them
from black to white after the marking phase.

To avoid the need for the black color, we use a 'false gray' stack to
detect such rare cases and register affected objects on it and change
the objects to white at the end of the marking phase. This saves some
GC time because we can avoid the gray-to-black CAS per non-moving
object as well as the extra pass over non-moving objects.

Ritzperf EAAC (N6):
  Avg GC time:  232 ->  183 ms (-21%)
Total GC time: 15.3 -> 14.1 s  (-7.7%)

Bug: 12687968
Change-Id: Idb29c3dcb745b094bcf6abc4db646dac9cbd1f71

8 years agoMerge "Revert "Revert "Move rewritten StringFactory call results into dex registers...
Mingyao Yang [Mon, 23 May 2016 16:50:47 +0000 (16:50 +0000)]
Merge "Revert "Revert "Move rewritten StringFactory call results into dex registers for deopt"""

8 years agoMerge "Do not set property jpda.settings.syncPort in JDWP tests."
Treehugger Robot [Mon, 23 May 2016 09:22:31 +0000 (09:22 +0000)]
Merge "Do not set property jpda.settings.syncPort in JDWP tests."

8 years agoMerge "Only fill methods with 0xFE on debug builds"
Mathieu Chartier [Sat, 21 May 2016 00:03:41 +0000 (00:03 +0000)]
Merge "Only fill methods with 0xFE on debug builds"

8 years agoOnly fill methods with 0xFE on debug builds
Mathieu Chartier [Thu, 19 May 2016 17:13:04 +0000 (10:13 -0700)]
Only fill methods with 0xFE on debug builds

The GC scans classes without holding any locks, we can not fill
the methods if it is running. Added a GC critical section to address
this. Fixes random crash when scanning classes' methods.

Only for debug builds to not hurt performance.

(cherry picked from commit 22bd2a1b5ec2a5038cc3ae1964781f30aef0315f)

Bug: 28699001
Change-Id: If96155eaf3fc0e6df31f57dcf32fbd4063b09345

8 years agoRevert "Revert "Move rewritten StringFactory call results into dex registers for...
Mingyao Yang [Thu, 19 May 2016 17:48:40 +0000 (10:48 -0700)]
Revert "Revert "Move rewritten StringFactory call results into dex registers for deopt""

Potential gc points can make the result value stale. We now set the result value
to null proactively once it's moved to shadow frame registers. IsStringInit()
is written in a way that does string comparison instead of requiring method
resolution so that it doesn't have a gc point. Also we don't cache the callee
method during frame unwinding since the method may be rewritten already.

Bug: 28555675

Change-Id: Ic51511a4a0fc84a852d8d907f91e7835f49ac478

8 years agoDo not set property jpda.settings.syncPort in JDWP tests.
Roland Levillain [Fri, 20 May 2016 17:16:54 +0000 (18:16 +0100)]
Do not set property jpda.settings.syncPort in JDWP tests.

Let the OS choose the port automatically.

Bug: 28869570
Change-Id: I79775f9e72f7f8d0f9ec3d68c6f0bdb057ca13ff

8 years agoMerge "ARM: Add new String.compareTo intrinsic."
Vladimir Marko [Fri, 20 May 2016 13:55:13 +0000 (13:55 +0000)]
Merge "ARM: Add new String.compareTo intrinsic."

8 years agoARM: Add new String.compareTo intrinsic.
Scott Wakeling [Mon, 18 Apr 2016 08:00:11 +0000 (09:00 +0100)]
ARM: Add new String.compareTo intrinsic.

Benchmarked on Nexus6P big, little, and all cores. The new intrinsic is
faster than pStringCompareTo for compare lengths on [1,512], so the
runtime call is no longer needed.

Change-Id: If853b592dfc5e561ea3389b51729f37a2c89c18e

8 years agoMerge "ARM64: Move BIC after branch in StringCompareTo intrinsic."
Vladimir Marko [Fri, 20 May 2016 10:53:11 +0000 (10:53 +0000)]
Merge "ARM64: Move BIC after branch in StringCompareTo intrinsic."

8 years agoARM64: Move BIC after branch in StringCompareTo intrinsic.
Scott Wakeling [Fri, 20 May 2016 09:41:38 +0000 (10:41 +0100)]
ARM64: Move BIC after branch in StringCompareTo intrinsic.

Change-Id: Ic785dd93daab73b4b37917097c8c8ea2de797ed2

8 years agoMerge "Add missing check for IsShuttingDown in profile saver"
Treehugger Robot [Fri, 20 May 2016 02:26:43 +0000 (02:26 +0000)]
Merge "Add missing check for IsShuttingDown in profile saver"

8 years agoMerge "ART: Check whether an oat file exists before opening"
Treehugger Robot [Fri, 20 May 2016 01:37:46 +0000 (01:37 +0000)]
Merge "ART: Check whether an oat file exists before opening"

8 years agoAdd missing check for IsShuttingDown in profile saver
Calin Juravle [Wed, 18 May 2016 22:49:36 +0000 (15:49 -0700)]
Add missing check for IsShuttingDown in profile saver

Bug: 28814718

(cherry picked from commit 0233a413ba42aa34a92c357c8dcfbe48871788b9)

Change-Id: I709fc30147047c7a420cd6ff2f0c3b57c54c2021

8 years agoART: Check whether an oat file exists before opening
Andreas Gampe [Thu, 19 May 2016 04:10:42 +0000 (21:10 -0700)]
ART: Check whether an oat file exists before opening

The two-stage process of dlopen and our own loader is expensive.
Considering that the OatFileAssistant needs to check two locations,
one of which is unlikely to have a file for the common case of apps
installed in data, do a file existence check before attempting to
load the file.

Remove an unused variable.

Saves about 0.25ms on a N6P.

Bug: 28801010

(cherry picked from commit d9a720bcb5df2c135f161c7c6da2d25db4400dca)

Change-Id: I0aff9c276c0f539723f8a92663f14ce72160c44d

8 years agoMerge "Do not allow OSR jump while debugging is active."
Aart Bik [Thu, 19 May 2016 20:30:19 +0000 (20:30 +0000)]
Merge "Do not allow OSR jump while debugging is active."

8 years agoMerge changes I0bbdf83d,I70156f98
Treehugger Robot [Thu, 19 May 2016 19:02:16 +0000 (19:02 +0000)]
Merge changes I0bbdf83d,I70156f98

* changes:
  ART: Fix Mac build
  ART: Optimize PreSetup pass for oat-file open

8 years agoDo not allow OSR jump while debugging is active.
Aart Bik [Wed, 18 May 2016 22:44:07 +0000 (15:44 -0700)]
Do not allow OSR jump while debugging is active.

Rationale:
This prevents dangerous transitions between interpreter
and osr compiled code while e.g. single stepping through
a method that is becoming hot.

BUG=28672961

Change-Id: Ife8e641c05b3e3eb01284212270595c8677d6673

8 years agoMerge "Clean up JNI calling convention callee saves."
Vladimir Marko [Thu, 19 May 2016 17:37:39 +0000 (17:37 +0000)]
Merge "Clean up JNI calling convention callee saves."

8 years agoMerge "MIPS32: java.lang.Math.round(float)"
Aart Bik [Thu, 19 May 2016 17:25:26 +0000 (17:25 +0000)]
Merge "MIPS32: java.lang.Math.round(float)"

8 years agoMerge "Fix profile saver initial wait"
Mathieu Chartier [Thu, 19 May 2016 17:17:54 +0000 (17:17 +0000)]
Merge "Fix profile saver initial wait"

8 years agoClean up JNI calling convention callee saves.
Vladimir Marko [Thu, 19 May 2016 09:37:24 +0000 (10:37 +0100)]
Clean up JNI calling convention callee saves.

Precalculate callee saves at compile time and return them
as ArrayRef<> instead of keeping then in a std::vector<>.

Change-Id: I4fd7d2bbf6138dc31b0fe8554eac35b0777ec9ef

8 years agoMerge "Revert "Revert "ART: Reference.getReferent intrinsic for x86 and x86_64"""
Nicolas Geoffray [Thu, 19 May 2016 17:11:23 +0000 (17:11 +0000)]
Merge "Revert "Revert "ART: Reference.getReferent intrinsic for x86 and x86_64"""

8 years agoFix profile saver initial wait
Mathieu Chartier [Thu, 19 May 2016 02:51:23 +0000 (19:51 -0700)]
Fix profile saver initial wait

Was using TimedWait for the initial wait, but this can return
early if the process receives any interrupt (due to futex). The
solution is to use a wait loop. If the wait returned early, not
enough classes were including in the profile. This negatively
affected application launch times in some scenarios.

Sample wait times before the change:
Waited 2.002s
Waited 97.808ms
Waited 182.676ms
Waited 2.000s
Waited 1.678s

Bug: 27688727

(cherry picked from commit 0ec065d55ccc4eb0956b0a2231bcc8c1a6d1d273)

Change-Id: I7cfdda9dcff942c7618d6022a0c31f872fb76fcf

8 years agoART: Fix Mac build
Andreas Gampe [Thu, 19 May 2016 04:27:00 +0000 (21:27 -0700)]
ART: Fix Mac build

Follow-up to 9821cceebf077cb747aed543582b3d740a03ea7f.

Bug: 28801010

(cherry picked from commit 17fc4bda7987654709dcc24ea5a7bd6a859e0966)

Change-Id: I0bbdf83d64ea81e56824aa19bfae3baa341a2b73

8 years agoART: Optimize PreSetup pass for oat-file open
Andreas Gampe [Wed, 18 May 2016 20:09:54 +0000 (13:09 -0700)]
ART: Optimize PreSetup pass for oat-file open

The PreSetup pass for opening an oatfile with dlopen parses all
shared objects and tries to retrieve the corresponding mem map
(so as to have a fake MemMap to reserve the space for any scanning
operations and so on). Optimistically optimize this pass by counting
the number of shared objects before the dlopen, and skipping as
many afterwards.

This saves about half a millisecond on an N6P.

Bug: 28801010

(cherry picked from commit 9821cceebf077cb747aed543582b3d740a03ea7f)

Change-Id: I70156f9875e89c5af3c9e36e8f01c5662e3f736e

8 years agoMerge "Allow libcore and JDWP tests to be executed without JIT."
Treehugger Robot [Thu, 19 May 2016 12:19:53 +0000 (12:19 +0000)]
Merge "Allow libcore and JDWP tests to be executed without JIT."

8 years agoAllow libcore and JDWP tests to be executed without JIT.
Roland Levillain [Thu, 19 May 2016 11:24:17 +0000 (12:24 +0100)]
Allow libcore and JDWP tests to be executed without JIT.

To use AOT compiling, pass `--no-jit` option to
run-libcore-tests.sh and run-jdwp-tests.sh

Change-Id: I16efce1f48747ecbf8b900427be73c5694b5fb13

8 years agoMerge "Catch classes inheriting from themselves in the class linker."
Roland Levillain [Thu, 19 May 2016 11:13:44 +0000 (11:13 +0000)]
Merge "Catch classes inheriting from themselves in the class linker."

8 years agoMerge "Revert "Move rewritten StringFactory call results into dex registers for deopt""
Treehugger Robot [Thu, 19 May 2016 01:06:25 +0000 (01:06 +0000)]
Merge "Revert "Move rewritten StringFactory call results into dex registers for deopt""

8 years agoRevert "Move rewritten StringFactory call results into dex registers for deopt"
Hiroshi Yamauchi [Thu, 19 May 2016 00:15:12 +0000 (00:15 +0000)]
Revert "Move rewritten StringFactory call results into dex registers for deopt"

This reverts commit 8ca33bf04060fadd5b35fa93fa56547c62fe52e7.

597-deopt-new-string is failing.

Bug: 28846692
Bug: 28555675
Change-Id: Ibfb59ec36e089c987ea64e4af4ca3709e536412a

8 years agoMerge "Make a fake libart for misbehaving apps."
Alex Light [Wed, 18 May 2016 21:05:41 +0000 (21:05 +0000)]
Merge "Make a fake libart for misbehaving apps."

8 years agoMerge "Move rewritten StringFactory call results into dex registers for deopt"
Mingyao Yang [Wed, 18 May 2016 17:45:27 +0000 (17:45 +0000)]
Merge "Move rewritten StringFactory call results into dex registers for deopt"

8 years agoCatch classes inheriting from themselves in the class linker.
Roland Levillain [Wed, 18 May 2016 14:52:54 +0000 (15:52 +0100)]
Catch classes inheriting from themselves in the class linker.

(cherry picked from commit 90328ac545f65759a8e4fb217a75332906795518)

Bug: 28685551
Bug: 27682580
Bug: 28830038

Change-Id: If568013bf3c82c1df9b282522712d9af5ca5945d

8 years agoMerge "Mark concrete HIR instructions as FINAL."
Treehugger Robot [Wed, 18 May 2016 12:50:03 +0000 (12:50 +0000)]
Merge "Mark concrete HIR instructions as FINAL."

8 years agoMark concrete HIR instructions as FINAL.
Vladimir Marko [Wed, 18 May 2016 11:48:17 +0000 (12:48 +0100)]
Mark concrete HIR instructions as FINAL.

This allows the compiler to apply more optimizations.

Change-Id: Ic7d8a457ea4e7d5853195cc4b56482703a1176d5

8 years agoEnforce class definition ordering rules in v37 Dex files.
Roland Levillain [Wed, 18 May 2016 10:41:33 +0000 (11:41 +0100)]
Enforce class definition ordering rules in v37 Dex files.

These new checks also reject classes extending or
implementing themselves directly or transitively within
a single Dex file.

Bug: 28812524
Bug: 28797012
Bug: 28685551
Bug: 27682580

Change-Id: I51c43f8b4b6a7abaade63682411e61f21767f5d4

8 years agoMerge "ART: Fix systrace monitor logging"
Treehugger Robot [Wed, 18 May 2016 05:15:59 +0000 (05:15 +0000)]
Merge "ART: Fix systrace monitor logging"

8 years agoART: Fix systrace monitor logging
Andreas Gampe [Tue, 17 May 2016 17:13:10 +0000 (10:13 -0700)]
ART: Fix systrace monitor logging

Thinlock unlocking was incorrectly unconditionally ending a block.

Bug: 28423466

(cherry picked from commit 825ab1c3f44fd84e5967f023c2dd8d36c6906f08)

Change-Id: Ifaebd9e959041e157e292d4cba05675a37e9c700

8 years agoMerge "ART: Blacklist a libcore test for investigation"
Nicolas Geoffray [Wed, 18 May 2016 03:08:54 +0000 (03:08 +0000)]
Merge "ART: Blacklist a libcore test for investigation"

8 years agoART: Blacklist a libcore test for investigation
Andreas Gampe [Wed, 18 May 2016 02:00:23 +0000 (19:00 -0700)]
ART: Blacklist a libcore test for investigation

Blacklist dalvik.system.DexClassLoaderTest#testDexThenPathClassLoader
for investigation.

Bug: 28826195
Change-Id: Ibff00293af3c7bc272e3b419f4065c0fd8c069cf

8 years agoMake a fake libart for misbehaving apps.
Alex Light [Fri, 15 Apr 2016 19:41:09 +0000 (12:41 -0700)]
Make a fake libart for misbehaving apps.

Bug: 27775991
Change-Id: I22864aa22d4864d85e055a5b1d3ff1faf122011b
(cherry picked from commit b270b9e6cba453209e226b0f621c75f2e51f122a)

8 years agoMove rewritten StringFactory call results into dex registers for deopt
Mingyao Yang [Mon, 16 May 2016 18:01:49 +0000 (11:01 -0700)]
Move rewritten StringFactory call results into dex registers for deopt

Bug: 28555675
Change-Id: I9236df283f2e83ca5dcde01f73dc0522d745cd59

8 years agoMerge "Fix an assert during jdwp debugging."
Mingyao Yang [Tue, 17 May 2016 22:11:33 +0000 (22:11 +0000)]
Merge "Fix an assert during jdwp debugging."

8 years agoMerge "Keep oat file unique pointers until they are no longer used."
Treehugger Robot [Tue, 17 May 2016 22:06:51 +0000 (22:06 +0000)]
Merge "Keep oat file unique pointers until they are no longer used."