OSDN Git Service

android-x86/dalvik.git
14 years agoChange the bitmap callback signature to have a void return value.
Carl Shapiro [Fri, 30 Jul 2010 03:39:50 +0000 (20:39 -0700)]
Change the bitmap callback signature to have a void return value.

Previously, a bitmap callback could abort the bitmap traversal by
returning false.  All of the bitmap callbacks used in the garbage
collector are hardwired to return true.  This change eliminates the
early termination facility and its attendant complexity.

Change-Id: I5490dd74b56b9700ec1b7e657637fae5eb4cc339

14 years agoMerge "Remove unused limits.h include and fix sys/mman.h include comment."
Carl Shapiro [Fri, 30 Jul 2010 03:44:25 +0000 (20:44 -0700)]
Merge "Remove unused limits.h include and fix sys/mman.h include comment."

14 years agoRemove unused limits.h include and fix sys/mman.h include comment.
Carl Shapiro [Fri, 30 Jul 2010 02:51:53 +0000 (19:51 -0700)]
Remove unused limits.h include and fix sys/mman.h include comment.

Change-Id: I00299ca598af03da27be29867b71588c3aa81e83

14 years agoRemove an unused member from the mark context.
Carl Shapiro [Fri, 30 Jul 2010 00:51:54 +0000 (17:51 -0700)]
Remove an unused member from the mark context.

Change-Id: Ic85061af92e507001ddfb61710e996362078ec9d

14 years agoRe-enable the concurrent GC.
Carl Shapiro [Thu, 29 Jul 2010 22:24:08 +0000 (15:24 -0700)]
Re-enable the concurrent GC.

Change-Id: I1ddee8491788bb60371cdbadf25b53c65e012e0e

14 years agoMerge "Allow the VM to suspend while the heap worker initializes."
Brian Carlstrom [Thu, 29 Jul 2010 21:48:35 +0000 (14:48 -0700)]
Merge "Allow the VM to suspend while the heap worker initializes."

14 years agoAllow the VM to suspend while the heap worker initializes.
Carl Shapiro [Sat, 24 Jul 2010 01:11:27 +0000 (18:11 -0700)]
Allow the VM to suspend while the heap worker initializes.

The concurrent collector may initiate a collection, holding the heap
worker lock, while the heap worker thread starts up.  This causes the
thread suspension to wait indefinitely for the heap worker thread and
forces a VM abort.  The following stack trace is logged:

  #00 __futex_syscall3
  #01 pthread_mutex_lock<-_normal_lock
  #02 heapWorkerThreadStart<-dvmLockMutex
  #03 internalThreadStart
  #04 __thread_entry
  #05 pthread_create

This change puts the heap worker thread in to the VM wait state while
it acquires its locks during startup thereby avoiding the crash.  The
first dvmLockMutex substituted seems to have quelled the crashes at
startup.  The second may be unnecessary but seems benign.

14 years agoJIT: temporarily disable the JIT and concurrent GC on SMP systems
buzbee [Thu, 29 Jul 2010 20:17:35 +0000 (13:17 -0700)]
JIT: temporarily disable the JIT and concurrent GC on SMP systems

Change-Id: If2d489b2aca39cd0297453f311a5c3ce80f577d9

