OSDN Git Service

android-x86/dalvik.git
13 years agoFix for x86-atom/CALLABI.S to handle failure for android.jni.cts.JniStaticTest#test_r...
Johnnie Birch [Wed, 9 Jun 2010 22:03:27 +0000 (15:03 -0700)]
Fix for x86-atom/CALLABI.S to handle failure for android.jni.cts.JniStaticTest#test_returnChar. CALLABI.S was not returning unsigned shorts correctly.

Change-Id: Ia6b443d41a96b0f65739c0b16a0ddb39f7eb33fa

13 years agoDon't prelink libdvm for x86
Chih-Wei Huang [Sun, 4 Jul 2010 07:44:56 +0000 (15:44 +0800)]
Don't prelink libdvm for x86

13 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

13 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

13 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

13 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

13 years agoDon't build dx if it's an app-only build.
Ying Wang [Fri, 11 Jun 2010 20:54:13 +0000 (13:54 -0700)]
Don't build dx if it's an app-only build.

Change-Id: I609f21e78b7bbac9af25ac1bc6bd5d3941ea462a

13 years agoAdd /proc/pid/task/tid/schedstat info to thread stack dumps
Christopher Tate [Wed, 2 Jun 2010 23:17:46 +0000 (16:17 -0700)]
Add /proc/pid/task/tid/schedstat info to thread stack dumps

This lets us see whether a usually-blocked thread is actually making
progress in between stack snapshots.

Change-Id: If191627e4572457579d5f330d31bde86b8ce4ec5

13 years agoJit: Fix for 2717275 First JIT bug reported by external developers
buzbee [Wed, 26 May 2010 21:48:04 +0000 (14:48 -0700)]
Jit: Fix for  2717275 First JIT bug reported by external developers

The JIT was incorrectly keeping a short value in a floating point
register rather than copying it to a core register before storing.
There was an assert to catch this case, but asserts don't fire in
production builds.

The fix is safe and simple - just exclude this case from the "optimization".

Change-Id: I38f1865da11ef3f78213f84967d4737e066b9c68

14 years agoDisable SSL Session Ticket extension for OpenSSLSocket
Brian Carlstrom [Thu, 13 May 2010 23:30:53 +0000 (16:30 -0700)]
Disable SSL Session Ticket extension for OpenSSLSocket

Due to compatability issues with some sites, disable this SSL extension which wasn't present in Eclair. See also:

    b/2682876 Some ssl sites cause "A secure connection could not be established" error

Change-Id: Ib42fb249eb0f8d645ae3f983c77cb278ca54f946

14 years agoMerge "Remove test runner tool vogar from Froyo." into froyo
Jesse Wilson [Mon, 10 May 2010 22:44:52 +0000 (15:44 -0700)]
Merge "Remove test runner tool vogar from Froyo." into froyo

14 years agoRemove test runner tool vogar from Froyo.
Jesse Wilson [Mon, 10 May 2010 21:39:20 +0000 (14:39 -0700)]
Remove test runner tool vogar from Froyo.

This tool has been open sourced independently and it will be quite
awkward for external contributors who attempt to use or contribute
to this dead copy. This code is test only and not used by the
production runtime.
http://code.google.com/p/vogar/

Change-Id: Ib53bdfdb600330e1a2f200b5747305fc527a78a6

14 years agob/2663512: "java.io.IOException: SSL shutdown failed.: Ok" shouldn't dump a stacktrace
Brian Carlstrom [Fri, 7 May 2010 16:58:15 +0000 (09:58 -0700)]
b/2663512: "java.io.IOException: SSL shutdown failed.: Ok" shouldn't dump a stacktrace

Gutted OpenSSLSocketImpl finalizer. The comment from the code
(excepted below) explains in detail the trouble of having the
finalizer do anything more than touch its the instances own state due
to unpredictable order of finalization and the future possability of
parallel finalization.

        /*
         * Just worry about our own state. Notably we do not try and
         * close anything. The SocketImpl, either our own
         * PlainSocketImpl, or the Socket we are wrapping, will do
         * that. This might mean we do not properly SSL_shutdown, but
         * if you want to do that, properly close the socket yourself.
         *
         * The reason why we don't try to SSL_shutdown is that there
         * can be a race between finalizers where the PlainSocketImpl
         * finalizer runs first and closes the socket. However, in the
         * meanwhile, the underlying file descriptor could be reused
         * for another purpose. If we call SSL_shutdown after that, the
         * underlying socket BIOs still have the older file descriptor
         * and will write the close notify to some unsuspecting
         * reader.
         */

