OSDN Git Service

android-x86/dalvik.git
14 years agoam 1310319f: am 3e9bfe0b: Support dalvikvm on a Linux x86 host
Jesse Wilson [Sat, 21 Aug 2010 16:36:30 +0000 (09:36 -0700)]
am 1310319f: am 3e9bfe0b: Support dalvikvm on a Linux x86 host

Merge commit '1310319f0f89c1fc2890657aaa1f0b0ac30e099f'

* commit '1310319f0f89c1fc2890657aaa1f0b0ac30e099f':
  Support dalvikvm on a Linux x86 host

14 years agomanual merge
Jean-Baptiste Queru [Sat, 21 Aug 2010 01:53:43 +0000 (18:53 -0700)]
manual merge

Change-Id: I8f680ec1b2e29bd0acde675a2ab4ffd65c7ce84e

14 years agoam 3e9bfe0b: Support dalvikvm on a Linux x86 host
Jesse Wilson [Thu, 19 Aug 2010 06:00:52 +0000 (23:00 -0700)]
am 3e9bfe0b: Support dalvikvm on a Linux x86 host

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

* commit '3e9bfe0bed2f27d01efdb03a71025c421d321956':
  Support dalvikvm on a Linux x86 host

14 years agoSupport dalvikvm on a Linux x86 host
Jesse Wilson [Wed, 18 Aug 2010 18:35:23 +0000 (11:35 -0700)]
Support dalvikvm on a Linux x86 host

Change-Id: Id166ab03a01833e06ec1a9aa0059e4eb28ec04ce

14 years agoam ac830fea: Fix dx launching script to use the new platform-tools location.
Xavier Ducrohet [Thu, 19 Aug 2010 00:31:34 +0000 (17:31 -0700)]
am ac830fea: Fix dx launching script to use the new platform-tools location.

Merge commit 'ac830feace28957c9e84ce2cb0ed2a565bc24c99' into gingerbread-plus-aosp

* commit 'ac830feace28957c9e84ce2cb0ed2a565bc24c99':
  Fix dx launching script to use the new platform-tools location.

14 years agoFix dx launching script to use the new platform-tools location.
Xavier Ducrohet [Wed, 18 Aug 2010 22:42:19 +0000 (15:42 -0700)]
Fix dx launching script to use the new platform-tools location.

Change-Id: Ia4d316b0fb5193dc412aa5374fc270c5b10f70e5

14 years agoam 52d4cd28: Rename registers on inlined instructions that use wide operands.
Ben Cheng [Mon, 16 Aug 2010 22:19:46 +0000 (15:19 -0700)]
am 52d4cd28: Rename registers on inlined instructions that use wide operands.

Merge commit '52d4cd28a5d6d946934704e11e1d41450c10aa05'

* commit '52d4cd28a5d6d946934704e11e1d41450c10aa05':
  Rename registers on inlined instructions that use wide operands.

14 years agoRename registers on inlined instructions that use wide operands.
Ben Cheng [Mon, 16 Aug 2010 21:08:49 +0000 (14:08 -0700)]
Rename registers on inlined instructions that use wide operands.

For example, v1 in the callee should be v7 in the caller.

