OSDN Git Service

android-x86/dalvik.git
12 years agoMerge branch 'aosp/honeycomb-LTE-release' into honeycomb-mr2-x86 honeycomb-x86
Chih-Wei Huang [Sat, 5 Nov 2011 17:26:28 +0000 (01:26 +0800)]
Merge branch 'aosp/honeycomb-LTE-release' into honeycomb-mr2-x86

12 years agoFixed bug in x86-atom fast interpreter. Adds guard for potential null pointer.
Johnnie Birch [Fri, 25 Mar 2011 20:24:03 +0000 (13:24 -0700)]
Fixed bug in x86-atom fast interpreter. Adds guard for potential null pointer.
Adds guard for potential null pointer when checking for debugger active on return from method.

Change-Id: Iaef2b6815fe6c64450cc0cc36f8920e4c38f40e6

12 years agoUpdate to allow x86-atom build for FI on Gingerbread
Johnnie Birch [Fri, 18 Feb 2011 18:06:23 +0000 (10:06 -0800)]
Update to allow x86-atom build for FI on Gingerbread

Also handles most TODO.txt items and contains some rewriting of the dispatch code.
Also adds a newline to the end of files that did not previously end with a newline.

Change-Id: I0cf3e77dc7bbf5ed7ec8538ef4d7d8740e296640

12 years agoam a028d87f: Always grow the limit address of the a heap along with its size.
Carl Shapiro [Wed, 15 Jun 2011 04:56:54 +0000 (21:56 -0700)]
am a028d87f: Always grow the limit address of the a heap along with its size.

* commit 'a028d87fb310eae8cac821183aa91567ec8cb0f9':
  Always grow the limit address of the a heap along with its size.

12 years agoAlways grow the limit address of the a heap along with its size.
Carl Shapiro [Wed, 15 Jun 2011 03:51:45 +0000 (20:51 -0700)]
Always grow the limit address of the a heap along with its size.

Previously, clearing the growth limit only updated the maximumSize of
the unlimited heap without updating the limit value.  This caused any
operations iterated over the extent of the heap to ignore allocations
beyond the original heap size.  With this change the limit is always
kept in agreement with the maximumSize.

Bug: 4539441
Change-Id: I08c8004e724549d196e1fd5d6ad22efc85b0c8d2

13 years agoFix a type error in the allocation of non-moving arrays.
Carl Shapiro [Mon, 18 Apr 2011 22:08:21 +0000 (15:08 -0700)]
Fix a type error in the allocation of non-moving arrays.

Originally, non-moving arrays were allocated with dvmAllocObjectArray.
However, dvmAllocObjectArray does not respect the width of the user
supplied element class and substitutes a hard coded value of 4 bytes.
This change replaces dvmAllocObjectArray with dvmAllocArrayByClass.
dvmAllocArrayByClass consults the element class for its width when
computing the storage size for the array being allocated.

Bug: 4309030

13 years agoam af242824: Revert "Fix a type error in the allocation of non-moving arrays." per...
Sriram Raman [Tue, 19 Apr 2011 21:29:47 +0000 (14:29 -0700)]
am af242824: Revert "Fix a type error in the allocation of non-moving arrays." per Ryan\'s request

* commit 'af242824dcedbbe39c92b49d148e7ff50267e47f':
  Revert "Fix a type error in the allocation of non-moving arrays." per Ryan's request

13 years agoRevert "Fix a type error in the allocation of non-moving arrays." per Ryan's request
Sriram Raman [Tue, 19 Apr 2011 21:17:27 +0000 (17:17 -0400)]
Revert "Fix a type error in the allocation of non-moving arrays." per Ryan's request

This reverts commit bdd06aadab6214d2378b7d5078f92bfb14e7e3dc.

Change-Id: Ifbb4bd7941fe4f2e9d02ca2b7d77186edae4dd55

13 years agoam bdd06aad: Fix a type error in the allocation of non-moving arrays.
Carl Shapiro [Tue, 19 Apr 2011 18:43:46 +0000 (11:43 -0700)]
am bdd06aad: Fix a type error in the allocation of non-moving arrays.

* commit 'bdd06aadab6214d2378b7d5078f92bfb14e7e3dc':
  Fix a type error in the allocation of non-moving arrays.

13 years agoFix a type error in the allocation of non-moving arrays.
Carl Shapiro [Mon, 18 Apr 2011 22:08:21 +0000 (15:08 -0700)]
Fix a type error in the allocation of non-moving arrays.

Originally, non-moving arrays were allocated with dvmAllocObjectArray.
However, dvmAllocObjectArray does not respect the width of the user
supplied element class and substitutes a hard coded value of 4 bytes.
This change replaces dvmAllocObjectArray with dvmAllocArrayByClass.
dvmAllocArrayByClass consults the element class for its width when
computing the storage size for the array being allocated.

Bug: 4309030
Change-Id: I9cfe1b62ea61f03e46f44ad2be0d1cce1bef7cdd

13 years agoam 486ac3c0: Removing inaccurate and unmaintained docs.
Dan Bornstein [Thu, 24 Mar 2011 00:53:04 +0000 (17:53 -0700)]
am 486ac3c0: Removing inaccurate and unmaintained docs.

