OSDN Git Service

android-x86/dalvik.git
14 years agoFixing vogar script to use the latest name
Jesse Wilson [Tue, 30 Mar 2010 20:05:09 +0000 (13:05 -0700)]
Fixing vogar script to use the latest name

14 years agoFix a bug, and protect against an unrelated class of bugs.
Elliott Hughes [Tue, 30 Mar 2010 03:51:48 +0000 (20:51 -0700)]
Fix a bug, and protect against an unrelated class of bugs.

If the Java array allocation in InetAddress.cpp failed, we'd free NULL instead of the
previously-allocated structure. This is a new bug in froyo, but only happens in out of
memory situations, so doesn't seem worth fixing there.

Unrelatedly, let's disallow assignment and copying of all our RAII classes. This isn't
a mistake I've seen made, but it's easy to protect against, so we may as well do so
consistently.

Change-Id: I2433b31ff983d388788b09e59e08d661f1725ecd

14 years agoMerge "Add Java 6's exponent separator to DecimalFormatSymbols." into dalvik-dev
Elliott Hughes [Tue, 30 Mar 2010 01:35:30 +0000 (18:35 -0700)]
Merge "Add Java 6's exponent separator to DecimalFormatSymbols." into dalvik-dev

14 years agoAdd Java 6's exponent separator to DecimalFormatSymbols.
Elliott Hughes [Tue, 30 Mar 2010 00:39:51 +0000 (17:39 -0700)]
Add Java 6's exponent separator to DecimalFormatSymbols.

Bug: 2497395
Change-Id: Ic552fa828649bae882e508a62a44073d1038b5c0

14 years agoMerge "Tweak our test & runner so XPath tests can be executed on Hudson." into dalvik-dev
Jesse Wilson [Tue, 30 Mar 2010 00:21:31 +0000 (17:21 -0700)]
Merge "Tweak our test & runner so XPath tests can be executed on Hudson." into dalvik-dev

14 years agoTweak our test & runner so XPath tests can be executed on Hudson.
Jesse Wilson [Mon, 29 Mar 2010 23:13:48 +0000 (16:13 -0700)]
Tweak our test & runner so XPath tests can be executed on Hudson.

14 years agoFix build.
Elliott Hughes [Mon, 29 Mar 2010 22:20:01 +0000 (15:20 -0700)]
Fix build.

Rather than try to be clever with header files (which didn't work with glibc
for the sim build) let's make Math.copySign have the StrictMath behavior,
and have StrictMath call Math. (The other way round, though it might seem
more logical, wouldn't solve the problem. We already have numerous cases of
StrictMath calling Math anyway.)

Change-Id: Ifff065ddc8fbd5d5f8d4d5b67bc9ac07a719eb00

14 years agoMerge "Merge commit '8812fdd7' into manualmerge" into dalvik-dev
Jesse Wilson [Mon, 29 Mar 2010 20:52:59 +0000 (13:52 -0700)]
Merge "Merge commit '8812fdd7' into manualmerge" into dalvik-dev

14 years agoMerge commit '8812fdd7' into manualmerge
Jesse Wilson [Mon, 29 Mar 2010 20:52:17 +0000 (13:52 -0700)]
Merge commit '8812fdd7' into manualmerge

Conflicts:
libcore/xml/src/test/java/tests/api/javax/xml/parsers/SAXParserFactoryTest.java

14 years agoMerge "Fix StrictMath.copySign's behavior with NaN." into dalvik-dev
Elliott Hughes [Mon, 29 Mar 2010 20:43:29 +0000 (13:43 -0700)]
Merge "Fix StrictMath.copySign's behavior with NaN." into dalvik-dev

14 years agoFix StrictMath.copySign's behavior with NaN.
Elliott Hughes [Sat, 27 Mar 2010 06:23:38 +0000 (23:23 -0700)]
Fix StrictMath.copySign's behavior with NaN.

StrictMath's copySign method is defined to treat all NaNs as positive, regardless
of their sign bit. Rather than add yet more code on the Java side (which already
called down to native code three times), let's just make one call to native code.

This change fixes failures in already-committed StrictMath tests.

The only other potential instances of this class of error were in the
max and min methods, but they all handle NaNs before calling
(double|float)To(Raw)?LongBits, so the choice there really is arbitrary.

Change-Id: I439dbdff9068cb420b78a6330cde9d7d0d12c0ef

14 years agoFix all our java.text.Bidi failures.
Elliott Hughes [Sat, 27 Mar 2010 00:46:16 +0000 (17:46 -0700)]
Fix all our java.text.Bidi failures.

Two are invalid tests where we behave the same as the RI. The third reflects
a difference between ICU4C and the RI, so I've added code to recognize that
case and paper over the crack. I've also tidied up a bit more.

With any luck, I'll never see these files again...

Change-Id: I278502fbdea039e9a2318df830dc0b55851e96c0

14 years agoMerge "Java 6 changed CollationKey from final to abstract." into dalvik-dev
Elliott Hughes [Fri, 26 Mar 2010 23:16:30 +0000 (16:16 -0700)]
Merge "Java 6 changed CollationKey from final to abstract." into dalvik-dev

14 years agoam 2be0c815: (-s ours) Suppressing additional tests that fail in Froyo.
Jesse Wilson [Fri, 26 Mar 2010 23:08:43 +0000 (16:08 -0700)]
am 2be0c815: (-s ours) Suppressing additional tests that fail in Froyo.

Merge commit '2be0c815dda289b09f3bb26f751c124f30eaf612' into dalvik-dev