Before:
div-double v7, v8, v10
iput-wide-quick (C) v1, v6, (#136) <- v1 should be renamed
invoke-virtual-quick (PI) v6, v7, v8

After:
div-double v7, v8, v10
iput-wide-quick (C) v7, v6, (#136)
invoke-virtual-quick (PI) v6, v7, v8

Bug: 2907602

Change-Id: I21b9a45f8e422148d45de98c1ec9acbfd9783cc6

14 years agoSweep concurrently.
Carl Shapiro [Tue, 10 Aug 2010 22:55:45 +0000 (15:55 -0700)]
Sweep concurrently.

After marking, exchange the mark and live bitmaps and resume all
threads.  The sweep proceeds concurrently viewing the new live bitmap
as the old mark bitmap thereby permitting allocations performed while
sweeping to update the live bitmap.

Change-Id: I9c307190a14ce417413175db016be41c38aeeaf3

14 years agoam d012d06b: Fix the ordering of lock acquisition in the heap worker.
Carl Shapiro [Tue, 10 Aug 2010 02:57:04 +0000 (19:57 -0700)]
am d012d06b: Fix the ordering of lock acquisition in the heap worker.

Merge commit 'd012d06b0673c3da9d23b1816ff5a325576eb9b3'

* commit 'd012d06b0673c3da9d23b1816ff5a325576eb9b3':
  Fix the ordering of lock acquisition in the heap worker.

14 years agoam 34bfe020: Fix a couple copyright headers that aren\'t in the prescribed format.
Dan Bornstein [Tue, 10 Aug 2010 02:57:01 +0000 (19:57 -0700)]
am 34bfe020: Fix a couple copyright headers that aren\'t in the prescribed format.

Merge commit '34bfe020eccbe4034322c5952012612b0540acb3'

* commit '34bfe020eccbe4034322c5952012612b0540acb3':
  Fix a couple copyright headers that aren't in the prescribed format.

14 years agoFix the ordering of lock acquisition in the heap worker.
Carl Shapiro [Fri, 6 Aug 2010 22:17:46 +0000 (15:17 -0700)]
Fix the ordering of lock acquisition in the heap worker.

A feature of the concurrent GC is that gcHeapLock is released while
roots are traced through.  This complicates the heap worker thread as
it assumes that when the gcHeapLock can be acquired no threads are
contending for the heapWorkerLock.  However, the concurrent GC holds
heapWorkerLock for the duration of a GC.  If the heap worker thread
becomes active while the GC temporarily release gcHeapLock it may
deadlock the GC by acquring the gcHeapLock, needed by the GC during
its final pause, and wait for the heapWorkerLock held by the GC.

This change attempts to resolve this issue by checking to see if after
a transition into running whether the GC has become active.  If so, it
releases gcHeapLock and reacquires it after the GC has signaled
completion.  This must be done in a loop as there is no guarantee that
the GC has not become active when heap worker is rescheduled.

14 years agoFix a couple copyright headers that aren't in the prescribed format.
Dan Bornstein [Wed, 4 Aug 2010 01:09:42 +0000 (18:09 -0700)]
Fix a couple copyright headers that aren't in the prescribed format.

Change-Id: I4de4dc69d8989f1add431e58533c7e633f67e550

14 years agoMerge "Fix the ordering of lock acquisition in the heap worker."
Carl Shapiro [Mon, 9 Aug 2010 21:15:11 +0000 (14:15 -0700)]
Merge "Fix the ordering of lock acquisition in the heap worker."

14 years agoImplement card table verification.
Carl Shapiro [Sat, 7 Aug 2010 00:07:53 +0000 (17:07 -0700)]
Implement card table verification.

Card table verification occurs just before scanning the card table
during a concurrent GC.  Each object in the bitmap is visited and the
number of white (unmarked) references are counted.  If an object has
unmarked objects it is by definition gray and must reside on a dirty
card.  If the object is not on a dirty card, the verification routine
aborts the VM.

Because the processing of weak roots and references has yet to occur,
reachable reference objects with unmarked referents and weak interned
strings may still be gray.  These objects are checked during the card
table scan and ignored if their card is not dirty.

Change-Id: I64d145aa4719fb52eb9e3bb91efaf4dcfacd6e0c

14 years agoFix the ordering of lock acquisition in the heap worker.
Carl Shapiro [Fri, 6 Aug 2010 22:17:46 +0000 (15:17 -0700)]
Fix the ordering of lock acquisition in the heap worker.

A feature of the concurrent GC is that gcHeapLock is released while
roots are traced through.  This complicates the heap worker thread as
it assumes that when the gcHeapLock can be acquired no threads are
contending for the heapWorkerLock.  However, the concurrent GC holds
heapWorkerLock for the duration of a GC.  If the heap worker thread
becomes active while the GC temporarily release gcHeapLock it may
deadlock the GC by acquring the gcHeapLock, needed by the GC during
its final pause, and wait for the heapWorkerLock held by the GC.

This change attempts to resolve this issue by checking to see if after
a transition into running whether the GC has become active.  If so, it
releases gcHeapLock and reacquires it after the GC has signaled
completion.  This must be done in a loop as there is no guarantee that
the GC has not become active when heap worker is rescheduled.

Change-Id: Ia30481cc597cea837529eab4f85ba86b02691efe

14 years agoMerge "Remove stale comments."
Carl Shapiro [Fri, 6 Aug 2010 18:16:30 +0000 (11:16 -0700)]
Merge "Remove stale comments."

14 years agoMerge "Rename verifyHeap and eliminate its bogus function-level comment."
Carl Shapiro [Fri, 6 Aug 2010 18:16:21 +0000 (11:16 -0700)]
Merge "Rename verifyHeap and eliminate its bogus function-level comment."

14 years agoRename verifyHeap and eliminate its bogus function-level comment.
Carl Shapiro [Fri, 6 Aug 2010 04:49:07 +0000 (21:49 -0700)]
Rename verifyHeap and eliminate its bogus function-level comment.

Change-Id: I09870de2710d03059faf6abce016e282865d2227

14 years agoRemove stale overwritefree flag.
Carl Shapiro [Fri, 6 Aug 2010 03:21:42 +0000 (20:21 -0700)]
Remove stale overwritefree flag.

Change-Id: If14998128245245c908b2390acfe28b82339f8bf

14 years agoMerge "Add const qualifier to the dvmComputeStringHash signature."
Carl Shapiro [Fri, 6 Aug 2010 03:01:52 +0000 (20:01 -0700)]
Merge "Add const qualifier to the dvmComputeStringHash signature."

14 years agoAdd const qualifier to the dvmComputeStringHash signature.
Carl Shapiro [Fri, 6 Aug 2010 02:55:11 +0000 (19:55 -0700)]
Add const qualifier to the dvmComputeStringHash signature.

Change-Id: Icc963f324ca738438c069e99f346826d7f301095

14 years agoRemove stale comments.
Carl Shapiro [Fri, 6 Aug 2010 02:53:09 +0000 (19:53 -0700)]
Remove stale comments.

Change-Id: I7b7d822784ebf3b18ee8af6bd6acee220c285508

14 years agoam c9153114: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-gingerbread
Brian Carlstrom [Thu, 5 Aug 2010 19:12:44 +0000 (12:12 -0700)]
am c9153114: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-gingerbread

Merge commit 'c915311408e45b4687d230641382e025cf38805d'

* commit 'c915311408e45b4687d230641382e025cf38805d':
  Add a missing branch for inlined direct getters.
  Implement method inlining for getters/setters
  Switch -Xjnitrace over to using a custom JNI bridge.
  Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.
  Break apart the swapping of the mark and live bitmaps and zeroing of
  Fix a crash during VM shutdown.
  Update the atomics test for the new atomics API.
  Allow the VM to suspend while the heap worker initializes.

14 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-gingerbread
Brian Carlstrom [Wed, 4 Aug 2010 22:37:09 +0000 (15:37 -0700)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-gingerbread

14 years agoFix for 2892472 jit spew: No free temp registers
buzbee [Wed, 4 Aug 2010 17:13:15 +0000 (10:13 -0700)]
Fix for 2892472 jit spew: No free temp registers

Neglected some register allocation hygene, which caused a
problem on armv5te builds.

Change-Id: I666b39b88822c4d3d3d7f0e84386aca2920bb9f1

14 years agoAdd a missing branch for inlined direct getters.
Ben Cheng [Tue, 3 Aug 2010 19:54:00 +0000 (12:54 -0700)]
Add a missing branch for inlined direct getters.

Change-Id: Ie11925b1856b32aeb6855601195e8a13d23c4e94

14 years agoImplement method inlining for getters/setters
Ben Cheng [Mon, 7 Jun 2010 20:44:23 +0000 (13:44 -0700)]
Implement method inlining for getters/setters

Changes include:
1) Force the trace that ends with an invoke instruction to include
   the next instruction if it is a move-result (because both need
   to be turned into no-ops if callee is inlined).
2) Interpreter entry point/trace builder changes so that return
   target won't automatically be considered as trace starting points
   (to avoid duplicate traces that include the move result
   instructions).
3) Codegen changes to handle getters/setters invoked from both
   monomorphic and polymorphic callsites.