* commit '486ac3c0a90b05be5af4b82801ef325e83241057':
  Removing inaccurate and unmaintained docs.

13 years agoRemoving inaccurate and unmaintained docs.
Dan Bornstein [Wed, 23 Mar 2011 22:26:58 +0000 (15:26 -0700)]
Removing inaccurate and unmaintained docs.

Change-Id: Ifef37063e844e4eb9ccc8111a1f1263fe26bd517

13 years agoFix build.
Raphael [Wed, 2 Mar 2011 22:37:37 +0000 (14:37 -0800)]
Fix build.

The build server is stuck waiting for the O_BINARY change
from system/core. This will unblock it.

Change-Id: Iedd5f7a6cb140ac07b5084948a69eb5d94e2070f

13 years agoam 7027ab61: am 88041260: am dd19f5b9: Merge "Fix for a crash when GC weak references."
Romain Guy [Wed, 2 Mar 2011 20:53:48 +0000 (12:53 -0800)]
am 7027ab61: am 88041260: am dd19f5b9: Merge "Fix for a crash when GC weak references."

* commit '7027ab6198f9d27b376e467971d55f14b160e40f':
  Fix for a crash when GC weak references.

13 years agoam 0c91e9d5: am 98e0347a: am 2b3d7e8e: Merge "Open dexdump files in binary mode."
Raphael Moll [Wed, 2 Mar 2011 20:53:46 +0000 (12:53 -0800)]
am 0c91e9d5: am 98e0347a: am 2b3d7e8e: Merge "Open dexdump files in binary mode."

* commit '0c91e9d5a4078bc1c6da2c225bde5fb703fd9d58':
  Open dexdump files in binary mode.

13 years agoam 88041260: am dd19f5b9: Merge "Fix for a crash when GC weak references."
Romain Guy [Tue, 1 Mar 2011 21:50:40 +0000 (13:50 -0800)]
am 88041260: am dd19f5b9: Merge "Fix for a crash when GC weak references."

* commit '88041260251335cc497db4708f0057d5367da8b4':
  Fix for a crash when GC weak references.

13 years agoam 98e0347a: am 2b3d7e8e: Merge "Open dexdump files in binary mode."
Raphael Moll [Tue, 1 Mar 2011 21:50:37 +0000 (13:50 -0800)]
am 98e0347a: am 2b3d7e8e: Merge "Open dexdump files in binary mode."

* commit '98e0347a7f016764403384567267db6e9dcf8edf':
  Open dexdump files in binary mode.

13 years agoam dd19f5b9: Merge "Fix for a crash when GC weak references."
Romain Guy [Tue, 1 Mar 2011 20:39:47 +0000 (12:39 -0800)]
am dd19f5b9: Merge "Fix for a crash when GC weak references."

* commit 'dd19f5b91a1032e60871febb143850fd81000c5a':
  Fix for a crash when GC weak references.

13 years agoam 2b3d7e8e: Merge "Open dexdump files in binary mode."
Raphael Moll [Tue, 1 Mar 2011 20:39:44 +0000 (12:39 -0800)]
am 2b3d7e8e: Merge "Open dexdump files in binary mode."

* commit '2b3d7e8eccd7cbf64b2ac41c05073a9191d0d3b3':
  Open dexdump files in binary mode.

13 years agoAdd notice file for dx.jar and dexdump
Xavier Ducrohet [Tue, 1 Mar 2011 02:16:32 +0000 (18:16 -0800)]
Add notice file for dx.jar and dexdump

Change-Id: I0094d382e866b8767383516abd367c98712da594

13 years agoMerge "Fix for a crash when GC weak references."
Romain Guy [Thu, 24 Feb 2011 19:24:47 +0000 (11:24 -0800)]
Merge "Fix for a crash when GC weak references."

13 years agoAdd new comparator function.
Dan Bornstein [Wed, 23 Feb 2011 23:30:24 +0000 (15:30 -0800)]
Add new comparator function.

This one compares a DexProto with a list of method parameter types,
and it is immediately useful in the new getMethod() reflection code,
to avoid doing a bunch of extra string manipulation.

While I was in the territory, I removed some comment redundancy.

Change-Id: I5049e2ac4606e44a65c3c426ac2f880a891c51f9

13 years agoMerge "Optimize Class.getMethod() by loading only one method."
Jesse Wilson [Wed, 23 Feb 2011 21:32:57 +0000 (13:32 -0800)]
Merge "Optimize Class.getMethod() by loading only one method."

13 years agoOptimize Class.getMethod() by loading only one method.
Jesse Wilson [Wed, 23 Feb 2011 04:20:36 +0000 (20:20 -0800)]
Optimize Class.getMethod() by loading only one method.

Change-Id: Ia2cd776c0a14914264e8d94e978d55854ed75623
http://b/3431686

13 years agoMerge "Open dexdump files in binary mode."
Raphael Moll [Tue, 22 Feb 2011 22:55:59 +0000 (14:55 -0800)]
Merge "Open dexdump files in binary mode."

13 years agoBump Dalvik version.
Andy McFadden [Tue, 22 Feb 2011 22:09:19 +0000 (14:09 -0800)]
Bump Dalvik version.