* commit '2be0c815dda289b09f3bb26f751c124f30eaf612':
  Suppressing additional tests that fail in Froyo.

14 years agoJava 6 changed CollationKey from final to abstract.
Elliott Hughes [Fri, 26 Mar 2010 21:46:11 +0000 (14:46 -0700)]
Java 6 changed CollationKey from final to abstract.

I've also taken the opportunity to tidy up our implementation a little,
though my hands are tied by (a) the fact that our concrete classes are
in a separate package from our abstract classes and (b) frameworks/base
actually pokes about with our icu4jni collation code (http://b/2417080).

I've also tidied up a bunch of dead code. In particular, it's silly for
us to check parameters in Java that will be checked in native code (and
that one would assume will be valid most of the time anyway).

Bug: 1635883
Change-Id: I7db3c1ff1f0d23cb85604f9c8eb995e4488d7c0a

14 years agoMerge "Fixing tests to handle changes in our behaviour since DOM 3." into froyo
Jesse Wilson [Fri, 26 Mar 2010 22:21:11 +0000 (15:21 -0700)]
Merge "Fixing tests to handle changes in our behaviour since DOM 3." into froyo

14 years agoSuppressing additional tests that fail in Froyo.
Jesse Wilson [Fri, 26 Mar 2010 21:49:30 +0000 (14:49 -0700)]
Suppressing additional tests that fail in Froyo.

Our File class doesn't do SecurityManager checks at the same time as it
did previously.

We added a failing logging test but not the fix.

We moved the SQL drivers around, causing some SQL tests to fail.

A new logging test doesn't load its resources using the safe pattern.

Change-Id: I34ab81e4001969aa536f61a89c277ae2b879d49d

14 years agoFixing tests to handle changes in our behaviour since DOM 3.
Jesse Wilson [Fri, 26 Mar 2010 21:03:36 +0000 (14:03 -0700)]
Fixing tests to handle changes in our behaviour since DOM 3.

Our exception priority has changed for DOM attributes. We
previously used to throw DOMExceptions with namespace error
codes and now throw DOMExceptions with character error codes
when the attribute name is malformed. This caused changes to
many tests.

Another notable behaviour change is that we now supply the
qname (like the RI) where previously we did not. It is optional,
but we now include it for RI-consistency.

Yet another behaviour change is that we don't look at System
properties when choosing a SAX implementation. This simplifies
our internals significantly. End users who want an alternative
SAX implementation should construct it manually.

Also adding @KnownFailure tags for new tests that we have
never yet passed.

Change-Id: I6f81bedd7c2a0867086dc507b3220c2b07c4d3d3

14 years agoStart cleaning up the Charset implementation.
Elliott Hughes [Fri, 26 Mar 2010 18:30:00 +0000 (11:30 -0700)]
Start cleaning up the Charset implementation.

This was going to be https://issues.apache.org/jira/browse/HARMONY-6461,
but I couldn't resist cleaning up some of the surrounding code, and ended
up cleaning up some of our native code too. In the course of the afternoon
I spent on this, I lost my conviction that the upstream change makes
sense, so I reverted that, leaving this change just pure cleanup.

(Note that the cleanup work is incomplete. This is an improvement, but
there's plenty left to do. I just don't want to get too distracted until
all the Java 6 changes are done.)

Change-Id: I56841db5f6c038bbf7942e83a148dca546519269

14 years agoMerge "Use more idiomatic naming in test code." into dalvik-dev
Elliott Hughes [Fri, 26 Mar 2010 18:05:38 +0000 (11:05 -0700)]
Merge "Use more idiomatic naming in test code." into dalvik-dev

14 years agoUse more idiomatic naming in test code.
Elliott Hughes [Fri, 26 Mar 2010 17:51:48 +0000 (10:51 -0700)]
Use more idiomatic naming in test code.

(I introduced this in https://android-git.corp.google.com/g/46305.)

Change-Id: I100202fc18e246dd7b66870ce75543642505336d

14 years agoam 63868feb: Use correct resource flags for Dalvik ld/st instructions to enable code...
Ben Cheng [Thu, 25 Mar 2010 23:55:50 +0000 (16:55 -0700)]
am 63868feb: Use correct resource flags for Dalvik ld/st instructions to enable code motion.

Merge commit '63868feb2cc6a1fb1c76d7b54296ef4869f632be' into dalvik-dev

* commit '63868feb2cc6a1fb1c76d7b54296ef4869f632be':
  Use correct resource flags for Dalvik ld/st instructions to enable code motion.

14 years agoUse correct resource flags for Dalvik ld/st instructions to enable code motion.
Ben Cheng [Thu, 25 Mar 2010 23:16:02 +0000 (16:16 -0700)]
Use correct resource flags for Dalvik ld/st instructions to enable code motion.

Change-Id: I9b371af4150b6245c0ff59eea63d83406edbbcee

14 years agoam f2f7880a: Test and document our handling of nulls with getString().
Jesse Wilson [Thu, 25 Mar 2010 21:40:39 +0000 (14:40 -0700)]
am f2f7880a: Test and document our handling of nulls with getString().

Merge commit 'f2f7880a40aed1c8d9c27db49226e47396556aac' into dalvik-dev

* commit 'f2f7880a40aed1c8d9c27db49226e47396556aac':
  Test and document our handling of nulls with getString().

14 years agoTest and document our handling of nulls with getString().
Jesse Wilson [Thu, 25 Mar 2010 20:31:43 +0000 (13:31 -0700)]
Test and document our handling of nulls with getString().

Our behaviour is consistent with Crockford's.

The test confirms that the behaviour is consistent with the report
of that bug, which the submitter claims is not how it should behave.
http://code.google.com/p/android/issues/detail?id=7257

Change-Id: Ibace4bd995e3cbc8fb6c9dc509f8f4491865a647

14 years agoam d630700a: Merge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"
Bill Buzbee [Thu, 25 Mar 2010 20:11:50 +0000 (13:11 -0700)]
am d630700a: Merge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"

Merge commit 'd630700a9fbc6d317e0b4df73cbbc74a2c8fadaa' into dalvik-dev

* commit 'd630700a9fbc6d317e0b4df73cbbc74a2c8fadaa':
  Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands

14 years agoMerge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"
Bill Buzbee [Thu, 25 Mar 2010 20:07:45 +0000 (13:07 -0700)]
Merge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"

14 years agoApply https://issues.apache.org/jira/browse/HARMONY-4307.
Elliott Hughes [Thu, 25 Mar 2010 18:30:13 +0000 (11:30 -0700)]
Apply https://issues.apache.org/jira/browse/HARMONY-4307.

They didn't add a test for this; supposedly it fixed a flaky AWT test. But
the change looks plausible.

Change-Id: I358849a20d5e38d01d6c77a4c335002bb7bba095

14 years agoClean up a few toStrings.
Elliott Hughes [Thu, 25 Mar 2010 17:39:48 +0000 (10:39 -0700)]
Clean up a few toStrings.

I couldn't find any more that were using getClass() rather than
getClass().getName().

Change-Id: I30b375748d36bc36d1e6999349fc472496456746

14 years agoJit: Fix for 2542488 JIT codegen bug with overlapping wide operands
Bill Buzbee [Thu, 25 Mar 2010 17:38:34 +0000 (10:38 -0700)]
Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands

Change-Id: I7b922e223fe1f5242d1f3db1fa18f54aaed725af

14 years agoam ec7c8c98: Fix java.util.Random\'s constructors.
Elliott Hughes [Thu, 25 Mar 2010 17:25:17 +0000 (10:25 -0700)]
am ec7c8c98: Fix java.util.Random\'s constructors.

Merge commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29' into dalvik-dev

* commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29':
  Fix java.util.Random's constructors.

14 years agoFix java.util.Random's constructors.
Elliott Hughes [Thu, 25 Mar 2010 06:38:48 +0000 (23:38 -0700)]
Fix java.util.Random's constructors.

Subclasses rely on having their overridden setSeed called by Random's
constructors, and the RI actually documents this behavior. (The
documentation even changed between Java 5 and Java 6 to make it _more_
explicit.)

This patch keeps that part of I6239d93bb46876ef1c4a5e155a6dc1ac6fab4eae
that improved our randomness, but reverts the attempt to fix Random's
uncouth behavior.

Also a regression test so we don't try to fix Random again in future.

Bug: 2502231
Change-Id: Ieea1009145c74eac9475c0cd5066dabad20eb114

14 years agoam f87ab961: Merge "Don\'t leak memory on failed pipe or mutex init"
Kenny Root [Thu, 25 Mar 2010 02:40:12 +0000 (19:40 -0700)]
am f87ab961: Merge "Don\'t leak memory on failed pipe or mutex init"

Merge commit 'f87ab9616697b8bae08c5e8007cbdd0039a1f8ce' into dalvik-dev

* commit 'f87ab9616697b8bae08c5e8007cbdd0039a1f8ce':
  Don't leak memory on failed pipe or mutex init

14 years agoam 3d5d8736: Merge "Fix for the JIT blocking mode plus some code cleanup."
Ben Cheng [Thu, 25 Mar 2010 02:40:10 +0000 (19:40 -0700)]
am 3d5d8736: Merge "Fix for the JIT blocking mode plus some code cleanup."

Merge commit '3d5d87364d062734753bfd26336e96a7e8d03360' into dalvik-dev

* commit '3d5d87364d062734753bfd26336e96a7e8d03360':
  Fix for the JIT blocking mode plus some code cleanup.

14 years agoam c66affa4: Switch to VMWAIT while outputting trace data.
Andy McFadden [Thu, 25 Mar 2010 02:40:04 +0000 (19:40 -0700)]
am c66affa4: Switch to VMWAIT while outputting trace data.

Merge commit 'c66affa440de113df861928c528fcbbead2ead45' into dalvik-dev

* commit 'c66affa440de113df861928c528fcbbead2ead45':
  Switch to VMWAIT while outputting trace data.

14 years agoMerge "Don't leak memory on failed pipe or mutex init"
Kenny Root [Thu, 25 Mar 2010 00:07:15 +0000 (17:07 -0700)]
Merge "Don't leak memory on failed pipe or mutex init"

14 years agoDon't leak memory on failed pipe or mutex init
Kenny Root [Thu, 25 Mar 2010 00:01:22 +0000 (17:01 -0700)]
Don't leak memory on failed pipe or mutex init

SSL allocation might fail on pipe or mutex creation, so free allocated
memory when that happens.

Change-Id: Ibe3813cb652db1e880e3acf0dc1fa37fbe0ad455

14 years agoMerge "Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalF...
Elliott Hughes [Wed, 24 Mar 2010 23:23:29 +0000 (16:23 -0700)]
Merge "Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSymbols." into dalvik-dev

14 years agoAdd Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSy...
Elliott Hughes [Wed, 24 Mar 2010 21:04:55 +0000 (14:04 -0700)]
Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSymbols.

This patch also improves the documentation of all getAvailableLocales methods
to clarify exactly what "available" means. Note that at the moment, many of
our implementations just return Locale.getAvailableLocales. It turns out that
ICU does the same in most cases, but I'll come back in a separate patch and
add code so we just pass these down to ICU, and wash our hands of the matter.

I've rewritten DateFormatSymbols.equals, which was very wrong. The time zone
names comparison had an invalid optimization, and its slow-path loop was wrong
too: it only ever tested values against themselves, which isn't likely to have
been the author's intention.

I've added toString overrides to DateFormatSymbols and DecimalFormatSymbols,
because I need them every time I work on these classes.

I've made the constants in DecimalFormatSymbols static final, and given them
idiomatic names. (I still think we might benefit from breaking these into
separate fields, as in the serialized form, but that's a separate issue.)

Finally, and unrelatedly, I've added a comment to BreakIteratorProvider that
I missed in my last change to that file.

Change-Id: I5d6cb30f9afdb502d38353d8a624dc2f0fef41ac

14 years agoMerge "Fix for the JIT blocking mode plus some code cleanup."
Ben Cheng [Wed, 24 Mar 2010 22:49:50 +0000 (15:49 -0700)]
Merge "Fix for the JIT blocking mode plus some code cleanup."

14 years agoFix for the JIT blocking mode plus some code cleanup.
Ben Cheng [Wed, 24 Mar 2010 22:24:19 +0000 (15:24 -0700)]
Fix for the JIT blocking mode plus some code cleanup.

Bug: 2517606
Change-Id: I2b5aa92ceaf23d484329330ae20de5966704280b

14 years agoShow current values of mutexes in thread dump.
Andy McFadden [Wed, 24 Mar 2010 20:35:19 +0000 (13:35 -0700)]
Show current values of mutexes in thread dump.

Experimental feature; may or may not be useful.  Dump the current value
of half a dozen VM mutexes.  This will tell us if they're unlocked,
locked, or contended-for at the point somebody does a thread dump.  For
example, when the GC notices the HeapWorker watchdog has expired:

  I/dalvikvm( 2828): DALVIK THREADS:
  I/dalvikvm( 2828): (mutexes: tll=0 tsl=0 tscl=0 ghl=1 hwl=1 hwll=0)

In this case, gcHeapLock and heapWorkerLock are held, the rest are not.

If this turns out to be useful we can put more effort into the output
format.  The pthread lib doesn't insert the thread ID unless you're
using recursive or errorcheck mutexes, which (for performance reasons)
we try not to use.

Change-Id: I272534d8c9db6340cfc23bfdddb47beefc2efbfb

14 years agoSwitch to VMWAIT while outputting trace data.
Andy McFadden [Wed, 24 Mar 2010 20:03:08 +0000 (13:03 -0700)]
Switch to VMWAIT while outputting trace data.

One of the traces from a monkey run suggests we stalled out during the
open/write/close part of writing the trace data.  To reduce the chances
of spin-on-suspending here we now switch to VMWAIT during the I/O.

For bug 2541030.

Change-Id: Ice832988213741976917fdd36afa12a694a42e81

14 years agoImprove the ThreadGroup documentation.
Elliott Hughes [Wed, 24 Mar 2010 01:06:35 +0000 (18:06 -0700)]
Improve the ThreadGroup documentation.

(Because I was asked a question about ThreadGroup today, and the answer is
always "don't use ThreadGroup"...)

Change-Id: Ibaa2f1830e1fe435c9712f3b08506639b9521b9e

14 years agoMerge "Remove explicit 8192 arguments to BufferedReader and friends." into dalvik-dev
Elliott Hughes [Wed, 24 Mar 2010 00:41:53 +0000 (17:41 -0700)]
Merge "Remove explicit 8192 arguments to BufferedReader and friends." into dalvik-dev

14 years agoam b7b9be13: Merge "Improve java.net.InetAddress.getLocalHost documentation."
Elliott Hughes [Tue, 23 Mar 2010 23:31:13 +0000 (16:31 -0700)]
am b7b9be13: Merge "Improve java.net.InetAddress.getLocalHost documentation."

Merge commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2' into dalvik-dev

* commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2':
  Improve java.net.InetAddress.getLocalHost documentation.

14 years agoRemove explicit 8192 arguments to BufferedReader and friends.
Elliott Hughes [Tue, 23 Mar 2010 23:26:01 +0000 (16:26 -0700)]
Remove explicit 8192 arguments to BufferedReader and friends.

These were clearly added just to shut up our own warning, and are now
unnecessary and misleading to future maintainers.

There's one barely-related change: InputStreamReader and OutputStreamWriter
are very similar, and this patch makes them more similar, and adds a few
missing modifiers from their fields.

Change-Id: I959011f914ff215e92bbfa41c1bac66465803685

14 years agoMerge "Improve java.net.InetAddress.getLocalHost documentation."
Elliott Hughes [Tue, 23 Mar 2010 23:23:02 +0000 (16:23 -0700)]
Merge "Improve java.net.InetAddress.getLocalHost documentation."

14 years agoMerge "Fix --debug-port to --debug in vogar usage" into dalvik-dev
Brian Carlstrom [Tue, 23 Mar 2010 23:09:29 +0000 (16:09 -0700)]
Merge "Fix --debug-port to --debug in vogar usage" into dalvik-dev

14 years agoFix --debug-port to --debug in vogar usage
Brian Carlstrom [Tue, 23 Mar 2010 23:05:10 +0000 (16:05 -0700)]
Fix --debug-port to --debug in vogar usage

Change-Id: I012100578caa4f5768b7926b4fbe489c80f8d32b

14 years agoMerge "Remove the "default buffer size" warnings." into dalvik-dev
Elliott Hughes [Tue, 23 Mar 2010 22:45:12 +0000 (15:45 -0700)]
Merge "Remove the "default buffer size" warnings." into dalvik-dev

14 years agoRemove the "default buffer size" warnings.
Elliott Hughes [Tue, 23 Mar 2010 22:22:02 +0000 (15:22 -0700)]
Remove the "default buffer size" warnings.

Everyone seems to agree these have outlived their usefulness.

Change-Id: Ia2a53ffa1f9498333b4b2d51d5c1db488b89abaf

14 years agoam 02388cf1: Jit: disable for Sapphire.
Bill Buzbee [Tue, 23 Mar 2010 21:55:08 +0000 (14:55 -0700)]
am 02388cf1: Jit: disable for Sapphire.

Merge commit '02388cf18a87ba0243cddc6ccf3eaf8668118723' into dalvik-dev

* commit '02388cf18a87ba0243cddc6ccf3eaf8668118723':
  Jit: disable for Sapphire.

14 years agoJit: disable for Sapphire.
Bill Buzbee [Tue, 23 Mar 2010 21:34:11 +0000 (14:34 -0700)]
Jit: disable for Sapphire.

Change-Id: I3c48f239ef9a83fac1ef05d18ea1b00ab27879ff

14 years agoImprove java.net.InetAddress.getLocalHost documentation.
Elliott Hughes [Tue, 23 Mar 2010 21:21:27 +0000 (14:21 -0700)]
Improve java.net.InetAddress.getLocalHost documentation.

Bug: 1518707
Change-Id: I741a7a28325320949e84e997e6a49d3356c9a308

14 years agoam d4e0952b: Further refinements to "kill other thread".
Andy McFadden [Tue, 23 Mar 2010 20:01:33 +0000 (13:01 -0700)]
am d4e0952b: Further refinements to "kill other thread".

Merge commit 'd4e0952b73f9054adcc927a1c12699ba63f1672a' into dalvik-dev

* commit 'd4e0952b73f9054adcc927a1c12699ba63f1672a':
  Further refinements to "kill other thread".

14 years agoFurther refinements to "kill other thread".
Andy McFadden [Tue, 23 Mar 2010 19:34:43 +0000 (12:34 -0700)]
Further refinements to "kill other thread".

Switched from SIGSEGV to SIGSTKFLT.  Otherwise it looks like we're
seg-faulting in code that was actually executing just fine.

Ignore SIGSEGV before returning.  This avoids creating a second dump
when dvmAbort() is called.  (If the caller's stack trace were at all
interesting, we wouldn't be here, and we can do without the log spam.)

Added some more details to the logging.

For bug 2517042.

Change-Id: Ifff7fd75d6dbf7e3663152787f8921dda215fe40

14 years agoMerge "Revert the removal of java.nio.NIOAccess, which frameworks/base/ uses." into...
Elliott Hughes [Tue, 23 Mar 2010 00:56:03 +0000 (17:56 -0700)]
Merge "Revert the removal of java.nio.NIOAccess, which frameworks/base/ uses." into dalvik-dev

14 years agoRevert the removal of java.nio.NIOAccess, which frameworks/base/ uses.
Elliott Hughes [Tue, 23 Mar 2010 00:50:33 +0000 (17:50 -0700)]
Revert the removal of java.nio.NIOAccess, which frameworks/base/ uses.

This was removed in https://android-git.corp.google.com/g/45796, but turns
out to be used. I think we can do better in the long term, but right now
this just removes some of the duplication from the original, and adds
comments explaining where it's used.

Bug: 2535509
Change-Id: Ie8e717537b8b8c70c8689f2dbb2c3a38501ecc57

14 years agoMerge "Add the Java 6 java.text.spi and java.util.spi interfaces." into dalvik-dev
Elliott Hughes [Tue, 23 Mar 2010 00:00:55 +0000 (17:00 -0700)]
Merge "Add the Java 6 java.text.spi and java.util.spi interfaces." into dalvik-dev

14 years agoAdd the Java 6 java.text.spi and java.util.spi interfaces.
Elliott Hughes [Mon, 22 Mar 2010 23:36:58 +0000 (16:36 -0700)]
Add the Java 6 java.text.spi and java.util.spi interfaces.

We don't currently use these, and don't necessarily plan to. Full support
would have a run-time cost, and it's not obvious that it would be particularly
useful.

Code search can't actually find any users of this stuff in the wild outside
of the various VM implementations and their test suites.

Bug: 2497395
Change-Id: Ie25aef73ece6d1fd169fdcb7b2f847761d77914d

14 years agoam 64ee717b: Jit: Re-enable for Sapphire
Bill Buzbee [Mon, 22 Mar 2010 22:43:25 +0000 (15:43 -0700)]
am 64ee717b: Jit: Re-enable for Sapphire

Merge commit '64ee717be7cf4aad64371e73cfd180aa4d85dd07' into dalvik-dev

* commit '64ee717be7cf4aad64371e73cfd180aa4d85dd07':
  Jit: Re-enable for Sapphire

14 years agoJit: Re-enable for Sapphire
Bill Buzbee [Mon, 22 Mar 2010 20:59:45 +0000 (13:59 -0700)]
Jit: Re-enable for Sapphire

Change-Id: Icbfd8781756c2c7cde88140ed40766e29448b1ff

14 years agoRemove all remaining "@since Android" tags.
Elliott Hughes [Mon, 22 Mar 2010 19:26:38 +0000 (12:26 -0700)]
Remove all remaining "@since Android" tags.

I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.

Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697

14 years agoAdd Java 6's java.util.Arrays changes.
Elliott Hughes [Mon, 22 Mar 2010 18:16:46 +0000 (11:16 -0700)]
Add Java 6's java.util.Arrays changes.

I've kept our binary search implementation and just generalized the
interface.

I've gone out of my way to preserve exception priority. I know we don't
agree that it's necessary, but it is important if we want to be able to
run other people's tests. If someone wants to write a new high-quality
test suite (which would be a great thing to have), we should remove the
hacks. (I've commented them.) Otherwise, I've gone out of my way to keep
the near-duplicates forced on us by Java's primitive type system as
identical as possible.

This passes all harmony and jtreg tests.

Change-Id: I91fbf707dac76124c6dbe59b0b30b7ded9a69529

14 years agoMerge "Java 6 java.nio.Buffer changes." into dalvik-dev
Elliott Hughes [Fri, 19 Mar 2010 23:23:09 +0000 (16:23 -0700)]
Merge "Java 6 java.nio.Buffer changes." into dalvik-dev

14 years agoJava 6 java.nio.Buffer changes.
Elliott Hughes [Fri, 19 Mar 2010 23:06:18 +0000 (16:06 -0700)]
Java 6 java.nio.Buffer changes.

We no longer need the duplicated lower-quality documentation on
each subclass, and the NIOAccess class turns out to be unused.

Bug: 2497395
Change-Id: Ib7ce8f51aac2b78bf56fff4526af1c2c8818e277

14 years agoam e9f1038c: Merge "Use pthread_kill(3) instead of kill(2)."
Andy McFadden [Fri, 19 Mar 2010 22:40:13 +0000 (15:40 -0700)]
am e9f1038c: Merge "Use pthread_kill(3) instead of kill(2)."

Merge commit 'e9f1038c3e71dba123532c62741257867d68e08b' into dalvik-dev

* commit 'e9f1038c3e71dba123532c62741257867d68e08b':
  Use pthread_kill(3) instead of kill(2).

14 years agoMerge "Use pthread_kill(3) instead of kill(2)."
Andy McFadden [Fri, 19 Mar 2010 22:35:40 +0000 (15:35 -0700)]
Merge "Use pthread_kill(3) instead of kill(2)."

14 years agoMerge "Remove a superfluous declaration (left over from when DexClassLoader was dupli...
Dan Bornstein [Fri, 19 Mar 2010 22:21:55 +0000 (15:21 -0700)]
Merge "Remove a superfluous declaration (left over from when DexClassLoader was duplicated from PathClassLoader)." into dalvik-dev

14 years agoUse pthread_kill(3) instead of kill(2).
Andy McFadden [Fri, 19 Mar 2010 22:18:57 +0000 (15:18 -0700)]
Use pthread_kill(3) instead of kill(2).

Another swing at useful native traces.  pthread_kill(3) uses tkill(2)
instead of kill(2), so we may have a better chance of the signal landing
on the right thread.

For bug 2517042.

Change-Id: I62871c1e21b11442ea52c861397674f1644f4da9

14 years agoTrack Java 6's BreakIterator API changes.
Elliott Hughes [Fri, 19 Mar 2010 21:49:47 +0000 (14:49 -0700)]
Track Java 6's BreakIterator API changes.

Bug: 2497395
Change-Id: Iaef75bbd946bebe6201b5f52564bcaf8a4d0e56e

14 years agoClean up the Java side of the ICU interface a bit.
Elliott Hughes [Fri, 19 Mar 2010 01:25:22 +0000 (18:25 -0700)]
Clean up the Java side of the ICU interface a bit.

My original intention was just to add the missing "final" on a few classes,
but our BreakIterator implementation struck me as excessively bloated and
confusing.

Change-Id: I2d2dccafe8ec91124f3c83909c9ec647cc2d51e2

14 years agoRemove a superfluous declaration (left over from when DexClassLoader was
Dan Bornstein [Fri, 19 Mar 2010 21:01:59 +0000 (14:01 -0700)]
Remove a superfluous declaration (left over from when DexClassLoader was
duplicated from PathClassLoader).

Change-Id: Iaf3e8a5b23df1a8bbf670bf6d6045fffef6c8fcb

14 years agoam 7713b900: Merge "Fixing namespace+prefix mode in Expat and removing optional field...
Jesse Wilson [Fri, 19 Mar 2010 20:50:30 +0000 (13:50 -0700)]
am 7713b900: Merge "Fixing namespace+prefix mode in Expat and removing optional fields from callbacks."

Merge commit '7713b900d12c7a46334db46b33fbe848167189dd' into dalvik-dev

* commit '7713b900d12c7a46334db46b33fbe848167189dd':
  Fixing namespace+prefix mode in Expat and removing optional fields from callbacks.

14 years agoMerge "Fixing namespace+prefix mode in Expat and removing optional fields from callba...
Jesse Wilson [Fri, 19 Mar 2010 20:39:28 +0000 (13:39 -0700)]
Merge "Fixing namespace+prefix mode in Expat and removing optional fields from callbacks."

14 years agoFixing namespace+prefix mode in Expat and removing optional fields from callbacks.
Jesse Wilson [Fri, 19 Mar 2010 19:51:43 +0000 (12:51 -0700)]
Fixing namespace+prefix mode in Expat and removing optional fields from callbacks.

The first part is related to bug 6632:
  http://code.google.com/p/android/issues/detail?id=6632

I added these optional fields back when I was originally updating
the XML parser for Froyo. I've decided to remove them to simplify
migrating between Android and the RI. It should also save some
object allocations.

Note that the RI v5 and the RI v6 behave differently for optional
values on attributes; this motivated me to add the otherwise
unfortunate assertOneOf() method to the testcase. (We behave more
like RI v6, which is to supply the values upon request)

Change-Id: Icfa5d29976a86bf194b3ed7c0d9e2275c3bff9dd

14 years agoAdded flags to the vm:
Barry Hayes [Wed, 17 Mar 2010 19:12:39 +0000 (12:12 -0700)]
Added flags to the vm:
-Xgc:[no]preverify
-Xgc:[no]postverify
to run verify routines over the heap pre- and post-gc.

Changed the Verify.h interface. It now publishes an entry point for
verifying a HeapBitmap, rather than the HeapBitmap callback.

Added a dvmHeapSuspendAndVerify to Heap.h for verification outside of
the GC.

Added callbacks before and after GC, under the locks, under flag control.
Processing of properties to produce flags is in a different project,
frameworks/base

Change-Id: I3f3896583fe9e7239bbe2f374d7ed4c5dd5d3e82

14 years agoMerge "The "referent" field of java.lang.ref.Reference objects is NOT included in...
Barry Hayes [Fri, 19 Mar 2010 19:57:52 +0000 (12:57 -0700)]
Merge "The "referent" field of java.lang.ref.Reference objects is NOT included in ifieldRefCount. See Class.c precacheReferenceOffsets for this amusing bit of VM trivia." into dalvik-dev

14 years agoThe "referent" field of java.lang.ref.Reference objects is NOT
Barry Hayes [Fri, 19 Mar 2010 17:10:59 +0000 (10:10 -0700)]
The "referent" field of java.lang.ref.Reference objects is NOT
included in ifieldRefCount.
See Class.c precacheReferenceOffsets for this amusing bit of VM trivia.

Added an explicit VERIFY_REFERENCE of the Reference.referent field for
subclasses of Reference.

Change-Id: Ibc8a059ffb353d60b681af1d3a5520c2443d3864

14 years agoam e073b0e8: Move String creation outside O(n^2) path in LogManager
Bjorn Bringert [Fri, 19 Mar 2010 17:08:00 +0000 (10:08 -0700)]
am e073b0e8: Move String creation outside O(n^2) path in LogManager

Merge commit 'e073b0e86ea089a08685202f78fe446cd03b3d49' into dalvik-dev

* commit 'e073b0e86ea089a08685202f78fe446cd03b3d49':
  Move String creation outside O(n^2) path in LogManager

14 years agoMove String creation outside O(n^2) path in LogManager
Bjorn Bringert [Fri, 19 Mar 2010 11:22:40 +0000 (11:22 +0000)]
Move String creation outside O(n^2) path in LogManager

This more than halves the number of Strings and StringBuilders created
when constructing a GoogleHttpClient and executing a single
HTTP request.

Bug http://b/issue?id=2529141

Change-Id: Ia8268fd692b08cf82e4abbffe1459e461e9f7e68

14 years agoMerge "Add's Java 6's DecimalFormat.setRoundingMode (et cetera)." into dalvik-dev
Elliott Hughes [Fri, 19 Mar 2010 01:12:07 +0000 (18:12 -0700)]
Merge "Add's Java 6's DecimalFormat.setRoundingMode (et cetera)." into dalvik-dev

14 years agoAdd's Java 6's DecimalFormat.setRoundingMode (et cetera).
Elliott Hughes [Fri, 19 Mar 2010 00:00:07 +0000 (17:00 -0700)]
Add's Java 6's DecimalFormat.setRoundingMode (et cetera).

Format and NumberFormat's bogusly-public constructors became protected with
Java 6. DecimalFormat gained more control over rounding behavior. There's a
slight mismatch with our ICU4C-based implementation in that ICU4C doesn't
support RoundingMode.UNNECESSARY, so I've had to fake that (but I doubt it's
used much, if at all).

I've pulled out the obviously Android-specific tests from the harmony
DecimalFormatTest.java, but I've only brought back the rounding mode changes
from the current harmony code to avoid the new tests' dependencies. I've also
added one new test of my own, to check that setMaximumFractionDigits affects
rounding as it should (since the harmony tests don't test this, and it's
somewhat subtle).

Bug: 2497395
Change-Id: Ifafc8bb051e078ead988073281f5c33f0aeb130a

14 years agoam 94e57f7b: Merge "Increase sleep delays on debug thread kill."
Andy McFadden [Fri, 19 Mar 2010 00:05:40 +0000 (17:05 -0700)]
am 94e57f7b: Merge "Increase sleep delays on debug thread kill."

Merge commit '94e57f7bb8e60210e379bfea29471db059a7edca' into dalvik-dev

* commit '94e57f7bb8e60210e379bfea29471db059a7edca':
  Increase sleep delays on debug thread kill.

14 years agoMerge "Increase sleep delays on debug thread kill."
Andy McFadden [Thu, 18 Mar 2010 23:57:30 +0000 (16:57 -0700)]
Merge "Increase sleep delays on debug thread kill."

14 years agoIncrease sleep delays on debug thread kill.
Andy McFadden [Thu, 18 Mar 2010 23:27:14 +0000 (16:27 -0700)]
Increase sleep delays on debug thread kill.

It appears the delays between the signals were insufficient for a busy
system.  This increases the timeouts to larger values, which may or may
not be sufficient.  What's really needed here is a way to monitor
debuggerd's activity, but that seems like a lot of work for what this
wants to accomplish.

Also, set gDvm.nativeDebuggerActive to true to prevent the heapworker
watchdog timeout from firing.  (Either somebody is going to attach a
debugger soon, or the process is going to die, so it's reasonable to
do here.)

Change-Id: Ic92590499871860ef766147eeaa6efc7afb4acdc

14 years agoMerge "Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc." into dalvik-dev
Elliott Hughes [Thu, 18 Mar 2010 20:41:41 +0000 (13:41 -0700)]
Merge "Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc." into dalvik-dev

14 years agoAdd Java 6's Scanner.reset and fix RuleBasedCollator's javadoc.
Elliott Hughes [Thu, 18 Mar 2010 18:31:16 +0000 (11:31 -0700)]
Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc.

(The harmony ScannerTest.java is quite different from ours, and doesn't test
this trivial method anyway.)

Bug: 2497395
Change-Id: I8b2b3db7233f766ef70bfdbfdcdfbd0f23e4bdb4

14 years agoam 253eebd3: Drop needless parens from Javadoc.
Jesse Wilson [Thu, 18 Mar 2010 18:25:12 +0000 (11:25 -0700)]
am 253eebd3: Drop needless parens from Javadoc.

Merge commit '253eebd34a7a4a30b20cbfd42dbfd7117af8a154' into dalvik-dev

* commit '253eebd34a7a4a30b20cbfd42dbfd7117af8a154':
  Drop needless parens from Javadoc.

14 years agoam 1573a78e: Merge "Javadoc for JSONArray."
Jesse Wilson [Thu, 18 Mar 2010 18:20:17 +0000 (11:20 -0700)]
am 1573a78e: Merge "Javadoc for JSONArray."

Merge commit '1573a78ed4898aaf4a38abf6ea0ab1254459282b' into dalvik-dev

* commit '1573a78ed4898aaf4a38abf6ea0ab1254459282b':
  Javadoc for JSONArray.

14 years agoDrop needless parens from Javadoc.
Jesse Wilson [Thu, 18 Mar 2010 18:18:42 +0000 (11:18 -0700)]
Drop needless parens from Javadoc.

Although this violates my longstanding style preference, it agrees
with almighty JJB's official ArrayList, which is Good Enough For Me.

Change-Id: I7b608c12e04d0b7789bfcabeab4b7347ad22baca

14 years agoMerge "Javadoc for JSONArray."
Jesse Wilson [Thu, 18 Mar 2010 18:14:45 +0000 (11:14 -0700)]
Merge "Javadoc for JSONArray."

14 years agoJavadoc for JSONArray.
Jesse Wilson [Thu, 18 Mar 2010 06:50:48 +0000 (23:50 -0700)]
Javadoc for JSONArray.

Change-Id: I3aced2607b48210f76887e0d42b591c098ce5db7

14 years agoam 58ece73d: Bug fix for JIT peephole optimization.
Ben Cheng [Thu, 18 Mar 2010 16:37:50 +0000 (09:37 -0700)]
am 58ece73d: Bug fix for JIT peephole optimization.

Merge commit '58ece73d25c78a05b94c820c5ec65b8a2edca81f' into dalvik-dev

* commit '58ece73d25c78a05b94c820c5ec65b8a2edca81f':
  Bug fix for JIT peephole optimization.

14 years agoBug fix for JIT peephole optimization.
Ben Cheng [Thu, 18 Mar 2010 06:32:26 +0000 (23:32 -0700)]
Bug fix for JIT peephole optimization.

Bug: 2520500
Change-Id: I36dbd8b3a6d13c40f9735df4918ab02b5f053b07

14 years agoMerge "Add Java 6's Logger.GLOBAL_LOGGER_NAME field." into dalvik-dev
Elliott Hughes [Wed, 17 Mar 2010 23:41:34 +0000 (16:41 -0700)]
Merge "Add Java 6's Logger.GLOBAL_LOGGER_NAME field." into dalvik-dev

14 years agoam 31275264: Fixing 10 of the XPath failures caused by a malformed Document.
Jesse Wilson [Wed, 17 Mar 2010 23:36:36 +0000 (16:36 -0700)]
am 31275264: Fixing 10 of the XPath failures caused by a malformed Document.

Merge commit '312752642a4539788952260fc517d286f6a6202e' into dalvik-dev

* commit '312752642a4539788952260fc517d286f6a6202e':
  Fixing 10 of the XPath failures caused by a malformed Document.

14 years agoAdd Java 6's Logger.GLOBAL_LOGGER_NAME field.
Elliott Hughes [Wed, 17 Mar 2010 23:28:07 +0000 (16:28 -0700)]
Add Java 6's Logger.GLOBAL_LOGGER_NAME field.

Also deprecated Logger.global.

Bug: 2497395
Change-Id: I28e5f83116277430c4eb0773b238670c0dd80847

14 years agoAdd Java 6's new PipedReader/PipedInputStream constructors.
Elliott Hughes [Wed, 17 Mar 2010 22:54:54 +0000 (15:54 -0700)]
Add Java 6's new PipedReader/PipedInputStream constructors.

Also bring back the latest harmony java6 branch tests, and modify them to pass
with our deliberate [spec-compliant] exception changes.

Bug: 2497395
Change-Id: Ifb3f9bf48f8eec4120f9e59b03beb3969cfe0cd3