Tested extensively in mainline with existing tests.xnet.AllTests as
well as new javax.net.ssl tests. Sanity tested in froyo with
tests.xnet.AllTests and browser testing.

Change-Id: I85e0e086b43b2ad79304f2cf42721d09cc41a5f4

14 years agoRevert "Plug leak in class initialization."
Dan Egnor [Fri, 7 May 2010 03:56:14 +0000 (20:56 -0700)]
Revert "Plug leak in class initialization."

This reverts commit d07cf9d69dddeebb91386a88f7b6d2323cf125a9.
Bug: 2664424

Change-Id: I1a36469757f2f20fb29b3bcf04e2a23aa7b72dca

14 years agoPlug leak in class initialization.
Andy McFadden [Thu, 6 May 2010 20:39:07 +0000 (13:39 -0700)]
Plug leak in class initialization.

Don't add static fields and methods to the resolved-items table if the
defining class is still being initialized.  If we do, other threads can
then access those fields and methods without first performing an "is the
class initialized" test.

We will end up performing static field and method resolution more often
now than before.  On a Nexus One, zygote class preload time went from
2227ms to 2239ms (i.e. the performance difference is in the noise).

Bug 2655384.

Change-Id: Ib0c285ef23d58ae709be65f09efb68e73f982084

14 years agoDO NOT MERGE: Rewrite the HTTP connection pool used by HttpURLConnection.
Jesse Wilson [Thu, 6 May 2010 17:54:21 +0000 (10:54 -0700)]
DO NOT MERGE: Rewrite the HTTP connection pool used by HttpURLConnection.

This started off as incremental changes, but it ended up going
far enough that it earned the "rewrite" badge.

System.getProperty() is not called for every HTTP connection.
This is slightly controversial, but the old code had to bend
over backwards to support dynamic pool changes, and it didn't
even support the case when the pool shrank but not to 0.

The new code doesn't do I/O within static synchronized blocks.
This should reduce contention described here: http://b/issue?id=2606547

Also: simpify implementation, prettier names, more focused doc.

Originally submitted to dalvik-dev.
  https://android-git.corp.google.com/g/49309

Change-Id: I815c3123838b29cd2d9b39346e5c2486e1f5a2d2

14 years agoFixing bulk reads in ByteArray.MyInputStream
Jesse Wilson [Mon, 3 May 2010 22:27:11 +0000 (15:27 -0700)]
Fixing bulk reads in ByteArray.MyInputStream

This has never worked properly, but it didn't matter until recently
because neither the JDK's nor early Dalvik's DataInputStream was
exercising it. But in 2.0, Dalvik's DataInputStream prefers bulk
reads, which exercises this code when run on-device.

http://code.google.com/p/android/issues/detail?id=8115

The problem was that System.arraycopy call didn't include the start
offset in the call.

14 years agoFix breakpoint handling on switch statements.
Andy McFadden [Mon, 3 May 2010 23:11:20 +0000 (16:11 -0700)]
Fix breakpoint handling on switch statements.

Some debuggers (Eclipse and IntelliJ, but not jdb) appear to set
breakpoints at all addresses associated with a given bytecode offset.
Because dx emits line number information for the data tables used
by "switch" statements, we end up setting a breakpoint on the start
of the switch data.

In the past this wasn't a problem, but now that we're using "hard"
breakpoints it's causing the magic number at the start of the table
to be overwritten.  An explict test on the magic number is causing
the intepreter to throw an InternalError.

The quick fix is to refuse to stomp on a "magic" NOP.  Assuming the
line number table is otherwise valid and doesn't point into the middle
of a multi-word instruction, this should solve the problem.  (We can
check this during verification.)

Bug 2643148.

Change-Id: Ic96947da14ea2346a67f0eb769a1c006153da448