14 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Brian Carlstrom [Wed, 28 Jul 2010 23:23:02 +0000 (16:23 -0700)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

Change-Id: I990ca89cfd36271813e5af4bcad479290bee2502

14 years agoUse the card marks to find gray objects during a concurrent collection.
Carl Shapiro [Wed, 28 Jul 2010 21:12:27 +0000 (14:12 -0700)]
Use the card marks to find gray objects during a concurrent collection.

Presently, the garbage collector scans the mark bits looking for gray
objects.  As of this change, only objects spanning dirty cards will be
reexamined during re-marking.

As part of this change, re-marking of roots will push objects onto the
mark stack instead of setting their mark bits.  The number of gray
roots discovered during re-marking is small.  If this changes we can
dirty the cards instead and let re-scanning push the gray objects.

Change-Id: If270812821e070d09af344edb63dfede26d10410

14 years agoMerge "Verify jmethodID when calling methods." into dalvik-dev
Andy McFadden [Wed, 28 Jul 2010 14:36:22 +0000 (07:36 -0700)]
Merge "Verify jmethodID when calling methods." into dalvik-dev

14 years agoRemove an obsolete member reference.
Carl Shapiro [Wed, 28 Jul 2010 06:50:25 +0000 (23:50 -0700)]
Remove an obsolete member reference.

Change-Id: I97394489304d86a840b4716b3e5d2f1e26745cfa

14 years agoMerge "Separately report thread suspension and garbage collection times." into dalvik-dev
Carl Shapiro [Wed, 28 Jul 2010 06:35:49 +0000 (23:35 -0700)]
Merge "Separately report thread suspension and garbage collection times." into dalvik-dev

14 years agoSeparately report thread suspension and garbage collection times.
Carl Shapiro [Wed, 28 Jul 2010 00:25:31 +0000 (17:25 -0700)]
Separately report thread suspension and garbage collection times.

The GC elapsed time written to the log used to be the sum of the time
spent suspending threads and the time spent executing the rest of the
garbage collector code.  With this change we account for each of these
phases separately.  With the concurrent GC, thread suspension can
dominate the GC pause times so breaking this number out gives a clear
picture of the efficiency of the underlying GC algorithm.

Also, accounting for the concurrent garbage collector is more
accurate.  The start and end times did not subtract the amount of time
spent during the concurrent mark.  The clock is now stopped and
restarted during the concurrent phase of the collector.

Change-Id: Icf3f8c0e183166a62ca1bf32fc77f17e3b5aa963

14 years agoVerify jmethodID when calling methods.
Andy McFadden [Tue, 27 Jul 2010 23:04:43 +0000 (16:04 -0700)]
Verify jmethodID when calling methods.

The JNI Call<type>Method, CallNonvirtual<type>Method, and
CallStatic<type>Method functions take an object (or class) and a
jmethodID as arguments.  For virtual calls, if the jmethodID is not
for a method in the provided object, the VM can crash.  (The most
common way to accomplish this is to pass a class object into a virtual
method call.)

For static method calls, the method defines the class, and we ignore
the jclass argument.  Still, we don't want badly-formed code floating
around, so we just log a warning.

This is part of CheckJNI.

Bug 2577881.

Change-Id: Ia19f0cb604b06a6bd4da8e3d6238d4e162b1480e

14 years agoMerge commit '1daf86bdb630efa96147220019e1a97c853ed3d2' into mm
Brian Carlstrom [Tue, 27 Jul 2010 18:26:36 +0000 (11:26 -0700)]
Merge commit '1daf86bdb630efa96147220019e1a97c853ed3d2' into mm

14 years agoMerge "Remove some partial gc code." into dalvik-dev
Carl Shapiro [Mon, 26 Jul 2010 18:17:13 +0000 (11:17 -0700)]
Merge "Remove some partial gc code." into dalvik-dev

14 years agoInflate excessively reacquired thin locks.
Carl Shapiro [Fri, 23 Jul 2010 23:30:12 +0000 (16:30 -0700)]
Inflate excessively reacquired thin locks.

Change-Id: I78e436bb57722e23730b3c6b6f72705276bde44a

14 years agoRemove some partial gc code.
Carl Shapiro [Fri, 23 Jul 2010 03:22:49 +0000 (20:22 -0700)]
Remove some partial gc code.

This code conflicts with the concurrent collector.

Change-Id: I640d68943b72a967ff39989a445be87ce5ee781c

14 years agoMerge "Drive the root verification by a root visitor." into dalvik-dev
Carl Shapiro [Fri, 23 Jul 2010 01:25:55 +0000 (18:25 -0700)]
Merge "Drive the root verification by a root visitor." into dalvik-dev

14 years agoDrive the root verification by a root visitor.
Carl Shapiro [Fri, 23 Jul 2010 00:29:23 +0000 (17:29 -0700)]
Drive the root verification by a root visitor.

The change separates out the traversal of the roots from the
verification of references.  As of this change, the logic benhind
traversing is wholly owned by the visitor.

Change-Id: Idc07755436f5cd18ba010ec24d12b6e22000c56e

14 years agoMerge "x86 interpreter write barrier support" into dalvik-dev
buzbee [Thu, 22 Jul 2010 22:58:37 +0000 (15:58 -0700)]
Merge "x86 interpreter write barrier support" into dalvik-dev

14 years agoMerge "New string intern table without immortal bits." into dalvik-dev
Carl Shapiro [Thu, 22 Jul 2010 22:46:08 +0000 (15:46 -0700)]
Merge "New string intern table without immortal bits." into dalvik-dev

14 years agoNew string intern table without immortal bits.
Carl Shapiro [Wed, 21 Jul 2010 21:49:25 +0000 (14:49 -0700)]
New string intern table without immortal bits.

The old implementation of the intern table stole the lsb to denote
that a string was "immortal" meaning that it was loaded from a dex
file.  Before clients can use strings from this table they must be
aware of the bit and clear it before chasing the pointer.

The new intern table separates strings that are interned by a call to
String.intern and strings that are interned by the class loader.  This
adds a small cost to each intern call.  Fortunately, there is a
payback in the garbage collector as we can scan just the literal
strings during root marking and scan just the user interned strings
before sweeping to clear them.  Also we no longer have to special case
walking through reference-containing locations in the intern table.

Change-Id: I1192fdcc99e1bb2c606f74f54b3056ec60b6f39b

14 years agox86 interpreter write barrier support
buzbee [Thu, 15 Jul 2010 23:03:32 +0000 (16:03 -0700)]
x86 interpreter write barrier support

Fix for 2837703.  Also added support for new Dalvik volatile ops.

Change-Id: Ic2b8d31afc8806077c5bf27ec90c643f7e47591e

14 years agoMerge "JIT: Support for Dalvik volatiles (issue 2781881)" into dalvik-dev
buzbee [Thu, 22 Jul 2010 17:31:36 +0000 (10:31 -0700)]
Merge "JIT: Support for Dalvik volatiles (issue 2781881)" into dalvik-dev

14 years agoJIT: Support for Dalvik volatiles (issue 2781881)
buzbee [Tue, 20 Jul 2010 21:53:42 +0000 (14:53 -0700)]
JIT: Support for Dalvik volatiles (issue 2781881)

Also, on SMP systems generate memory barriers.

Change-Id: If64f7c98a8de426930b8f36ac77913e53b7b2d7a

14 years agoIn sweepBitmapCallback, index into ptrs, rather than increment.
Barry Hayes [Wed, 21 Jul 2010 18:51:37 +0000 (11:51 -0700)]
In sweepBitmapCallback, index into ptrs, rather than increment.

The arm seems to only have data changes from this change, so should
not change performance.

Change-Id: I32e40ccc2724fccb5996cbafb9f3872785544ae3

14 years agoMerge "Fixup a failing assert." into dalvik-dev
Barry Hayes [Wed, 21 Jul 2010 18:38:54 +0000 (11:38 -0700)]
Merge "Fixup a failing assert." into dalvik-dev

14 years agoFixup a failing assert.
Barry Hayes [Wed, 21 Jul 2010 18:22:04 +0000 (11:22 -0700)]
Fixup a failing assert.

YET AGAIN bit by max being inclusive. Only failed occasionally, and
failures quickly restart and roll off the log. I wasn't watching
closely enough when I tested, I expect.

Change-Id: I2c8e9c0b49ffd9b575e8fa4c882bdae9c64e8304

14 years agoMerge "Be less misleading when something goes wrong early." into dalvik-dev
Elliott Hughes [Wed, 21 Jul 2010 18:08:14 +0000 (11:08 -0700)]
Merge "Be less misleading when something goes wrong early." into dalvik-dev

14 years agoBe less misleading when something goes wrong early.
Elliott Hughes [Wed, 21 Jul 2010 00:23:06 +0000 (17:23 -0700)]
Be less misleading when something goes wrong early.

In the recent icu4c breakage, we misinterpreted the "thrown during ...<clinit>"
to mean that <clinit> was the method that threw. This patch makes the wording
less easy to misinterpret.

The other thing that was confusing was the lack of a stack trace. It turns out
that dalvikvm tried to output a stack trace when the thread died, but it was
using LOGI. We'd have seen that on the device (which logs everything), but it
was filtered out by the host build's liblog. (Our ANDROID_LOG_TAGS was set to
"*:w".)