4) Extend/fix self-verification to form identical trace regions and
   handle traces with inlined callees.
5) Apply touchups to the method based parsing - still not in use.

Change-Id: I116b934df01bf9ada6d5a25187510e352bccd13c

14 years agoam 4dc622c5: Remove the dvmHeapSizeChanged no-op routine.
Carl Shapiro [Sat, 31 Jul 2010 02:49:45 +0000 (19:49 -0700)]
am 4dc622c5: Remove the dvmHeapSizeChanged no-op routine.

Merge commit '4dc622c5b4ce48b5f2f0a0f92f316dd557fc950f' into dalvik-dev

* commit '4dc622c5b4ce48b5f2f0a0f92f316dd557fc950f':
  Remove the dvmHeapSizeChanged no-op routine.

14 years agoRemove the dvmHeapSizeChanged no-op routine.
Carl Shapiro [Sat, 31 Jul 2010 02:37:22 +0000 (19:37 -0700)]
Remove the dvmHeapSizeChanged no-op routine.

Change-Id: I6deb4ea858610edee6e7aa44d49d91cae5a25404

14 years agoam 6fa09f77: Fix the format conversions, again.
Carl Shapiro [Sat, 31 Jul 2010 01:03:29 +0000 (18:03 -0700)]
am 6fa09f77: Fix the format conversions, again.

