OSDN Git Service

android-x86/dalvik.git
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 agoMerge "Implement growth limits to support multiple heap configurations." into honeycomb
Carl Shapiro [Wed, 19 Jan 2011 02:16:46 +0000 (18:16 -0800)]
Merge "Implement growth limits to support multiple heap configurations." into honeycomb

13 years agoImplement growth limits to support multiple heap configurations.
Carl Shapiro [Wed, 19 Jan 2011 01:59:30 +0000 (17:59 -0800)]
Implement growth limits to support multiple heap configurations.

When a growth limit is in effect, allocations will be limited to
number of bytes specified by the growth limit instead of the maximum
heap size.  Growth limits are specified on the command line with the
new parameter -XX:HeapGrowthLimit.  A growth limit can be removed at
runtime by calling the new clearGrowthLimit method.

This is a work around until we can adjust the maximum heap size at
runtime.

Change-Id: Ic01e32823b5ca8cf29c0948fb6cd2df10967c1fb

13 years agoMerge "Fix proxy expectation." into honeycomb
Jesse Wilson [Wed, 19 Jan 2011 01:24:19 +0000 (17:24 -0800)]
Merge "Fix proxy expectation." into honeycomb

13 years agoFix proxy expectation.
Jesse Wilson [Wed, 19 Jan 2011 01:20:33 +0000 (17:20 -0800)]
Fix proxy expectation.

Change-Id: I70589302c686387a1f89e8f79eb58c4b6b8214a6

13 years agoRemove unused heap dumping code.
Carl Shapiro [Mon, 17 Jan 2011 03:29:23 +0000 (19:29 -0800)]
Remove unused heap dumping code.

Change-Id: Id8774848a870003c60be2ebcc505ce30795a4fcf

13 years agoRemove some inline declarations to improve debugging.
Carl Shapiro [Mon, 17 Jan 2011 01:20:49 +0000 (17:20 -0800)]
Remove some inline declarations to improve debugging.

Change-Id: I41b044fb9ae66c1d531f4d61c73ce6fcd597102f

13 years agoRename absoluteMaxSize to maximumSize.
Carl Shapiro [Sun, 16 Jan 2011 22:05:53 +0000 (14:05 -0800)]
Rename absoluteMaxSize to maximumSize.

Change-Id: I3ec30b35f3689ad76a805af3b261cdaa7adbc3d7

13 years agoMerge "Make the soft limited predicate look more like a predicate." into honeycomb
Carl Shapiro [Sun, 16 Jan 2011 21:51:44 +0000 (13:51 -0800)]
Merge "Make the soft limited predicate look more like a predicate." into honeycomb

13 years agoMake the soft limited predicate look more like a predicate.
Carl Shapiro [Sat, 15 Jan 2011 03:05:23 +0000 (19:05 -0800)]
Make the soft limited predicate look more like a predicate.

Change-Id: I8edfafdfa8d73ebe1e3288bc0c8df2c6acbce2af

13 years agoMerge "Fix JNI invocation of constructors." into honeycomb
Andy McFadden [Fri, 14 Jan 2011 23:33:16 +0000 (15:33 -0800)]
Merge "Fix JNI invocation of constructors." into honeycomb

13 years agoFix JNI invocation of constructors.
Andy McFadden [Fri, 14 Jan 2011 22:52:48 +0000 (14:52 -0800)]
Fix JNI invocation of constructors.

The code that "virtualizes" method invocations was attempting to
virtualize a call to a constructor.  Constructors are direct methods,
so this resulted in a spurious CloneNotSupportedException.

Bug 3354578

(cherry-pick from dalvik-dev)

Change-Id: Ib158ab7fc6b2874eba1fc2afa45fd5436c1f2a8a

13 years agoOnly generate debugging LIRs in verbose mode.
Ben Cheng [Fri, 14 Jan 2011 18:23:37 +0000 (10:23 -0800)]
Only generate debugging LIRs in verbose mode.

This should reduce memory usage and JIT time a bit.
Affected opcodes: kArmPseudoSSARep and kArmPseudoDalvikByteCodeBoundary.

Change-Id: I18ce9338b8d258270df51a66f9dc98cd2d9dd0e8

13 years agoMerge "Minor cleanup of some initialization code." into honeycomb
Carl Shapiro [Fri, 14 Jan 2011 01:45:21 +0000 (17:45 -0800)]
Merge "Minor cleanup of some initialization code." into honeycomb

13 years agoMinor cleanup of some initialization code.
Carl Shapiro [Fri, 14 Jan 2011 01:25:19 +0000 (17:25 -0800)]
Minor cleanup of some initialization code.