Change-Id: Ib46b3c7addc75aed103a3eb9fa010234f4444fbe

14 years agoMerge "When aliasing a bitmap, use smallest available limit." into dalvik-dev
Barry Hayes [Wed, 21 Jul 2010 01:23:42 +0000 (18:23 -0700)]
Merge "When aliasing a bitmap, use smallest available limit." into dalvik-dev

14 years agoWhen aliasing a bitmap, use smallest available limit.
Barry Hayes [Thu, 15 Jul 2010 15:58:10 +0000 (08:58 -0700)]
When aliasing a bitmap, use smallest available limit.

dvmHeapSourceGetObjectBitmaps was using each Heap's allocation limit
to set the max for the bitmap. This causes the HeapBitmap iterators to
do unnecessary work, over parts of the HeapBitmap which could be known
to be all zeros.

Making the max for a HeapBitmap also take into account the liveBits's
max will inform the HeapBitmap iterators that these regions are all
zeros. This will only change the calculation for the active allocation
Heap; but when there are two Heaps, the Zygote Heap is expected to be
pretty well packed, with not a lot of extra words of zeroes in the
HeapBitmap.

Also fixes a defect in aliasBitmap's calculation of bitsLen.
See http://b/issue?id=2857152

Change-Id: Iacb6bc400318702d760a774c6ca5eab67b8bdfd3

14 years agoMerge "Port the improved 087 test back to test 086." into dalvik-dev
Barry Hayes [Tue, 20 Jul 2010 22:18:37 +0000 (15:18 -0700)]
Merge "Port the improved 087 test back to test 086." into dalvik-dev

14 years agoMerge "Add class checks in AllocObject / NewObject." into dalvik-dev
Andy McFadden [Tue, 20 Jul 2010 18:29:41 +0000 (11:29 -0700)]
Merge "Add class checks in AllocObject / NewObject." into dalvik-dev

14 years agoMerge "Remove #ifdef 0 code in removeCollectedObject." into dalvik-dev
Barry Hayes [Tue, 20 Jul 2010 17:44:40 +0000 (10:44 -0700)]
Merge "Remove #ifdef 0 code in removeCollectedObject." into dalvik-dev

14 years agoAdd class checks in AllocObject / NewObject.
Andy McFadden [Mon, 19 Jul 2010 22:44:56 +0000 (15:44 -0700)]
Add class checks in AllocObject / NewObject.

The JNI spec says the functions throw InstantiationException if you
pass in an abstract or interface class, and that you "must not" try to
allocate an array class with this mechanism.  These are now checked.
We also forbid creation of a Class object with these calls, since
that should only be done by DefineClass.

Also, added appropriate "is class initialized" code for the A/V
variants of NewObject, which were strangely lacking them.

Change-Id: I8dde7a812265cfb16b1765695c652e98c9de0840

14 years agoRemove #ifdef 0 code in removeCollectedObject.
Barry Hayes [Tue, 20 Jul 2010 17:24:04 +0000 (10:24 -0700)]
Remove #ifdef 0 code in removeCollectedObject.

Change-Id: I095b5bdccde621da88ac9118123d82583b0230b6