Merge commit '6fa09f77cda8be8505897881a74821886c5aa116' into dalvik-dev

* commit '6fa09f77cda8be8505897881a74821886c5aa116':
  Fix the format conversions, again.

14 years agoFix the format conversions, again.
Carl Shapiro [Sat, 31 Jul 2010 01:00:01 +0000 (18:00 -0700)]
Fix the format conversions, again.

Change-Id: I6e46d882bad1e3264caeffec6196ce6ed07299ef

14 years agoam 4d529be0: Fix log message format conversions and remove uneeded newlines.
Carl Shapiro [Sat, 31 Jul 2010 00:49:42 +0000 (17:49 -0700)]
am 4d529be0: Fix log message format conversions and remove uneeded newlines.

Merge commit '4d529be041b5a8c25647da505aed109d5f3f4e69' into dalvik-dev

* commit '4d529be041b5a8c25647da505aed109d5f3f4e69':
  Fix log message format conversions and remove uneeded newlines.

14 years agoFix log message format conversions and remove uneeded newlines.
Carl Shapiro [Fri, 30 Jul 2010 04:47:54 +0000 (21:47 -0700)]
Fix log message format conversions and remove uneeded newlines.

Change-Id: Iae538c643d86522e8f0a52e6f01e411bbdea892b

14 years agoam 5488c8b2: Merge "Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk."
Carl Shapiro [Fri, 30 Jul 2010 23:20:33 +0000 (16:20 -0700)]
am 5488c8b2: Merge "Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk."

Merge commit '5488c8b2a6f4254cdfa4abbb655784fb5d632008' into dalvik-dev

* commit '5488c8b2a6f4254cdfa4abbb655784fb5d632008':
  Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.

14 years agoMerge "Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk."
Carl Shapiro [Fri, 30 Jul 2010 23:18:47 +0000 (16:18 -0700)]
Merge "Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk."

14 years agoam f3e71ffb: Merge "JIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT"
buzbee [Fri, 30 Jul 2010 23:15:33 +0000 (16:15 -0700)]
am f3e71ffb: Merge "JIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT"

Merge commit 'f3e71ffb84adfb0401e5b0d164e505ae3df22c01' into dalvik-dev

* commit 'f3e71ffb84adfb0401e5b0d164e505ae3df22c01':
  JIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT

14 years agoMerge "JIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT"
buzbee [Fri, 30 Jul 2010 23:12:55 +0000 (16:12 -0700)]
Merge "JIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT"

14 years agoChange dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.
Barry Hayes [Wed, 21 Jul 2010 19:03:02 +0000 (12:03 -0700)]
Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.

Concurrent sweeping will require the callback to process objects which
are live and not marked, while the client code continues to allocate
and set bits. Since dvmHeapBitmapXorWalk was only used to sweep, it
seemed easiest to make it learn its true purpose.

14 years agoMerge "Switch -Xjnitrace over to using a custom JNI bridge." into dalvik-dev
Elliott Hughes [Fri, 30 Jul 2010 22:56:19 +0000 (15:56 -0700)]
Merge "Switch -Xjnitrace over to using a custom JNI bridge." into dalvik-dev

14 years agoSwitch -Xjnitrace over to using a custom JNI bridge.
Elliott Hughes [Fri, 30 Jul 2010 20:34:49 +0000 (13:34 -0700)]
Switch -Xjnitrace over to using a custom JNI bridge.

This now works without needing to specify -Xint:portable, and no longer needs
to be manually enabled at compile-time.

If you're using -Xjnitrace, you'll pay to look up the real JNI bridge on every
invocation of a native method, but doing so leads to a really simple
implementation, and you're writing to the log on every invocation anyway, so
-Xjnitrace and performance don't go together anyway.

Bug: 2846017

Change-Id: I3108c4f35f27b72e8849c41077ae3e8768550e96

14 years agoam 79a76f30: Remove the seldom used overwrite free code.
Carl Shapiro [Fri, 30 Jul 2010 22:46:26 +0000 (15:46 -0700)]
am 79a76f30: Remove the seldom used overwrite free code.

Merge commit '79a76f30a7fe513e08b82464b68e00d77b170f54' into dalvik-dev