Minor increase to differentiate HC MR1 from HC.

Change-Id: I2ccd57d4952c19c2df2fe948ce60c476819450d4

13 years agoFix prelink for libdvm.
Ying Wang [Sat, 19 Feb 2011 00:56:41 +0000 (16:56 -0800)]
Fix prelink for libdvm.

Change-Id: If91f46f80c1b1947683720e8187cecb0f7077b94
Bug: 3470019

13 years agoOpen dexdump files in binary mode.
Raphael Moll [Wed, 16 Feb 2011 21:39:27 +0000 (13:39 -0800)]
Open dexdump files in binary mode.

Requires change Ia5c0a59e from system/core
(which defines O_BINARY globally.)

Change-Id: If814608ee9662190a7cf80aae2ad2451d88364ae

13 years agoClean up use of HAVE_ANDROID_OS
Kenny Root [Wed, 16 Feb 2011 18:15:52 +0000 (10:15 -0800)]
Clean up use of HAVE_ANDROID_OS

HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0"
for non-targets. Changing them to #ifdef should be safe and matches all
the other uses of HAVE_ANDROID_OS throughout the system.

Change-Id: I077aee39b08ce82327a571d9aca0cae422a0ebb5

13 years agoFix "all stubs" interpreter
Andy McFadden [Mon, 14 Feb 2011 22:04:42 +0000 (14:04 -0800)]
Fix "all stubs" interpreter

The "all stubs" interpreter is the recommended starting point for
anyone creating a "fast" interpreter on a new CPU.  This cleans
up some minor bit rot in the code and documentation.

Bug 3452689

Change-Id: I6bc3b0b5da11955d842d5fc5f16cb1a2209d4a89

13 years agoMerge "Make Release(JNI_COMMIT) faster"
Andy McFadden [Wed, 9 Feb 2011 16:10:49 +0000 (08:10 -0800)]
Merge "Make Release(JNI_COMMIT) faster"

13 years agoMake Release(JNI_COMMIT) faster
Andy McFadden [Wed, 9 Feb 2011 00:24:34 +0000 (16:24 -0800)]
Make Release(JNI_COMMIT) faster

The Release<primitive>ArrayElements and ReleasePrimitiveArrayCritical
calls take a "mode" argument.  If you pass in JNI_COMMIT, the storage
isn't actually released; instead, the buffer contents are flushed to
the backing storage.  If the VM has handed you a pointer to the raw
data rather than a copy, the call is a no-op.

In its present incarnation, it's a no-op that changes the thread state,
adding overhead and the possibility of suspension.  This change moves
the test for JNI_COMMIT outside the enter/exit macros.

Bug 3430203

Change-Id: I8426647ee02b2336c5c90146028fc207cfbacc3a

13 years agoRemove JNI_FORCE_C
Andy McFadden [Wed, 9 Feb 2011 00:12:33 +0000 (16:12 -0800)]
Remove JNI_FORCE_C

This hasn't been useful in a really long time.

Change-Id: Ieea01f5d051bc8fc671f7414af3bed626ece75f1

13 years agoMerge "Added JNI hack to support JNI hack"
Andy McFadden [Wed, 9 Feb 2011 00:03:05 +0000 (16:03 -0800)]
Merge "Added JNI hack to support JNI hack"

13 years agoAdded JNI hack to support JNI hack
Andy McFadden [Tue, 8 Feb 2011 20:07:32 +0000 (12:07 -0800)]
Added JNI hack to support JNI hack

Some of our graphics code wants to get a pointer, release it, and then
continue to use it.  The "forcecopy" mode of CheckJNI was designed
to find any code that does this.  It succeeded.

To support the behavior, we provide a JNI helper function that does
the dirty work.  It passes a magic value into the Get and Release calls
that causes "forcecopy" to skip the copy.  When forcecopy is not
enabled, the values are simply ignored.

To avoid any possibility of the function getting published in the NDK,
the function is not described in JNIHelp.h.

Bug 3409356

Change-Id: Ibd20d12ba6d3d3236ebf5760f7ccaa8c557e3774

13 years agoFree some strings in error paths
Kenny Root [Wed, 2 Feb 2011 23:07:00 +0000 (15:07 -0800)]
Free some strings in error paths

Change-Id: I54629ca65c30960f930ce6886e0915e360e20237

13 years agoAvoid double-free on error.
Andy McFadden [Mon, 7 Feb 2011 23:49:13 +0000 (15:49 -0800)]
Avoid double-free on error.

In certain circumstances on a -user build we could end up trying to
free a buffer twice.

Bug 3431477

Change-Id: I1cce1da0e32aabc85d5c5c69346224c6db49b8ee

13 years agoEnsure word atomicity in System.arraycopy
Andy McFadden [Thu, 3 Feb 2011 00:55:41 +0000 (16:55 -0800)]
Ensure word atomicity in System.arraycopy

The VM needs to ensure that updates to 16-bit and 32-bit fields
and array elements happen atomically.  System.arraycopy was calling
memmmove(), which in bionic happens to copy a byte at a time.

