OSDN Git Service

android-x86/dalvik.git
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 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

14 years agoMove the biasedCardTableBase out of the non-public GcHeap structure,
Barry Hayes [Mon, 12 Jul 2010 16:52:20 +0000 (09:52 -0700)]
Move the biasedCardTableBase out of the non-public GcHeap structure,
and back to DvmGlobals where it can be found. Create dvmIsValidCard to
access the values hidden in the GcHeap.

This is a half-step to inlining dvmMarkCard and dvmCardFromAddr.

Change-Id: I50158915802d7f08ddadb60ca6907afd279df2a8

14 years agoMake the write barrier calls in ObjectInlines conditional; if the
Barry Hayes [Fri, 9 Jul 2010 15:50:19 +0000 (08:50 -0700)]
Make the write barrier calls in ObjectInlines conditional; if the
value being stored is NULL, no write barrier call is needed.

Change-Id: I608f9706c233717b4fa0f79f78f152a2a360ee78

14 years agoMerge "Remove a mostly obsolete comment and fix some formatting." into dalvik-dev
Carl Shapiro [Sat, 10 Jul 2010 01:05:52 +0000 (18:05 -0700)]
Merge "Remove a mostly obsolete comment and fix some formatting." into dalvik-dev

14 years agoRemove a mostly obsolete comment and fix some formatting.
Carl Shapiro [Sat, 10 Jul 2010 00:55:41 +0000 (17:55 -0700)]
Remove a mostly obsolete comment and fix some formatting.

Change-Id: I74dce856323136e5d2703bd1c753f5a87ba575b9

14 years agoWhen aliasing a bitmap, use smallest available limit.
Carl Shapiro [Sat, 10 Jul 2010 00:41:26 +0000 (17:41 -0700)]
When aliasing a bitmap, use smallest available limit.

The original implementation of the bitmap aliasing routine chose the
conservative max value of the heap limit.  This is perfect for the
zygote but is oversized for application heaps that are not anywhere
near full.  Now the code consults the live bitmap and will use its max
value if it is smaller than the heap limit.

Change-Id: I7cf223efdeaed318922a8a5f9e147092e539da6c

14 years agoMake the compiler's MIN and MAX macros globally visible.
Carl Shapiro [Sat, 10 Jul 2010 00:35:15 +0000 (17:35 -0700)]
Make the compiler's MIN and MAX macros globally visible.

Change-Id: Ic04aa35276df783b1d9eacede9627fd3e0b9acb6

14 years agoUse the new pendingNext field to thread pending references.
Carl Shapiro [Fri, 9 Jul 2010 23:50:54 +0000 (16:50 -0700)]
Use the new pendingNext field to thread pending references.

Presently, the garbage collector uses the queueNext field to thread
references discovered during a trace.  This is unsafe as a user may
simultaniously call enqueue on a discovered reference which will alias
the queue of pending references to the queue of a reference queue.

To avoid this problem, the garbage collector uses the pendingNext
field to thread together pending references.  If, during reference
processing, the garbage collector discovers that an object has been
enqueued by the user, it will short circuit referencing processing for
that object.

As part of this change, the the reference object processing routines
have been reorganized to eliminate the macrology used by the pending
reference queueing.  In addition, the pending reference lists are now
circular to ensure pendingNext of a pending reference is never NULL.

Change-Id: Id855aa295dd835eacc8d5e765f4edbb869c104b7

14 years agoMerge "Some formatting and commenting clean-up." into dalvik-dev
Barry Hayes [Fri, 9 Jul 2010 21:34:35 +0000 (14:34 -0700)]
Merge "Some formatting and commenting clean-up." into dalvik-dev

14 years agoSome formatting and commenting clean-up.
Barry Hayes [Fri, 9 Jul 2010 19:53:49 +0000 (12:53 -0700)]
Some formatting and commenting clean-up.

Change-Id: Icc166d98fe9c0fb03a51f9fbfa2e5765b75af8f5