14 years agoMerge "Throw an exception in JIT'ed code if dvmFindInterfaceMethodInCache returns...
Ben Cheng [Mon, 3 May 2010 01:18:48 +0000 (18:18 -0700)]
Merge "Throw an exception in JIT'ed code if dvmFindInterfaceMethodInCache returns NULL" into froyo

14 years agoMerge "Fix a memory ordering bug when updating the inline cache for predicted chainin...
Ben Cheng [Mon, 3 May 2010 01:18:38 +0000 (18:18 -0700)]
Merge "Fix a memory ordering bug when updating the inline cache for predicted chaining." into froyo

14 years agoThrow an exception in JIT'ed code if dvmFindInterfaceMethodInCache returns NULL
Ben Cheng [Sun, 2 May 2010 17:45:32 +0000 (10:45 -0700)]
Throw an exception in JIT'ed code if dvmFindInterfaceMethodInCache returns NULL

Bug: 2642019
Change-Id: Iec2be8f61388d99b1500bb144e56b86febe76c0b

14 years agoFix a memory ordering bug when updating the inline cache for predicted chaining.
Ben Cheng [Fri, 30 Apr 2010 22:14:00 +0000 (15:14 -0700)]
Fix a memory ordering bug when updating the inline cache for predicted chaining.

Also collect the statistics about fast/queued/dropped IC update. Example
output:

D/dalvikvm(   86): JIT: ICPatch: 603 fast, 6 queued; 0 dropped

Bug: 2642019

Change-Id: I8cffdc9e422189bfd94bf845bcb2cff516f37077

14 years agoBackport the setFixedLengthStreamingMode fix to froyo.
Elliott Hughes [Fri, 30 Apr 2010 07:33:13 +0000 (00:33 -0700)]
Backport the setFixedLengthStreamingMode fix to froyo.

Bug: 2643503
Change-Id: Ia42c9407ac77721d7fec3b806135d4e9912ee8ca

14 years agoFix dexdump to build in Windows SDK under Linux
Raphael [Tue, 13 Apr 2010 22:19:21 +0000 (15:19 -0700)]
Fix dexdump to build in Windows SDK under Linux

(Merged from master Change I0e57c81d)

14 years agoFix a deadlock in the breakpoint code.
Andy McFadden [Fri, 23 Apr 2010 00:08:11 +0000 (17:08 -0700)]
Fix a deadlock in the breakpoint code.

In froyo we started using "hard" breakpoints, where we replace the
existing opcodes with breakpoint instructions.  This requires some
coordination to avoid confusing the verifier.  The previous approach
allowed the breakpoints to be inserted, and "undid" them while the
verifier ran; this worked, but caused us to be holding a lock for
an extended period.

The new approach just avoids altering the bytecode of unverified
classes, and then "flushes" the breakpoint set out between the time
when verification completes and class initialization starts.  This
removes the possibility of blocking with the lock held, and makes
everything much simpler.

For bug 2615063.

(cherry-pick from dalvik-dev)

Change-Id: I75f19b0cc71fc0babb50ab299c6c5a865e06c919

14 years agoFix NetworkInterface on sholes/ppp.
Elliott Hughes [Wed, 21 Apr 2010 19:48:25 +0000 (12:48 -0700)]
Fix NetworkInterface on sholes/ppp.

We need to use IFA_LOCAL to get the interface addresses; IFA_ADDRESS is the
remote address (which is usually the same as IFA_LOCAL, but not in the ppp
case).

Tested on sholes, where it fixes the test used in the bug; also tested on
passion, where it doesn't break the already-working test.

Bug: 2575983
Change-Id: Ib334a002dc099daeeb05cbc341fe233d4d11d2f7

14 years agoMerge "Remove dangerous logging code from unlockMonitor. It is unsafe to dereference...
Carl Shapiro [Tue, 20 Apr 2010 22:51:47 +0000 (15:51 -0700)]
Merge "Remove dangerous logging code from unlockMonitor.  It is unsafe to dereference a potentially corrupt lock word to retrieve additional information about the lock state.  This code was added to debug a transient error and has since been removed from other branches." into froyo