14 years agoPort the improved 087 test back to test 086.
Barry Hayes [Tue, 20 Jul 2010 16:46:05 +0000 (09:46 -0700)]
Port the improved 087 test back to test 086.

Change-Id: Id4dffe23fb60c4e703a0c4de0fab1a0876b2756a

14 years agoMerge "Add a regression test. dvmFreeClassInnards had a defect where it would SIGSEGV...
Barry Hayes [Tue, 20 Jul 2010 16:42:39 +0000 (09:42 -0700)]
Merge "Add a regression test. dvmFreeClassInnards had a defect where it would SIGSEGV when a linking error tried to clean up, and then GC also tried to clean up when freeing a ClassObject." into dalvik-dev

14 years agoAdd a regression test. dvmFreeClassInnards had a defect where it would
Barry Hayes [Mon, 12 Jul 2010 18:06:42 +0000 (11:06 -0700)]
Add a regression test. dvmFreeClassInnards had a defect where it would
SIGSEGV when a linking error tried to clean up, and then GC also tried
to clean up when freeing a ClassObject.

Bug 2786413

Change-Id: Ia4c6bc9eae007a9cf65db13ddf3019ed9ac07d7f

14 years agoRevert "When aliasing a bitmap, use smallest available limit."
Carl Shapiro [Mon, 19 Jul 2010 22:55:01 +0000 (15:55 -0700)]
Revert "When aliasing a bitmap, use smallest available limit."

This did not correctly compute the intended limit.

This reverts commit 740cd296284e682d9d92bd638d266efccf817bbe.

14 years agoMerge "Implement JDWP ArrayType.NewInstance." into dalvik-dev
Andy McFadden [Mon, 19 Jul 2010 22:44:27 +0000 (15:44 -0700)]
Merge "Implement JDWP ArrayType.NewInstance." into dalvik-dev

14 years agoImplement JDWP ArrayType.NewInstance.
Andy McFadden [Mon, 19 Jul 2010 20:51:36 +0000 (13:51 -0700)]
Implement JDWP ArrayType.NewInstance.

With this, you can go into the Eclipse "Display" view and evaluate
"new byte[5]" to get "(byte[]) [0, 0, 0, 0, 0]".

Change-Id: Id110c5701a9de12222760be6623585b5f7e28023

14 years agoam b037a464: Don\'t do heap dump on SIGUSR1.
Andy McFadden [Mon, 19 Jul 2010 15:58:36 +0000 (08:58 -0700)]
am b037a464: Don\'t do heap dump on SIGUSR1.

Merge commit 'b037a464512c0721bdca969ae19cce3d4b17b083' into dalvik-dev

* commit 'b037a464512c0721bdca969ae19cce3d4b17b083':
  Don't do heap dump on SIGUSR1.

14 years agoImplement JNI UnregisterNatives.
Andy McFadden [Fri, 16 Jul 2010 00:20:24 +0000 (17:20 -0700)]
Implement JNI UnregisterNatives.

This function is of limited use, but one of our partners found a need
for it, so it's finally getting implemented.  It clears all JNI native
method bindings in a given class.

It turns out there are some interesting potential races which can be
avoided by treading lightly.  The utility function that updates the
Method struct has been modified appropriately.