14 years agoam 2566990f: resolved conflicts for merge of c62fc717 to master
buzbee [Fri, 9 Jul 2010 21:18:06 +0000 (14:18 -0700)]
am 2566990f: resolved conflicts for merge of c62fc717 to master

Merge commit '2566990f30f31c6e2bbcbabab26b925e5504ce37' into dalvik-dev

* commit '2566990f30f31c6e2bbcbabab26b925e5504ce37':
  JIT: Fix for 2813841, use core regs for sub-word data

14 years agoresolved conflicts for merge of c62fc717 to master
buzbee [Fri, 9 Jul 2010 20:59:19 +0000 (13:59 -0700)]
resolved conflicts for merge of c62fc717 to master

Change-Id: I80b9e0e2334ae47d62d3e956f5b9505ef285572e

14 years agoam 856d111c: am b6d37288: JIT: Fix for 2813841, use core regs for sub-word data
Bill Buzbee [Fri, 9 Jul 2010 19:39:36 +0000 (12:39 -0700)]
am 856d111c: am b6d37288: JIT: Fix for 2813841, use core regs for sub-word data

Merge commit '856d111c4c87e4b47c71954dc6548e636295ea50' into gingerbread-plus-aosp

* commit '856d111c4c87e4b47c71954dc6548e636295ea50':
  JIT: Fix for 2813841, use core regs for sub-word data

14 years agoam b6d37288: JIT: Fix for 2813841, use core regs for sub-word data
Bill Buzbee [Fri, 9 Jul 2010 19:37:59 +0000 (12:37 -0700)]
am b6d37288: JIT: Fix for 2813841, use core regs for sub-word data

Merge commit 'b6d372886d145716f1f62d39726ea06255ebe76d' into gingerbread

* commit 'b6d372886d145716f1f62d39726ea06255ebe76d':
  JIT: Fix for 2813841, use core regs for sub-word data

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 agoMerge "Handle NULL return from class loader." into dalvik-dev
Andy McFadden [Fri, 9 Jul 2010 18:23:05 +0000 (11:23 -0700)]
Merge "Handle NULL return from class loader." into dalvik-dev

14 years agoHandle NULL return from class loader.
Andy McFadden [Fri, 9 Jul 2010 17:52:19 +0000 (10:52 -0700)]
Handle NULL return from class loader.

The VM was asserting that it couldn't happen, when it fact it can quite
easily if a class loader is broken.

Bug 2817346.

Change-Id: Id2a4edab428a0ef0fa9aabc8e4a7f6a4d614fb9e

14 years agoam b122c8b1: Fix thread names.
Andy McFadden [Fri, 9 Jul 2010 16:50:01 +0000 (09:50 -0700)]
am b122c8b1: Fix thread names.

Merge commit 'b122c8b1030e4da9cbc0e7e401a72e1d614e9c3e' into dalvik-dev

* commit 'b122c8b1030e4da9cbc0e7e401a72e1d614e9c3e':
  Fix thread names.

14 years agoFix thread names.
Andy McFadden [Thu, 8 Jul 2010 22:43:19 +0000 (15:43 -0700)]
Fix thread names.

The prctl() call we were using politely truncates overly-long strings.
The pthread_setname_np() call returns ERANGE.  This adds a buffer
copy to create a truncated string.

I'm strongly tempted to just back out the previous change and go
back to using prctl(), but there's probably some value in using a
pthread call, even if it is _np (and appears to exist but declared
differently on other platforms).

Change-Id: Ib692ea0e225f691e4888b27883c61f7701272245

14 years agoQuicker partial collection by using card marking.
Barry Hayes [Tue, 22 Jun 2010 19:32:59 +0000 (12:32 -0700)]
Quicker partial collection by using card marking.

Add calls to the card marking from the write barrier routines, so that
a write to an Object marks the appropriate card. Add code in the GC to
use and rebuild the cards at a partial GC, clearing cards in the
Zygote heap which do not in fact contain references to the application
heap.