The new plan is to have bionic provide a platform-optimized memmove
variant that makes guarantees about word sizes.  If it is not present
(either because it hasn't been written for the current platform,
or we're not linking against bionic), we will use a trivial copy loop.

We assume that the memmove-by-word implementation does whatever
it needs to for best performance.  For example, if the function
determines that memcpy() is word-safe and will be faster, it can
call that.  The VM no longer makes assumptions about the internal
workings of libc functions.

I also rearranged the code to avoid making indirect calls, reading
function addresses from memory, and using integer multiplication
instructions when a simple shift will do.  (gcc now generates the
whole thing as one function.)

Also, added some primitive array copy tests to 011-array-copy.

Bug 3398352

Change-Id: I4677ee1c87998697a93e61f39a48b3f391e8e11b

13 years agoam 168ae921: am e7bf56c5: Use the global maximum to compute the size of a new mspace.
Carl Shapiro [Wed, 2 Feb 2011 21:22:53 +0000 (13:22 -0800)]
am 168ae921: am e7bf56c5: Use the global maximum to compute the size of a new mspace.

* commit '168ae921fb68f2af7fbb62619232ec27bb741bea':
  Use the global maximum to compute the size of a new mspace.

13 years agoam e7bf56c5: Use the global maximum to compute the size of a new mspace.
Carl Shapiro [Wed, 2 Feb 2011 21:18:48 +0000 (13:18 -0800)]
am e7bf56c5: Use the global maximum to compute the size of a new mspace.

* commit 'e7bf56c584b8b2c3d60f79a27a4a2e9a6b1e2f22':
  Use the global maximum to compute the size of a new mspace.

13 years agoUse the global maximum to compute the size of a new mspace.
Carl Shapiro [Wed, 2 Feb 2011 04:19:04 +0000 (20:19 -0800)]
Use the global maximum to compute the size of a new mspace.

The global maximum was used for the initial specificaion but a local
maximum was used for post-Zygote mspace creations.  This prevented a
clearing of the growth limit from having the intended effect.

Bug: 3414804
Change-Id: I47e0c1510f2212849e3b738c5578bbd7b1aff27d

13 years agoUpdate doc with actual version number.
Andy McFadden [Tue, 1 Feb 2011 22:02:59 +0000 (14:02 -0800)]
Update doc with actual version number.

Honeycomb is 3.0.

Change-Id: Ic7f15a9e2345344acdc787db153f8b8c559fe15f

13 years agoam d820da20: Reconcile gingerbread-plus-aosp and honeycomb
The Android Open Source Project [Sun, 30 Jan 2011 20:53:55 +0000 (12:53 -0800)]
am d820da20: Reconcile gingerbread-plus-aosp and honeycomb

* commit 'd820da20e28c0468324125a8a2bf75c3c4c01c27':

13 years agoReconcile gingerbread-plus-aosp and honeycomb
The Android Open Source Project [Sun, 30 Jan 2011 20:39:54 +0000 (12:39 -0800)]
Reconcile gingerbread-plus-aosp and honeycomb

Change-Id: Ic8c04a257aaf0ecf5348d176def5bedc6c640ee0

13 years agoMass merge from gingerbread - do not merge
The Android Open Source Project [Sun, 30 Jan 2011 20:39:54 +0000 (12:39 -0800)]
Mass merge from gingerbread - do not merge

Change-Id: I03cce63a718a19c27445efd2c48a7886f22f7ed1

13 years agoam 81058aaf: (-s ours) Use bcopy() to move object refs around within an array. DO...
Dan Bornstein [Sat, 29 Jan 2011 18:51:59 +0000 (10:51 -0800)]
am 81058aaf: (-s ours) Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit '81058aaf92c188cc20273edd0275329fc304aca2':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam b46125f2: (-s ours) am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object...
Dan Bornstein [Sat, 29 Jan 2011 16:47:06 +0000 (08:47 -0800)]
am b46125f2: (-s ours) am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit 'b46125f27e83da6b9844a502b11ffff48c59f729':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within...
Dan Bornstein [Sat, 29 Jan 2011 16:44:07 +0000 (08:44 -0800)]
am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit '08e5449920e616cab1895eda309c20e109e5752e':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.
Dan Bornstein [Thu, 27 Jan 2011 23:28:25 +0000 (15:28 -0800)]
am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit '81058aaf92c188cc20273edd0275329fc304aca2':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam 99d4ea09: am 3207edfa: Use bcopy() to move object refs around within an array.
Dan Bornstein [Thu, 27 Jan 2011 23:10:56 +0000 (15:10 -0800)]
am 99d4ea09: am 3207edfa: Use bcopy() to move object refs around within an array.

* commit '99d4ea09cb64768d0e1f2149f7e3af7d37172be7':
  Use bcopy() to move object refs around within an array.

13 years agoam 3207edfa: Use bcopy() to move object refs around within an array.
Dan Bornstein [Thu, 27 Jan 2011 22:59:38 +0000 (14:59 -0800)]
am 3207edfa: Use bcopy() to move object refs around within an array.

* commit '3207edfa2de55be1207ff3e10409e7b291e33ab1':
  Use bcopy() to move object refs around within an array.

13 years agoUse bcopy() to move object refs around within an array. DO NOT MERGE.
Dan Bornstein [Thu, 27 Jan 2011 19:38:37 +0000 (11:38 -0800)]
Use bcopy() to move object refs around within an array. DO NOT MERGE.

bcopy() guarantees that pointer-size words are stored atomically, and
so this prevents the gc from seeing a pointer in mid-change.

Bug: 3399673
Change-Id: Ic7d795e5d397548e9d6d8c11a585d86838cf8a44

13 years agoUse bcopy() to move object refs around within an array.
Dan Bornstein [Thu, 27 Jan 2011 19:38:37 +0000 (11:38 -0800)]
Use bcopy() to move object refs around within an array.

bcopy() guarantees that pointer-size words are stored atomically, and
so this prevents the gc from seeing a pointer in mid-change.

Change-Id: I7ba426c5b54a3459504211d88cca1b07383168bb

13 years agoam 6ad1992b: (-s ours) am 70b130f5: (-s ours) Clean up/out some comments. DO NOT...
Dan Bornstein [Thu, 27 Jan 2011 05:55:38 +0000 (21:55 -0800)]
am 6ad1992b: (-s ours) am 70b130f5: (-s ours) Clean up/out some comments. DO NOT MERGE.

* commit '6ad1992b311937963d44be68f3ec0255a87d82b8':
  Clean up/out some comments. DO NOT MERGE.

13 years agoam f741b8e1: am 80a30431: (-s ours) Remove some pointless tests.
Dan Bornstein [Thu, 27 Jan 2011 05:48:09 +0000 (21:48 -0800)]
am f741b8e1: am 80a30431: (-s ours) Remove some pointless tests.

* commit 'f741b8e112834cb3c140ca81890dc41126649dee':
  Remove some pointless tests.

13 years agoam 76675cb5: am 9b6881c2: Fix accidental transposition of partial and concurrent...
Carl Shapiro [Thu, 27 Jan 2011 05:35:57 +0000 (21:35 -0800)]
am 76675cb5: am 9b6881c2: Fix accidental transposition of partial and concurrent values.

* commit '76675cb52e5d5ddeaefd81ec83841e0c503d3411':
  Fix accidental transposition of partial and concurrent values.

13 years agoam 9b6881c2: Fix accidental transposition of partial and concurrent values.
Carl Shapiro [Thu, 27 Jan 2011 05:16:31 +0000 (21:16 -0800)]
am 9b6881c2: Fix accidental transposition of partial and concurrent values.

* commit '9b6881c26d58a46e6478294d83554fb9e3a85625':
  Fix accidental transposition of partial and concurrent values.

13 years agoFix accidental transposition of partial and concurrent values.
Carl Shapiro [Thu, 27 Jan 2011 02:41:03 +0000 (18:41 -0800)]
Fix accidental transposition of partial and concurrent values.

In the event of an allocation failure a full, concurrent collection was
initiated instead of a partial, non-concurrent collection.  This change
assigns the correct boolean values to that settings.

These values should be made enums to ensure this does not happen again.

Bug: 3379352

Change-Id: I9336e8f832cf02e4a74745cd475914a0c312ea4e

13 years agoam a4c8f3fa: am d6b23e5c: Merge "Package garbage collection policy parameters into...
Carl Shapiro [Thu, 27 Jan 2011 03:13:02 +0000 (19:13 -0800)]
am a4c8f3fa: am d6b23e5c: Merge "Package garbage collection policy parameters into a single structure." into honeycomb

* commit 'a4c8f3fae538b56a003e0546b8c001d68873a650':
  Package garbage collection policy parameters into a single structure.

13 years agoam d6b23e5c: Merge "Package garbage collection policy parameters into a single struct...
Carl Shapiro [Thu, 27 Jan 2011 02:06:35 +0000 (18:06 -0800)]
am d6b23e5c: Merge "Package garbage collection policy parameters into a single structure." into honeycomb

* commit 'd6b23e5ca90e011b6ede0d3592922616df3e33ec':
  Package garbage collection policy parameters into a single structure.

13 years agoMerge "Package garbage collection policy parameters into a single structure." into...
Carl Shapiro [Thu, 27 Jan 2011 02:02:17 +0000 (18:02 -0800)]
Merge "Package garbage collection policy parameters into a single structure." into honeycomb

13 years agoPackage garbage collection policy parameters into a single structure.
Carl Shapiro [Thu, 27 Jan 2011 01:25:27 +0000 (17:25 -0800)]
Package garbage collection policy parameters into a single structure.

The garbage collection policy had been determined informally.  This change
defines the garbage collection behavior in a centralized location making it
clear how the system will behave when requesting a garbage collection in one
of the four common situations.  This change is required to allow us to change
the policy for an explicit garbage collection.

In addition, this change hoists out the thread priority toggle from the
main garbage collector routine into two simple subroutines making this
it much easier to read and spot behavior differences.

Bug: 3379352
Change-Id: If0d7d9ef337819598fb6e268f7a127f2bae23580

13 years agoam 4d7dd569: Handle the case of referent clearing during tracing.
Carl Shapiro [Wed, 26 Jan 2011 21:03:44 +0000 (13:03 -0800)]
am 4d7dd569: Handle the case of referent clearing during tracing.

* commit '4d7dd56902150ab8db4c20a191bad112928839e9':
  Handle the case of referent clearing during tracing.

13 years agoam 6159ef45: (-s ours) Parameterize instance counting to include subclasses.
Carl Shapiro [Wed, 26 Jan 2011 21:03:40 +0000 (13:03 -0800)]
am 6159ef45: (-s ours) Parameterize instance counting to include subclasses.

* commit '6159ef4520073ae8e7ce7b7d1f7648b161a33302':
  Parameterize instance counting to include subclasses.

13 years agoam ee875bb3: am 80e8d7f9: Increase default stack size
Andy McFadden [Tue, 25 Jan 2011 20:41:36 +0000 (12:41 -0800)]
am ee875bb3: am 80e8d7f9: Increase default stack size

* commit 'ee875bb3c019e278500c000cdd99b34e629e42eb':
  Increase default stack size

13 years agoam 80e8d7f9: Increase default stack size
Andy McFadden [Tue, 25 Jan 2011 20:38:42 +0000 (12:38 -0800)]
am 80e8d7f9: Increase default stack size

* commit '80e8d7f9ca9b49437bec6224162d7bb7f42392da':
  Increase default stack size

13 years agoIncrease default stack size
Andy McFadden [Tue, 25 Jan 2011 20:26:41 +0000 (12:26 -0800)]
Increase default stack size

This increases the default stack size from 12KB to 16KB.

Bug 3388513

Change-Id: I7f7c3f75b749ca2145a96434e89e6500f79973e4

13 years agoam 704c48da: am a4313feb: Remove unprotected reads in the instance counting routines.
Carl Shapiro [Mon, 24 Jan 2011 21:32:44 +0000 (13:32 -0800)]
am 704c48da: am a4313feb: Remove unprotected reads in the instance counting routines.

* commit '704c48daff6bd4f1e824eccb7171c08d32b86ea1':
  Remove unprotected reads in the instance counting routines.

13 years agoam a4313feb: Remove unprotected reads in the instance counting routines.
Carl Shapiro [Mon, 24 Jan 2011 20:38:56 +0000 (12:38 -0800)]
am a4313feb: Remove unprotected reads in the instance counting routines.

* commit 'a4313feb23dd454905a3297bdc9ba745e6066a16':
  Remove unprotected reads in the instance counting routines.

13 years agoRemove unprotected reads in the instance counting routines.
Carl Shapiro [Mon, 24 Jan 2011 20:31:09 +0000 (12:31 -0800)]
Remove unprotected reads in the instance counting routines.

In the past, the instance counters would read the live bitmap, acquire
the heap lock, and then scan the live bitmap.  Reading the live bitmap
ahead of acquiring the heap lock gives the holder of the heap lock an
opportunity to invalidate the copy of the live bitmap read by the
instance counter routine.  For example, the garbage collector could
swap the mark and live bitmaps before releasing the heap lock.  This
change makes the read of the live bitmap safe by moving it into the
critical section.

Bug: 3271510
Change-Id: Ic02171e9ec3b4d24e83773199f00a18a75707427

13 years agoam e1a5956b: am 0eac12e0: Merge "Replace collect with clear for the SoftReference...
Carl Shapiro [Mon, 24 Jan 2011 01:00:45 +0000 (17:00 -0800)]
am e1a5956b: am 0eac12e0: Merge "Replace collect with clear for the SoftReference policy." into honeycomb

* commit 'e1a5956bd9d3d7b89a09b554804c967a30c13932':
  Replace collect with clear for the SoftReference policy.

13 years agoam e1034238: am b387ce8a: Remove references to android_atomic_swap.
Carl Shapiro [Mon, 24 Jan 2011 01:00:43 +0000 (17:00 -0800)]
am e1034238: am b387ce8a: Remove references to android_atomic_swap.

* commit 'e10342385c9845cd82ac73c3b0d9b26c4a3dcd15':
  Remove references to android_atomic_swap.

13 years agoam 0eac12e0: Merge "Replace collect with clear for the SoftReference policy." into...
Carl Shapiro [Mon, 24 Jan 2011 00:07:52 +0000 (16:07 -0800)]
am 0eac12e0: Merge "Replace collect with clear for the SoftReference policy." into honeycomb

* commit '0eac12e0b26c3cdfa3d16e73cc8d7ebd889c846b':
  Replace collect with clear for the SoftReference policy.

13 years agoMerge "Replace collect with clear for the SoftReference policy." into honeycomb
Carl Shapiro [Mon, 24 Jan 2011 00:05:57 +0000 (16:05 -0800)]
Merge "Replace collect with clear for the SoftReference policy." into honeycomb

13 years agoReplace collect with clear for the SoftReference policy.
Carl Shapiro [Sun, 23 Jan 2011 23:58:31 +0000 (15:58 -0800)]
Replace collect with clear for the SoftReference policy.

The garbage collector is invoked with a parameter that changes the
SoftReference clearing policy.  This parameter is normally false,
meaning the garbage collector will attempt to preserve some
softly-reachable referents of SoftReference instances.  When true, the
garbage collector will treat SoftReference instances as WeakReference
instances and always clearly referent fields with softly-reachable
referents.

The code refers to this action as collecting soft references which is
misleading.  The change to the garbage collector policy has an effect
on the referent field of SoftReference instances and any SoftReference
instance which is unreachable is subject collection like any other
object.  With this change we now use the description clearing soft
refernces to describe the policy.

Bug: 3381480

Change-Id: Ie179514e68d4621237b08658c1c55811a49f1210

13 years agoam b387ce8a: Remove references to android_atomic_swap.
Carl Shapiro [Sun, 23 Jan 2011 23:58:49 +0000 (15:58 -0800)]
am b387ce8a: Remove references to android_atomic_swap.

* commit 'b387ce8ae1ffa0861be1ec94ba6c313203931a1b':
  Remove references to android_atomic_swap.

13 years agoRemove references to android_atomic_swap.
Carl Shapiro [Sun, 23 Jan 2011 23:24:34 +0000 (15:24 -0800)]
Remove references to android_atomic_swap.

Bug: 3381237

Change-Id: Iabca4be285082d804b0b206025bd4ca8e008ee42

13 years agoam d50993ff: am 6ff6ec6b: Fix dalvik test 084.
Andy McFadden [Thu, 20 Jan 2011 19:00:23 +0000 (11:00 -0800)]
am d50993ff: am 6ff6ec6b: Fix dalvik test 084.

* commit 'd50993ff6ec834801d1442b0872de33f6d930c4d':
  Fix dalvik test 084.

13 years agoam 6ff6ec6b: Fix dalvik test 084.
Andy McFadden [Thu, 20 Jan 2011 18:58:21 +0000 (10:58 -0800)]
am 6ff6ec6b: Fix dalvik test 084.

* commit '6ff6ec6b6361db707e4b0318075fc38dd319a49a':
  Fix dalvik test 084.

13 years agoFix dalvik test 084.
Andy McFadden [Thu, 20 Jan 2011 18:41:57 +0000 (10:41 -0800)]
Fix dalvik test 084.

Two threads were waiting for initialization of a class to complete.
There was nothing encouraging one thread to resume execution first,
but on single-core devices it always worked out the same way.

Bug 3366697

Change-Id: I29430d398dfbd9509d7db2b7db2800d340b29d19

13 years agoam 94918db6: am 84547e16: Merge "Remove logging of memory management statistics to...
Carl Shapiro [Thu, 20 Jan 2011 01:26:44 +0000 (17:26 -0800)]
am 94918db6: am 84547e16: Merge "Remove logging of memory management statistics to the event log." into honeycomb

* commit '94918db6ac491d361f7d2fea63e88c67c16e8103':
  Remove logging of memory management statistics to the event log.

13 years agoam 84547e16: Merge "Remove logging of memory management statistics to the event log...
Carl Shapiro [Thu, 20 Jan 2011 01:24:14 +0000 (17:24 -0800)]
am 84547e16: Merge "Remove logging of memory management statistics to the event log." into honeycomb

* commit '84547e16cfef6e2f1ebe377a466e858a61b59e45':
  Remove logging of memory management statistics to the event log.

13 years agoMerge "Remove logging of memory management statistics to the event log." into honeycomb
Carl Shapiro [Thu, 20 Jan 2011 01:22:50 +0000 (17:22 -0800)]
Merge "Remove logging of memory management statistics to the event log." into honeycomb

13 years agoRemove logging of memory management statistics to the event log.
Carl Shapiro [Wed, 19 Jan 2011 23:37:31 +0000 (15:37 -0800)]
Remove logging of memory management statistics to the event log.

While the event log used to report better information than the logcat
log messages, this is no longer the case.

Change-Id: Iaf7bef5252c284c1a159bc8c0447247c5b5f47e4

13 years agoam 98ce90f3: am e39e28a8: Merge "Include -XX:DisableExplicitGC in the usage output...
Carl Shapiro [Wed, 19 Jan 2011 23:45:06 +0000 (15:45 -0800)]
am 98ce90f3: am e39e28a8: Merge "Include -XX:DisableExplicitGC in the usage output." into honeycomb

* commit '98ce90f3d007d77b8f7b65c987cc14dddb8cbfd6':
  Include -XX:DisableExplicitGC in the usage output.

13 years agoam e39e28a8: Merge "Include -XX:DisableExplicitGC in the usage output." into honeycomb
Carl Shapiro [Wed, 19 Jan 2011 23:42:58 +0000 (15:42 -0800)]
am e39e28a8: Merge "Include -XX:DisableExplicitGC in the usage output." into honeycomb

* commit 'e39e28a8451222714120406d998a6d776e62bc68':
  Include -XX:DisableExplicitGC in the usage output.

13 years agoMerge "Include -XX:DisableExplicitGC in the usage output." into honeycomb
Carl Shapiro [Wed, 19 Jan 2011 23:41:34 +0000 (15:41 -0800)]
Merge "Include -XX:DisableExplicitGC in the usage output." into honeycomb

13 years agoInclude -XX:DisableExplicitGC in the usage output.
Carl Shapiro [Wed, 19 Jan 2011 23:39:41 +0000 (15:39 -0800)]
Include -XX:DisableExplicitGC in the usage output.

Change-Id: I290d7b5762b616b02f59a653ac5a83388c299a93

13 years agoam 9cef8218: am 836741f0: Merge "Change suspend order in GC" into honeycomb
Andy McFadden [Wed, 19 Jan 2011 23:34:09 +0000 (15:34 -0800)]
am 9cef8218: am 836741f0: Merge "Change suspend order in GC" into honeycomb

* commit '9cef82185def11b5d712961dabc66adf56913963':
  Change suspend order in GC

13 years agoam 836741f0: Merge "Change suspend order in GC" into honeycomb
Andy McFadden [Wed, 19 Jan 2011 23:32:01 +0000 (15:32 -0800)]
am 836741f0: Merge "Change suspend order in GC" into honeycomb

* commit '836741f0984579c415f63b39efae6ce5aa695bcd':
  Change suspend order in GC

13 years agoMerge "Change suspend order in GC" into honeycomb
Andy McFadden [Wed, 19 Jan 2011 23:30:18 +0000 (15:30 -0800)]
Merge "Change suspend order in GC" into honeycomb

13 years agoChange suspend order in GC
Andy McFadden [Wed, 19 Jan 2011 22:48:52 +0000 (14:48 -0800)]
Change suspend order in GC

The GC currently does this:

 1. acquire heapLock
 2. suspend all threads
 3. acquire heapWorkerLock

When the HeapWorker thread is suspended in #2, it might be holding
the lock we want in step #3, leading to VM deadlock.  This change
reverses the order of #2 and #3, which should allow the HeapWorker
thread to progress to a point where it releases the lock before
the GC requests the suspension.

If futexes are being unfair, the GC might have to wait a bit
longer while the HeapWorker does stuff (it might unlock, do work,
and re-lock without the scheduler giving time to the GC thread;
with the old scheme the HeapWorker would see the pending thread
suspension immediately and stop).  A better fix is planned.

Bug 3340837

Change-Id: Ib9b37c130903a2800f8f28ae61540a428dbfc5be

13 years agoam 0bd1ebdb: am 461d57dc: Merge "Add an option to disable explicit GC requests."...
Carl Shapiro [Wed, 19 Jan 2011 22:33:32 +0000 (14:33 -0800)]
am 0bd1ebdb: am 461d57dc: Merge "Add an option to disable explicit GC requests." into honeycomb

* commit '0bd1ebdbeb876acfca801e337fe58ffe184edc1a':
  Add an option to disable explicit GC requests.

13 years agoam 461d57dc: Merge "Add an option to disable explicit GC requests." into honeycomb
Carl Shapiro [Wed, 19 Jan 2011 22:32:00 +0000 (14:32 -0800)]
am 461d57dc: Merge "Add an option to disable explicit GC requests." into honeycomb

* commit '461d57dc62af82c9095a0ce3feb8fc0a4f88ddc9':
  Add an option to disable explicit GC requests.

13 years agoMerge "Add an option to disable explicit GC requests." into honeycomb
Carl Shapiro [Wed, 19 Jan 2011 22:29:43 +0000 (14:29 -0800)]
Merge "Add an option to disable explicit GC requests." into honeycomb

13 years agoAdd an option to disable explicit GC requests.
Carl Shapiro [Wed, 19 Jan 2011 20:56:14 +0000 (12:56 -0800)]
Add an option to disable explicit GC requests.

Change-Id: Ibb2ca9d99fccfba61492a8059201777f59c81274

13 years agoam 4b2dc337: am 6009938d: Increase LinearAlloc limit
Andy McFadden [Wed, 19 Jan 2011 19:29:20 +0000 (11:29 -0800)]
am 4b2dc337: am 6009938d: Increase LinearAlloc limit

* commit '4b2dc33744c00da2a89b075e8e631f3917f83d7f':
  Increase LinearAlloc limit

13 years agoam 6009938d: Increase LinearAlloc limit
Andy McFadden [Wed, 19 Jan 2011 19:27:48 +0000 (11:27 -0800)]
am 6009938d: Increase LinearAlloc limit

* commit '6009938d52c3ba5ae1fdf0074ab618d1166750bf':
  Increase LinearAlloc limit

13 years agoIncrease LinearAlloc limit
Andy McFadden [Wed, 19 Jan 2011 19:00:53 +0000 (11:00 -0800)]
Increase LinearAlloc limit

When run on framework.jar, dexopt needs about 4MB of LinearAlloc
space.  We were capped at 5MB.  Bump up the limit to 8MB to give
us some additional head room.

Bug 3362346

Change-Id: I61e06e4cd7d24d45e426026a5adddd7badc3b839

13 years agoam 9622ef8d: am b2e15681: Merge "Implement growth limits to support multiple heap...
Carl Shapiro [Wed, 19 Jan 2011 06:02:28 +0000 (22:02 -0800)]
am 9622ef8d: am b2e15681: Merge "Implement growth limits to support multiple heap configurations." into honeycomb

* commit '9622ef8d66f3a2c1780166a84485e6130727fcc1':
  Implement growth limits to support multiple heap configurations.