OSDN Git Service
Elliott Hughes [Wed, 16 Dec 2009 23:37:18 +0000 (15:37 -0800)]
Make java.lang.Character fast.
This patch reinstates some of the upstream ASCII fast paths, adds some new
ones, and forwards all char overloads to the int methods (placing the fast
paths in the int overload), so using the int overload isn't automatically
3x slower than the char overload even for the same characters.
See the bug for benchmark results. The ASCII speedups are between 2x and 4x.
Bug:
2295801
Android (Google) Code Review [Wed, 16 Dec 2009 21:33:04 +0000 (13:33 -0800)]
Merge change I24ac537c
* changes:
Move VFP register save/restore routines from template to codegen.
Ben Cheng [Wed, 16 Dec 2009 21:15:53 +0000 (13:15 -0800)]
Move VFP register save/restore routines from template to codegen.
Code in the template directory will occupy space in the code cache and is
invoked from JIT'ed code. Since these routines are only invoked from statically
compiled functions we can move them to the codegen directory which also has
arch-variant configurations.
Android (Google) Code Review [Wed, 16 Dec 2009 20:59:33 +0000 (12:59 -0800)]
Merge change Id6bd7c81
* changes:
Rewrote all the toString and bit twiddling code in Integer and Long using state-of-the-art recipes. The resulting code is much faster than what it replaced, as well as being more concise. While I was in the neighborhood I also cleaned up a few other things in the boxed primitives (TYPE fields, small-value caches, etc.).
Jesse Wilson [Wed, 16 Dec 2009 18:35:06 +0000 (10:35 -0800)]
Making helper threads daemons in the jtreg runner.
Fixing a bug where we were attempting to execute errord out tests. And
renaming the testClasses to a testClasspath.
Android (Google) Code Review [Wed, 16 Dec 2009 07:51:57 +0000 (23:51 -0800)]
Merge change Iadae8af9
* changes:
Updating Caliper runner to correspond with caliper r20091215
Jesse Wilson [Wed, 16 Dec 2009 02:59:27 +0000 (18:59 -0800)]
Updating Caliper runner to correspond with caliper r20091215
Joshua Bloch [Tue, 15 Dec 2009 00:32:33 +0000 (16:32 -0800)]
Rewrote all the toString and bit twiddling code in Integer and Long using
state-of-the-art recipes. The resulting code is much faster than what it
replaced, as well as being more concise. While I was in the neighborhood
I also cleaned up a few other things in the boxed primitives (TYPE fields,
small-value caches, etc.).
Addressed review comments.
Elliott Hughes [Wed, 16 Dec 2009 00:27:08 +0000 (16:27 -0800)]
Fix our test runner to look inside source files for package declarations.
The relevant libcore .java files were all under test/java/ directories, but
that's not generally true, and not true in the specific case of caliper's
benchmarks.
Elliott Hughes [Tue, 15 Dec 2009 23:50:08 +0000 (15:50 -0800)]
Fix dalvik_jtreg build.
Use the same technique frameworks/base uses when building external/apache-http
to build the dalvik_jtreg dependencies. This is ugly, but seems to keep the
host and device builds off each others' toes.
Android (Google) Code Review [Tue, 15 Dec 2009 23:46:19 +0000 (15:46 -0800)]
Merge change I326caaa3
* changes:
Fix our SSLSession implementations to call valueUnbound on remove.
Elliott Hughes [Tue, 15 Dec 2009 23:32:28 +0000 (15:32 -0800)]
Fix our SSLSession implementations to call valueUnbound on remove.
This addresses the other problem from the following abandoned change:
https://android-git.corp.google.com/g/4743
Android (Google) Code Review [Tue, 15 Dec 2009 23:26:27 +0000 (15:26 -0800)]
Merge change Id2be5eb7
* changes:
Eclipse doesn't like that this class' directory didn't match its package.
Brett Chabot [Tue, 15 Dec 2009 23:06:05 +0000 (15:06 -0800)]
am
61fdb24e: (-s ours) am
173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Merge commit '
61fdb24e732f0effb72c70491845a497e99faae1'
* commit '
61fdb24e732f0effb72c70491845a497e99faae1':
Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Elliott Hughes [Tue, 15 Dec 2009 22:13:27 +0000 (14:13 -0800)]
Eclipse doesn't like that this class' directory didn't match its package.
Resolve in favor of the package declaration.
Elliott Hughes [Tue, 15 Dec 2009 21:06:11 +0000 (13:06 -0800)]
Fix OpenSSLSessionImpl.getCreationTime and getLastAccessedTime.
This addresses one part of this abandoned change from ursg:
https://android-git.corp.google.com/g/4743
I've also tidied up the native method names to use the harmony "-Impl"
convention, removed useless methods that just forward to a native method,
and removed dead code. I've canonicalized some of the duplication too,
but I want to go through the rest of out OpenSSL code before I really start
trying to remove the duplication.
When this is submitted, I'll fix the other (unrelated) bug the abandoned
change addressed.
Brett Chabot [Tue, 15 Dec 2009 18:59:23 +0000 (10:59 -0800)]
am
173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Merge commit '
173411f7a11c81bef07adc28c66ce4c417df67ff' into eclair-plus-aosp
* commit '
173411f7a11c81bef07adc28c66ce4c417df67ff':
Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Android Git Automerger [Tue, 15 Dec 2009 08:44:44 +0000 (00:44 -0800)]
Merge commit 'goog/eclair-plus-aosp'
Brett Chabot [Mon, 14 Dec 2009 23:49:13 +0000 (15:49 -0800)]
Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Bug
2155700
Change-Id: Ib0f9d363842d713ce3e07cdd303078c5c3e518c9
Android (Google) Code Review [Mon, 14 Dec 2009 22:35:24 +0000 (14:35 -0800)]
Merge change I1d96b51e
* changes:
Merge branch 'archive_888752' into archive_dalvik
Android (Google) Code Review [Mon, 14 Dec 2009 22:33:06 +0000 (14:33 -0800)]
Merge change Icf57d5da
* changes:
Merge branch 'logging_888752' into logging_dalvik
Android (Google) Code Review [Mon, 14 Dec 2009 22:25:09 +0000 (14:25 -0800)]
Merge change Ie84afdff
* changes:
Support running caliper with the jtreg runner. This is an early first look; we'll need to fix a few things before the UI for this is nice.
Jesse Wilson [Thu, 10 Dec 2009 00:29:30 +0000 (16:29 -0800)]
Merge branch 'logging_888752' into logging_dalvik
Conflicts:
libcore/logging/META-INF/MANIFEST.MF
libcore/logging/src/main/java/java/util/logging/LogManager.java
libcore/logging/src/main/java/java/util/logging/Logger.java
libcore/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
Andy McFadden [Sat, 5 Dec 2009 00:36:08 +0000 (16:36 -0800)]
Don't assume debugger wants all exceptions.
The JDWP implementation in the VM keeps a list of the objects that the
debugger knows about, and prevents the GC from collecting them (which
isn't strictly necessary, but it's a whole lot easier than doing it
right). Because of the way it's implemented, it actually ended up
keeping track of all thrown exceptions, even if the debugger wasn't
interested in hearing about them.
With this change we now do a "late" registration of the exception
object, preventing exception-happy code from filling memory when the
debugger is attached.
Android (Google) Code Review [Fri, 11 Dec 2009 20:36:03 +0000 (12:36 -0800)]
Merge change I11aa1bb5
* changes:
Jit: Fix 083-jit-regressions test to omit non-deterministic output
Bill Buzbee [Fri, 11 Dec 2009 17:01:12 +0000 (09:01 -0800)]
Jit: Fix 083-jit-regressions test to omit non-deterministic output
Android (Google) Code Review [Fri, 11 Dec 2009 15:28:04 +0000 (07:28 -0800)]
Merge change I4c691d1a
* changes:
Minor CheckJNI tweak.
Android (Google) Code Review [Fri, 11 Dec 2009 15:27:44 +0000 (07:27 -0800)]
Merge change I909ce240
* changes:
Iterate in JNI thread exit check.
Jesse Wilson [Tue, 8 Dec 2009 23:43:05 +0000 (15:43 -0800)]
Support running caliper with the jtreg runner. This is an early first look;
we'll need to fix a few things before the UI for this is nice.
Andy McFadden [Fri, 11 Dec 2009 00:38:30 +0000 (16:38 -0800)]
Iterate in JNI thread exit check.
The Dalvik VM includes a helpful check that kicks and screams if a thread
exits without detaching from the VM first. It manages this with a pthread
TLS destructor. This is handy, but it will interfere with anyone who
wants to use a TLS destructor to initiate the thread detach.
With this change, we now iterate a couple of times to allow other
destructors a chance to detach the thread before we get snippy.
For
2319072.
Andy McFadden [Thu, 10 Dec 2009 23:11:18 +0000 (15:11 -0800)]
Minor CheckJNI tweak.
Check for "L;" class names, e.g. "Ljava/lang/String;", in CheckJNI. If
we see one passed in, give a specific failure message instead of just
allowing the inevitable NoClassDefFoundError to propagate back.
Also, add a message string to the pre-formed NoClassDefFoundError used
by the bootstrap class loader so that it's obvious where it comes from.
Dan Bornstein [Thu, 10 Dec 2009 23:14:59 +0000 (15:14 -0800)]
am
2859440d: am
c51439a5: Fix a bug where, in static synchronized methods that had no other uses of registers (no locals, no parameters, no method calls with arguments), v0 would be used both to hold the object being synchronized on and to hold a caught exception.
Merge commit '
2859440d31dcb5de958d32a6012c1f8b3c509344'
* commit '
2859440d31dcb5de958d32a6012c1f8b3c509344':
Fix a bug where, in static synchronized methods that had no other uses
Dan Bornstein [Thu, 10 Dec 2009 23:09:50 +0000 (15:09 -0800)]
am
c51439a5: Fix a bug where, in static synchronized methods that had no other uses of registers (no locals, no parameters, no method calls with arguments), v0 would be used both to hold the object being synchronized on and to hold a caught exception.
Merge commit '
c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2' into eclair-mr2-plus-aosp
* commit '
c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2':
Fix a bug where, in static synchronized methods that had no other uses
Android (Google) Code Review [Thu, 10 Dec 2009 23:07:49 +0000 (15:07 -0800)]
Merge change I9388fbfd
* changes:
More java.io.File cleanup.
Elliott Hughes [Thu, 10 Dec 2009 21:18:35 +0000 (13:18 -0800)]
More java.io.File cleanup.
Make File.list (and friends) cost one JNI call instead of four,
and move the conversion of UTF-8 byte sequences into the JNI, so
it returns String[] instead of byte[][].
Switch to readdir_r(3) so we don't need the JNI to be "static
synchronized".
Remove fixed-length buffers from the native code.
Fix leaks by introducing a "proper" native container (similar to
std::forward_list). We should still investigate either using
std::vector or passing in an ArrayList<String> and using JNI to
call ArrayList.add, but this is a step forward from the old
code anyway.
Bug:
2281992
Dan Bornstein [Thu, 10 Dec 2009 22:43:23 +0000 (14:43 -0800)]
am
78199efa: am
39c5899d: Preflight cleanup of Ropper.java for style, whitespace, etc., before doing some more drastic modifications. Also, bumped up the version number, rather than making changes first and then forgetting that important detail.
Merge commit '
78199efa7615ac896c9a116737bb87f3724ead0b'
* commit '
78199efa7615ac896c9a116737bb87f3724ead0b':
Preflight cleanup of Ropper.java for style, whitespace, etc., before doing
Dan Bornstein [Thu, 10 Dec 2009 22:37:32 +0000 (14:37 -0800)]
Fix a bug where, in static synchronized methods that had no other uses
of registers (no locals, no parameters, no method calls with arguments),
v0 would be used both to hold the object being synchronized on and to hold
a caught exception.
The result was code that, if an exception was thrown through it, would
in turn throw an IllegalMonitorStateException, as the vm would be
asked to monitor-exit the exception object and not the monitor-entered
class.
Dx test 062 has a couple new cases to cover this case as well as the
parallel instance method case (not that the latter was problematic,
but I like the symmetry).
Dan Bornstein [Thu, 10 Dec 2009 22:24:02 +0000 (14:24 -0800)]
am
39c5899d: Preflight cleanup of Ropper.java for style, whitespace, etc., before doing some more drastic modifications. Also, bumped up the version number, rather than making changes first and then forgetting that important detail.
Merge commit '
39c5899d0359c386815f5f72991a3a2573135dbd' into eclair-mr2-plus-aosp
* commit '
39c5899d0359c386815f5f72991a3a2573135dbd':
Preflight cleanup of Ropper.java for style, whitespace, etc., before doing
Dan Bornstein [Thu, 10 Dec 2009 21:32:09 +0000 (13:32 -0800)]
Preflight cleanup of Ropper.java for style, whitespace, etc., before doing
some more drastic modifications. Also, bumped up the version number, rather
than making changes first and then forgetting that important detail.
Barry Hayes [Wed, 28 Oct 2009 22:32:19 +0000 (15:32 -0700)]
The disabled code was too late to make eclair, and there were some
bugs on x86, now fixed.
Let's get this into master for some burn-in.
Barry Hayes [Fri, 30 Oct 2009 16:36:08 +0000 (09:36 -0700)]
Remove arrayClass from ClassObject. It seems to get only dozens of hits in
all of Zygote start-up.
There doesn't seem to be a measurable difference in the time printed in:
I/Zygote ( 2247): ...preloaded 1147 classes in NNNNms.
Android (Google) Code Review [Thu, 10 Dec 2009 20:51:37 +0000 (12:51 -0800)]
Merge change I5f6d073a
* changes:
Jit: Save/restore callee-save floating point registers at interpreter entry/exit
Bill Buzbee [Tue, 8 Dec 2009 20:37:13 +0000 (12:37 -0800)]
Jit: Save/restore callee-save floating point registers at interpreter entry/exit
Andy McFadden [Thu, 10 Dec 2009 02:40:18 +0000 (18:40 -0800)]
am
b2c70f2c: (-s ours) am
4d9f9384: DO NOT MERGE - Reduce spin-on-suspend complaints.
Merge commit '
b2c70f2cb70cd3dbdd12b2581447ed1e70a30992'
* commit '
b2c70f2cb70cd3dbdd12b2581447ed1e70a30992':
DO NOT MERGE - Reduce spin-on-suspend complaints.
Elliott Hughes [Thu, 10 Dec 2009 02:40:13 +0000 (18:40 -0800)]
am
0f6512c7: am
3f77d012: Merge change I2ca00c90 into eclair-mr2
Merge commit '
0f6512c7b4dd17177a7fdb521ca440d87b4230ad'
* commit '
0f6512c7b4dd17177a7fdb521ca440d87b4230ad':
Fix dalvik test 063.
Jesse Wilson [Thu, 10 Dec 2009 02:24:19 +0000 (18:24 -0800)]
Merge branch 'archive_888752' into archive_dalvik
Conflicts:
libcore/archive/build.xml
libcore/archive/src/main/java/java/util/jar/JarFile.java
libcore/archive/src/main/java/java/util/zip/GZIPInputStream.java
libcore/archive/src/main/java/java/util/zip/Inflater.java
libcore/archive/src/main/java/java/util/zip/InflaterInputStream.java
libcore/archive/src/main/java/java/util/zip/ZipEntry.java
libcore/archive/src/main/java/java/util/zip/ZipFile.java
libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties
libcore/archive/src/main/native/archive/unix/exports.txt
libcore/archive/src/main/native/archive/unix/makefile
libcore/archive/src/main/native/archive/windows/makefile
libcore/archive/src/main/native/archive_copyright.c
libcore/archive/src/main/native/jarfile.c
libcore/archive/src/main/native/java_util_zip_Deflater.c
libcore/archive/src/main/native/zip.c
libcore/archive/src/main/native/zipcache.c
libcore/archive/src/main/native/zlib/unix/makefile
libcore/archive/src/main/native/zlib/windows/makefile
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AllTests.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarInputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/Pack200Test.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterOutputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java
Elliott Hughes [Thu, 10 Dec 2009 00:05:29 +0000 (16:05 -0800)]
Implement DTDHandler support for ExpatParser.
Every time a third-party developer gets their DefaultHandler method signatures
wrong (making it impossible for us to call them), they see this in the log and
complain that SAX parsing is broken on Android:
WARN/ExpatReader(704): DTD handlers aren't supported.
This patch adds that support -- even though no-one wants it -- so we can get
rid of the irrelevant log message.
Andy McFadden [Wed, 9 Dec 2009 23:59:48 +0000 (15:59 -0800)]
am
4d9f9384: DO NOT MERGE - Reduce spin-on-suspend complaints.
Merge commit '
4d9f9384999b14acc996ed621e1205b389845f13' into eclair-mr2-plus-aosp
* commit '
4d9f9384999b14acc996ed621e1205b389845f13':
DO NOT MERGE - Reduce spin-on-suspend complaints.
Elliott Hughes [Wed, 9 Dec 2009 23:40:55 +0000 (15:40 -0800)]
am
3f77d012: Merge change I2ca00c90 into eclair-mr2
Merge commit '
3f77d0127a34798cfede935331c10c1e57ec0ff7' into eclair-mr2-plus-aosp
* commit '
3f77d0127a34798cfede935331c10c1e57ec0ff7':
Fix dalvik test 063.
Elliott Hughes [Wed, 9 Dec 2009 08:44:31 +0000 (00:44 -0800)]
Fix java.util.Formatter formatting of -0.0.
The active ingredient here is the two changes to stop comparing longValue
with doubleValue and formatting the long if the two compare equal. This
causes us to lose the sign of 0 (because there's no long -0, but -0.0d == 0).
Instead, we explicitly test for boxed Double and Float arguments (because
the number of integral types is larger, they get the "else" clause).
The other changes are just minor cosmetic changes made as I followed the code.
Bug found by jtreg, so no new test.
Andy McFadden [Thu, 3 Dec 2009 01:03:41 +0000 (17:03 -0800)]
DO NOT MERGE - Reduce spin-on-suspend complaints.
The first complaint is popping up too quickly, and the pile of log
messages it emits aren't helping the process do real work. This
skips the complaining if we just finished the first (0.25 sec) sleep.
(merged back from master)
Android (Google) Code Review [Wed, 9 Dec 2009 00:34:19 +0000 (16:34 -0800)]
Merge change I7bdddfb1
* changes:
Improve the FileNotFoundExceptions thrown by OSFileSystem.open.
Elliott Hughes [Tue, 8 Dec 2009 23:41:35 +0000 (15:41 -0800)]
Improve the FileNotFoundExceptions thrown by OSFileSystem.open.
When I improved the internals of java.io.File, I failed to keep
OSFileSystem.open (which uses the internals of java.io.File) in
sync, leading to misleading error reporting. java.io.File's
internals now include a trailing NUL, which is useful for the
native code but confuses Java if it tries to decode the byte[]
as a UTF-8 sequence.
This patch fixes the bug and also improves OSFileSystem.open's
error reporting to include the reason for the failure.
Bug:
2313271
Dan Bornstein [Tue, 8 Dec 2009 22:51:58 +0000 (14:51 -0800)]
am
66cbe5b1: am
bf1bb914: am
4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.
Merge commit '
66cbe5b10e3bd9f7b3c262a2ec8a3c11087baa80'
* commit '
66cbe5b10e3bd9f7b3c262a2ec8a3c11087baa80':
Two exception-related tweaks: (1) Make the dynamic exception construction
Elliott Hughes [Tue, 8 Dec 2009 21:20:29 +0000 (13:20 -0800)]
Fix build.
Android (Google) Code Review [Tue, 8 Dec 2009 21:04:55 +0000 (13:04 -0800)]
Merge change I8cdf9790
* changes:
Take Locale into account in java.util.Formatter uppercase conversions.
Elliott Hughes [Tue, 8 Dec 2009 19:52:21 +0000 (11:52 -0800)]
Take Locale into account in java.util.Formatter uppercase conversions.
(This is an RI incompatibility, but Sun accepts that the RI's behavior is a
bug.)
Bug:
2301938
Android (Google) Code Review [Tue, 8 Dec 2009 15:21:26 +0000 (07:21 -0800)]
Merge change Id40223ec
* changes:
Convert an assert() into a real test.
Android (Google) Code Review [Tue, 8 Dec 2009 01:32:14 +0000 (17:32 -0800)]
Merge change I2ca00c90 into eclair-mr2
* changes:
Fix dalvik test 063.
Elliott Hughes [Tue, 8 Dec 2009 01:20:53 +0000 (17:20 -0800)]
Fix dalvik test 063.
Avoid a race by sleeping so the code we're examining gets to run before we
query its state.
Bug:
2310700
Dan Bornstein [Tue, 8 Dec 2009 01:02:10 +0000 (17:02 -0800)]
am
bf1bb914: am
4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.
Merge commit '
bf1bb914a62c65eb8304ce1d86e8ff2dd4f5c79b' into eclair-mr2-plus-aosp
* commit '
bf1bb914a62c65eb8304ce1d86e8ff2dd4f5c79b':
Two exception-related tweaks: (1) Make the dynamic exception construction
Dan Bornstein [Tue, 8 Dec 2009 00:58:08 +0000 (16:58 -0800)]
am
4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.
Merge commit '
4a888b09be2ade9fc5bb0137f702b3be889679a9' into eclair-plus-aosp
* commit '
4a888b09be2ade9fc5bb0137f702b3be889679a9':
Two exception-related tweaks: (1) Make the dynamic exception construction
Dan Bornstein [Tue, 8 Dec 2009 00:57:31 +0000 (16:57 -0800)]
am
4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.
Merge commit '
4a888b09be2ade9fc5bb0137f702b3be889679a9' into eclair-mr2
* commit '
4a888b09be2ade9fc5bb0137f702b3be889679a9':
Two exception-related tweaks: (1) Make the dynamic exception construction
Dan Bornstein [Mon, 7 Dec 2009 23:46:23 +0000 (15:46 -0800)]
Two exception-related tweaks: (1) Make the dynamic exception construction
mechanism be able to handle exception constructors that take Object instead
of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.
Change-Id: Ie5ce680c30043a4b186e59d7c8883666648b2c87
Andy McFadden [Mon, 7 Dec 2009 23:35:51 +0000 (15:35 -0800)]
Convert an assert() into a real test.
We occasionally see an assertion failure on some debug builds that
indicates a thread is being examined by the GC while still running.
This turns the assertion into an always-enabled test with verbose
logging and a VM abort.
Android (Google) Code Review [Mon, 7 Dec 2009 21:26:09 +0000 (13:26 -0800)]
Merge change I78b1acb6
* changes:
More java.io.File cleanup.
Elliott Hughes [Sun, 6 Dec 2009 04:27:37 +0000 (20:27 -0800)]
More java.io.File cleanup.
Remove the duplication between the various list and listFiles methods.
This also makes the variants that take a filter no less efficient than
those that don't, for the special case of the null filter.
The upstream code sometimes assumed returned filenames were UTF-8, and
at other times assumed returned filenames were in the platform encoding.
The new code always uses UTF-8, to match filenames sent to the operating
system, which were and are always sent as UTF-8 byte sequences.
This patch does not alter the native listImpl method. That's for the
next patch.
A couple of unrelated cosmetic changes have been made in this patch:
declarations of native methods have been moved next to the methods
they implement, and a minor simplification has been made to the
documentation of isAbsolute.
Bug:
2281992
Android (Google) Code Review [Mon, 7 Dec 2009 18:21:42 +0000 (10:21 -0800)]
Merge change I01c5bfe3
* changes:
Jit: 2nd attempt at fix for [Issue
2302318] Crash during spin-on-suspend
Bill Buzbee [Fri, 4 Dec 2009 21:17:36 +0000 (13:17 -0800)]
Jit: 2nd attempt at fix for [Issue
2302318] Crash during spin-on-suspend
Logic on the 1st attempt was a little off, preventing some invokes from
getting chaining cells.
Android (Google) Code Review [Sun, 6 Dec 2009 03:47:49 +0000 (19:47 -0800)]
Merge change I76f1dbe7
* changes:
More java.io.File cleanup.
Elliott Hughes [Sat, 5 Dec 2009 18:49:20 +0000 (10:49 -0800)]
More java.io.File cleanup.
Mostly cosmetic: improve documentation, factor out the code to join two
strings into a path, put fields in canonical order, defer to String (which
might be able to perform optimizations we can't), simplify the path
cleaning code.
Also remove more unused Windows support (since our File is already totally
broken on Windows anyway).
Bug:
2281992
Elliott Hughes [Sat, 5 Dec 2009 17:47:23 +0000 (09:47 -0800)]
Improve TimeZone documentation.
We can't do anything about the RI's unfortunate choice of method names,
but improving our documentation might help reduce the confusion they
cause.
Bug:
2244560
Android (Google) Code Review [Sat, 5 Dec 2009 17:15:50 +0000 (09:15 -0800)]
Merge change I97af6ec8
* changes:
More java.io.File cleanup.
Elliott Hughes [Fri, 4 Dec 2009 23:06:58 +0000 (15:06 -0800)]
More java.io.File cleanup.
Two changes:
1. Change the createNewFile JNI to match the Java interface, so we can lose the
glue. (Also make the Java/JNI names match, and sort the table of native method
names alphabetically.)
2. Fix the caching of the path byte sequence so we're caching the exact byte
sequence we want to hand to JNI. Also switch to caching the byte[] at
construction time, rather than hiding it behind an accessor.
There's a deliberate functional change here too: previously we were inconsistent
about which encoding was in use. Sometimes it was explicitly UTF-8, other times
the default platform encoding (which happens to be UTF-8 on Android). Now we
always use UTF-8. (But note that the File.list methods, which I haven't got to
yet, still return a mix of UTF-8 and platform-encoded strings.)
Bug:
2281992
Android (Google) Code Review [Sat, 5 Dec 2009 00:32:24 +0000 (16:32 -0800)]
Merge change Ia8ff1644
* changes:
Fix two trivial Formatter bugs (found by jtreg).
Elliott Hughes [Fri, 4 Dec 2009 01:24:54 +0000 (17:24 -0800)]
Fix two trivial Formatter bugs (found by jtreg).
jtreg complains that we allow "%<%" and "%<n". This patch disallows
the special "last argument" case to conversions that don't take
arguments.
We also reject explicitly-numbered arguments such as "%123$n" or
"%123$%" (whether or not a corresponding argument was provided) though
the RI ignores such errors. I've modified the harmony tests to stop
passing unused argument indexes to %n and %%.
This fixes about 80 jtreg complaints (the java/util/Formatter/Basic test is
generated by shell script and seems to accidentally repeat many of the same
tests over and over).
This patch also includes a little more tidying for readability, but
no other functional changes.
Android (Google) Code Review [Fri, 4 Dec 2009 22:43:30 +0000 (14:43 -0800)]
Merge change I9bb3f193
* changes:
Add new(-ish) Dalvik opcodes to Opcodes.java.
Andy McFadden [Fri, 4 Dec 2009 21:43:01 +0000 (13:43 -0800)]
Add new(-ish) Dalvik opcodes to Opcodes.java.
This is a public API change.
Android (Google) Code Review [Fri, 4 Dec 2009 21:04:35 +0000 (13:04 -0800)]
Merge change I85442b60
* changes:
Android ICU4.2.1 upgrade. For detail of dalvik changes, please see: https://docs.google.com/a/google.com/View?docid=0AfZlO7RuiBh5Y2NmMjdndmJfNDVmNWM2cGY0NQ&hl=en
Bill Buzbee [Fri, 4 Dec 2009 20:39:42 +0000 (12:39 -0800)]
Reverting [master] Change I85dd4a66: (platform/dalvik)
Andy McFadden [Fri, 4 Dec 2009 19:30:04 +0000 (11:30 -0800)]
am
ca77c603: am
a7745f97: Remove "unused" opcodes from API.
Merge commit '
ca77c6035fcce6ed9653ee1bed1753bff99e3d89'
* commit '
ca77c6035fcce6ed9653ee1bed1753bff99e3d89':
Remove "unused" opcodes from API.
Elliott Hughes [Fri, 4 Dec 2009 19:30:00 +0000 (11:30 -0800)]
am
b90871f4: (-s ours) am
5d26339a: DO NOT MERGE: backport the IPv6 NetworkInterface/multicast fixes.
Merge commit '
b90871f4c638ce83137adea74b66dd3eca907cfe'
* commit '
b90871f4c638ce83137adea74b66dd3eca907cfe':
DO NOT MERGE: backport the IPv6 NetworkInterface/multicast fixes.
Andy McFadden [Fri, 4 Dec 2009 19:24:26 +0000 (11:24 -0800)]
am
a7745f97: Remove "unused" opcodes from API.
Merge commit '
a7745f9734870e8750d8488b6563f80e0ecdcdcf' into eclair-mr2-plus-aosp
* commit '
a7745f9734870e8750d8488b6563f80e0ecdcdcf':
Remove "unused" opcodes from API.
Android (Google) Code Review [Fri, 4 Dec 2009 19:00:33 +0000 (11:00 -0800)]
Merge change I85dd4a66
* changes:
Jit: Fix for [Issue
2302318] Crash during spin-on-suspend testing
Andy McFadden [Fri, 4 Dec 2009 15:31:13 +0000 (07:31 -0800)]
Remove "unused" opcodes from API.
There's no need to have constants like OP_UNUSED_FF in the API. They
serve no purpose, and it makes life confusing when an opcode is defined
(does the "unused" one go away, breaking the API? do we have the real
definition and the "unused" definition simultaneously?).
Discussed / approved by API council.
Android (Google) Code Review [Fri, 4 Dec 2009 15:21:41 +0000 (07:21 -0800)]
Merge change I7d18e38e
* changes:
Added additional DEX checksum.
Bill Buzbee [Thu, 3 Dec 2009 23:09:32 +0000 (15:09 -0800)]
Jit: Fix for [Issue
2302318] Crash during spin-on-suspend testing
This was an amusing bug: the test case simulated a daemon by falling
into an empty loop-forever. The trace selector treats unconditional
branches as NOPs, and proceeded to repeatedly add the same "branch to self"
instruction to the trace until it reached max trace size. The compiler
got confused, and died.
Android (Google) Code Review [Fri, 4 Dec 2009 00:32:56 +0000 (16:32 -0800)]
Merge change I6d8a640c
* changes:
Make java.util.Formatter perform acceptably (and fix two jtreg failures).
Andy McFadden [Fri, 4 Dec 2009 00:08:36 +0000 (16:08 -0800)]
Added additional DEX checksum.
We have a checksum on the base DEX data, but not on the stuff that
dexopt appends. If a flash block goes "funny" we might not be able to
detect the problem. This change adds a checksum field to the
"optimized" header.
The new checksum is verified under the same circumstances as the base
DEX checksum: when you use "dexdump", and when you enable additional
checking with -Xcheckdexsum (or the property dalvik.vm.check-dex-sum
is set to "true").
For bug
2255640.
Android (Google) Code Review [Thu, 3 Dec 2009 21:44:04 +0000 (13:44 -0800)]
Merge change I1ede83b7
* changes:
Reduce spin-on-suspend complaints.
Elliott Hughes [Wed, 2 Dec 2009 21:35:29 +0000 (13:35 -0800)]
Make java.util.Formatter perform acceptably (and fix two jtreg failures).
Here are the slowdowns compared to hand-written StringBuilder.append code,
for three cases: a long format string with no format specifiers, a long
format string with a single %d, and a long format string with a
single %s (in that order):
passion-old: 54x 40x 10x
sim-new: 1.7x 3.4x 5.3x
passion-new: 9.2x 2.2x 1.8x
Formatter has been changed to use a less expensive mechanism for parsing
the format string, to not create expensive temporary objects unless they're
actually needed (particularly strings used only in error messages), to not
create a temporary StringBuilder in every transform* method, and to not
charge for padding (or truncation) unless actually required.
As Stroustrup would say, "you don't pay for what you don't use".
Other changes:
AbstractStringBuilder adds a special case for appending one StringBuilder to
another, similar to its existing special case for String (because we do a
much better job of copying a char[] with System.arraycopy than iterating over
a CharSequence).
Character reinstates the ASCII-range optimizations for isDigit and
isUpperCase, both of which are used by Formatter. Bug
2295801 covers
reinstating the rest of Character's special cases.
String loses the unused inner class ConsolePrintStream, which isn't actually
relevant to this change, but offended me greatly.
CharBuffer gets a rewritten toString that's less inefficient. (This doesn't
matter to us because the new Formatter doesn't use CharBuffer, but one
shouldn't leave broken glass on the lawn.)
The change to Formatter.close fixes a jtreg failure (and brings our
implementation in line with our documentation, which already stated that
multiple calls to Formatter.close only close the underlying Closeable
once).
The change to Formatter.format(Locale, ...) fixes a jtreg failure: any
Formattable we call out to needs to be able to use Formatter.locale to
find out the locale it's formatting for. I've reworded the documentation
so that it's clearer (it was already correct, but ambiguous).
Bug:
2272346
Andy McFadden [Thu, 3 Dec 2009 01:03:41 +0000 (17:03 -0800)]
Reduce spin-on-suspend complaints.
The first complaint is popping up too quickly, and the pile of log
messages it emits aren't helping the process do real work. This
skips the complaining if we just finished the first (0.25 sec) sleep.
Android (Google) Code Review [Thu, 3 Dec 2009 18:09:30 +0000 (10:09 -0800)]
Merge change I909b4182
* changes:
Jit: Fix for
2187020, bad exception recovery from native invoke static
Bill Buzbee [Thu, 3 Dec 2009 17:56:50 +0000 (09:56 -0800)]
Jit: Fix for
2187020, bad exception recovery from native invoke static
Android (Google) Code Review [Thu, 3 Dec 2009 15:26:10 +0000 (07:26 -0800)]
Merge change I352c5d87
* changes:
Rudimentary JNI method arg checking.
Jesse Wilson [Thu, 3 Dec 2009 01:58:26 +0000 (17:58 -0800)]
More jtreg+JUnit love. Getting JUnit to work off-device.
Also fixing the number of threads used by the driver.
Android (Google) Code Review [Thu, 3 Dec 2009 00:58:33 +0000 (16:58 -0800)]
Merge change I147cfdcf
* changes:
JUnit support for jtreg runner. This makes it so that a single command will compile a focused set of tests, install them on the device, and run them.
Jesse Wilson [Wed, 2 Dec 2009 01:33:27 +0000 (17:33 -0800)]
JUnit support for jtreg runner. This makes it so that a single command
will compile a focused set of tests, install them on the device, and
run them.
There are still some features missing in the current test runner:
- it requires JUnit to be compiled manually "mmm external/junit". I'm
trying to figure out why our build system cannot find it.
- it requires the full test suite already be on the device. This is
necessary for the support test files and annotations. I intend to
create a follow up change to move those into a smaller target.
For now "mmm dalvik snod" will build these.
- JUnit test expectations are at the class level, not the method level.
I don't yet have a mechanism to introspect the .java file from JUnit
to get its method-level detail.
- jtreg tests can only be run as a directory, not as a single test.
Android (Google) Code Review [Thu, 3 Dec 2009 00:03:32 +0000 (16:03 -0800)]
Merge change I310502fa
* changes:
Enable CheckJNI on core tests.
Andy McFadden [Wed, 2 Dec 2009 23:50:09 +0000 (15:50 -0800)]
Enable CheckJNI on core tests.
This adds -Xcheck:jni to the core test command line. The tests will run
a bit more slowly when native code is involved, but I don't think we're
doing any performance testing in here, and the extra JNI testing is
useful.