OSDN Git Service
Sebastien Hertz [Thu, 18 Sep 2014 08:20:42 +0000 (10:20 +0200)]
Move spammy logs to JDWP verbose mode
We are spammed by warning messages when debugging, especially each time we
suspend/resume all threads (to update instrumentation or collect monitor info).
It's common to get into the cases where these warnings are logged so they
shouldn't be warning but debug messages.
This CL moves these LOG(WARNING) to VLOG(jdwp) to not disturb developers when
debugging their app (especially when looking for specific messages in logcat).
We keep them in JDWP verbose mode because they help knowing when we initiate
these sequences of "suspend/resume all threads".
Also adds debug suspend count in the log message for more context.
Bug:
17524544
Bug:
17170697
(cherry picked from commit
f272af4b9dcd39cdd50fa6655601a26e837eaea9)
Change-Id: I61df70ace1475bf10d83202b6bb774f7036354cb
Andreas Gampe [Fri, 19 Sep 2014 03:56:04 +0000 (20:56 -0700)]
ART: Only allow the zygote to create the global boot image
Do not allow arbitrary processes, even when root, to write the
boot image in /data/dalvik-cache.
Bug:
17478752,
17510489,
17439961
Change-Id: Iba2b74be6d0752f4221f4ff5ee295b45a34cb2e1
Ian Rogers [Thu, 18 Sep 2014 15:56:45 +0000 (08:56 -0700)]
DO NOT MERGE. Only have a portable entrypoint in portable builds.
Bug:
16214885
Change-Id: Iff7b7415efdbdabd7e6020e221a540f6a774c852
Sebastien Hertz [Thu, 18 Sep 2014 12:20:26 +0000 (12:20 +0000)]
Merge "Update JDWP event filtering to avoid useless ids" into lmp-dev
buzbee [Wed, 17 Sep 2014 20:23:58 +0000 (13:23 -0700)]
ART: skip compilation of huge methods.
Besides not being worthwhile to compile, it huge methods could cause
overflow of some internal compiler structures.
internal b/
17524219
Change-Id: I0e47ff4757eec265809598830a2616ac367af77d
Sebastien Hertz [Wed, 17 Sep 2014 09:46:44 +0000 (09:46 +0000)]
Merge "Avoid crash in StringReference.Value JDWP command" into lmp-dev
Andreas Gampe [Wed, 17 Sep 2014 03:31:25 +0000 (03:31 +0000)]
Merge "ART: Avoid recursive abort on thread dump" into lmp-dev
Andreas Gampe [Tue, 16 Sep 2014 23:40:09 +0000 (16:40 -0700)]
ART: Sync oat file to disk before patching
Bug:
15567083,
17439961,
17510489,
17478752
Change-Id: I828dc6775044b5050c2520eb097abe6a920fd3ee
Andreas Gampe [Tue, 16 Sep 2014 22:15:13 +0000 (15:15 -0700)]
ART: Avoid recursive abort on thread dump
Also clean up unused variable.
Bug:
15567083
Change-Id: Id83a3784bbe88520a4ffe654b2553d36a7b8e5bc
Jeff Hao [Tue, 16 Sep 2014 21:53:22 +0000 (21:53 +0000)]
Merge "Avoid suspending for alloc trace enabling when already suspended." into lmp-dev
Jeff Hao [Tue, 16 Sep 2014 01:03:41 +0000 (18:03 -0700)]
Avoid suspending for alloc trace enabling when already suspended.
Bug:
17499772
Change-Id: Id98c10967b28e8859e5ac46f5878c304fb85c498
Andreas Gampe [Tue, 16 Sep 2014 18:35:57 +0000 (18:35 +0000)]
Merge "ART: Check for exceptions from unresolved classes" into lmp-dev
Andreas Gampe [Tue, 16 Sep 2014 18:23:23 +0000 (11:23 -0700)]
ART: Check for exceptions from unresolved classes
In no-verify mode, classes may be unresolved because of missing
dependencies. Ignore and clear the exception.
Bug:
17506140
Change-Id: I70602b089e6631b1e177dbe8316c5fefdaf777a0
Brian Carlstrom [Tue, 16 Sep 2014 18:25:29 +0000 (18:25 +0000)]
Merge "Avoid printing absolute addresses in oatdump" into lmp-dev
Brian Carlstrom [Mon, 15 Sep 2014 03:34:17 +0000 (20:34 -0700)]
Avoid printing absolute addresses in oatdump
- Added printing of OatClass offsets.
- Added printing of OatMethod offsets.
- Added bounds checks for code size size, code size, mapping table, gc map, vmap table.
- Added sanity check of 100k for code size.
- Added partial disassembly of questionable code.
- Added --no-disassemble to disable disassembly.
- Added --no-dump:vmap to disable vmap dumping.
- Reordered OatMethod info to be in file order.
Bug:
15567083
Change-Id: Id86a21e06d4a28f29f16fd018cba7e55c57f849a
Andreas Gampe [Tue, 16 Sep 2014 05:31:05 +0000 (05:31 +0000)]
Merge "ART: Do not unlink unreadable ELF files" into lmp-dev
Andreas Gampe [Tue, 16 Sep 2014 05:25:24 +0000 (22:25 -0700)]
ART: Do not unlink unreadable ELF files
Unlinking can be racy with respect to secondary oat files.
Bug:
17496483
Change-Id: I53f92a924b34dfcf50d7e02487c5f8f23de627ca
Ian Rogers [Mon, 15 Sep 2014 23:08:15 +0000 (23:08 +0000)]
Merge "Only log an error if an unattached thread is unregistered." into lmp-dev
Ian Rogers [Mon, 15 Sep 2014 22:17:07 +0000 (15:17 -0700)]
Only log an error if an unattached thread is unregistered.
Turn a fatal check into a diagnostic error. It looks like this issue arises
when a runtime shutsdown without properly being started.
Bug:
17011539
Change-Id: I2983c8332e83769e9480e8f30a46ca3b80a2e90e
Sebastien Hertz [Mon, 15 Sep 2014 09:27:27 +0000 (11:27 +0200)]
Avoid crash in StringReference.Value JDWP command
Checks for null or invalid object id. Also checks whether the corresponding
object is a java.lang.String.
Bug:
17492221
Bug:
15005460
Change-Id: I2e9afe2ade69b130e59a5a0c00d02ded20b05b94
Mathieu Chartier [Fri, 12 Sep 2014 19:58:05 +0000 (12:58 -0700)]
Add native support for FinalizerList.makeCircularListIfUnenqueued
Called from FinalizerReference.enqueueSentinelReference to prevent
a race where the GC updates pendingNext of the sentinel reference
before enqueueSentinelReference.
Bug:
17462553
Change-Id: I7ad2fd250c2715d1aeb919bd548ef9aab24f30a2
Sebastien Hertz [Tue, 9 Sep 2014 10:10:13 +0000 (12:10 +0200)]
Update JDWP event filtering to avoid useless ids
To reduce the number of JDWP ids in the debugger, we update the event filtering
support to work with runtime objects (Thread, Class, Object, ...) instead of
JDWP ids (ThreadId, RefTypeId, ObjectId, ...).
We used to create useless JDWP ids for events even if they were not reported
because of event filtering (thread only, class only, instance only, ...). Now
we only create JDWP ids when we know we're going to report an event.
Bug:
17343664
Change-Id: Ib83df6d82fbcb40895f5cd9201a1e9ecd0a07e17
Andreas Gampe [Sat, 13 Sep 2014 01:38:24 +0000 (18:38 -0700)]
ART: Make elf loading not abort
Changes elf_file code to use less CHECKs and instead return error
values (usually nullptr). This avoids aborts.
In oat_file, when loading an oat file fails, try to unlink at. If
this succeeds, on the next run we may compile again.
Bug:
17491333
Change-Id: I50fdd2edacd86f25d4dacf2180ce2a6105eaf4af
Mathieu Chartier [Sat, 13 Sep 2014 00:34:30 +0000 (00:34 +0000)]
Merge "Fix stale root error in verifier" into lmp-dev
Mathieu Chartier [Sat, 13 Sep 2014 00:01:24 +0000 (17:01 -0700)]
Fix stale root error in verifier
There was a stale root error caused by the static roots from
the reg types. These were visitied if there was an active verifier
in the method_verifiers_ but this is not always the case when a GC
is run. The fix is to always visit the static method verifier roots.
This only showed up as a bug without an image since these roots
were primitive classes and always in the image, and therefore
didn't ever need to be updated due to moving GC.
Bug:
17262039
Change-Id: I592f2770570de97b431671cfbd409f63697892f1
Andreas Gampe [Fri, 12 Sep 2014 22:31:51 +0000 (22:31 +0000)]
Merge "ART: Allow quickening in the boot image" into lmp-dev
Andreas Gampe [Thu, 28 Aug 2014 21:41:02 +0000 (14:41 -0700)]
ART: Allow quickening in the boot image
Update the class linker to accept class status from the boot image
in compiler mode. Update compiler driver to allow quickening for
boot image classes. Update method verifier to accept quickened
instructions in compiler mode when we just want to dump. Update
oatdump to the new verifier API.
Bug:
17316928
Change-Id: I9ef1bfd78b0d93625b89b3d662131d7d6e5f2903
Andreas Gampe [Fri, 12 Sep 2014 20:49:25 +0000 (20:49 +0000)]
Merge "ART: Change access flag behavior in verifier" into lmp-dev
buzbee [Fri, 12 Sep 2014 19:49:26 +0000 (19:49 +0000)]
Merge "Quick compiler (arm64) Fix inline Math.round()" into lmp-dev
Mathieu Chartier [Fri, 12 Sep 2014 19:42:41 +0000 (19:42 +0000)]
Merge "Fix and re-enable FreeList large object space for 64 bit" into lmp-dev
buzbee [Fri, 12 Sep 2014 17:40:47 +0000 (10:40 -0700)]
Quick compiler (arm64) Fix inline Math.round()
Math.round is detected and inlined for arm64. However, the
arm64 backend incorrectly modified a source operand in place
during the round sequence. Depending on how registers are
allocated, that modification could persist. Changed to use a
temp register for the intermediate result.
Internal b/
17411468
Change-Id: I7c636f985e193f8ff838768fde3b741e443bb1bb
Andreas Gampe [Mon, 25 Aug 2014 22:05:04 +0000 (15:05 -0700)]
ART: Change access flag behavior in verifier
Note: this moves the miranda modifier to the upper 16 bit.
Bug:
16161620
Change-Id: I2f591d53b7d1559171e70aaaf22225d94b4882f5
Andreas Gampe [Fri, 12 Sep 2014 18:25:28 +0000 (18:25 +0000)]
Merge "Fix host 64-bit ISA string" into lmp-dev
Mathieu Chartier [Tue, 9 Sep 2014 00:42:48 +0000 (17:42 -0700)]
Fix and re-enable FreeList large object space for 64 bit
Not enabled on 32 bit due to virtual memory fragmentation concerns.
The new free list large object space ensures that allocations are
page aligned by using a side table for accounting data.
Bug:
17414549
Change-Id: Idbcbe75cb86b6d9b3d8b20f3048631a48c511458
Mathieu Chartier [Thu, 11 Sep 2014 23:51:03 +0000 (23:51 +0000)]
Merge "Add fast path to VMClassLoader.findLoadedClass" into lmp-dev
Mathieu Chartier [Thu, 11 Sep 2014 23:27:11 +0000 (23:27 +0000)]
Merge "Delete pin table" into lmp-dev
Brian Carlstrom [Thu, 11 Sep 2014 23:13:17 +0000 (23:13 +0000)]
Merge "Print the command line and ABI in stack dumps like debuggerd." into lmp-dev
Jeff Brown [Thu, 11 Sep 2014 01:41:18 +0000 (18:41 -0700)]
Print the command line and ABI in stack dumps like debuggerd.
Ensure the heading is "Cmd line:" just like debuggerd and
as it used to be in Dalvik.
Fix a missing newline.
Trim all training nulls from the command line.
Don't bother printing the original command line if unset.
Add the ABI to the dump to help the native stack symbol tool.
Bug:
17474152
Change-Id: Ie1da1bd4f38c92b13ea08c7122f4573d8ec8fc73
Jeff Brown [Thu, 11 Sep 2014 23:01:55 +0000 (23:01 +0000)]
Merge "Revert "Print the command line and ABI in stack dumps like debuggerd."" into lmp-dev
Jeff Brown [Thu, 11 Sep 2014 23:01:44 +0000 (23:01 +0000)]
Revert "Print the command line and ABI in stack dumps like debuggerd."
This reverts commit
38ac77b6fb1fc626299022fe0f16d5b6c365cb9b.
Change-Id: I8e4952b80d03ad61c3ff2afaf8a96b8c2e36f0c7
Jeff Brown [Thu, 11 Sep 2014 22:57:55 +0000 (22:57 +0000)]
Merge "Print the command line and ABI in stack dumps like debuggerd." into lmp-dev
Mathieu Chartier [Thu, 11 Sep 2014 21:21:41 +0000 (14:21 -0700)]
Add fast path to VMClassLoader.findLoadedClass
VMClassLoader.findLoadedClass now calls FindClassInPathClassLoader
as a fast path. Exclusive time results (trace view maps launch):
Before:
nativeFillInStackTrace 1.4%
defineClassNative 1.2%
findLoadedClass 0.2%
After:
nativeFillInStackTrace 0.5%
defineClassNative 0.0%
findLoadedClass 0.9%
Bug:
16828525
Change-Id: I1bde48effcd28529778c00ec0fa0dda4e32026a3
Jeff Brown [Thu, 11 Sep 2014 01:41:18 +0000 (18:41 -0700)]
Print the command line and ABI in stack dumps like debuggerd.
Ensure the heading is "Cmd line:" just like debuggerd and
as it used to be in Dalvik.
Fix a missing newline.
Trim all training nulls from the command line.
Don't bother printing the original command line if unset.
Add the ABI to the dump to help the native stack symbol tool.
Bug:
17474152
Change-Id: I19c585dbd7d31ef6c98270e469445cae40cbd518
Mathieu Chartier [Thu, 11 Sep 2014 20:14:31 +0000 (13:14 -0700)]
Delete pin table
The pin table was brought over from dalvik but not really needed
since ART doesn't support pinning in movable spaces. The only
thing it did was hold objects live for JNI functions.
This shouldn't be necessary since people keep jni references to
these objects or else they could never release the elements.
Bug:
17456946
Change-Id: Ibed0d029157ffb9e75ecd80d4d544d690986c090
Andreas Gampe [Thu, 11 Sep 2014 17:59:33 +0000 (10:59 -0700)]
ART: Fix preverified setting in VerifyClass
Make sure soft-failed classes cannot set methods to pre-verified.
Bug:
16828525,
17465185
Change-Id: I09c0a68ca722978459741311148eae7614f9ca49
Vladimir Marko [Thu, 11 Sep 2014 16:18:49 +0000 (16:18 +0000)]
Merge "Improve dex location canonicalization-related performance." into lmp-dev
Vladimir Marko [Thu, 11 Sep 2014 16:18:16 +0000 (16:18 +0000)]
Merge "Fix GetDexCanonicalLocation test for relative paths." into lmp-dev
Sebastien Hertz [Thu, 11 Sep 2014 14:23:44 +0000 (16:23 +0200)]
Fix crash when connected to DDMS
Restore init of WellKnownClasses::org_apache_harmony_dalvik_ddmc_Chunk_data and
removed duplicated line.
Bug:
17467328
Bug:
17463118
Change-Id: I64638e23615b7c20061b49c41a9c0e9f35a4d537
Sebastien Hertz [Thu, 11 Sep 2014 09:33:33 +0000 (09:33 +0000)]
Merge "Fix deadlock in VirtualMachine.AllThreads" into lmp-dev
Sebastien Hertz [Thu, 11 Sep 2014 08:04:30 +0000 (08:04 +0000)]
Merge "Don't hold any lock when visiting classes from JDWP" into lmp-dev
Brian Carlstrom [Thu, 11 Sep 2014 06:54:05 +0000 (06:54 +0000)]
Merge "Use WellKnownClasses in ThrowStackOverflowError to reduce changes of further stack overflow" into lmp-dev
Brian Carlstrom [Thu, 11 Sep 2014 06:10:47 +0000 (23:10 -0700)]
Use WellKnownClasses in ThrowStackOverflowError to reduce changes of further stack overflow
Bug:
17463118
Change-Id: Ic05b07803d2d3112e0b67064f380cd46ba9e293f
Andreas Gampe [Thu, 11 Sep 2014 02:48:05 +0000 (19:48 -0700)]
ART: Correctly make methods preverified
Bug:
16828525
Change-Id: I66756348b2aa50e41dacca59769b6810a91c73b0
Vladimir Marko [Fri, 5 Sep 2014 13:01:17 +0000 (14:01 +0100)]
Improve dex location canonicalization-related performance.
Eagerly add canonical dex file locations to the OatFile's
primary lookup map in Setup(). This moves the boot.oat work
from every app startup to the zygote initialization. Since
we always ended up initializing the canonical location map
anyway due to the way that we're loading dex files, the lazy
initialization didn't save anything.
Clean up dex file name canonicalization to make sure we
free() the memory returned by realpath() rather than using
std::unique_ptr<> with the default deleter.
Avoid some unnecessary duplicate OatDexFile lookups.
Bug:
16828525
Bug:
17346103
(cherry picked from commit
aa4497db59f1eeec954f2ba5da6d458fcdf9b3a4)
Change-Id: Icc4b14ebe903282ca91ce24e33a6d7c75dff991c
Calin Juravle [Thu, 7 Aug 2014 10:54:36 +0000 (11:54 +0100)]
Fix GetDexCanonicalLocation test for relative paths.
If the reference file is created with a relative path the test will
fail.
(cherry picked from commit
61281dc0aaa22730fd4fee268cac40776b193042)
Change-Id: Ie82b9d381bd884111dfc91cc235b46ad9f3225be
Brian Carlstrom [Wed, 10 Sep 2014 18:02:55 +0000 (18:02 +0000)]
Merge "Ensure class is linked before resolution" into lmp-dev
Sebastien Hertz [Wed, 10 Sep 2014 17:44:39 +0000 (19:44 +0200)]
Ensure class is linked before resolution
Adds a missing call to ClassLinker::EnsureResolved to ensure we did link the
class and retired the temp class (placeholder) before doing the resolution.
Bug:
17435441
Change-Id: Ib1a7181d6e5e814ca9299d0504e739a2b69475ef
Christopher Ferris [Wed, 10 Sep 2014 17:49:51 +0000 (17:49 +0000)]
Merge "Add proper cfi directives." into lmp-dev
Ian Rogers [Wed, 10 Sep 2014 14:31:36 +0000 (14:31 +0000)]
Merge "VisitClassesWithoutClassesLock isn't safe if classes move." into lmp-dev
Christopher Ferris [Tue, 9 Sep 2014 20:55:13 +0000 (13:55 -0700)]
Add proper cfi directives.
This function has a mix of arm and cfi directives. Since our unwinders
can work with both, remove the arm directives and fix the cfi directives.
Bug:
17392751
Change-Id: Ibd4859a4f0b8f2da751a0928a2f5f4afa3df7df8
Mathieu Chartier [Wed, 10 Sep 2014 00:26:58 +0000 (17:26 -0700)]
Increase dex2oat timeouts for debug builds
Should fix the 056-const-string-jumbo test.
Change-Id: I04d98dfd59003b964c1feee6eee31079f9f4a476
Mathieu Chartier [Tue, 9 Sep 2014 20:51:09 +0000 (13:51 -0700)]
Change Reference.get() intrinsic to Reference.getReferent().
The reference intrinsic was incorrectly inlining
PhantomReference.get(). We now get around this by adding a
layer of indirection. Reference.get() now calls getReferent()
which is intrinsified and inlined.
Requires:
https://android-review.googlesource.com/#/c/107100/
Bug:
17429865
(cherry picked from commit
cd48f2d86197d4fe87cc88077bc4af5ba66e5295)
Change-Id: Ie91e70abf43cedf3c707c7bb8a5059e19d2a2577
Jeff Hao [Tue, 9 Sep 2014 20:13:24 +0000 (20:13 +0000)]
Merge "Change 099-vmdebug test to use File.createTempFile." into lmp-dev
Jeff Hao [Tue, 9 Sep 2014 20:07:59 +0000 (13:07 -0700)]
Change 099-vmdebug test to use File.createTempFile.
Avoids issues with concurrency.
Bug:
17439227
Change-Id: I4a5956d9f26fad416a244216c2c77d5e6f072c62
Mathieu Chartier [Tue, 9 Sep 2014 17:39:37 +0000 (17:39 +0000)]
Merge "Temporarily disable LOS on 64 bit" into lmp-dev
Sebastien Hertz [Tue, 9 Sep 2014 10:08:49 +0000 (12:08 +0200)]
Fix deadlock in VirtualMachine.AllThreads
We cannot add any object in the JDWP object registry while holding the
Locks::thread_list_lock. Indeed we may need to suspend a thread and take it,
causing a deadlock by waiting for ourself on this lock.
Bug:
17343664
Change-Id: I2335c63e418c0d485daf2c35f8debcd52f943140
Andreas Gampe [Tue, 9 Sep 2014 06:39:45 +0000 (23:39 -0700)]
ART: Better error reporting on broken oat file
Do not blow up when in GetHashBucket if GetHashBucketNum is zero.
Instead back-step to ElfFileOpen, which prints which symbol was
missing from which file.
Bug:
17422404
Change-Id: I3b890dd1c31c08b1ccc0f7f668afcceee95f8d00
Brian Carlstrom [Tue, 9 Sep 2014 06:02:19 +0000 (06:02 +0000)]
Merge "Workaround Darwin ContainedWithinExistingMap issue" into lmp-dev
Brian Carlstrom [Tue, 9 Sep 2014 05:41:35 +0000 (22:41 -0700)]
Workaround Darwin ContainedWithinExistingMap issue
Bug:
16861075
Change-Id: I577a0c7ede919e610c356e7c40dd60d87914dd3a
Sebastien Hertz [Tue, 9 Sep 2014 05:12:55 +0000 (05:12 +0000)]
Merge "Fix monitor visit for class initializer" into lmp-dev
Andreas Gampe [Tue, 9 Sep 2014 05:07:38 +0000 (05:07 +0000)]
Merge "ART: Fix unchecked register index validity" into lmp-dev
Brian Carlstrom [Tue, 9 Sep 2014 04:37:39 +0000 (21:37 -0700)]
Fix darwin run-test problems
Bug:
17428908
Change-Id: Id74a0383fdae6753558e27cd447c1ca349819c91
Mathieu Chartier [Tue, 9 Sep 2014 02:49:50 +0000 (19:49 -0700)]
Temporarily disable LOS on 64 bit
Problem is that MAP_32BIT simulation can take seconds on large object
allocations in the worst case.
Bug:
17414549
Change-Id: I463bb0b728eed14847a32a27a93640ec6080f6b3
Mathieu Chartier [Tue, 9 Sep 2014 01:14:22 +0000 (01:14 +0000)]
Merge "Add fast path for FindClass using the type dex file." into lmp-dev
Mathieu Chartier [Fri, 5 Sep 2014 01:33:17 +0000 (18:33 -0700)]
Add fast path for FindClass using the type dex file.
If we are using the PathClassLoader with a BootClassLoader
parent, we can handle the common case in the FindClass function
without needing to go back to java code.
Around 10% speedup measured of maps launch, could be noise due to
large variation of app launch times. Eliminates defineClassNative
from being anywhere near the top of sampling profiles.
Bug:
17397179
Bug:
16828525
Change-Id: Ide0db2b5f6cf5b96fc46e89178e0799de667cb88
Andreas Gampe [Tue, 9 Sep 2014 00:41:35 +0000 (00:41 +0000)]
Merge "ART: Change ART for new native bridge sequence" into lmp-dev
Mathieu Chartier [Mon, 8 Sep 2014 23:01:52 +0000 (23:01 +0000)]
Merge "Add test for hashCode and System.identityHashCode." into lmp-dev
Jeff Hao [Mon, 8 Sep 2014 22:32:39 +0000 (15:32 -0700)]
Disable tracing if enabled by default for new tracing test.
Bug:
17412385
Change-Id: If963a9ba2214c72efbef673a840bbeb6fdbb1795
Jeff Hao [Mon, 8 Sep 2014 22:22:08 +0000 (22:22 +0000)]
Merge "Change when sampling thread is reset during shutdown to prevent races." into lmp-dev
Jeff Hao [Mon, 8 Sep 2014 16:38:18 +0000 (09:38 -0700)]
Change when sampling thread is reset during shutdown to prevent races.
Also adds some extra argument checking and testing for tracing.
Bug:
17412385
Change-Id: I876378d5bd17d75ab346584713b04dc0656d2120
Mathieu Chartier [Mon, 8 Sep 2014 21:48:25 +0000 (14:48 -0700)]
Add test for hashCode and System.identityHashCode.
(cherry picked from commit
bda2836af470c45e30c567b14d6747a7450c4741)
Change-Id: Ieba8f8eb09441ec145a176df00c293695eae0f47
Mathieu Chartier [Mon, 8 Sep 2014 20:35:11 +0000 (13:35 -0700)]
Ignore heap trim requests if we are the zygote
Done to prevent app launching lag due to sleep in heap trimmer
daemon.
Bug:
17310019
Change-Id: Ia593e7eced1c1583771985ec9e7b60ee0c0e7912
Mathieu Chartier [Mon, 8 Sep 2014 20:08:41 +0000 (20:08 +0000)]
Revert "Fix heap trimmer daemon sleeping."
This reverts commit
698b44634396e8111e96e1116586fde89a838347.
Change-Id: Ifa8c2d554b82289cc31803ad6027735d2c3c9be8
Andreas Gampe [Sun, 7 Sep 2014 20:06:12 +0000 (13:06 -0700)]
ART: Fix unchecked register index validity
The static check of index validity is against the type given by
the instruction, e.g., boolean for SPUT_BOOLEAN, but the target_type
is the resolved field type and can differ. An additional check is
necessary to avoid a read out of bounds.
Bug:
17411109
Change-Id: Ie4ed8bbda79f3f6403a24e727450a943447aa71d
Andreas Gampe [Wed, 3 Sep 2014 04:22:18 +0000 (21:22 -0700)]
ART: Change ART for new native bridge sequence
Initialize or unload after a fork.
(cherry picked from commit
6be67eeedbe60afce42300ae3e7f0e7180a96efa)
Change-Id: I5a20de1cb68dd1802937b369b14c50c9c1031c67
Ian Rogers [Fri, 29 Aug 2014 22:40:08 +0000 (15:40 -0700)]
VisitClassesWithoutClassesLock isn't safe if classes move.
Which they do, so avoid by doing an array allocation.
Also, tidy member variables to the end of ClassLinker.
Remove unnecessary mutable. Tidy and fix a locks required/excluded.
Change-Id: I2404a9e7a1ea997d68ab1206f97d2a20dffbda06
(cherry picked from commit
dbf3be0f133c0bdf454f637fee2452dbb5f7c027)
Sebastien Hertz [Mon, 8 Sep 2014 08:15:19 +0000 (10:15 +0200)]
Fix monitor visit for class initializer
We do not hold class object's lock when invoking class initializer. Therefore
it is wrong to visit it when looking for monitors owned by a thread.
Bug:
17377924
Change-Id: I7fddcdb9a554301e040c571971eec9be6cba5eda
Brian Carlstrom [Fri, 5 Sep 2014 18:54:44 +0000 (18:54 +0000)]
Merge "Fix numerous issues with DdmVmInternal allocation tracking" into lmp-dev
Brian Carlstrom [Fri, 5 Sep 2014 05:15:18 +0000 (22:15 -0700)]
Fix numerous issues with DdmVmInternal allocation tracking
Issues addressed:
- Using without JDWP attached caused native crash.
- When buffer is full (64k entries), number of entries reported was 0.
- Disabling tracking after disabling tracking caused native crash.
- Asking for allocations after disabled caused native crash.
- Lock ordering issues between mutator lock and alloc tracker lock.
Adding 098-ddmc test to cover these cases.
Bug:
17392248
Change-Id: I45c0abbfb3dd7a7421aea3bbba2ea8d05225e48b
Calin Juravle [Fri, 5 Sep 2014 15:33:21 +0000 (15:33 +0000)]
Merge "Avoid recomputing the dex checksum during class loading" into lmp-dev
Calin Juravle [Tue, 2 Sep 2014 14:53:55 +0000 (15:53 +0100)]
Avoid recomputing the dex checksum during class loading
Thread the already computed checksum to VerifyOatAndDexFileChecksums and
LoadMultiDexFilesFromOatFile to avoid recomputing it.
Bug:
17346103
Change-Id: Ifa0c1cad952853751e98cbb3c999631b9909a9f9
Ian Rogers [Wed, 13 Aug 2014 21:37:26 +0000 (14:37 -0700)]
Ensure alternate signal stack is minimum size.
On Mac a sigaltstack may need to be 32KB, setting it to 16KB causes
sigaltstack to fail.
(cherry picked from commit
c24a1e00b13a7ebf10dd896f6a18b1ad09617ec7)
Change-Id: Ic06d80f1acf5c4eb3d2dd1156bfa2805ab0df492
Mathieu Chartier [Thu, 4 Sep 2014 17:38:39 +0000 (17:38 +0000)]
Merge "Fix heap trimmer daemon sleeping." into lmp-dev
Mathieu Chartier [Thu, 4 Sep 2014 04:26:36 +0000 (21:26 -0700)]
Fix heap trimmer daemon sleeping.
Problem:
Heap trimmer daemon sleeping caused app launch occasionally to take a
while due stopping the heap trimming thread taking a long time.
The heap trimmer thread now never sleeps, we prevent issues caused
by frequent back and forth process state changes by only
transitioning to background if it has been kCollectorTransitionWait
time since the last transition to background. Similar logic for heap
trimming.
Bug:
17310019
Change-Id: I23980421cc388f36b66a4c03ed15dd11d43f59b5
Jean Christophe Beyler [Thu, 4 Sep 2014 15:34:28 +0000 (08:34 -0700)]
ART: Fix x86_64 GenSelect case when destination is Ref
Reference in x86_64 is a 64-bit solo register. As a result, the invocation
of OpRegImm results in an error when Select opcode of the kind:
ref = boolean ? null : null;
because opRegImm does not support 64-bit destination for OpMov.
The case above is only possible for ref because no one other constant except
null is possible.
Bug:
17327895
Change-Id: I7541e744ec1c8619711712fd17be72764efcf3a8
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
3f51e7d942c22edaab3a7e703a1e6a2dd6a26f77)
Ian Rogers [Thu, 4 Sep 2014 15:53:16 +0000 (15:53 +0000)]
Merge "ART: Fix computation of frame size for direct proxy methods" into lmp-dev
Serguei Katkov [Fri, 29 Aug 2014 11:20:15 +0000 (18:20 +0700)]
ART: Fix computation of frame size for direct proxy methods
Proxy method has only one direct method and it is a constructor which
is cloned from java.lang.reflect.Proxy class together with code.
As a result its body is a compiled quick code and frame size should be
computed accordingly in contrast with other virtual methods which are
invoked through stub.
Change-Id: I0ac99b2f567b281c9342152bad1149dd6cd39480
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
(cherry picked from commit
805bab1738549b2477b3ad4d9d57fd7c681451b9)
Mathieu Chartier [Thu, 4 Sep 2014 04:23:13 +0000 (04:23 +0000)]
Merge "Fix native allocation watermark clamping." into lmp-dev
Mathieu Chartier [Wed, 3 Sep 2014 17:30:11 +0000 (10:30 -0700)]
Fix native allocation watermark clamping.
The main issue causing the test to fail is that
native_footprint_gc_watermark_ becoming > growth_limit_ due to no
clamping.
Temporary runFinalization fix is calling runFinalization 2x.
Bug:
17371542
Change-Id: I188cb530a44dd109e066a22091f12f8d2d4350c3
Mathieu Chartier [Thu, 4 Sep 2014 02:29:14 +0000 (02:29 +0000)]
Merge "Add exception check to AllocateInternalWithGc" into lmp-dev