This change removes the "dvm" prefix from static functions and makes
the memory option processor use the potentially wider size_t type for
manipulating memory sizes instead of the unsigned int type.

Change-Id: Ia85b01d2a852080e56e4da7c9393fe4e6c2bdf00

13 years agoMerge "Fix invoke-interface verification failures" into honeycomb
Andy McFadden [Fri, 14 Jan 2011 00:35:26 +0000 (16:35 -0800)]
Merge "Fix invoke-interface verification failures" into honeycomb

13 years agoMerge "Remove a stray empty line." into honeycomb
Carl Shapiro [Fri, 14 Jan 2011 00:25:16 +0000 (16:25 -0800)]
Merge "Remove a stray empty line." into honeycomb

13 years agoRemove a stray empty line.
Carl Shapiro [Fri, 14 Jan 2011 00:21:22 +0000 (16:21 -0800)]
Remove a stray empty line.

Change-Id: Ie954aa547b5cbfd0058407c0139e057c08ad9337

13 years agoFix invoke-interface verification failures
Andy McFadden [Fri, 14 Jan 2011 00:05:34 +0000 (16:05 -0800)]
Fix invoke-interface verification failures

A regression introduced in bug 3329492 was causing exceptions to be
thrown immediately (during class initialization) rather than when the
problem was actually hit.

Bug 3345814.

Change-Id: I0a6b36a226b70f7a7da4384fe46095b45f004300

13 years agoMerge "Fix implementation of volatile stores" into honeycomb
Andy McFadden [Fri, 14 Jan 2011 00:04:43 +0000 (16:04 -0800)]
Merge "Fix implementation of volatile stores" into honeycomb

13 years agoAdd missing length modifiers for printing size_t values.
Carl Shapiro [Thu, 13 Jan 2011 23:56:42 +0000 (15:56 -0800)]
Add missing length modifiers for printing size_t values.

Change-Id: Ie82f5c4d06e8cdd6b7ce3562a4e7bb28bf2ea858

13 years agoFix implementation of volatile stores
Andy McFadden [Thu, 13 Jan 2011 21:09:26 +0000 (13:09 -0800)]
Fix implementation of volatile stores

Volatile stores are synchronization actions, not merely releasing
stores, so an additional barrier is required.  We also have the
option of using atomic operations, but that's not recommended (except
for 64-bit fields, where we don't have a choice).

Bug 3338450

Change-Id: Ibfa3486eb89af7769c81bcf892b3fee50d2028d4

13 years agoRemove stale enumerators for external allocation tracking.
Carl Shapiro [Thu, 13 Jan 2011 22:28:00 +0000 (14:28 -0800)]
Remove stale enumerators for external allocation tracking.

Change-Id: Iab9c718f6bdee71512c2d5996244d46f944a455f

13 years agoRemove enumerators for stale GC reasons.
Carl Shapiro [Thu, 13 Jan 2011 02:21:00 +0000 (18:21 -0800)]
Remove enumerators for stale GC reasons.

Change-Id: I297e3ce5ba75e308cc994a7303d6bfc70e819737

13 years agoRemove the allocation limits interfaces.
Carl Shapiro [Wed, 12 Jan 2011 23:54:43 +0000 (15:54 -0800)]
Remove the allocation limits interfaces.

Change-Id: I97a098fe385cc12991b8f1277683fb1146673570

13 years agoRemove support for setting the minimum size of the heap at runtime.
Carl Shapiro [Wed, 12 Jan 2011 19:04:55 +0000 (11:04 -0800)]
Remove support for setting the minimum size of the heap at runtime.

Change-Id: I1752c59184325b5929532b61f4fa0feaa03b8218

13 years agoHandle the case of referent clearing during tracing.
Carl Shapiro [Wed, 12 Jan 2011 01:16:48 +0000 (17:16 -0800)]
Handle the case of referent clearing during tracing.

Reference objects with non-null referent fields are collected during
tracing for processing after the trace has completed.  Before the
trace was made concurrent there was no way for a reference with a
non-null referent field to have its referent become null by any action
of the garbage collector after it was discovered.  Assertions were
placed in the reference processing code to check this invariant.

After the trace was made concurrent it became possible for a user to
clear the referent field of an already discovered reference.  This
violates the assertions in the reference processing code.

This change replaces the assertions in the reference processing code
with logic to deal with null referent fields.  The assert in the
SoftReference preservation code has been converted to a continue that
short circuits the preservation logic.  The assert in the white
reference clearing code short circuits the clearing and enqueueing.

Change-Id: I77bd18cd1ad52e9f457b0f9b1d4e1403e5de1a98