14 years agoUpdate the ssl test so the client reads something from the server.
Huahui Wu [Mon, 19 Apr 2010 22:05:17 +0000 (18:05 -0400)]
Update the ssl test so the client reads something from the server.
This is needed when cut-through feature is needed as in b/2586347.
Dr. No approved in http://b/issue?id=2511073 .

Change-Id: Id84724873522fe0435dbda342616da02783f7d6b

14 years agoRemove dangerous logging code from unlockMonitor. It is unsafe to
Carl Shapiro [Tue, 20 Apr 2010 07:53:13 +0000 (00:53 -0700)]
Remove dangerous logging code from unlockMonitor.  It is unsafe to
dereference a potentially corrupt lock word to retrieve additional
information about the lock state.  This code was added to debug a
transient error and has since been removed from other branches.

Change-Id: I5aabae531c52532929e8dbb71bdcc6cb7cee64f9

14 years agoFix remaining small issues with the lock sampling.
Carl Shapiro [Sat, 17 Apr 2010 00:33:15 +0000 (17:33 -0700)]
Fix remaining small issues with the lock sampling.

* Eliminate the now unused lockprofsample flag.  The sample percentage
  has been a function of the wait time an threshold since the previous
  change.

* Eliminate some trailing whitespace that creeped into the previous
  change.

* Eliminate the trailing newline from the event buffer.  Because the
  buffer pointer was not incremented this character was not seen in
  the event log anyway.

* Document the lockProfThreshold global.

Change-Id: Ia1c1fcf862d76f5631601e05e7941e5171fab097

14 years agoFix several issues with the lock sampling code. This change obsoletes
Carl Shapiro [Sat, 17 Apr 2010 00:33:15 +0000 (17:33 -0700)]
Fix several issues with the lock sampling code.  This change obsoletes
the lockProfSample flag.

Change-Id: Idb1846fc3db4ff73678a0dae46aabbb5dbb8b957

14 years agoAdd a mechanism to long a sample of long running lock acquisitions.
Carl Shapiro [Fri, 9 Apr 2010 22:03:33 +0000 (15:03 -0700)]
Add a mechanism to long a sample of long running lock acquisitions.

14 years agoDO NOT MERGE. Suppressing tests that fail in CTS' test runner.
Jesse Wilson [Wed, 14 Apr 2010 21:43:12 +0000 (14:43 -0700)]
DO NOT MERGE. Suppressing tests that fail in CTS' test runner.

These tests have been verified to work successfully in run-core-tests.
We plan on unifying CTS and Dalvik's test running infrastructure in this
quarter so that we don't need such unfortunate hacks.

Test failures: http://b/issue?id=2564250
Fix test runner: http://b/issue?id=2215226

Change-Id: I3df2f4de10705dc470e397da2d0f014141573da1

14 years agoFixing PipedInputStreamTest to fill the buffer before dying on a dead reader.
Jesse Wilson [Wed, 14 Apr 2010 01:02:47 +0000 (18:02 -0700)]
Fixing PipedInputStreamTest to fill the buffer before dying on a dead reader.

Change-Id: Ie34a8bec7b2a34d2933225d6d4e04e0643dbcf99

14 years agoFix SSL_shutdown error reporting to print a proper error instead of "Ok"
Brian Carlstrom [Sat, 10 Apr 2010 00:49:11 +0000 (17:49 -0700)]
Fix SSL_shutdown error reporting to print a proper error instead of "Ok"

There are other problematic error reporting cases to be fixed later, but this one seems to be the frequently occuring.

Change-Id: Ia5910cffb60cc694066be03d43ac1bb7eab47357

14 years agoMerge "Adding support for hash '#' comments to our JSON parser." into froyo
Jesse Wilson [Tue, 6 Apr 2010 22:54:01 +0000 (15:54 -0700)]
Merge "Adding support for hash '#' comments to our JSON parser." into froyo

14 years agoAdding support for hash '#' comments to our JSON parser.
Jesse Wilson [Tue, 6 Apr 2010 21:16:28 +0000 (14:16 -0700)]
Adding support for hash '#' comments to our JSON parser.

Neither the JSON RFC nor the documentation of Crockford's
implementation mention these comments, but somehow the
old parser used to support these. And so we shall also.