(There's a race on ARM SMP in the original implementation, in which
we could still observe "insns" as NULL after nativeFunc is pointing at
the JNI bridge.  Handled in this change with an explicit full barrier,
which is overkill.  We can make it better as part of the general
barrier-removal pass in bug 2781972 -- really wants an acquiring load
on nativeFunc, though that's a waste for internal native calls.)

Also, stifled an unnecessary warning about redefining a native method
implementation (which is explicitly allowed).  Limited the scope of
an inappropriate "const" declaration.

Bug 2697885.

Change-Id: Ie406e25de3f77d00fe3e9130b406abcb45c3d60e

14 years agoDon't do heap dump on SIGUSR1.
Andy McFadden [Fri, 16 Jul 2010 18:07:58 +0000 (11:07 -0700)]
Don't do heap dump on SIGUSR1.

We still do the GC, but without the HPROF heap dump.

Change-Id: I004a65b9571667dd320dfabec1441d0fc8b9970a

14 years agoMerge "Tracing for developers of native methods." into dalvik-dev
Elliott Hughes [Thu, 15 Jul 2010 23:24:30 +0000 (16:24 -0700)]
Merge "Tracing for developers of native methods." into dalvik-dev

14 years agoTracing for developers of native methods.
Elliott Hughes [Wed, 7 Jul 2010 21:47:25 +0000 (14:47 -0700)]
Tracing for developers of native methods.

The existing -verbose:jni is mainly useful for VM developers hacking on the JNI
implementation; this is intended to replace the ad hoc logging developers of
native methods need to write.

Use "-Xint:portable -Xjnitrace:ClassNameSubstring" on the command line. To
trace all native methods (mainly useful for testing the tracing), use
"-Xjnitrace:"; to trace just methods in java.util.regex.Matcher, use
"-Xjnitrace:Matcher" or "-Xjnitrace:Ljava/util/regex/Matcher;" or whatever.
To trace all the methods in Matcher and Pattern, you have to use something
like "-Xjnitrace:java/util/regex/". There's no facility for tracing an
individual method or group of methods because I haven't needed such a thing.

Here's a basic example:

 -> Ljava/nio/charset/Charsets;.toUtf8Bytes([CII)[B (0x400474b8, 0, 5)
 <- Ljava/nio/charset/Charsets;.toUtf8Bytes([CII)[B returned 0x40047548

Here's an example of a non-static native method:

 -> Lorg/apache/harmony/luni/platform/OSFileSystem;.writeImpl(I[BII)J this=0x40012e78 (1, 0x400476d0, 0, 5)
 <- Lorg/apache/harmony/luni/platform/OSFileSystem;.writeImpl(I[BII)J returned 5

Here's an interesting example showing another native method being called, and
an exception being thrown by a native method:

 -> Ljava/lang/VMClassLoader;.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; (0x400466b8, false)
 -> Ljava/lang/Throwable;.nativeFillInStackTrace()Ljava/lang/Object; ()
 <- Ljava/lang/Throwable;.nativeFillInStackTrace()Ljava/lang/Object; returned 0x400467c8
 <- Ljava/lang/VMClassLoader;.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; threw Ljava/lang/ClassNotFoundException;

(This functionality needs to be enabled at compile time. A later patch will
address that.)

Change-Id: I6da8930bd4b4f228e07b05cc59a3aea331c5cee1

14 years agoMerge commit 'ba7e99a13ccb03611781cfec2631303cc042c76a' into mm
Brian Carlstrom [Thu, 15 Jul 2010 22:10:32 +0000 (15:10 -0700)]
Merge commit 'ba7e99a13ccb03611781cfec2631303cc042c76a' into mm

14 years agoMerge "Fix a crash during the VM shutdown." into dalvik-dev
Carl Shapiro [Thu, 15 Jul 2010 19:24:51 +0000 (12:24 -0700)]
Merge "Fix a crash during the VM shutdown." into dalvik-dev

14 years agoMerge "Caching the class name on the Java heap." into dalvik-dev
Jesse Wilson [Thu, 15 Jul 2010 19:02:02 +0000 (12:02 -0700)]
Merge "Caching the class name on the Java heap." into dalvik-dev

14 years agoam 58b0f67f: am 1c3da619: am 0f0e6f10: Merge "The ICU data is no longer compiled...
Joe Onorato [Thu, 15 Jul 2010 18:38:42 +0000 (11:38 -0700)]
am 58b0f67f: am 1c3da619: am 0f0e6f10: Merge "The ICU data is no longer compiled directly into the shared library." into gingerbread

Merge commit '58b0f67fe22032f55bf779e2f828b445a475bfd3' into dalvik-dev

* commit '58b0f67fe22032f55bf779e2f828b445a475bfd3':
  The ICU data is no longer compiled directly into the shared library.

14 years agoJIT: Fix for 2813841, use core regs for sub-word data
Bill Buzbee [Wed, 7 Jul 2010 13:55:56 +0000 (06:55 -0700)]
JIT: Fix for 2813841, use core regs for sub-word data

In an attempt to avoid unnecessary register copies, the JIT allows
data items to live in either floating point or core registers until
an instruction is used which requires one or the other.  The bug here
was that sub-word data was allowed to live in floating point registers
at the point of a load or store.  This cl forces the use of core registers
in those cases.

Change-Id: Iaee57545c6a62990186a5d0ab5bb22728d75dd60

14 years agoam 1c3da619: am 0f0e6f10: Merge "The ICU data is no longer compiled directly into...
Joe Onorato [Thu, 15 Jul 2010 18:31:01 +0000 (11:31 -0700)]
am 1c3da619: am 0f0e6f10: Merge "The ICU data is no longer compiled directly into the shared library." into gingerbread

Merge commit '1c3da6197c677339cfdd41a948a5f79f804d6e4e'

* commit '1c3da6197c677339cfdd41a948a5f79f804d6e4e':
  The ICU data is no longer compiled directly into the shared library.

14 years agoFix a crash during the VM shutdown.
Carl Shapiro [Thu, 15 Jul 2010 18:26:26 +0000 (11:26 -0700)]
Fix a crash during the VM shutdown.

The routine to shutdown the threads in a heap source was not checking
to see whether a heap source had been created.  This caused a crash
when VM requested a shutdown before it had fully initialized.

Change-Id: Iea0c7e9ed86ede881986a6576d9f973b2ec8c36d

14 years agoam 0f0e6f10: Merge "The ICU data is no longer compiled directly into the shared libra...
Joe Onorato [Thu, 15 Jul 2010 18:12:43 +0000 (11:12 -0700)]
am 0f0e6f10: Merge "The ICU data is no longer compiled directly into the shared library." into gingerbread

Merge commit '0f0e6f10f9029a958683b0830d47b21bc993a067' into gingerbread-plus-aosp

* commit '0f0e6f10f9029a958683b0830d47b21bc993a067':
  The ICU data is no longer compiled directly into the shared library.

14 years agoMerge "The ICU data is no longer compiled directly into the shared library." into...
Joe Onorato [Thu, 15 Jul 2010 18:08:00 +0000 (11:08 -0700)]
Merge "The ICU data is no longer compiled directly into the shared library." into gingerbread

14 years agoMerge "Describe dalvik.vm.extra-opts." into dalvik-dev
Andy McFadden [Thu, 15 Jul 2010 17:45:51 +0000 (10:45 -0700)]
Merge "Describe dalvik.vm.extra-opts." into dalvik-dev

14 years agoDescribe dalvik.vm.extra-opts.
Andy McFadden [Thu, 15 Jul 2010 17:30:23 +0000 (10:30 -0700)]
Describe dalvik.vm.extra-opts.

Goes with bug 2838629.

Change-Id: I754af767bf8173a674d84428a3ce11cd337b19ae

14 years agoMake dvmVerifyCardTable more resiliant, and move invocation to start
Barry Hayes [Wed, 14 Jul 2010 14:07:54 +0000 (07:07 -0700)]
Make dvmVerifyCardTable more resiliant, and move invocation to start
and end of GC.

Also removes the dependence on HeapBitmap from the .h file.

Change-Id: I2132d0dedfb8fbd07012563d116e808d444038ab

14 years agoMake dvmCardTableStartup be more independant of HeapSource startup.
Barry Hayes [Wed, 14 Jul 2010 15:13:18 +0000 (08:13 -0700)]
Make dvmCardTableStartup be more independant of HeapSource startup.

Also added a call to dvmCardTableShutdown. Also removed the dependency
on GcHeap from CardTable.h.

Change-Id: Icf0293572371cc8a30b55672816fdd75a151e82c

14 years agoCaching the class name on the Java heap.
Jesse Wilson [Thu, 15 Jul 2010 01:40:51 +0000 (18:40 -0700)]
Caching the class name on the Java heap.

The native call was a bottleneck in some code I was writing.
See change 57637 for the corresponding libcore change.
https://android-git.corp.google.com/g/#change,57637

14 years agoam 23280a25: Merge "Update heap profiling docs."
Andy McFadden [Wed, 14 Jul 2010 23:02:45 +0000 (16:02 -0700)]
am 23280a25: Merge "Update heap profiling docs."

Merge commit '23280a2598d72733223c69a6ff3ab9dd5005c751' into dalvik-dev

* commit '23280a2598d72733223c69a6ff3ab9dd5005c751':
  Update heap profiling docs.

14 years agoMerge "Update heap profiling docs."
Andy McFadden [Wed, 14 Jul 2010 22:56:05 +0000 (15:56 -0700)]
Merge "Update heap profiling docs."

14 years agoUpdate heap profiling docs.
Andy McFadden [Wed, 14 Jul 2010 21:48:20 +0000 (14:48 -0700)]
Update heap profiling docs.

Explain that "kill -10" is being removed as a heap-dump mechanism, and
describe the new "am dumpheap" command.

Change-Id: I83ac6cb5a7624d006001cc5404689bfe88b44fdd

14 years agoMerge "Revert "Fix the bitsLen calculation in aliasBitmap."" into dalvik-dev
Barry Hayes [Wed, 14 Jul 2010 18:43:04 +0000 (11:43 -0700)]
Merge "Revert "Fix the bitsLen calculation in aliasBitmap."" into dalvik-dev

14 years agoam c596465b: am 87e2b990: am 3f4f8ad0: am 98c2591a: (-s ours) merge from open-source...
The Android Open Source Project [Wed, 14 Jul 2010 18:42:40 +0000 (11:42 -0700)]
am c596465b: am 87e2b990: am 3f4f8ad0: am 98c2591a: (-s ours) merge from open-source froyo

Merge commit 'c596465b1a2bf0afe723fad139164b6aaee184da' into dalvik-dev

* commit 'c596465b1a2bf0afe723fad139164b6aaee184da':
  Add/Remove Some @KnownFailure Annotations

14 years agoam 87e2b990: am 3f4f8ad0: am 98c2591a: (-s ours) merge from open-source froyo
The Android Open Source Project [Wed, 14 Jul 2010 18:34:18 +0000 (11:34 -0700)]
am 87e2b990: am 3f4f8ad0: am 98c2591a: (-s ours) merge from open-source froyo

Merge commit '87e2b990f7eb59588970399d85e4bcda67dba76f'

* commit '87e2b990f7eb59588970399d85e4bcda67dba76f':
  Add/Remove Some @KnownFailure Annotations

14 years agoam 3f4f8ad0: am 98c2591a: (-s ours) merge from open-source froyo
The Android Open Source Project [Wed, 14 Jul 2010 18:32:04 +0000 (11:32 -0700)]
am 3f4f8ad0: am 98c2591a: (-s ours) merge from open-source froyo

Merge commit '3f4f8ad0ff9a603419b66d6672cc00bb69b35d78' into gingerbread-plus-aosp

* commit '3f4f8ad0ff9a603419b66d6672cc00bb69b35d78':
  Add/Remove Some @KnownFailure Annotations

14 years agoam 98c2591a: (-s ours) merge from open-source froyo
The Android Open Source Project [Wed, 14 Jul 2010 18:29:03 +0000 (11:29 -0700)]
am 98c2591a: (-s ours) merge from open-source froyo

Merge commit '98c2591a3de16682c957edc0d4fd3d10aacb3cb9' into gingerbread

* commit '98c2591a3de16682c957edc0d4fd3d10aacb3cb9':
  Add/Remove Some @KnownFailure Annotations

14 years agoMerge "Interpreter & JIT support for write barriers" into dalvik-dev
buzbee [Wed, 14 Jul 2010 18:09:56 +0000 (11:09 -0700)]
Merge "Interpreter & JIT support for write barriers" into dalvik-dev

14 years agoRevert "Fix the bitsLen calculation in aliasBitmap."
Barry Hayes [Wed, 14 Jul 2010 18:08:47 +0000 (11:08 -0700)]
Revert "Fix the bitsLen calculation in aliasBitmap."

This reverts commit 87a48d25f4451824261153bfdde9dc4c4e51cbb2.

14 years agoMerge "Fix the bitsLen calculation in aliasBitmap." into dalvik-dev
Barry Hayes [Wed, 14 Jul 2010 13:16:08 +0000 (06:16 -0700)]
Merge "Fix the bitsLen calculation in aliasBitmap." into dalvik-dev

14 years agoMerge "Make the visitor routines inlined." into dalvik-dev
Carl Shapiro [Wed, 14 Jul 2010 05:26:49 +0000 (22:26 -0700)]
Merge "Make the visitor routines inlined." into dalvik-dev

14 years agoMake the visitor routines inlined.
Carl Shapiro [Wed, 14 Jul 2010 00:36:41 +0000 (17:36 -0700)]
Make the visitor routines inlined.

The chanage also removes the verbose logging from the visitor.

Change-Id: I096dbe6d5fe2846ea363a9402e8c2b46d23f1302

14 years agoMerge "Use the dvmAllocRegion instead of ashmem and mmap." into dalvik-dev
Carl Shapiro [Wed, 14 Jul 2010 04:38:12 +0000 (21:38 -0700)]
Merge "Use the dvmAllocRegion instead of ashmem and mmap." into dalvik-dev

14 years agoThe ICU data is no longer compiled directly into the shared library.
Joe Onorato [Wed, 14 Jul 2010 02:08:08 +0000 (19:08 -0700)]
The ICU data is no longer compiled directly into the shared library.

Change-Id: Ief1aa1c5f6da39f4d94cb68b285d8e02cc10b9ac

14 years agoUse the dvmAllocRegion instead of ashmem and mmap.
Carl Shapiro [Wed, 14 Jul 2010 01:28:13 +0000 (18:28 -0700)]
Use the dvmAllocRegion instead of ashmem and mmap.

Also clean-up an uneeded include of ashmem.h from a similar commit in
the past.

Change-Id: Id86b89e72031406cfd2bf3d3a97f2d2327e090b6

14 years agoFix the bitsLen calculation in aliasBitmap.
Barry Hayes [Tue, 13 Jul 2010 23:49:19 +0000 (16:49 -0700)]
Fix the bitsLen calculation in aliasBitmap.

Since the max in inclusive, not exclusive, this was making the bits
appear too short. HeapBitmap's walk routines were using this short
value for the finger in the final FLUSH_POINTERBUF call. That caused
scanObject to believe that it could mark objects at the top of the
heap, rather than having to push them on the maek stack. But, alas, as
we have noted, it is the final FLUSH_POINTERBUF.

Change-Id: Ie562defc3c2e5304cf4c96026447359b3f4fcb59

14 years agomerge from open-source froyo
The Android Open Source Project [Tue, 13 Jul 2010 22:27:19 +0000 (15:27 -0700)]
merge from open-source froyo

Change-Id: Ia703f40fe40ea86791db8090dc821f2ab0ffdd4d

14 years agoMerge "Add a regression test for ClassLoader.loadClass() returning null." into dalvik-dev
Barry Hayes [Tue, 13 Jul 2010 22:18:02 +0000 (15:18 -0700)]
Merge "Add a regression test for ClassLoader.loadClass() returning null." into dalvik-dev

14 years agoMerge "Remove redundant "#ifndef NDEBUG" guarding asserts." into dalvik-dev
Carl Shapiro [Tue, 13 Jul 2010 21:45:21 +0000 (14:45 -0700)]
Merge "Remove redundant "#ifndef NDEBUG" guarding asserts." into dalvik-dev

14 years agoAdd a regression test for ClassLoader.loadClass() returning null.
Barry Hayes [Mon, 12 Jul 2010 17:24:11 +0000 (10:24 -0700)]
Add a regression test for ClassLoader.loadClass() returning null.

Bug 2817346.

Change-Id: Ifdb5e08ed428f10323dd413462e6efe6a4761d2c

14 years agoInterpreter & JIT support for write barriers
buzbee [Mon, 12 Jul 2010 19:59:22 +0000 (12:59 -0700)]
Interpreter & JIT support for write barriers

In this iteration, cards are marked on either the store address or
the object head (whichever leads to faster code).  In all cases,
though, card marks are deferred until after the associated store
has completed.

Change-Id: I633d6e8c3bebdb80bde92efb4fa6fc7cc84f60fc

14 years agoam 4b851a75: Allow heap dump requests with a FileDescriptor arg.
Andy McFadden [Tue, 13 Jul 2010 19:27:07 +0000 (12:27 -0700)]
am 4b851a75: Allow heap dump requests with a FileDescriptor arg.

Merge commit '4b851a75f7712086a9fc4427f68c99b83725f37d' into dalvik-dev

* commit '4b851a75f7712086a9fc4427f68c99b83725f37d':
  Allow heap dump requests with a FileDescriptor arg.

14 years agoAllow heap dump requests with a FileDescriptor arg.
Andy McFadden [Fri, 9 Jul 2010 23:50:05 +0000 (16:50 -0700)]
Allow heap dump requests with a FileDescriptor arg.

Part of a larger change to allow "am" to initiate hprof heap dumps.

The original implementation wrote data to a temp file, because we
compute the second part first while doing GC work.  Now all paths
work like DDMS, writing all data to a memstream and then copying it
out to a file at the very end.

Also, fix a potential fd leak on failure in the profiling code.

Bug 2759474.

Change-Id: I0f838cbd9948a23088f08463c3008be7198d76e7

14 years agoRemove redundant "#ifndef NDEBUG" guarding asserts.
Carl Shapiro [Tue, 13 Jul 2010 02:48:53 +0000 (19:48 -0700)]
Remove redundant "#ifndef NDEBUG" guarding asserts.

Change-Id: Iaa4687cbaaa1eac59cf0b80afb57b3ba708ece09

14 years agoMerge "Use "long" instead of the more verbose but equivalent "long int"." into dalvik-dev
Carl Shapiro [Tue, 13 Jul 2010 02:35:58 +0000 (19:35 -0700)]
Merge "Use "long" instead of the more verbose but equivalent "long int"." into dalvik-dev

14 years agoRemove a stray log statement.
Carl Shapiro [Tue, 13 Jul 2010 00:51:40 +0000 (17:51 -0700)]
Remove a stray log statement.

Change-Id: I4c4c6111cc67480377374ee3c10b729cc93622f9

14 years agoUse "long" instead of the more verbose but equivalent "long int".
Carl Shapiro [Tue, 13 Jul 2010 00:45:51 +0000 (17:45 -0700)]
Use "long" instead of the more verbose but equivalent "long int".

Change-Id: I06f87c0f8314baeccac6e96e47ad749ff18a065c

14 years agoMerge "Simplify heap bitmap allocation." into dalvik-dev
Carl Shapiro [Tue, 13 Jul 2010 00:04:38 +0000 (17:04 -0700)]
Merge "Simplify heap bitmap allocation." into dalvik-dev

14 years agoSimplify heap bitmap allocation.
Carl Shapiro [Mon, 12 Jul 2010 23:09:54 +0000 (16:09 -0700)]
Simplify heap bitmap allocation.

Rather than use ashmem and mmap directly, we now call out to a common
abstraction which does both.  A name is now required.  This should go
unnoticed as all callers provided a name anyway.

Change-Id: I3d1d613ddd62f218fb17a583dc85de97c33c96bc

14 years agoMerge "Minor clean-ups of the reference processing code." into dalvik-dev
Carl Shapiro [Mon, 12 Jul 2010 22:44:08 +0000 (15:44 -0700)]
Merge "Minor clean-ups of the reference processing code." into dalvik-dev

14 years agoAdd/Remove Some @KnownFailure Annotations
Brian Muramatsu [Mon, 12 Jul 2010 22:17:47 +0000 (15:17 -0700)]
Add/Remove Some @KnownFailure Annotations

Bug 2639444 2564250 2639393

Remove the @KnownFailure annotations form tests now passing in
Froyo for Nexus One using the CTS test runner. Put on
@KnownFailure annotations for those that are failing but passing
with the run-core-tests test runner.

MultiSocketTest is an exception that doesn't seem to make sense,
and fails in both runners.

Change-Id: Id8eb6b5d6f2b04b77434411f2b04c56cd61acf85

14 years agoMerge "Make the write barrier calls in ObjectInlines conditional; if the value being...
Barry Hayes [Mon, 12 Jul 2010 21:23:31 +0000 (14:23 -0700)]
Merge "Make the write barrier calls in ObjectInlines conditional; if the value being stored is NULL, no write barrier call is needed." into dalvik-dev

14 years agoMerge "Make concurrent mark-and-sweep the default." into dalvik-dev
Carl Shapiro [Mon, 12 Jul 2010 21:22:26 +0000 (14:22 -0700)]
Merge "Make concurrent mark-and-sweep the default." into dalvik-dev

14 years agoMake concurrent mark-and-sweep the default.
Carl Shapiro [Mon, 12 Jul 2010 21:04:42 +0000 (14:04 -0700)]
Make concurrent mark-and-sweep the default.

Change-Id: Ia889717a6889f86d20ca092bcea249048f7d2121

14 years agoMinor clean-ups of the reference processing code.
Carl Shapiro [Mon, 12 Jul 2010 21:02:28 +0000 (14:02 -0700)]
Minor clean-ups of the reference processing code.

* Eliminate two dead stores to a pendingNextOffset variable.  This
  value is only needed in the abstractions that delaying, enqueue and
  dequeue of references.

* Clean-up the comment that preceeds the reference list walking.  This
  comment was originally copied from the code that preserves soft
  references.  That routine walks the list, but the clearing code
  actually unlinks the list.

* Remove the the dirtyObjectVisitor.  This does the exact same thing
  as the existing scanObject code.

Change-Id: I20b68e52e4147aa602dd317392f68809ba4d7c63