13 years agoMerge "Check VMRuntime.addressOf is actually passed an array." into honeycomb
Elliott Hughes [Wed, 12 Jan 2011 01:04:33 +0000 (17:04 -0800)]
Merge "Check VMRuntime.addressOf is actually passed an array." into honeycomb

13 years agoCheck VMRuntime.addressOf is actually passed an array.
Elliott Hughes [Wed, 12 Jan 2011 00:38:30 +0000 (16:38 -0800)]
Check VMRuntime.addressOf is actually passed an array.

Change-Id: I9571f13f397303963a99e380f9e1f8ef45fd504a

13 years agoMerge "Remove obsolete comments about small and large object heaps." into honeycomb
Carl Shapiro [Wed, 12 Jan 2011 00:37:21 +0000 (16:37 -0800)]
Merge "Remove obsolete comments about small and large object heaps." into honeycomb

13 years agoRemove obsolete comments about small and large object heaps.
Carl Shapiro [Wed, 12 Jan 2011 00:33:53 +0000 (16:33 -0800)]
Remove obsolete comments about small and large object heaps.

It looks like somebody intended to perform segregation of objects by
their size.  This was never implemented and the terminology is similar
to what is used by a forthcoming API.

Change-Id: Iff016781fedefd55961c5c5168569c83ecdf5258

13 years agoMove nio direct byte buffers onto the Java heap.
Elliott Hughes [Mon, 10 Jan 2011 23:30:18 +0000 (15:30 -0800)]
Move nio direct byte buffers onto the Java heap.

Specifically, implement VMRuntime.newNonMovableArray and VMRuntime.addressOf.
For now these are pretty trivial because we don't have a copying collector,
but this (a) prevents code from allocating arbitrary amounts of direct byte
buffer without being charged for it, and (b) lets us move to a copying
collector in future.

Change-Id: I5de156dc8ac4ab5c997e18d447f635eb01ff08ab

13 years agojniRegisterNativeMethods should abort on failure
Andy McFadden [Fri, 7 Jan 2011 21:34:47 +0000 (13:34 -0800)]
jniRegisterNativeMethods should abort on failure

The jniRegisterNativeMethods function currently behaves like the
RegisterNatives function that it wraps, returning 0 on success and
nonzero on failure.  However, this is an internal-only function used
by bits of infrastructure that should never fail to initialize.  By
aborting sooner we make the failure impossible to ignore.

This doesn't appear to break anything.

Bug 3323089

Change-Id: I48d1b02d90616d4c9ee01eb0e46cb61752727c5b

13 years agoMerge "Fix JNI GetMethodID on interfaces" into honeycomb
Andy McFadden [Fri, 7 Jan 2011 20:47:28 +0000 (12:47 -0800)]
Merge "Fix JNI GetMethodID on interfaces" into honeycomb

13 years agoFix JNI GetMethodID on interfaces
Andy McFadden [Fri, 7 Jan 2011 01:04:05 +0000 (17:04 -0800)]
Fix JNI GetMethodID on interfaces

The GetMethodID call was only searching through methods declared by
classes and superclasses.  If you passed it an interface class and
asked for a method declared in a superinterface, the call would fail.
We now have separate code for handling lookups on interfaces.

This also refactors some similar code in the interface method resolver.

Bug 3329492

(Cherry-pick from dalvik-dev)

Change-Id: Icaf744b9e75a1fd6d99f47281002cc6b3c36e368

13 years agoFix EABI call bridge.
Andy McFadden [Thu, 6 Jan 2011 21:12:53 +0000 (13:12 -0800)]
Fix EABI call bridge.

Fix two bugs in the "slow" path, which is only exercised when calling a
native method with more than 28 words of arguments.  First, the code wasn't
skipping past the return type in the shorty signature, so the stack layout
was likely to be messed up if you had long/double args.  Second, the type
check on the value destined for r3 was broken, which would cause problems
if the method's first arg was 32-bit and the second arg was 64-bit.

Bug 3328925

(Cherry-pick from dalvik-dev)

Change-Id: I30a1972cf394dad993df574f17b8770ba9e840dd

13 years agoMore Jit-to-Interp entry point cleanup.
Ben Cheng [Wed, 5 Jan 2011 20:39:42 +0000 (12:39 -0800)]
More Jit-to-Interp entry point cleanup.