See bug 2571423.

Change-Id: I77d64c5ec53278d8df5fe1873404f1241320504b

14 years agoMerge "Trivial doc change: froyo is 2.2." into froyo
Andy McFadden [Tue, 6 Apr 2010 21:23:37 +0000 (14:23 -0700)]
Merge "Trivial doc change: froyo is 2.2." into froyo

14 years agoTrivial doc change: froyo is 2.2.
Andy McFadden [Tue, 6 Apr 2010 20:45:38 +0000 (13:45 -0700)]
Trivial doc change: froyo is 2.2.

Change-Id: Icce3770dd318ec8853d5120c13a85656ed1171ea

14 years agoMerge "Froyo InputStream.available documentation improvement." into froyo
Elliott Hughes [Mon, 5 Apr 2010 23:13:54 +0000 (16:13 -0700)]
Merge "Froyo InputStream.available documentation improvement." into froyo

14 years agoFroyo InputStream.available documentation improvement.
Elliott Hughes [Mon, 5 Apr 2010 18:33:58 +0000 (11:33 -0700)]
Froyo InputStream.available documentation improvement.

This method causes a lot of confusion, and we can do a lot better. (Ideally,
the API would either not exist or be something like "public boolean ready()".)

I've removed poor-quality documentation overrides too, so the full
documentation is visible in most places. (InflaterInputStream is an obvious
exception.)

Also, to a lesser extent, improve the InputStream.skip documentation.

Change-Id: I6d6cd788e6a32ad4a2613d1e381610f1ad8575fe

14 years agoAdded a note about android:vmSafeMode.
Andy McFadden [Mon, 5 Apr 2010 17:07:30 +0000 (10:07 -0700)]
Added a note about android:vmSafeMode.

Seems like a good thing to note here, along with the system properties that
accomplish the same thing system-wide.

(This is a minor documentation change only.)

Change-Id: Ib9adbd612d662fd2da3a02f49e730040fba8a7f3

14 years agoClean up the codegen for invoking helper callout functions.
Ben Cheng [Fri, 2 Apr 2010 22:04:53 +0000 (15:04 -0700)]
Clean up the codegen for invoking helper callout functions.

All invoked functions are documented in compiler/codegen/arm/CalloutHelper.h
Bug: 2567981

Change-Id: Ia7cd4107272df1b0b5588fbcc0aafcc6d0723d60

14 years agoRemove JSON License from NOTICE file
Brian Carlstrom [Fri, 2 Apr 2010 21:40:07 +0000 (14:40 -0700)]
Remove JSON License from NOTICE file

Change-Id: Ie4426f8e33ddef42916e88adeaf672714212d3a3

14 years agoMerge "Accept the "-Xjitdisableopt" flag as advertised." into froyo
Ben Cheng [Thu, 1 Apr 2010 20:32:30 +0000 (13:32 -0700)]
Merge "Accept the "-Xjitdisableopt" flag as advertised." into froyo

14 years agoAccept the "-Xjitdisableopt" flag as advertised.
Ben Cheng [Thu, 1 Apr 2010 20:26:54 +0000 (13:26 -0700)]
Accept the "-Xjitdisableopt" flag as advertised.

Bug: 2542212
Change-Id: I6819bbbaf43ccb9a1e35cc576cfd6e5440b9578b

14 years agoFix a race condition in JIT state refresh under debugging / misc code cleanup.
Ben Cheng [Wed, 31 Mar 2010 18:59:18 +0000 (11:59 -0700)]
Fix a race condition in JIT state refresh under debugging / misc code cleanup.

Bug: 2561283
Change-Id: I9fd94928f3e661de97098808340ea92b28cafa07

14 years agoMerge "Fix misuse of ALLOC_DONT_TRACK." into froyo
Andy McFadden [Wed, 31 Mar 2010 15:43:28 +0000 (08:43 -0700)]
Merge "Fix misuse of ALLOC_DONT_TRACK." into froyo

14 years agoRemove debug message from OpenSSL JNI code
Brian Carlstrom [Tue, 30 Mar 2010 23:28:48 +0000 (16:28 -0700)]
Remove debug message from OpenSSL JNI code