Change-Id: Ie6f29fd096e029f48085715b282b6db8a7122555

14 years agoMerge "Only emit cat1 volatile ops in SMP builds." into dalvik-dev
Andy McFadden [Wed, 7 Jul 2010 21:41:04 +0000 (14:41 -0700)]
Merge "Only emit cat1 volatile ops in SMP builds." into dalvik-dev

14 years agoOnly emit cat1 volatile ops in SMP builds.
Andy McFadden [Wed, 7 Jul 2010 21:09:09 +0000 (14:09 -0700)]
Only emit cat1 volatile ops in SMP builds.

After consultation with the JITSquad, we no longer emit volatile
field access instructions for category 1 values unless ANDROID_SMP
is nonzero.

See also bug 2781881.

Change-Id: I58041572f6cf9308a8a125200dc419ce9d3d8d12

14 years agoMerge "JIT: Fix for 2813841, use core regs for sub-word data" into dalvik-dev
Bill Buzbee [Wed, 7 Jul 2010 18:29:18 +0000 (11:29 -0700)]
Merge "JIT: Fix for 2813841, use core regs for sub-word data" into dalvik-dev

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: I60c2a0d1df9a299f6c5130371f44f2be9c348ded

14 years agoam e5289ebc: Merge "Use pthread_setname_np when available."
Andy McFadden [Wed, 7 Jul 2010 14:51:47 +0000 (07:51 -0700)]
am e5289ebc: Merge "Use pthread_setname_np when available."

Merge commit 'e5289ebcda44ae0167d29f482cbb521f51e49f96' into dalvik-dev

* commit 'e5289ebcda44ae0167d29f482cbb521f51e49f96':
  Use pthread_setname_np when available.

14 years agoMerge "Use pthread_setname_np when available."
Andy McFadden [Wed, 7 Jul 2010 14:40:41 +0000 (07:40 -0700)]
Merge "Use pthread_setname_np when available."

14 years agoMerge "Disambiguate method overloads in -Xjitverbose output." into dalvik-dev
Elliott Hughes [Fri, 2 Jul 2010 20:47:14 +0000 (13:47 -0700)]
Merge "Disambiguate method overloads in -Xjitverbose output." into dalvik-dev

14 years agoDisambiguate method overloads in -Xjitverbose output.
Elliott Hughes [Fri, 2 Jul 2010 20:38:44 +0000 (13:38 -0700)]
Disambiguate method overloads in -Xjitverbose output.

Before:

 TRACEINFO (35): 0x41660904 Ljava/lang/AbstractStringBuilder;append0 0xe 11 of 25, 4 blocks
 ...
 TRACEINFO (36): 0x41660a30 Ljava/lang/AbstractStringBuilder;append0 0x16 8 of 33, 6 blocks

After:

 TRACEINFO (35): 0x41660904 Ljava/lang/AbstractStringBuilder;append0.(C)V 0xe 11 of 25, 4 blocks
 ...
 TRACEINFO (36): 0x41660a30 Ljava/lang/AbstractStringBuilder;append0.(Ljava/lang/String;)V 0x16 8 of 33, 6 blocks

Change-Id: I73ee3b0981bf8db24322b1e9a0fec34f989c55b1

14 years agoam 1c52e6d2: Properly set the entry point for the dbg > mterp transition.
Ben Cheng [Fri, 2 Jul 2010 20:12:24 +0000 (13:12 -0700)]
am 1c52e6d2: Properly set the entry point for the dbg > mterp transition.

Merge commit '1c52e6d208b0455be1880e50a2fdb2c2206ec3f7' into dalvik-dev

* commit '1c52e6d208b0455be1880e50a2fdb2c2206ec3f7':
  Properly set the entry point for the dbg > mterp transition.

14 years agoProperly set the entry point for the dbg > mterp transition.
Ben Cheng [Fri, 2 Jul 2010 20:00:39 +0000 (13:00 -0700)]
Properly set the entry point for the dbg > mterp transition.