Only register entry points dispatched through [r6+#offset] in
JitToInterpEntries.

For ARM targets check the size of JitToInterpEntries explicitly to
make sure that its last entry is within 128 byte from InterpState
due to the Thumb codegen constraint.

Change-Id: I74184115cb3a3c89afc3a5fe53685671d9cb1027

13 years agoDon't treat dvmJitToPatchPredictedChain as a Jit-to-Interp entry point.
Ben Cheng [Tue, 4 Jan 2011 23:37:04 +0000 (15:37 -0800)]
Don't treat dvmJitToPatchPredictedChain as a Jit-to-Interp entry point.

It is just a native callout helper function.

Change-Id: I6398b6876f5ba579b76e732107157a4c99337796

13 years ago[Jit] Fix for 3311468 Maps crashed at handleFmt...
Bill Buzbee [Mon, 27 Dec 2010 17:31:21 +0000 (09:31 -0800)]
[Jit] Fix for 3311468 Maps crashed at handleFmt...

Change https://android-git.corp.google.com/g/#change,86452 eliminated unused
chaining cells for direct JNI calls.   However, a code path in CodegenDriver.c
assumed all similar invokes would have such cells.  Slightly re-arranged the
to avoid relying on the existance of the cell in cases in which it isn't
needed.

Change-Id: Ifc28acf559455a292b4b915ef1302085557e1d81

13 years agoMerge "Restore a few external allocation constants for compatibility."
Carl Shapiro [Thu, 23 Dec 2010 00:22:11 +0000 (16:22 -0800)]
Merge "Restore a few external allocation constants for compatibility."

13 years agoEliminate the chaining cells for direct JNI calls.
Ben Cheng [Wed, 22 Dec 2010 20:27:41 +0000 (12:27 -0800)]
Eliminate the chaining cells for direct JNI calls.

The JNI code is dispatched through TEMPLATE_INVOKE_METHOD_NATIVE, so
having a chaining cell for a non-virtual native call simply wastes
space.

Change-Id: Iaf944f745a0723a7772ea168fb35f79e79b21fae

13 years agoRestore a few external allocation constants for compatibility.
Carl Shapiro [Wed, 22 Dec 2010 20:21:01 +0000 (12:21 -0800)]
Restore a few external allocation constants for compatibility.

Aspects of the external allocation facility were exposed through the
VMDebug getAllocCount method.  In a previous change I removed all of
the references to external allocation from getAllocCount.  This had
the unfortunate side effect of breaking some CTS tests and causing the
VM to abort if the old constants were provided to getAllocCount on an
asserts enabled dalvik build.

The straight forward workaround seems to be to restore the special
treatment of these values in getAllocCount for as long as we support
the public interfaces of the external allocation facility.  An easier
way out may have been to make the failure case of getAllocCount return
0 instead of -1 and aborting on an asserts build.  Without some
analysis of API usage in market I would prefer to not change the -1
return value to 0 as it seems the thread counts currently return -1.

This change also eliminates the conditional export of the enum values
related to external allocation.  Those values are published API so it
makes no sense to maintain a way to guard their inclusion.

Change-Id: I49c173e0ec305536760c7aec15eebdc29213fc56

13 years agoRevert "Remove inline natives for an unused performance test."
Jesse Wilson [Wed, 22 Dec 2010 20:01:23 +0000 (12:01 -0800)]
Revert "Remove inline natives for an unused performance test."

This reverts commit 7ecd89dc02ce00c425788bd4989bdb6cde9a618a.

Change-Id: I427635b7e3f7be45cfde78b8046dab3b23b64562

13 years agoUpdate DalvikVersion due to removed NativeTestTarget
Jesse Wilson [Wed, 22 Dec 2010 18:06:58 +0000 (10:06 -0800)]
Update DalvikVersion due to removed NativeTestTarget

Change-Id: I891b63a676b6c3f12fdbc5858ef12f235bc1b9c1

13 years agoRemove inline natives for an unused performance test.
Jesse Wilson [Wed, 22 Dec 2010 13:20:31 +0000 (05:20 -0800)]
Remove inline natives for an unused performance test.

Change-Id: I80cfb918bdf174aeb6de83909c840563f6b945dd

13 years agoSimplify the interface for waiting for a concurrent GC to complete.
Carl Shapiro [Tue, 21 Dec 2010 02:33:24 +0000 (18:33 -0800)]
Simplify the interface for waiting for a concurrent GC to complete.

Previously, there was no guarantee that a GC would have completed when
the waiting routine returned.  This was an oversight, and the workaround
became to wait in a loop that tested the condition that the GC running
flag was not set.  The right fix was always to push the loop into the
waiting routine itself to keep the interface simple.  This change backs
out the hack, moving the waiting loop to where it belongs.

Change-Id: Idc6ab6e5d4379a5da27e9e115d23d4123c7cacc4

13 years agoRemove the external allocation facility.
Carl Shapiro [Fri, 17 Dec 2010 23:34:52 +0000 (15:34 -0800)]
Remove the external allocation facility.

Change-Id: Iff508a9173382f29c67ca9e6eb6f65855dce0be4

13 years agoExpose sysCopyFileToFile() and use it.
Dan Bornstein [Thu, 16 Dec 2010 21:17:30 +0000 (13:17 -0800)]
Expose sysCopyFileToFile() and use it.

Moved from ZipArchive.c, with tweaks to for argument order and name. Also
tweaked a related function in ZipArchive to match.

Change-Id: I4d2e3c8b44386d87c5aa1c4565f72da87357fce8

13 years agoHook up the preexisting RawDexFile opener.
Dan Bornstein [Thu, 16 Dec 2010 00:58:48 +0000 (16:58 -0800)]
Hook up the preexisting RawDexFile opener.

This one is similar in functionality to what's in JarFile.

I also made a couple minor (whitespace/comment/logging) changes to
JarFile where I spotted the opportunities.

This change makes it so that, if you happen to put a plain dex file on
your classpath (e.g., "dalvikvm -classpath /data/local/blort.dex
Blort"), it will actually be able to be used. This was documented as
working, but it was a lie...until now.

Change-Id: I2c93a8fdb40afa2d920904ab1235b7909e5837f8

13 years agoMerge "Initialize my field."
Dan Bornstein [Thu, 16 Dec 2010 00:06:33 +0000 (16:06 -0800)]
Merge "Initialize my field."

13 years agoInitialize my field.
Dan Bornstein [Wed, 15 Dec 2010 23:59:19 +0000 (15:59 -0800)]
Initialize my field.

<self-flagellation/>We can't count on malloc() to hand us zeroed
memory. I should know better by now.</self-flagellation>

Change-Id: If63c9d213982236e6e0362d03a4dd772b15bc73c

13 years agoMerge "Never write an hprof record for a null root."
Carl Shapiro [Wed, 15 Dec 2010 23:58:13 +0000 (15:58 -0800)]
Merge "Never write an hprof record for a null root."

13 years agoNever write an hprof record for a null root.
Carl Shapiro [Wed, 15 Dec 2010 21:36:59 +0000 (13:36 -0800)]
Never write an hprof record for a null root.

The old hprof implementation was never presented with null references
but with the new visitor based implementation null references are a
possibility.  With this change, the root visitor short circuits after
encountering a null reference and does write to the hprof file.

Change-Id: I38e8808a6ea43cb4361582ada4714f20ace7bea6

13 years agoPlumbing for loading byte[]-based dex files.
Dan Bornstein [Wed, 15 Dec 2010 00:57:00 +0000 (16:57 -0800)]
Plumbing for loading byte[]-based dex files.

This is obviously incomplete, but it's at least similarly incomplete
to the related code path it's right next to.

Change-Id: I06af6df3a4c2d648bf5b61b30a1ed5bbab4d170e

13 years agoAdd a new, optional "is sensitive thread?" hook.
Brad Fitzpatrick [Tue, 14 Dec 2010 00:53:28 +0000 (16:53 -0800)]
Add a new, optional "is sensitive thread?" hook.

The Android framework implements this hook in Ie6f58d130a29.

Bug: 3226270
Change-Id: I7342248e5699a22b71647e7cfeec52ec871cefaf

13 years agoFix a bug in hprof that corrupted the root set output.
Carl Shapiro [Mon, 13 Dec 2010 20:13:47 +0000 (12:13 -0800)]
Fix a bug in hprof that corrupted the root set output.

The root visitor takes an Object ** but the hprof output assumed an
Object *.  As such, bad root set object ids were written to the hprof
dump and, by extension, objects reachable only from the roots either
looked like floating garbage or were wholly omitted from the output.

Change-Id: I58b31b6ad145fa9843ecbda630ed8b6ab951d931

13 years agoVarious improvements to dexdeps.
Dan Bornstein [Wed, 8 Dec 2010 22:47:11 +0000 (14:47 -0800)]
Various improvements to dexdeps.

This includes:
* Adding an option to only produce lists of dependent classes (and not
  also fields and methods).
* Adding the ability to process multiple files on a single invocation.
* Adding a label at the head of the section for each file.
* Neatening up Output a bit by factoring "System.out" into a static field.

Change-Id: Id9a691d23afd18f82ab3790cb760cfd12e14bc86

13 years agoThrow useful detail messages when Method.invoke fails.
Elliott Hughes [Sat, 4 Dec 2010 01:59:32 +0000 (17:59 -0800)]
Throw useful detail messages when Method.invoke fails.

Part of my general push for better exceptions.

(Cherry-pick from dalvik-dev of https://android-git.corp.google.com/g/83287.)

Change-Id: I0cd47b492fbdc52db2eef8e2a02f31bda2a086eb

13 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Brian Carlstrom [Mon, 6 Dec 2010 22:23:09 +0000 (14:23 -0800)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

13 years agoam 91b93ea4: Fix monitor verification.
Andy McFadden [Sun, 5 Dec 2010 07:42:21 +0000 (23:42 -0800)]
am 91b93ea4: Fix monitor verification.

* commit '91b93ea496e8c86f410f302a94c2adf0fc9d8189':
  Fix monitor verification.

13 years agoMinor simplification.
Dan Bornstein [Sat, 4 Dec 2010 01:58:01 +0000 (17:58 -0800)]
Minor simplification.

Change-Id: Ie17ba83ead45028a8b7b32c1cc5763f9dd6d684c

13 years agoMerge "Fix stupid copy-paste error." into dalvik-dev
Dan Bornstein [Sat, 4 Dec 2010 01:49:46 +0000 (17:49 -0800)]
Merge "Fix stupid copy-paste error." into dalvik-dev

13 years agoFix stupid copy-paste error.
Dan Bornstein [Sat, 4 Dec 2010 01:48:27 +0000 (17:48 -0800)]
Fix stupid copy-paste error.

Change-Id: I1ad1e8c26ec47b9b148fc6a4292afa2ee25e58e2

13 years agoMerge "These asserts are no longer pointless." into dalvik-dev
Dan Bornstein [Sat, 4 Dec 2010 01:32:04 +0000 (17:32 -0800)]
Merge "These asserts are no longer pointless." into dalvik-dev

13 years agoThese asserts are no longer pointless.
Dan Bornstein [Sat, 4 Dec 2010 01:24:34 +0000 (17:24 -0800)]
These asserts are no longer pointless.

Change-Id: I32cfd2334de344156a41d1c2d7c10a8d96e970c4

13 years agoMake the inlined String.charAt throw detailed exceptions.
Elliott Hughes [Sat, 4 Dec 2010 00:37:54 +0000 (16:37 -0800)]
Make the inlined String.charAt throw detailed exceptions.

Part of my general push for better exceptions. I'll add a unit test to libcore,
but until we lose the dexopt brain damage, we won't be able to see it (dexopt
can't optimize JUnit tests, so we get no coverage of inline natives on our
continuous builds; http://b/3003994).

Change-Id: I3af757751534747fa4b3cc725b0914a8f7b3d45d

13 years agoMerge "Another clarifying rename and a bit more automation." into dalvik-dev
Dan Bornstein [Sat, 4 Dec 2010 00:07:33 +0000 (16:07 -0800)]
Merge "Another clarifying rename and a bit more automation." into dalvik-dev

13 years agoAnother clarifying rename and a bit more automation.
Dan Bornstein [Fri, 3 Dec 2010 23:32:40 +0000 (15:32 -0800)]
Another clarifying rename and a bit more automation.

kNumDalvikInstructions is now kNumPackedOpcodes, there is a new
kMaxOpcodeValue, and both are generated by opcode-gen.

Change-Id: Ic46f1f52d2d21382452c8e777024f4a985ad31d3
Bonus: Reworded the switch and array data comment for clarity.

13 years agoMerge "Use dvmHumanReadableDescriptor in -Xjnitrace." into dalvik-dev
Elliott Hughes [Fri, 3 Dec 2010 23:40:14 +0000 (15:40 -0800)]
Merge "Use dvmHumanReadableDescriptor in -Xjnitrace." into dalvik-dev

13 years agoRegular-expression compatibility.
Dan Bornstein [Fri, 3 Dec 2010 23:11:55 +0000 (15:11 -0800)]
Regular-expression compatibility.

The most compatible way of indicating that a dash is part of a
character range is to put a single dash at the end of the range
expression.

Change-Id: I1e118038dfacffbc004c97be0ae1c3dfe97e861d

13 years agoSmall fixes.
Dan Bornstein [Fri, 3 Dec 2010 21:16:08 +0000 (13:16 -0800)]
Small fixes.

I had unpackOpcode() slightly wrong, and I made the libcore opcode
numbers always be four hex digits.

Change-Id: I4f988b8794b4b6c48ef91698a8e567fa46b96dac

13 years agoClean up the opcode-gen script.
Dan Bornstein [Fri, 3 Dec 2010 21:01:06 +0000 (13:01 -0800)]
Clean up the opcode-gen script.

There was way too much string duplication, and it needed at least
a bit more commenting.

Change-Id: Id31ee1fd260db6f4afe301764c60de7c63b3f729

13 years agoUse dvmHumanReadableDescriptor in -Xjnitrace.
Elliott Hughes [Fri, 3 Dec 2010 18:57:15 +0000 (10:57 -0800)]
Use dvmHumanReadableDescriptor in -Xjnitrace.

This made the output more readable while debugging a zlib issue.

Bug: 3220923
Change-Id: Ie360516a8a7a92b5b75fe70feb5c9722289bed78

13 years agoMerge "Eliminate the GC.h header file." into dalvik-dev
Carl Shapiro [Fri, 3 Dec 2010 01:37:48 +0000 (17:37 -0800)]
Merge "Eliminate the GC.h header file." into dalvik-dev

13 years agoEliminate the GC.h header file.
Carl Shapiro [Fri, 3 Dec 2010 01:27:01 +0000 (17:27 -0800)]
Eliminate the GC.h header file.

Change-Id: Ieda8b819032fc6aac80b390960d9c6f4864795ab

13 years agoMerge "Add a note." into dalvik-dev
Dan Bornstein [Fri, 3 Dec 2010 01:09:33 +0000 (17:09 -0800)]
Merge "Add a note." into dalvik-dev

13 years agoAdd a note.
Dan Bornstein [Fri, 3 Dec 2010 01:08:56 +0000 (17:08 -0800)]
Add a note.

Change-Id: I55362cbc8bfbb22ebcd493db7cdeb34fc3394e3a

13 years agoMerge "Get rid of the ugly macros inside the bitmap sweep routine." into dalvik-dev
Carl Shapiro [Fri, 3 Dec 2010 01:07:52 +0000 (17:07 -0800)]
Merge "Get rid of the ugly macros inside the bitmap sweep routine." into dalvik-dev

13 years agoMerge "Make opcode 00ff be called "dispatch-ff"." into dalvik-dev
Dan Bornstein [Fri, 3 Dec 2010 01:07:38 +0000 (17:07 -0800)]
Merge "Make opcode 00ff be called "dispatch-ff"." into dalvik-dev

13 years agoMerge "Inching closer to having extended opcodes in the vm." into dalvik-dev
Dan Bornstein [Fri, 3 Dec 2010 01:07:04 +0000 (17:07 -0800)]
Merge "Inching closer to having extended opcodes in the vm." into dalvik-dev

13 years agoGet rid of the ugly macros inside the bitmap sweep routine.
Carl Shapiro [Fri, 3 Dec 2010 00:41:28 +0000 (16:41 -0800)]
Get rid of the ugly macros inside the bitmap sweep routine.

Thanks to recent simplifications the implementation macrology can be
expanded out.  While we are here, fix the comments about the treatment
of max.  This edit should have happened in the previous change to the
sweeper.

Change-Id: Ia18ee580f5955dca8c27b96f7badbfb067a0a1cb

13 years agoMerge "Drive all root scanning by the root visitor." into dalvik-dev
Carl Shapiro [Fri, 3 Dec 2010 00:59:54 +0000 (16:59 -0800)]
Merge "Drive all root scanning by the root visitor." into dalvik-dev

13 years agoMake opcode 00ff be called "dispatch-ff".
Dan Bornstein [Fri, 3 Dec 2010 00:46:25 +0000 (16:46 -0800)]
Make opcode 00ff be called "dispatch-ff".

With this change, it's still implemented as an unused opcode, but
it's now ready for its new life!

Change-Id: Ic70d311704925067e47d87b657d133a792144e65

13 years agoFix monitor verification.
Andy McFadden [Thu, 2 Dec 2010 21:13:22 +0000 (13:13 -0800)]
Fix monitor verification.

An earlier change inadvertently disabled the basic register type check
when the fancier checks were disabled.  This restores the type check,
and replaces a "TODO: add an assert" with an actual assert.

Bug 3246598.

(cherry-pick from dalvik-dev)

Change-Id: Iddfb33d2a3f0c03f5a06c3f6e4a47644ca640736

13 years agoMerge "Replace dalvik test local mode with new host mode" into dalvik-dev
buzbee [Fri, 3 Dec 2010 00:24:14 +0000 (16:24 -0800)]
Merge "Replace dalvik test local mode with new host mode" into dalvik-dev

13 years agoInching closer to having extended opcodes in the vm.
Dan Bornstein [Fri, 3 Dec 2010 00:05:51 +0000 (16:05 -0800)]
Inching closer to having extended opcodes in the vm.

Change-Id: If6578a0686ac8fe5e6d1a26509d8a5c748bed179

13 years agoDrive all root scanning by the root visitor.
Carl Shapiro [Fri, 3 Dec 2010 00:16:01 +0000 (16:16 -0800)]
Drive all root scanning by the root visitor.

The root visitor has been used by the concurrent collector during the
re-mark phase.  This change makes both the initial mark use the same
visitor routine and obsoletes all of the one-off markers scattered
throughout the runtime sources.

Change-Id: I08ea86d875f235cc628754240ad30ea5dfe2ce70

13 years agoReplace dalvik test local mode with new host mode
buzbee [Thu, 2 Dec 2010 23:37:06 +0000 (15:37 -0800)]
Replace dalvik test local mode with new host mode

To run the dalvik tests with host mode:
1.  build with WITH_HOST_DALVIK=true
2.  run-all-tests --host, or run-test <num> --host

Change-Id: Ic20df0b0720571b5a4ae11b5a1f6ce760d921d4b

13 years agoGive the awk script its own file.
Dan Bornstein [Thu, 2 Dec 2010 23:21:59 +0000 (15:21 -0800)]
Give the awk script its own file.

The embedded awk script totally dwarfed the shell script driver. It
was getting pretty ridiculous. (Ok ok, maybe the fact that this uses
awk in the first place is itself ridiculous.)

Change-Id: Ia53dbbff636eab7aeb44ff24013c62494ef86da0

13 years agoMerge "Extremely minor cleanup." into dalvik-dev
Dan Bornstein [Thu, 2 Dec 2010 23:15:54 +0000 (15:15 -0800)]
Merge "Extremely minor cleanup." into dalvik-dev

13 years agoExtremely minor cleanup.
Dan Bornstein [Thu, 2 Dec 2010 23:15:21 +0000 (15:15 -0800)]
Extremely minor cleanup.

Change-Id: Ia302597d27773aa72f675509e9b4f844db65cc85

13 years agoMerge "x86-mterp bug fix; support host mode in tests" into dalvik-dev
buzbee [Thu, 2 Dec 2010 23:14:51 +0000 (15:14 -0800)]
Merge "x86-mterp bug fix; support host mode in tests" into dalvik-dev

13 years agoRename some instruction/opcode types and utilities.
Dan Bornstein [Thu, 2 Dec 2010 20:45:00 +0000 (12:45 -0800)]
Rename some instruction/opcode types and utilities.

A lot of this is more about properties of opcodes as opposed to
inspecting instructions per se, and the new naming attempts to
make it clear what is being queried and what sort of data is being
returned.

Change-Id: Ice6f9f2ebf4f1cfa8c99597419aa13d1134a33b2

13 years agoMerge "Fix monitor verification." into dalvik-dev
Andy McFadden [Thu, 2 Dec 2010 22:49:30 +0000 (14:49 -0800)]
Merge "Fix monitor verification." into dalvik-dev

13 years agox86-mterp bug fix; support host mode in tests
buzbee [Thu, 2 Dec 2010 22:29:16 +0000 (14:29 -0800)]
x86-mterp bug fix; support host mode in tests

A recent x86 housecleaning change introduced a bug in OP_FILLED_ARRAY.
Fixed that, plus hacked up dalvik test scripts to support host
mode operation (with --host)

Change-Id: Iaf8b1ab753f93fa344e64f984a3c4696433ec9aa

13 years agoGet rid of QUIET_ZYGOTE_GC and make it the default.
Carl Shapiro [Thu, 2 Dec 2010 22:04:22 +0000 (14:04 -0800)]
Get rid of QUIET_ZYGOTE_GC and make it the default.

Change-Id: Ib9af028cfa46ca6041d716085ed3a78ef591bbc8

13 years agoMove a stray forward declaration of HeapSource to where it's needed.
Carl Shapiro [Thu, 2 Dec 2010 21:36:58 +0000 (13:36 -0800)]
Move a stray forward declaration of HeapSource to where it's needed.

Change-Id: I10dcc065c90ce40685b20a362470a32e213bf28f

13 years agoFix monitor verification.
Andy McFadden [Thu, 2 Dec 2010 21:13:22 +0000 (13:13 -0800)]
Fix monitor verification.

An earlier change inadvertently disabled the basic register type check
when the fancier checks were disabled.  This restores the type check,
and replaces a "TODO: add an assert" with an actual assert.

Bug 3246598.

Change-Id: I842c392e1e3aa8525235d873726c840f39703ff3

13 years agoMerge "Make the enums typedeffed as such." into dalvik-dev
Dan Bornstein [Thu, 2 Dec 2010 20:31:20 +0000 (12:31 -0800)]
Merge "Make the enums typedeffed as such." into dalvik-dev

13 years agoMake the enums typedeffed as such.
Dan Bornstein [Thu, 2 Dec 2010 18:35:48 +0000 (10:35 -0800)]
Make the enums typedeffed as such.

This makes these definitions C++-friendly. I also tried to clean up
and generally improve the documentation in this area. (Maybe you can
guess what's coming next.)

Change-Id: I76ab3087dcde5cc255288a993ec7b2963f2b733b