* commit '79a76f30a7fe513e08b82464b68e00d77b170f54':
  Remove the seldom used overwrite free code.

14 years agoRemove the seldom used overwrite free code.
Carl Shapiro [Fri, 30 Jul 2010 02:57:30 +0000 (19:57 -0700)]
Remove the seldom used overwrite free code.

This is being done in preparation of a change that will eliminate the
property handler from AndroidRuntime.cpp.

Change-Id: I05e43dab2e6e195048642e51d01986ed63472d21

14 years agoam a20a9929: Move LIKELY and UNLIKELY to a public header file.
Carl Shapiro [Fri, 30 Jul 2010 22:43:32 +0000 (15:43 -0700)]
am a20a9929: Move LIKELY and UNLIKELY to a public header file.

Merge commit 'a20a99298b45b4b6c7c9c528066a3e055e601535' into dalvik-dev

* commit 'a20a99298b45b4b6c7c9c528066a3e055e601535':
  Move LIKELY and UNLIKELY to a public header file.

14 years agoMove LIKELY and UNLIKELY to a public header file.
Carl Shapiro [Fri, 30 Jul 2010 04:22:12 +0000 (21:22 -0700)]
Move LIKELY and UNLIKELY to a public header file.

Change-Id: I6c4429277f50ff34021bd2ef836834605323b9bd

14 years agoam 577534a4: am 486e2d58: am 7f626db7: I got tired of rewriting something like this...
Dan Bornstein [Fri, 30 Jul 2010 22:00:37 +0000 (15:00 -0700)]
am 577534a4: am 486e2d58: am 7f626db7: I got tired of rewriting something like this text into emails and bug comments.

Merge commit '577534a45611f2011cbfa5aa99590e8ef565250e' into dalvik-dev

* commit '577534a45611f2011cbfa5aa99590e8ef565250e':
  I got tired of rewriting something like this text into emails and bug comments.

14 years agoam 486e2d58: am 7f626db7: I got tired of rewriting something like this text into...
Dan Bornstein [Fri, 30 Jul 2010 21:52:08 +0000 (14:52 -0700)]
am 486e2d58: am 7f626db7: I got tired of rewriting something like this text into emails and bug comments.

Merge commit '486e2d586ba964611e5d86742d0c8057268b7771'

* commit '486e2d586ba964611e5d86742d0c8057268b7771':
  I got tired of rewriting something like this text into emails and bug comments.

14 years agoam 7f626db7: I got tired of rewriting something like this text into emails and bug...
Dan Bornstein [Fri, 30 Jul 2010 21:49:39 +0000 (14:49 -0700)]
am 7f626db7: I got tired of rewriting something like this text into emails and bug comments.

Merge commit '7f626db7ae1408dfa7248de7f27fa65cae6fb0ce' into gingerbread-plus-aosp

* commit '7f626db7ae1408dfa7248de7f27fa65cae6fb0ce':
  I got tired of rewriting something like this text into emails and bug comments.

14 years agoI got tired of rewriting something like this text into emails and bug comments.
Dan Bornstein [Fri, 30 Jul 2010 21:10:19 +0000 (14:10 -0700)]
I got tired of rewriting something like this text into emails and bug comments.

Change-Id: Ib3bf57e0bac91567b6a331cd641c7589996e6a02

14 years agoJIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT
buzbee [Thu, 29 Jul 2010 22:24:14 +0000 (15:24 -0700)]
JIT: Fix for Issue 2881687 - fix volatiles and re-enable JIT

Change-Id: I2ccb4b46d92b729d5504ea9c1b771a5147096858

14 years agoChange dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.
Barry Hayes [Wed, 21 Jul 2010 19:03:02 +0000 (12:03 -0700)]
Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.

Concurrent sweeping will require the callback to process objects which
are live and not marked, while the client code continues to allocate
and set bits. Since dvmHeapBitmapXorWalk was only used to sweep, it
seemed easiest to make it learn its true purpose.

Change-Id: I44edd15e5a7447d029a7ae60c6cd9b101cb1e9d9

14 years agoBreak apart the swapping of the mark and live bitmaps and zeroing of
Barry Hayes [Mon, 19 Jul 2010 21:07:01 +0000 (14:07 -0700)]
Break apart the swapping of the mark and live bitmaps and zeroing of
the mark bitmap.

This paves the way for concurrent sweep.

Change-Id: I93a95188fecfd69d1d1933391a332537649206fa