Bug: 2810533
Change-Id: I511543a9ae3ea3abc358a7982c0e5b4ab79bf58a

14 years agoAdd two new stubs to fix the copying collector build.
Carl Shapiro [Fri, 2 Jul 2010 18:13:35 +0000 (11:13 -0700)]
Add two new stubs to fix the copying collector build.

Change-Id: I9f9c81ff5335100bbb21d43278a8cdd21a64ba56

14 years agoMinor clean-up of thread status changes.
Carl Shapiro [Fri, 2 Jul 2010 17:50:57 +0000 (10:50 -0700)]
Minor clean-up of thread status changes.

Eliminate the obsolete self != NULL test when acquiring the heap lock.
This should be redundant now that threads are added to the thread list
before they are able to allocate.

Switch to using a variable of the ThreadStatus type to store thread
status values rather than an ordinary int.

Change-Id: I8d30e69f20d5321a04f6b49322f13b3577d5a3c4

14 years agoAllow allocation during a concurrent GC.
Carl Shapiro [Fri, 2 Jul 2010 00:44:46 +0000 (17:44 -0700)]
Allow allocation during a concurrent GC.

Previously, any thread performing a GC held the heap lock for the
entire GC.  If the GC performed was a concurrent GC, mutator threads
that allocate during the GC would be blocked until the GC completed.

With this change, if the GC performed is a concurrent GC, the heap
lock is released while the roots are being traced.  If a mutator
thread allocates an object from available storage, the allocation
proceeds.  If a mutator thread attempts to allocate an object larger
than available storage, the thread will block until the GC completes.

Change-Id: I91a04179c6f583f878b685405a6fdd16b9995017

14 years agoresolved conflicts for merge of 225bfdd0 to dalvik-dev
Carl Shapiro [Thu, 1 Jul 2010 20:57:38 +0000 (13:57 -0700)]
resolved conflicts for merge of 225bfdd0 to dalvik-dev

Change-Id: I588a015e06ad87f492b02bed31ff64eeb49c3d0c

14 years agoMerge "Eliminate the only use of the releasing swap name."
Carl Shapiro [Thu, 1 Jul 2010 20:30:53 +0000 (13:30 -0700)]
Merge "Eliminate the only use of the releasing swap name."

14 years agoam bdddc792: am c399a2ca: merge from open-source master
The Android Open Source Project [Thu, 1 Jul 2010 19:03:42 +0000 (12:03 -0700)]
am bdddc792: am c399a2ca: merge from open-source master

Merge commit 'bdddc7926f70185bb5af05d41e1ac935fbbb8649' into dalvik-dev

* commit 'bdddc7926f70185bb5af05d41e1ac935fbbb8649':
  Don't prelink dalvik for x86

14 years agoam c399a2ca: merge from open-source master
The Android Open Source Project [Thu, 1 Jul 2010 18:56:19 +0000 (11:56 -0700)]
am c399a2ca: merge from open-source master

Merge commit 'c399a2caea7660b7e6ed6f816440edd73ba7ff37'

* commit 'c399a2caea7660b7e6ed6f816440edd73ba7ff37':
  Don't prelink dalvik for x86

14 years agoUse pthread_setname_np when available.
Andy McFadden [Thu, 1 Jul 2010 18:23:15 +0000 (11:23 -0700)]
Use pthread_setname_np when available.