Change-Id: I70c68087b7d109634eb3240dca1f27e6f20d3da6

14 years agoFix misuse of ALLOC_DONT_TRACK.
Andy McFadden [Tue, 30 Mar 2010 22:49:07 +0000 (15:49 -0700)]
Fix misuse of ALLOC_DONT_TRACK.

The internal String creation function doesn't allow ALLOC_DONT_TRACK.
This changes the call to use ALLOC_DEFAULT and then explicitly release
the tracked allocation.

For bug 2558142.

Change-Id: I57dfa4824578c3a3a33f6836b75f51391cc73746

14 years agoAdd an @KnownFailure annotation.
Elliott Hughes [Tue, 30 Mar 2010 22:18:26 +0000 (15:18 -0700)]
Add an @KnownFailure annotation.

Bug: 2489458
Change-Id: Ib1121c6190b63baae8dbc6a8a598c3f5a510cfaf

14 years agoFix for 2542488 JIT codegen bug with overlapping wide operands
Bill Buzbee [Sat, 27 Mar 2010 17:58:03 +0000 (10:58 -0700)]
Fix for 2542488 JIT codegen bug with overlapping wide operands

Change-Id: I2f31492f68cb753f76dd664cd6b0a52d7d32de4c

14 years agoImprove JIT self verifier test coverage to follow single-step instructions.
Ben Cheng [Sat, 27 Mar 2010 00:45:28 +0000 (17:45 -0700)]
Improve JIT self verifier test coverage to follow single-step instructions.

Bug: 2549326
Change-Id: I01412d4aac1379b61c90fe6e59c534b33be93f66

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 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 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 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 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 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 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 "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 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 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 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 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 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 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 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 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 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 "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 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 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 agoFixing 10 of the XPath failures caused by a malformed Document.
Jesse Wilson [Wed, 17 Mar 2010 23:16:15 +0000 (16:16 -0700)]
Fixing 10 of the XPath failures caused by a malformed Document.

See bug 2518858.

This makes our XPath implementation fail the exact same tests
as the RI's. (which we assume is also based on Apache Xalan)

Change-Id: I9a98323113c95609651e948ad11113f84ccd87ec

14 years agoMerge "Exercising our XPath implementation with 279 of Jaxen's tests."
Jesse Wilson [Wed, 17 Mar 2010 18:42:23 +0000 (11:42 -0700)]
Merge "Exercising our XPath implementation with 279 of Jaxen's tests."

14 years agoMerge "Javadocs for JSONObject."
Jesse Wilson [Wed, 17 Mar 2010 18:18:15 +0000 (11:18 -0700)]
Merge "Javadocs for JSONObject."

14 years agoJavadocs for JSONObject.
Jesse Wilson [Wed, 17 Mar 2010 06:41:33 +0000 (23:41 -0700)]
Javadocs for JSONObject.

Change-Id: I5ec9df6a3a9baac8f4f498890cd35feff774737a

14 years agoExercising our XPath implementation with 279 of Jaxen's tests.
Jesse Wilson [Tue, 16 Mar 2010 23:52:54 +0000 (16:52 -0700)]
Exercising our XPath implementation with 279 of Jaxen's tests.

Both our implementation and the RIv6 fail 29 tests, 17 of which are
"could not find function" failures regarding our common lack of
support for the evaluate(), document(), upper-case() and lower-case()
functions.

