summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve documentation about the user's default locale.Elliott Hughes2010-04-1316-214/+163
| | | | | | | | | | Add a bit of text to Locale's class documentation, and include a link from every method that uses Locale.getDefault(). Also try to consistently say "user's default locale", as a subliminal hint that this isn't necessarily the developer's locale, nor en_US. Bug: 2593000 Change-Id: Ieebe864ed6b9fecbfef5d5415269299739cedd1b
* Fix String.toLowerCase and toUpperCase.Elliott Hughes2010-04-137-202/+196
| | | | | | | | | | | | | | | Rather than try to cope with Lithuanian, let's just hand that one to ICU4C. I've removed my hand-crafted Azeri/Turkish lowercasing too, in favor of ICU. Presence of a high surrogate (which implies a supplemental character) is a good reason to hand over to ICU too. On the uppercasing side, I've kept our existing hard-coded table and just added code to defer to ICU for Azeri, Lithuanian, and Turkish (plus supplemental characters). I don't like the tables, but I don't have proof that they're incorrect. Bug: 2340628 Change-Id: I36b556b0444623a5aacc1afc58ebb4d84211d3dc
* Fix supplementary character support.Elliott Hughes2010-04-121-40/+44
| | | | | | | | | | Fixes all known bugs in our handling of supplementary characters. This change introduces a performance regression on the assumption that it won't be released without a corresponding JIT change to enable the code to be inlined back to pretty much what it used to be. Bug: 2587122 Change-Id: I3449c9718bbe32ebe53b6c10454ae1dc82105b59
* Merge "Throw the same exceptions as the RI from String methods." into dalvik-devElliott Hughes2010-04-121-6/+5
|\
| * Throw the same exceptions as the RI from String methods.Elliott Hughes2010-04-101-6/+5
| | | | | | | | | | | | | | | | | | | | | | String has its own StringIndexOutOfBoundsException subclass of IndexOutOfBoundsException. We can run more tests if we behave the same. The RI only admits to IndexOutOfBoundsException, though, so our documentation and throws clause shouldn't change. Change-Id: Ib87777f8a42d4bcac21e8f8f00f4dcbc0ada4201
* | Merge commit '7dbf57f6' into manualmergeBrian Carlstrom2010-04-101-1/+2
|\ \ | |/ |/| | | | | | | | | Conflicts: libcore/x-net/src/main/native/org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp Change-Id: I7cf63f6a1ca7c7604301cb8bb947633ad704a2c0
| * am 5fdfbeff: Fix SSL_shutdown error reporting to print a proper error ↵Brian Carlstrom2010-04-101-1/+2
| |\ | | | | | | | | | instead of "Ok"
| | * Fix SSL_shutdown error reporting to print a proper error instead of "Ok"Brian Carlstrom2010-04-091-1/+2
| | | | | | | | | | | | | | | | | | There are other problematic error reporting cases to be fixed later, but this one seems to be the frequently occuring. Change-Id: Ia5910cffb60cc694066be03d43ac1bb7eab47357
* | | Merge "Fix build by turning a comment into a doc comment. Clarify logic." ↵Elliott Hughes2010-04-101-10/+8
|\ \ \ | | | | | | | | | | | | into dalvik-dev
| * | | Fix build by turning a comment into a doc comment. Clarify logic.Elliott Hughes2010-04-091-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now I see what jessewilson was trying to say earlier; rewrite the post-loop code to say what I guess it was aiming at, which is avoiding an add followed by a remove in the not completely uncommon case where limit == 0 and the regular expression is a terminator rather than a true separator ('\n', say). (Normally the regular expression is a true separator so there will be no trailing empty string even though limit is 0: "a,b,c".split(","), for example.) Also, String.isEmpty is our fasest way of recognizing the empty string; certainly better than equals(""). Change-Id: I82f4ec49fa58efc178e342cf55d4dfbbdad01c75
* | | | Merge "Make String.split 10x faster." into dalvik-devElliott Hughes2010-04-095-66/+139
|\ \ \ \ | |/ / /
| * | | Make String.split 10x faster.Elliott Hughes2010-04-095-66/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all uses of String.split in the Android codebase use trivial single literal character separators. This patch optimizes that case to avoid the use of regular expressions entirely. The 10x speedup isn't the whole story, because the speedup is really proportional to the number of separators in the input. 10x is easily achievable, but the speedup could be arbitrarily high. Before: benchmark us logarithmic runtime PatternSplitComma 84.8 XXXXXXXXXXXXXX|||||||||||||| PatternSplitLiteralDot 85.0 XXXXXXXXXXXXXX|||||||||||||| StringSplitComma 166.3 XXXXXXXXXXXXXXXXXXXXXXXXXXXX| StringSplitHard 173.6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX StringSplitLiteralDot 167.7 XXXXXXXXXXXXXXXXXXXXXXXXXXXX| After: benchmark us logarithmic runtime PatternSplitComma 18.9 XXX||||||||||||||||||||| PatternSplitLiteralDot 19.0 XXX||||||||||||||||||||| StringSplitComma 18.8 XXX||||||||||||||||||||| StringSplitHard 174.2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX StringSplitLiteralDot 18.8 XXX||||||||||||||||||||| (The benchmarks starting "Pattern" use a precompiled Pattern for performance. Those starting "String" use String.split and would traditional entail a temporary Pattern. As you can see, creating Patterns is very expensive for us, and each one throws a finalizer spanner in the GC works too. The new fast path avoids all this. I'll commit the benchmark -- along with all the others I've ever used -- to http://code.google.com/p/dalvik this afternoon.) Tests? We actually pass _more_ tests after this patch, because the increase in performance means we don't hit timeouts. Change-Id: I404298e21a78d72cf5ce6ea675844bf251e3825b
* | | | Merge "Latest java.util.concurrent from the JSR 166 project." into dalvik-devJesse Wilson2010-04-09106-10419/+30243
|\ \ \ \
| * | | | Latest java.util.concurrent from the JSR 166 project.Jesse Wilson2010-04-09106-10419/+30243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code was downloaded from CVS on 2010-april-7 at 10:00pst http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/ The new interfaces and ArrayDeque class are all from Harmony.
* | | | | Disable our new javax.net.ssl tests until hangs are resolvedBrian Carlstrom2010-04-091-1/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the hangs all seem to happen during handshaking, there is more than one root cause. Until I have things working reliably, disabling the tests to avoid fouling up the continuous build. Change-Id: Ia57cac2e49284a1050a72d9ea77813307eff5ea8
* | | | Merge "An InlineNative for String.isEmpty, so it's not slower than length() ↵Elliott Hughes2010-04-091-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | == 0." into dalvik-dev
| * | | | An InlineNative for String.isEmpty, so it's not slower than length() == 0.Elliott Hughes2010-04-081-0/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: benchmark ns logarithmic runtime IsEmpty 115 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX LengthEqualsZero 21 XXXXX|||||||||||||| With C intrinsic: IsEmpty 30 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX LengthEqualsZero 20 XXXXXXXXXXXXXXXXXXXX|||||| With assembler intrinsic: IsEmpty 15 XXXXXXXXXXXXXXXXXXXX|||||| LengthEqualsZero 21 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (All times on passion.) Change-Id: Ifcc37fe7b8efdd377675a448e0085e490d6767bc
* | | | Merge "Move the furniture around some more." into dalvik-devAndy McFadden2010-04-090-0/+0
|\ \ \ \ | |/ / / |/| | |
| * | | Move the furniture around some more.Andy McFadden2010-04-080-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly just moving things around, with minor changes to behavior. - Instead of walking through all classes twice (once for verification, once for optimization), we now walk through them once and do both operations on a given class before moving on to the next. - If verification and optimization were disabled, the VM used a special "no fork + exec" path. It adds complexity for little benefit, so it's gone. - Reduced the amount of stuff being passed as arguments through multiple layers of functions. Notably, a pointer to a read-only lookup table is now accessed via a global. - The PROFILE_FIELD_ACCESS define now just blocks the quickening of field accesses instead of blocking all optimizations. (Not sure this is worth keeping around.) Change-Id: I7f7c658e3b682c7251cdf17cae58d79bd04ba2a0
* | | | Merge "resolved conflicts for merge of 19252faf to dalvik-dev" into dalvik-devElliott Hughes2010-04-081-32/+10
|\ \ \ \
| * \ \ \ resolved conflicts for merge of 19252faf to dalvik-devElliott Hughes2010-04-081-32/+10
| |\ \ \ \ | | | |/ / | | |/| | | | | | | Change-Id: Ibf429f9d9d048c01cb8f33b15e8b404d83138b74
| | * | | Disable System.setSecurityManager.Elliott Hughes2010-04-081-34/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We plan on removing SecurityManager checks, which are expensive and non-useful, especially because Android doesn't use SecurityManager itself. As a first step, let's ship a release where it's no longer possible to set a SecurityManager. Bug: 1320501 Change-Id: I88664dbc1d8b087579d54003a1aaed7b3d8412be
* | | | | Merge "Show a summary of failures at the end of a vogar run." into dalvik-devElliott Hughes2010-04-082-0/+13
|\ \ \ \ \
| * | | | | Show a summary of failures at the end of a vogar run.Elliott Hughes2010-04-082-0/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Super-useful when running a large batch of jtreg tests, and also useful for comparing against an earlier run (though hopefully we'll have a better solution for that eventually). Change-Id: I144f72ea1ae5240393b0b33193d7773537b7ee20
* | | | | Merge "Fixing javax.net.ssl test failures on RI" into dalvik-devBrian Carlstrom2010-04-083-5/+13
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fixing javax.net.ssl test failures on RIBrian Carlstrom2010-04-083-5/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vogar wasn't working at checkin on the host so I couldn't easily retest these changes that came from the code review. Sure enought there were some problems. SSLSocketTest now uses a condition variable to synchronize between the HandshakeCompletedListener and the main thread since the RI does the callback asynchronously. Back to ussing Arrays.equals for comparing Session ID byte[] since Object.equals does not work. Change-Id: I667b60dc065438efe4e3728d7a44b446ebc15e64
* | | | Merge "Add Java 6's new java.util.zip API." into dalvik-devElliott Hughes2010-04-0811-36/+1258
|\ \ \ \
| * | | | Add Java 6's new java.util.zip API.Elliott Hughes2010-04-0811-36/+1258
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This passes all but four of the harmony tests. The others fail because our Deflater works differently to theirs; we already fail the corresponding Deflater test. The only jtreg test for ZipError neither passes nor fails: it appears that this can only be thrown on Windows. Bug: 2497395 Change-Id: I79687495da42507dda692c890ec939bdbc9be2b3
* | | | am 214e2855: am 5dde0c4d: Merge "Adding support for hash \'#\' comments to ↵Jesse Wilson2010-04-083-30/+70
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | our JSON parser." into froyo Merge commit '214e285536e18e762c3207fecf97dacdd22e472e' into dalvik-dev * commit '214e285536e18e762c3207fecf97dacdd22e472e': Adding support for hash '#' comments to our JSON parser.
| * | | am 5dde0c4d: Merge "Adding support for hash \'#\' comments to our JSON ↵Jesse Wilson2010-04-063-30/+70
| |\ \ \ | | | |/ | | |/| | | | | parser." into froyo
| | * | Merge "Adding support for hash '#' comments to our JSON parser." into froyoJesse Wilson2010-04-063-30/+70
| | |\ \
| | | * | Adding support for hash '#' comments to our JSON parser.Jesse Wilson2010-04-063-30/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am abfb34bc: am c7b7edf7: Merge "Trivial doc change: froyo is 2.2." into froyoAndy McFadden2010-04-080-0/+0
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | | | | | | | | | Merge commit 'abfb34bcda2e2320121850a9cb5b10e8f10e9833' into dalvik-dev * commit 'abfb34bcda2e2320121850a9cb5b10e8f10e9833': Trivial doc change: froyo is 2.2.
| * | | am c7b7edf7: Merge "Trivial doc change: froyo is 2.2." into froyoAndy McFadden2010-04-060-0/+0
| |\ \ \ | | |/ /
| | * | Merge "Trivial doc change: froyo is 2.2." into froyoAndy McFadden2010-04-060-0/+0
| | |\ \
| | | * | Trivial doc change: froyo is 2.2.Andy McFadden2010-04-060-0/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Icce3770dd318ec8853d5120c13a85656ed1171ea
* | | | | Trivial doc change: froyo is 2.2.Andy McFadden2010-04-070-0/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Icce3770dd318ec8853d5120c13a85656ed1171ea
* | | | | Merge "Fixing a vogar issue where outcomes weren't making their way into ↵Jesse Wilson2010-04-071-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | XML." into dalvik-dev
| * | | | | Fixing a vogar issue where outcomes weren't making their way into XML.Jesse Wilson2010-04-071-0/+1
| | | | | |
* | | | | | Merge "Bring the latest Caliper (r102) into vogar." into dalvik-devJesse Wilson2010-04-071-0/+0
|\ \ \ \ \ \
| * | | | | | Bring the latest Caliper (r102) into vogar.Jesse Wilson2010-04-071-0/+0
| |/ / / / /
* | | | | | Merge "Correct long-standing thread status change bug." into dalvik-devAndy McFadden2010-04-070-0/+0
|\ \ \ \ \ \
| * | | | | | Correct long-standing thread status change bug.Andy McFadden2010-04-060-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the stars aligned correctly (or you were running valgrind), it was possible for a thread to change its status to RUNNING immediately after having its suspend count incremented. The problem is that the thread initiating the suspension regards the target thread as being in (say) VMWAIT with sCount=1, which means its safe to kick off a GC. The target thread thinks it's happily in RUNNING and can go do whatever it wants. The fix is to move the status change so that it's guarded by the suspension count mutex. This shouldn't affect performance. The number of instructions executed is about the same. Also, the "self can be NULL" feature of dvmCheckSuspendPending had very few customers, so we now skip that check and just require it to be set. For bug 2309331. Change-Id: Id512e16e321515a467c20b382c85017cef9cea4d
* | | | | | | Merge "Rearrange some things." into dalvik-devAndy McFadden2010-04-070-0/+0
|\ \ \ \ \ \ \
| * | | | | | | Rearrange some things.Andy McFadden2010-04-060-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits DexOptimize into DexPrepare (which deals with file shuffling and fork/exec) and Optimize (which does the actual quickening of instructions). The Optimize functions are now effectively private to the "analysis" directory. Twiddled some comments. No substantive code changes. Change-Id: Ia51865b259fb32822132e2373997866e360ca86a
* | | | | | | | Merge "Adding support for command line args to vogar-initiated processes." ↵Jesse Wilson2010-04-0612-72/+113
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into dalvik-dev
| * | | | | | | | Adding support for command line args to vogar-initiated processes.Jesse Wilson2010-04-0612-72/+113
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also adding monitor timeouts for use by the continuous build. From the huge number of files in this relatively simple CL, it's becoming clear that we need to simplify vogar's internals!
* | | | | | | | Fix build by adding missing imports.Elliott Hughes2010-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I433778b02d3ad67090ee88444700f79b3138d778
* | | | | | | | Merge "Actually use ServiceLoader in places where we had a hard-coded ↵Elliott Hughes2010-04-064-235/+63
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | equivalent." into dalvik-dev
| * | | | | | | | Actually use ServiceLoader in places where we had a hard-coded equivalent.Elliott Hughes2010-04-064-235/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've also removed a file that was causing us to use this code unnecessarily at run-time to explicitly specify the built-in default PreferencesFactory. I haven't touched Charset, but should come back and fix that too at some point. Change-Id: I3a2145041d048078bdb55ae7b8fa4ec9d8726922