14 years agoam 006346e8: Change the bitmap callback signature to have a void return value.
Carl Shapiro [Fri, 30 Jul 2010 04:47:07 +0000 (21:47 -0700)]
am 006346e8: Change the bitmap callback signature to have a void return value.

Merge commit '006346e8f138b4e4b16c7a94b049c1646b009b52' into dalvik-dev

* commit '006346e8f138b4e4b16c7a94b049c1646b009b52':
  Change the bitmap callback signature to have a void return value.

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 agoam 995b5ae8: Merge "Remove unused limits.h include and fix sys/mman.h include comment."
Carl Shapiro [Fri, 30 Jul 2010 03:49:48 +0000 (20:49 -0700)]
am 995b5ae8: Merge "Remove unused limits.h include and fix sys/mman.h include comment."

Merge commit '995b5ae8fc12df378dc4f228c86ab5f5bcb3a1a2' into dalvik-dev

* commit '995b5ae8fc12df378dc4f228c86ab5f5bcb3a1a2':
  Remove unused limits.h include and fix sys/mman.h include comment.

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 agoam a363035f: Remove an unused member from the mark context.
Carl Shapiro [Fri, 30 Jul 2010 01:05:03 +0000 (18:05 -0700)]
am a363035f: Remove an unused member from the mark context.

Merge commit 'a363035f3bbf56f6c4fe500dd85bc2f1330d7a20' into dalvik-dev

* commit 'a363035f3bbf56f6c4fe500dd85bc2f1330d7a20':
  Remove an unused member from the mark context.

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 agoam 7a57d5b7: Re-enable the concurrent GC.
Carl Shapiro [Thu, 29 Jul 2010 22:30:44 +0000 (15:30 -0700)]
am 7a57d5b7: Re-enable the concurrent GC.

Merge commit '7a57d5b78f15da77f5b5cab14c8c347883b2a343' into dalvik-dev

* commit '7a57d5b78f15da77f5b5cab14c8c347883b2a343':
  Re-enable the concurrent GC.

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 agoam deac1a95: Merge "Allow the VM to suspend while the heap worker initializes."
Brian Carlstrom [Thu, 29 Jul 2010 21:52:12 +0000 (14:52 -0700)]
am deac1a95: Merge "Allow the VM to suspend while the heap worker initializes."

Merge commit 'deac1a955f63be277342bc22c264c43aa1992f9c' into dalvik-dev

* commit 'deac1a955f63be277342bc22c264c43aa1992f9c':
  Allow the VM to suspend while the heap worker initializes.

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 agoam 35ff69be: JIT: temporarily disable the JIT and concurrent GC on SMP systems
buzbee [Thu, 29 Jul 2010 21:34:33 +0000 (14:34 -0700)]
am 35ff69be: JIT: temporarily disable the JIT and concurrent GC on SMP systems

Merge commit '35ff69be47f3f2bd33f2a2d8562eaa2ac3dc9f1d' into dalvik-dev

* commit '35ff69be47f3f2bd33f2a2d8562eaa2ac3dc9f1d':
  JIT: temporarily disable the JIT and concurrent GC on SMP systems

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 agoam e6899ef5: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-master
Brian Carlstrom [Thu, 29 Jul 2010 15:57:47 +0000 (08:57 -0700)]
am e6899ef5: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-master

Merge commit 'e6899ef57ca0bea419992ab9dd83b8ca65854284' into dalvik-dev

* commit 'e6899ef57ca0bea419992ab9dd83b8ca65854284':

14 years agoFix a crash during VM shutdown.
Carl Shapiro [Thu, 29 Jul 2010 02:33:46 +0000 (19:33 -0700)]
Fix a crash during VM shutdown.

The code to shutdown the GC daemon thread was not checking to see if
the GC daemon thread had been initialized.  This caused pthread_join
to crash waiting for an uninitialized thread object.

Change-Id: Iac338a054775aa024d74fbb4a5de35e12d95b862

14 years agoMerge "Allow the VM to suspend while the heap worker initializes." into dalvik-dev
Carl Shapiro [Thu, 29 Jul 2010 00:13:22 +0000 (17:13 -0700)]
Merge "Allow the VM to suspend while the heap worker initializes." into dalvik-dev

14 years agoUpdate the atomics test for the new atomics API.
Carl Shapiro [Wed, 28 Jul 2010 23:59:03 +0000 (16:59 -0700)]
Update the atomics test for the new atomics API.

Change-Id: I2b675b4a8e4634304a7ef9b938657fccd740bd79

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 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.

Change-Id: I208b559bcd01de6628f1b79ed6eef17f1536cbbc

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