In addition, our implementation fails 10 additional tests:
  xml/moreover.xml / /child::node() "expected:<1> but was:<3>"
  xml/simple.xml / string() "expected:<abd> but was:<"
  xml/web.xml / /child::node() "expected:<web-app> but was:<>"
  xml/web.xml / child::node() "expected:<web-app> but was:<>"
  xml/web.xml / name(/child::node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(/child::node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(/node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(child::node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(node()) "expected:<web-app> but was:<>"
  xml/web.xml /* name(../child::node()) "expected:<web-app> but was:<>"

Change-Id: Icb4695bbf826fd8f1c1ffae5e857169ff551f75e

14 years agoAdd missing macro SIGNATURE_BREAKPOINT.
Ben Cheng [Tue, 16 Mar 2010 23:20:48 +0000 (16:20 -0700)]
Add missing macro SIGNATURE_BREAKPOINT.

Change-Id: I9e450b7b2ff34a3609a99bf8fe11e3efa88ccc30

14 years agoMerge "Implement signature-based breakpoint for the JIT compiler."
Ben Cheng [Tue, 16 Mar 2010 23:16:08 +0000 (16:16 -0700)]
Merge "Implement signature-based breakpoint for the JIT compiler."

14 years agoMerge "Replace a use of index with strchr."
Carl Shapiro [Tue, 16 Mar 2010 23:08:38 +0000 (16:08 -0700)]
Merge "Replace a use of index with strchr."

14 years agoImplement signature-based breakpoint for the JIT compiler.
Ben Cheng [Tue, 16 Mar 2010 23:04:11 +0000 (16:04 -0700)]
Implement signature-based breakpoint for the JIT compiler.

The JIT compiler will replay itself with verbose printing if the compiled
instruction stream matches the customized signature from memory dump in the
bugreports.

Change-Id: I024082c5744903273b24a0a73468b9c0d3588ad5

14 years agoReplace a use of index with strchr.
Carl Shapiro [Tue, 16 Mar 2010 22:18:53 +0000 (15:18 -0700)]
Replace a use of index with strchr.

Change-Id: I2c1238bc1bd0945533712d0d74a761721b8408a3

14 years agoJit: Fix register usage bug - Issue 2518825 native crash running ARMv5te JIT
Bill Buzbee [Tue, 16 Mar 2010 19:41:43 +0000 (12:41 -0700)]
Jit: Fix register usage bug - Issue 2518825 native crash running ARMv5te JIT

Change I8ca61804 added a call to dvmCanPutArrayElement for APUT_OBJECT,
but did so in a way that violated register usage restrictions.  This change
tells the register allocation system what registers we expect to remain
live across the call to dvmCanPutArrayElement.

Change-Id: Icd83b888ba60768a196070d62d07d12c7a3c73c6

14 years agoMerge "Include strings.h directly for its ffs prototype."
Carl Shapiro [Tue, 16 Mar 2010 18:33:09 +0000 (11:33 -0700)]
Merge "Include strings.h directly for its ffs prototype."

14 years agoFixing an @link issue that is upsetting DroidDoc.
Jesse Wilson [Tue, 16 Mar 2010 17:57:58 +0000 (10:57 -0700)]
Fixing an @link issue that is upsetting DroidDoc.

Change-Id: I9837cfd46684ac6d5b9ec4ac6809da3c3f61d57d

14 years agoMerge "First half of JSON Javadocs."
Jesse Wilson [Tue, 16 Mar 2010 17:21:21 +0000 (10:21 -0700)]
Merge "First half of JSON Javadocs."

14 years agoFirst half of JSON Javadocs.
Jesse Wilson [Tue, 16 Mar 2010 06:47:57 +0000 (23:47 -0700)]
First half of JSON Javadocs.

Change-Id: I277ec3b35a28802dd7b7f82c1f4bbadbd3cc4c65

14 years agoMerge "Point debuggerd at the interesting thread."
Andy McFadden [Tue, 16 Mar 2010 15:48:04 +0000 (08:48 -0700)]
Merge "Point debuggerd at the interesting thread."

14 years agoInclude strings.h directly for its ffs prototype.
Carl Shapiro [Tue, 16 Mar 2010 07:21:41 +0000 (00:21 -0700)]
Include strings.h directly for its ffs prototype.

Change-Id: If957427bd0918b3b06e6b6177227f107a4b5a5c5

14 years agoPoint debuggerd at the interesting thread.
Andy McFadden [Tue, 16 Mar 2010 00:24:55 +0000 (17:24 -0700)]
Point debuggerd at the interesting thread.

There are a couple of situations (spin-on-suspend, HeapWorker wedged)
where the current thread's native stack is much less interesting than one
of the others.  This change will cause a couple of signals to be thrown
at the "interesting" thread in an attempt to get more useful information
out of debuggerd in these cases.

For bug 2517042.

Change-Id: Ib8c0e0ef93f07b7114e5f4638a907a0f7802bdc0