Switch from HAVE_PTHREAD_SETNAME_NP to HAVE_ANDROID_PTHREAD_SETNAME_NP.
The change to favor it over prctl() already went in (external change
https://review.source.android.com/#change,15205 ).

Change-Id: I3804b4c9d828d7a125cc4f0c8030e5832b5aeaf4

14 years agomerge from open-source master
The Android Open Source Project [Thu, 1 Jul 2010 17:37:36 +0000 (10:37 -0700)]
merge from open-source master

Change-Id: I3534c806a396de3365ef7278a9c4799f7f95e0e7

14 years agoDon't prelink dalvik for x86
Bruce Beare [Fri, 25 Jun 2010 16:53:56 +0000 (09:53 -0700)]
Don't prelink dalvik for x86

x86 doesn't (yet) support pre-linking and we need to disable it until it does.

Change-Id: Icfba41c364ed934632386e2fa7f50844dabd126e
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
14 years agoEliminate the only use of the releasing swap name.
Carl Shapiro [Wed, 30 Jun 2010 23:50:00 +0000 (16:50 -0700)]
Eliminate the only use of the releasing swap name.

Change-Id: I5e59c5b364c4155b179ceb9c16d2c4baae6cd2ea

14 years agoam de833dc1: am 14628323: am 79d2a00a: am 6296a2e8: Jit: Fix for 2793725 SIGSEGV...
Bill Buzbee [Wed, 30 Jun 2010 22:54:03 +0000 (15:54 -0700)]
am de833dc1: am 14628323: am 79d2a00a: am 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache

Merge commit 'de833dc1fb3088985d86b5f1640bbde3ec8fd6d5' into dalvik-dev

* commit 'de833dc1fb3088985d86b5f1640bbde3ec8fd6d5':
  Jit: Fix for 2793725 SIGSEGV in JIT code cache

14 years agoam 14628323: am 79d2a00a: am 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache
Bill Buzbee [Wed, 30 Jun 2010 22:49:05 +0000 (15:49 -0700)]
am 14628323: am 79d2a00a: am 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache

Merge commit '14628323c84aa14cd9c2ffa9166a0445e863a50c'

* commit '14628323c84aa14cd9c2ffa9166a0445e863a50c':
  Jit: Fix for 2793725 SIGSEGV in JIT code cache

14 years agoam 79d2a00a: am 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache
Bill Buzbee [Wed, 30 Jun 2010 22:33:19 +0000 (15:33 -0700)]
am 79d2a00a: am 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache

Merge commit '79d2a00ab79b07f4a69035f9f7fb922fd0552122' into gingerbread-plus-aosp

* commit '79d2a00ab79b07f4a69035f9f7fb922fd0552122':
  Jit: Fix for 2793725 SIGSEGV in JIT code cache

14 years agoRevert change of test automerged from master
Brian Carlstrom [Wed, 30 Jun 2010 19:36:14 +0000 (12:36 -0700)]
Revert change of test automerged from master

Change-Id: I2c28ca62129f190b9f71249d53731e7220358474

14 years agoam 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache
Bill Buzbee [Wed, 30 Jun 2010 19:08:06 +0000 (12:08 -0700)]
am 6296a2e8: Jit: Fix for 2793725 SIGSEGV in JIT code cache

Merge commit '6296a2e8e97d76165a83320b06e32fba0f5a5625' into gingerbread

* commit '6296a2e8e97d76165a83320b06e32fba0f5a5625':
  Jit: Fix for 2793725 SIGSEGV in JIT code cache

14 years agoJit: Fix for 2793725 SIGSEGV in JIT code cache
Bill Buzbee [Wed, 23 Jun 2010 23:36:50 +0000 (16:36 -0700)]
Jit: Fix for 2793725 SIGSEGV in JIT code cache

r7 and r8 were missing from the handler clobber set, and are stepped on by
the handlers for inline string compareto and indexof.

Change-Id: I979c4b94ee412cb3d2ab76c2421f4c2336d9b6e3

14 years agoMerge "Improve System.arraycopy's ArrayIndexOutOfBoundsException messages." into...
Elliott Hughes [Wed, 30 Jun 2010 18:42:42 +0000 (11:42 -0700)]
Merge "Improve System.arraycopy's ArrayIndexOutOfBoundsException messages." into dalvik-dev

14 years agoImprove System.arraycopy's ArrayIndexOutOfBoundsException messages.
Elliott Hughes [Wed, 30 Jun 2010 00:17:42 +0000 (17:17 -0700)]
Improve System.arraycopy's ArrayIndexOutOfBoundsException messages.

This has been handy for me a few times, and with Froyo's bug reporting
improvements, more third-party developers will be trying to debug remotely
and after the fact, so this might help them too.

Change-Id: I17abe6e91e487c02b782f62245392fbcbe5baf8e

14 years agoam 0d3291c7: Merge remote branch \'goog/dalvik-dev\' into mm
Brian Carlstrom [Wed, 30 Jun 2010 18:01:59 +0000 (11:01 -0700)]
am 0d3291c7: Merge remote branch \'goog/dalvik-dev\' into mm

Merge commit '0d3291c78488fc64455270c42e4a70d433e11f33' into dalvik-dev

* commit '0d3291c78488fc64455270c42e4a70d433e11f33':

14 years agoMerge remote branch 'goog/dalvik-dev' into mm
Brian Carlstrom [Wed, 30 Jun 2010 16:28:53 +0000 (09:28 -0700)]
Merge remote branch 'goog/dalvik-dev' into mm

Change-Id: I4346c9891939e589c627b9de4d71b959ed8f3b51

14 years agoEmit volatile field access instructions.
Andy McFadden [Mon, 28 Jun 2010 23:21:20 +0000 (16:21 -0700)]
Emit volatile field access instructions.

Easier said than done.  The trick is that we need to ensure that the
instruction replacement happens even if the verifier and optimizer
are not enabled in dexopt.

We're currently doing the -wide-volatile replacement during
verification, but that's not so great, since we collapse things like
iget-byte and iget-char into a single iget-volatile, losing the field
width.  We could recover it from the field declaration, but doing it
during verification is really just sort of wrong to begin with.

The substitution isn't technically an "optimization", but it's easiest
to do it during the opt pass, and we already have a convenient "is
optimized" flag that helps ensure that we do the replacement pass
exactly once.

Optimizing at run time means making a private copy of shared pages,
because the pages are mapped shared/read-only out of the DEX file.
We could use up a lot of physical memory if we applied all possible
optimizations, so we need a notion of "essential" and "non-essential"
optimizations.  If we're not running in dexopt, we only do the
essential ones, which should leave most methods untouched.

Replacement of 32-bit instructions is only strictly necessary when
we're building for SMP.  On a uniprocessor, the 32-bit operations
are inherently atomic, and memory barriers aren't required.  However,
the JIT may benefit from having volatile accesses identified by opcode.
Since the current branch doesn't support any SMP products, I'm enabling
the instruction generation for all platforms so that we can give it
some exercise.

While making this change I noticed that the exclusion mechanism for
breakpoints and optimization/verification was only serving to avoid
a data race (e.g. breakpoint being overwritten by an instruction
rewrite).  It wasn't guaranteed to prevent races when two threads
toggled pages between read-write and read-only while making an update,
since a 4K page can hold code for more than one class.  This has been
corrected by adding a mutex.

This change:
 - Introduces the notion of essential vs. non-essential optimizations.
 - Adds generation of 32-bit *-volatile instructions for all platforms.
 - Moves generation of *-wide-volatile from the verifier to the optimizer.
 - Allows the optimizer to modify code at run time.
 - Tweaks optimizeMethod() for "best effort" rather than "fail early".
 - Adds a DEX-granularity mutex to the bytecode update functions.

This also begins the removal of PROFILE_FIELD_ACCESS, which hasn't been
used for much and is mostly just in the way.

Change-Id: I4ac9fa5e1ac5f9a1d106c662c3deee90d62895aa

14 years agoMerge "Bullet-proof dvmFreeClassInnards from unexpected or NULL descriptor." into...
Barry Hayes [Wed, 30 Jun 2010 14:33:56 +0000 (07:33 -0700)]
Merge "Bullet-proof dvmFreeClassInnards from unexpected or NULL descriptor." into dalvik-dev