OSDN Git Service
Andy McFadden [Wed, 19 Aug 2009 14:21:41 +0000 (07:21 -0700)]
Progress toward indirect JNI references.
Switch from simple typecasts to conversion functions for the objects
passed in and out of JNI calls. No real change here; object references
are still just pointers.
Use explicit pin/unpin calls for primitive arrays. For GetStringChars
we now pin the char[] rather than the String object. (Which doesn't
make much difference in the grand scheme of things, since you need to
keep the String to pass into the release function anyway.)
Lorenzo Colitti [Tue, 18 Aug 2009 23:14:33 +0000 (16:14 -0700)]
Enable IPv6.
If the system has IPv6 connectivity, query the DNS for IPv6 addresses as well
as IPv4 addresses. If IPv6 addresses are returned, prefer them by default.
Impact of this change:
- If the device is on a network with IPv6 configured, is using wifi, and has
obtained an IPv6 address using autoconfiguration, the network stack will
request IPv6 addresses as well as IPv4 addresses when making DNS queries. This
allows the device to connect to websites and services that declare themselves
to be reachable over IPv6. If an IPv6 connection fails, the stack will fall
back to IPv4. This is what Windows Vista, Mac OS 10.4 and above, and most
Linux distributions do by default.
- If the device is not on a network that supports IPv6, or is using 3G/EVDO,
nothing will change.
I have been testing this change on self-compiled builds of master and eclair on
Dream and Sholes for several weeks with no breakage that I can see.
Android (Google) Code Review [Tue, 18 Aug 2009 22:37:06 +0000 (15:37 -0700)]
Merge change 21796 into eclair
* changes:
Turn down RegisterMap paranoia.
Andy McFadden [Tue, 18 Aug 2009 22:32:27 +0000 (15:32 -0700)]
Minor tweaks to JNI logging.
Reduced a LOGI to LOGD, normalized format, added a similar message for a
field ID lookup that was failing (due to a bad flash, as it turns out).
Andy McFadden [Tue, 18 Aug 2009 22:11:35 +0000 (15:11 -0700)]
Turn down RegisterMap paranoia.
This disables verification of RegisterMap contents and compressed
output, as well as a GC-time check that double-checked the validity of a
register known to hold a reference.
For internal bug
1896437.
Brett Chabot [Tue, 18 Aug 2009 17:59:02 +0000 (10:59 -0700)]
am
affecd77: Cleanup CTS core failing tests.
Merge commit '
affecd7714e14fabff011ad61d436df3698bf7eb' into eclair
* commit '
affecd7714e14fabff011ad61d436df3698bf7eb':
Cleanup CTS core failing tests.
Brett Chabot [Fri, 14 Aug 2009 04:37:47 +0000 (21:37 -0700)]
Cleanup CTS core failing tests.
BUG
2053939
Bill Buzbee [Tue, 11 Aug 2009 00:06:51 +0000 (17:06 -0700)]
Continuing evolution of Thumb2 support.
Bug fix for local optimization
Enable partial floating point store sinking (with significant perf gain!)
Dan Bornstein [Wed, 12 Aug 2009 19:16:40 +0000 (12:16 -0700)]
Be more POSIXly correct in the use of expr.
Jesse Wilson [Tue, 11 Aug 2009 01:43:30 +0000 (18:43 -0700)]
Update Luni to Harmony r802921.
Notable changes:
- replaced StringBuffer with StringBuilder in several places
- fixed a problem with BufferedInputStream's newline characters (EBCDIC)
- cleanup Timer's finalizer helper object
- new cache for the canonical path of a file
- fixed concurrency issue with ArrayList
- floating point parsing now trims length for very small numbers
- encoding specified "UTF-8" when converting some byte[]s to strings (JarURLConnection, Util, OSFileSystem)
- Harmony now implements floor and ceil in Java. We continue to use native code.
Android (Google) Code Review [Mon, 10 Aug 2009 23:44:10 +0000 (16:44 -0700)]
Merge change 8107
* changes:
First parts of enabling a host Dalvik build.
Dan Bornstein [Tue, 21 Jul 2009 23:08:39 +0000 (16:08 -0700)]
First parts of enabling a host Dalvik build.
Most of this is just factoring out common make defs to include both on
the host and device side, though there is a little bit of code change
to be slightly POSIX friendlier and to avoid unnecessary sanity checks
when compiling without an asm version of the interpreter.
This patch should cause no difference in build results, except if you
turn on the newly-defined WITH_HOST_DALVIK build flag. If you do turn
it on, at this point you should probably expect the build to fail due
to insufficient dependencies, which I of course expect to address in
upcoming patches.
Jean-Baptiste Queru [Mon, 10 Aug 2009 20:41:39 +0000 (13:41 -0700)]
merge from open-source master
Barry Hayes [Wed, 20 May 2009 19:10:36 +0000 (12:10 -0700)]
Change strategy for freeing objects in the sweep.
dlfree() in dlmalloc.c is fairly expensive. It checks the previous and
next block to see if the curent block can be merged into one of the
free blocks, and if it does merge, that involves manipulating the
internal free lists.
The sweep phase of the GC is already visiting free objects in address
order, and has a list of objects to be freed. The new strategy is:
Loop over the list of objects to be freed, merging when possible, and
only calling free() when a either the list has run out or a
non-adjacent free object is found.
Andy McFadden [Fri, 7 Aug 2009 18:41:35 +0000 (11:41 -0700)]
Increase priority of unresponsive threads.
The VM uses a safe-pointing thread suspension mechanism, which currently
means that the GC can't do its work until the various threads enter a
non-running state. This can be a problem if a low-priority thread was
scheduled out and other processes in the system are running flat out.
This changes the "spin on suspend" mechanism to increase the priority of
unresponsive threads. Currently we just boost the "nice" value, since
that seems to be enough to do the trick in my tests, but we may have to
shift the cgroup around as well (assuming other recent changes don't
simply render this unnecessary).
Andy McFadden [Fri, 7 Aug 2009 21:49:40 +0000 (14:49 -0700)]
Read thread priority as an int, not a boolean.
We were using the wrong field get function. After our change to
stdbool.h, the thread priority was always 0 or 1.
Andy McFadden [Fri, 7 Aug 2009 18:37:44 +0000 (11:37 -0700)]
Correct the type of a pointer.
Should've been part of change 20178.
Android (Google) Code Review [Fri, 7 Aug 2009 14:21:08 +0000 (07:21 -0700)]
Merge change 20378
* changes:
Suspend daemon threads before exiting.
Andy McFadden [Fri, 7 Aug 2009 00:56:14 +0000 (17:56 -0700)]
Suspend daemon threads before exiting.
The VM wasn't dealing with daemon threads very well, allowing them to
run unchecked while the city burned around them. Now we carefully
suspend them before shutdown is allowed to continue.
Android (Google) Code Review [Thu, 6 Aug 2009 19:49:34 +0000 (12:49 -0700)]
Merge change 8538
* changes:
A sampling profiler for Dalvik.
Bob Lee [Fri, 31 Jul 2009 01:17:37 +0000 (18:17 -0700)]
A sampling profiler for Dalvik.
Andy McFadden [Wed, 5 Aug 2009 22:20:27 +0000 (15:20 -0700)]
Switch to <stdbool.h> in the VM.
We were using an enum that made the compiler unhappy on MacOS X. This
switches us to using <stdbool.h> when it's available.
The size of a "bool" is either sizeof(_Bool) or sizeof(enum bool), and
the assembly sources dislike ambiguity, so this also changes
gDvm.debuggerActive to always be a single byte. The ARM and x86 code
was already assuming that -- held over from when enums were
variable-width, and never fixed because we get the right answer on
little-endian platforms -- so it doesn't look like we need to change
anything in mterp.
Android (Google) Code Review [Wed, 5 Aug 2009 21:11:05 +0000 (14:11 -0700)]
Merge change 9641
* changes:
Added thread profile to dmtracedump output
Android (Google) Code Review [Wed, 5 Aug 2009 20:41:28 +0000 (13:41 -0700)]
Merge change 20002
* changes:
Updating math to Harmony r772995.
Andy McFadden [Wed, 5 Aug 2009 20:20:16 +0000 (13:20 -0700)]
Regenerate mterp.
Whoops! Should've been part of
d33b0c3fbd81ae96c5d5c034030d62caac33c310.
Andy McFadden [Tue, 4 Aug 2009 23:38:40 +0000 (16:38 -0700)]
Don't assert that all threads have stopped.
If assertions were enabled and we had a daemon thread running, the VM
would fail on exit.
Android (Google) Code Review [Wed, 5 Aug 2009 14:22:20 +0000 (07:22 -0700)]
Merge change 20020
* changes:
Improvements to cgroup stuff.
Rodrigo Ipince [Tue, 4 Aug 2009 04:34:47 +0000 (21:34 -0700)]
Added thread profile to dmtracedump output
The thread profile lists all the running threads, sorted by elapsed time.
Andy McFadden [Tue, 4 Aug 2009 22:02:12 +0000 (15:02 -0700)]
Improvements to cgroup stuff.
When a thread is created or changes priority via Thread.setPriority(),
the cgroup value was being set incorrectly -- the code was comparing
the priority vs. the "nice" values we use in the rest of Android.
This was preventing threads from being moved into the background group
when first created. (It's not clear whether this matters in most cases,
since the system appears to move threads in and out of the background
cgroup without regard to their "nice" value in Process.setProcessGroup.)
The code that changed the cgroup wasn't really checking the return
value, though this is only meaningful if the verbose error logging is
compiled in.
The above have been fixed, and in addition the thread dump now displays
the cgroup value next to the other priority information.
Jesse Wilson [Tue, 4 Aug 2009 20:50:38 +0000 (13:50 -0700)]
Updating math to Harmony r772995.
Notable changes:
- lots of trailing whitespace and "@since Android 1.0" tags removed
- shiftLeft(1) replaced with shiftLeftOneBit(). That case can be optimized
more aggressively than the general case. The new method exists in BigInteger
and calls through to a new method in BitLevel in the same way as Harmony.
This is a squashed commit of the following:
commit
3f071487bdb8fff0b4a71ce0219ee7e1e16369fb
Merge:
4fda354 10640b6
Author: Jesse Wilson <jessewilson@google.com>
Date: Tue Aug 4 12:02:25 2009 -0700
Merge branch 'math_772995' into math_dalvik
Conflicts:
libcore/math/.classpath
libcore/math/build.xml
libcore/math/src/main/java/java/math/BigDecimal.java
libcore/math/src/main/java/java/math/BigInteger.java
libcore/math/src/main/java/java/math/Division.java
libcore/math/src/main/java/java/math/Elementary.java
libcore/math/src/main/java/java/math/Logical.java
libcore/math/src/main/java/java/math/MathContext.java
libcore/math/src/main/java/java/math/Multiplication.java
libcore/math/src/main/java/java/math/Primality.java
libcore/math/src/main/java/java/math/RoundingMode.java
libcore/math/src/test/java/tests/api/java/math/BigDecimalTest.java
libcore/math/src/test/java/tests/api/java/math/BigIntegerTest.java
commit
4fda354bd7d2c0ee918c86fa89852310cc8f2af7
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Jul 29 17:12:27 2009 -0700
Dalvik Math
commit
10640b6b254200f1c89553072e50137f6ad46c84
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Jul 29 17:11:07 2009 -0700
Math 772995
commit
15302f6d09b3547f1018e3d228f233f8f72c7de9
Author: Jesse Wilson <jessewilson@google.com>
Date: Wed Jul 29 17:08:19 2009 -0700
Math 527399
Andy McFadden [Tue, 4 Aug 2009 19:09:29 +0000 (12:09 -0700)]
Throw an exception instead of aborting in DexFile.
If presented with an invalid DexFile cookie -- perhaps because somebody
called DexFile.close() twice -- the VM would unceremoniously abort.
This was reported as a bug (external #2443). We now throw a simple
exception.
For internal bug
1794406.
Lorenzo Colitti [Wed, 29 Jul 2009 00:54:40 +0000 (17:54 -0700)]
Try to connect to all the IP addresses of a host instead of just the first.
Jean-Baptiste Queru [Mon, 3 Aug 2009 14:45:27 +0000 (07:45 -0700)]
merge from donut
Bill Buzbee [Sat, 1 Aug 2009 18:32:36 +0000 (11:32 -0700)]
Fixed 2 floating point bugs; improved debug output; armv7-a thumb2 inline sqrt
Android (Google) Code Review [Sat, 1 Aug 2009 16:04:06 +0000 (09:04 -0700)]
Merge change 9395
* changes:
Stage 3 of Thumb2 support. armv7-a now generates vfp code inline.
Bill Buzbee [Thu, 30 Jul 2009 17:52:29 +0000 (10:52 -0700)]
Stage 3 of Thumb2 support. armv7-a now generates vfp code inline.
Android (Google) Code Review [Fri, 31 Jul 2009 23:26:37 +0000 (16:26 -0700)]
Merge change 9414
* changes:
Fix a LOGVV.
Android (Google) Code Review [Fri, 31 Jul 2009 23:24:13 +0000 (16:24 -0700)]
Merge change 9384
* changes:
Added VMDebug.crash() (hidden).
Andy McFadden [Fri, 31 Jul 2009 23:24:12 +0000 (16:24 -0700)]
Fix a LOGVV.
Somebody on android-porting stumbled over this.
Andy McFadden [Fri, 31 Jul 2009 20:54:59 +0000 (13:54 -0700)]
Added VMDebug.crash() (hidden).
This call prints the stack trace for the current thread, and then
crashes the VM so you can see the native stack trace too. Useful for
figuring out "how did I get here?" situations.
Andy McFadden [Fri, 17 Jul 2009 01:11:22 +0000 (18:11 -0700)]
Indirect reference table implementation.
This change introduces the "indirect" reference table, which will be
replacing ReferenceTable for local and global JNI references. The key
difference is that, instead of handing raw Object pointers to JNI, we
will be giving them a magic value that can be converted back to an
Object. The goal is to avoid having to pin every object that native
code is aware of.
The code is not actually used anywhere yet.
Also bundled up here:
- added detail to a log message
- fixed a string format issue in the internal assert() definition
- very minor optimization in "remove" function in ReferenceTable
- quiet a gcc complaint
- only include the hash table regression test in builds that invoke it
Android (Google) Code Review [Thu, 30 Jul 2009 21:21:19 +0000 (14:21 -0700)]
Merge change 8953
* changes:
Store all IP addresses for a hostname instead of just one.
Lorenzo Colitti [Wed, 29 Jul 2009 00:55:00 +0000 (17:55 -0700)]
Store all IP addresses for a hostname instead of just one.
Android (Google) Code Review [Thu, 30 Jul 2009 17:49:00 +0000 (10:49 -0700)]
Merge change 9190
* changes:
Minor tweak (TEQS -> TEQ).
Andy McFadden [Thu, 30 Jul 2009 17:50:14 +0000 (10:50 -0700)]
Minor tweak (TEQS -> TEQ).
Avoids "Warning: s suffix on comparison instruction is deprecated".
Jesse Wilson [Thu, 30 Jul 2009 16:56:34 +0000 (09:56 -0700)]
am
bd79e449: Fix an issue where we\'re adding 4x the intended offset.
Merge commit '
bd79e4498465381117f2cbc6399a256061f1d144'
* commit '
bd79e4498465381117f2cbc6399a256061f1d144':
Fix an issue where we're adding 4x the intended offset.
Urs Grob [Thu, 30 Jul 2009 13:56:17 +0000 (06:56 -0700)]
Android (Google) Code Review [Wed, 29 Jul 2009 23:16:12 +0000 (16:16 -0700)]
Merge change 9042
* changes:
Update bytecode verifier info.
Andy McFadden [Wed, 29 Jul 2009 23:07:01 +0000 (16:07 -0700)]
Update bytecode verifier info.
Rewrote last section to describe deferred verification error reporting.
Added note about structured locking checks.
Jesse Wilson [Tue, 28 Jul 2009 23:49:40 +0000 (16:49 -0700)]
Fix an issue where we're adding 4x the intended offset.
We were doing pointer arithmetic of mixed types (jint* and jint),
and the type conversion ended up causing the offset to be converted
an extra time.
Jean-Baptiste Queru [Wed, 29 Jul 2009 21:56:48 +0000 (14:56 -0700)]
merge from donut
Android (Google) Code Review [Wed, 29 Jul 2009 20:59:24 +0000 (13:59 -0700)]
Merge change 9014
* changes:
Fixing some broken links in the concurrent Javadoc.
Jesse Wilson [Wed, 29 Jul 2009 20:45:14 +0000 (13:45 -0700)]
Fixing some broken links in the concurrent Javadoc.
There's a bug in droiddoc where links to methods with generic parameters
don't resolve correctly. I'll open a buganizer issue for this; in the
interim I've simply dropped the parameters for the offending links.
Jesse Wilson [Wed, 29 Jul 2009 18:39:24 +0000 (11:39 -0700)]
Fixing Executors to use raw types, which is what RI v5 does.
Also fixing VMStack to hide the new API method.
Android (Google) Code Review [Wed, 29 Jul 2009 17:00:32 +0000 (10:00 -0700)]
Merge change 8903
* changes:
Update concurrent module to Harmony r798021.
Urs Grob [Wed, 22 Jul 2009 18:06:03 +0000 (20:06 +0200)]
Removing MD2
Jesse Wilson [Wed, 29 Jul 2009 00:34:57 +0000 (17:34 -0700)]
Update concurrent module to Harmony r798021.
commit
56bcdc2a3b881883409267c3bd16294d80716859
Merge:
903691a f429dca
Author: Jesse Wilson <jessewilson@google.com>
Date: Mon Jul 27 17:33:19 2009 -0700
Merge branch 'concurrent_798021' into concurrent_dalvik
Conflicts:
libcore/concurrent/.classpath
libcore/concurrent/build.xml
libcore/concurrent/make/run-test.xml
libcore/concurrent/src/main/java/java/util/concurrent/ArrayBlockingQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/BlockingQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/ConcurrentHashMap.java
libcore/concurrent/src/main/java/java/util/concurrent/ConcurrentLinkedQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/ConcurrentMap.java
libcore/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArrayList.java
libcore/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArraySet.java
libcore/concurrent/src/main/java/java/util/concurrent/DelayQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/LinkedBlockingQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/PriorityBlockingQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/ScheduledThreadPoolExecutor.java
libcore/concurrent/src/main/java/java/util/concurrent/Semaphore.java
libcore/concurrent/src/main/java/java/util/concurrent/SynchronousQueue.java
libcore/concurrent/src/main/java/java/util/concurrent/ThreadPoolExecutor.java
libcore/concurrent/src/main/java/java/util/concurrent/TimeUnit.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicBoolean.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicInteger.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicIntegerArray.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicLong.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicLongArray.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicLongFieldUpdater.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicReference.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicReferenceArray.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java
libcore/concurrent/src/main/java/java/util/concurrent/atomic/package.html
libcore/concurrent/src/main/java/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
libcore/concurrent/src/main/java/java/util/concurrent/locks/LockSupport.java
libcore/concurrent/src/main/java/java/util/concurrent/locks/ReentrantReadWriteLock.java
libcore/concurrent/src/main/java/java/util/concurrent/locks/package.html
libcore/concurrent/src/main/java/java/util/concurrent/package.html
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/AtomicLongFieldUpdaterTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/AtomicReferenceFieldUpdaterTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/AtomicReferenceTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ConcurrentHashMapTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/DelayQueueTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ExecutorsTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/JSR166TestCase.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/LinkedBlockingQueueTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/LockSupportTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ReentrantLockTest.java
libcore/concurrent/src/test/java/tests/api/java/util/concurrent/ReentrantReadWriteLockTest.java
commit
903691ae71cff640d5487a3d34a20e8767dbfb66
Author: Jesse Wilson <jessewilson@google.com>
Date: Mon Jul 27 16:09:58 2009 -0700
Dalvik Concurrent
commit
f429dca21c408ee62e688f60d5e110718374e944
Author: Jesse Wilson <jessewilson@google.com>
Date: Mon Jul 27 16:08:25 2009 -0700
Concurrent 798021
commit
b2c76fdd1056113000140bc4af57300c87469d2d
Author: Jesse Wilson <jessewilson@google.com>
Date: Mon Jul 27 16:03:45 2009 -0700
Concurrent 527399
Android (Google) Code Review [Tue, 28 Jul 2009 22:14:16 +0000 (15:14 -0700)]
Merge change 8867
* changes:
Fix for
1857865: Need x86 implementation for OP_THROW_VERIFICATION_ERROR
Bill Buzbee [Tue, 28 Jul 2009 22:02:22 +0000 (15:02 -0700)]
Fix for
1857865: Need x86 implementation for OP_THROW_VERIFICATION_ERROR
Bill Buzbee [Tue, 28 Jul 2009 20:28:25 +0000 (13:28 -0700)]
Prevent OP_INVOKE_DIRECT_EMPTY from terminating a trace
Bill Buzbee [Tue, 28 Jul 2009 18:22:22 +0000 (11:22 -0700)]
Stage 2 of structural changes for support of THUMB2. No logic changes.
Bill Buzbee [Mon, 27 Jul 2009 22:51:54 +0000 (15:51 -0700)]
Fix for 3326: Incorrect return value from native library in dalvik
Really a workaround for a gcc bug in 4.3. Don't trust the C compiler
to properly clear high bits from < 32-bit JNI return values.
Android (Google) Code Review [Tue, 28 Jul 2009 01:08:32 +0000 (18:08 -0700)]
Merge change 5582
* changes:
Integrate luni module (but not tests) to Harmony r772995.
Ben Cheng [Mon, 27 Jul 2009 23:21:52 +0000 (16:21 -0700)]
Fix a JIT bug where invoke-direct-empty is the last instruction in the trace.
Android (Google) Code Review [Mon, 27 Jul 2009 23:25:59 +0000 (16:25 -0700)]
Merge change 8665
* changes:
First phase of restructuring to support THUMB2 & ARM traces Store some useful info about traces in JitTable entry; some general cleanup
Android (Google) Code Review [Mon, 27 Jul 2009 23:08:47 +0000 (16:08 -0700)]
Merge change 8707
* changes:
Fix mangling to translate dollar signs.
Brian McKenna [Sun, 19 Jul 2009 10:49:26 +0000 (20:49 +1000)]
Fix mangling to translate dollar signs.
(Manually pulled from external change 10724.)
Bill Buzbee [Thu, 23 Jul 2009 20:22:09 +0000 (13:22 -0700)]
First phase of restructuring to support THUMB2 & ARM traces
Store some useful info about traces in JitTable entry; some general cleanup
Andy McFadden [Mon, 27 Jul 2009 21:44:22 +0000 (14:44 -0700)]
Added dvmLinearAllocContains().
Jean-Baptiste Queru [Sun, 26 Jul 2009 03:35:55 +0000 (20:35 -0700)]
Merge korg/donut into korg/master
Conflicts:
libcore/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddressFactory.java
vm/oo/Class.c
Andy McFadden [Sat, 25 Jul 2009 17:11:54 +0000 (10:11 -0700)]
am
8e696dc0: JNI direct buffer function speedup, part 3.
Merge commit '
8e696dc0271299433cb3297e7aafc7bd0ee1b2b7'
* commit '
8e696dc0271299433cb3297e7aafc7bd0ee1b2b7':
JNI direct buffer function speedup, part 3.
Andy McFadden [Fri, 24 Jul 2009 23:08:33 +0000 (16:08 -0700)]
am
8e5c7847: JNI direct buffer function speedup, part 2.
Merge commit '
8e5c78470229fd2f5474574081eaa4a2286aafea'
* commit '
8e5c78470229fd2f5474574081eaa4a2286aafea':
JNI direct buffer function speedup, part 2.
Jesse Wilson [Fri, 24 Jul 2009 22:17:03 +0000 (15:17 -0700)]
Integrate luni module (but not tests) to Harmony r772995.
Notable changes
- Stripped "@since Android 1.0" from many files. Most files
are now 100% the same in Dalvik and Harmony.
- AbstractStringBuilder.reverse() supports surrogates
- AbstractStringBuilder shares less to waste less memory
- Bitset optimized
- BufferedInputStream changed to support unsynchronized close()
- BufferedOutputStream does flushInternal
- BufferedReader supports EBCDIC NEL
- Collections.synchronizedList().indexOf() does a copy for more concurrency
- Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl
and ServerSocketChannelImpl (these depend on internal APIs changed in
this update)
- DataInputStream/DataOutputStream now use a small buffer to limit the
number of times the underlying stream is accessed
- Date now has a minutes offset, more efficient toString()
- ExposedByteArrayInputStream: new internal class
- DeleteOnExit moved to top-level class
- FileDescriptor.isValid() now non-native
- Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending)
- FileURLConnection now guesses content types from streams
- HashMap iterator changes
- Hashtable iterator changes
- INetworkSystem
- removes bind2(), createMulticastSocket, sendStream(),
- renames createSocket to createStreamSocket
- JarURLConnection rewritten
- LinkedHashMap: new iterator
- Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik
- ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik
- ProxyClassFile - many changes
- String - optimized ascii for toLowerCase, toUpperCase, compare
- Timer - rewritten
- TreeMap - rewritten
- URLClassLoader - new
- URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content
to lookup content type handlers
Andy McFadden [Fri, 24 Jul 2009 22:28:16 +0000 (15:28 -0700)]
JNI direct buffer function speedup, part 3.
This caches the effective address in a new field in the base Buffer
object. The first time something calls through one of the various
getEffectiveAddress calls, the value is set. (This seemed easier than
chasing down the constructors and factories, and also prevents bit rot
on the "slow path" in the VM.)
Andy McFadden [Fri, 24 Jul 2009 00:47:18 +0000 (17:47 -0700)]
JNI direct buffer function speedup, part 2.
This converts the three direct buffer functions from JNI to internal VM
calls. As a bonus, we grab PlatformAddress.osaddr directly instead of
retrieving it with PlatformAddress.toLong().
We're still calling through getEffectiveAddress(), which is where most
of the complexity lies.
Nudged a couple of comments.
Android (Google) Code Review [Wed, 22 Jul 2009 23:09:07 +0000 (16:09 -0700)]
Android (Google) Code Review [Wed, 22 Jul 2009 22:34:57 +0000 (15:34 -0700)]
Merge change 8258 into donut
* changes:
Minor fixes to CheckJNI.
Andy McFadden [Wed, 22 Jul 2009 22:30:18 +0000 (15:30 -0700)]
am
5f612b82: JNI direct buffer function speedup, part 1.
Merge commit '
5f612b82bbc2fcfb13865acd3c3835febab23466'
* commit '
5f612b82bbc2fcfb13865acd3c3835febab23466':
JNI direct buffer function speedup, part 1.
Andy McFadden [Wed, 22 Jul 2009 22:20:08 +0000 (15:20 -0700)]
Minor fixes to CheckJNI.
We weren't always switching to "running" mode before playing with
objects. Now checkObject() always changes modes, and things that called
checkObject while in "running" mode now do so after switching back to
"native" (which shouldn't matter now, but I don't want to require nested
switching to work if I don't have to).
Vaguely related to internal bug
1943379, since I think we want to do
some updates to CheckJNI there.
Andy McFadden [Wed, 22 Jul 2009 22:07:27 +0000 (15:07 -0700)]
JNI direct buffer function speedup, part 1.
This is a fairly straightforward improvement to GetDirectBufferAddress,
caching classes and methodIDs instead of looking them up on every call.
This is the best we can do without making the function more vulnerable
to internal changes to Harmony's NIO implementation.
It looks like we need to take this farther, but this way we have a
relatively fast and relatively safe version to fall back on.
For internal bug
1943379.
Bill Buzbee [Wed, 22 Jul 2009 20:58:23 +0000 (13:58 -0700)]
Add armv7-a target to jit. Mostly a placeholder, another restructuring to come
Ben Cheng [Tue, 21 Jul 2009 19:45:34 +0000 (12:45 -0700)]
Remove unused label.
Ben Cheng [Tue, 21 Jul 2009 17:22:22 +0000 (10:22 -0700)]
Associate Java source code line number with JIT traces.
Sample output:
D/dalvikvm( 400): TRACEPROFILE 0x426d945c
5192426 [0x4(+32), 810] Lcom/android/unit_tests/PerformanceTests$AddMemberVariableTest;testRun;()V
D/dalvikvm( 400): TRACEPROFILE 0x426d955c 263 [0x2(+1), 809] (omitted)
D/dalvikvm( 400): TRACEPROFILE 0x426d9640 0 [0x53(+1), 344] (omitted)
D/dalvikvm( 400): TRACEPROFILE 0x426d960c 0 [0x72(+1), 271] (omitted)
D/dalvikvm( 400): TRACEPROFILE 0x426d9590 0 [0x74(+5), 272] (omitted)
For the first line:
5192426: execution count of this trace
0x4: starting bytecode offset
+32: number of instructions included in the trace
810: line number corresponding to 0x4 in the file containing the method
Also add WITH_JIT_TUNING for now whenever JIT is enabled.
Android Code Review [Mon, 20 Jul 2009 23:07:43 +0000 (16:07 -0700)]
Merge change 10723
* changes:
Fix variable names related to bytecode tracing.
Android (Google) Code Review [Mon, 20 Jul 2009 16:43:02 +0000 (09:43 -0700)]
Merge change 7773
* changes:
Polish JIT trace profiling and fix a unchaining bug when profiling is enabled.
Ben Cheng [Fri, 17 Jul 2009 22:54:23 +0000 (15:54 -0700)]
Polish JIT trace profiling and fix a unchaining bug when profiling is enabled.
Brian McKenna [Sun, 19 Jul 2009 10:49:26 +0000 (20:49 +1000)]
Fix mangling to translate dollar signs (to allow Scala methods).
Mike Lockwood [Wed, 8 Jul 2009 16:39:37 +0000 (12:39 -0400)]
Fix variable names related to bytecode tracing.
Signed-off-by: Tony Yokoyama <chuuoudai@gmail.com>
The compile errors, encountered in the case that macro LOG_INSTR is
turned on, are fixed.
On branch log_instr
Changes to be committed:
modified: vm/mterp/armv5te/debug.c
modified: vm/mterp/c/gotoTargets.c
modified: vm/mterp/out/InterpC-allstubs.c
modified: vm/mterp/out/InterpC-armv4.c
modified: vm/mterp/out/InterpC-armv5te.c
modified: vm/mterp/out/InterpC-portdbg.c
modified: vm/mterp/out/InterpC-portstd.c
modified: vm/mterp/out/InterpC-x86.c
modified: vm/mterp/portable/debug.c
modified: vm/oo/Class.c
Android (Google) Code Review [Fri, 17 Jul 2009 03:04:34 +0000 (20:04 -0700)]
Merge change 7487
* changes:
Fixed a tiny bug in TimSort that slightly affects performance on small arrays Martin Buchholz discovered this bug by running all tests with assertions enabled. That's the only way he could have discovered it, as it doesn't affect correctness:) The assertion that failed was the one at the head of countRunAndMakeAscending. The cause was that I called the method with (a, start, length) instead of (a, start, end).
Android (Google) Code Review [Thu, 16 Jul 2009 22:46:12 +0000 (15:46 -0700)]
Merge change 7550
* changes:
Fixing wakeups caused by Thread.join() interacting with LockSupport.unpark.
Jesse Wilson [Thu, 16 Jul 2009 18:56:27 +0000 (11:56 -0700)]
Fixing wakeups caused by Thread.join() interacting with LockSupport.unpark.
This caused several concurrency tests to fail when run with timeouts, since
the tests cause park and unpark to happen frequently.
Also fixing a tiny issue with CoreTestRunnable to use the proper tmp directory
and to include the program of a failed external execution.
Android (Google) Code Review [Thu, 16 Jul 2009 14:42:44 +0000 (07:42 -0700)]
Merge change 7442
* changes:
Make verifier field/method resolution conformant.
Android (Google) Code Review [Thu, 16 Jul 2009 14:42:32 +0000 (07:42 -0700)]
Merge change 7474
* changes:
Throw OutOfMemoryError on oversize array allocs.
Joshua Bloch [Thu, 16 Jul 2009 01:26:05 +0000 (18:26 -0700)]
Fixed a tiny bug in TimSort that slightly affects performance on small arrays
Martin Buchholz discovered this bug by running all tests with assertions
enabled. That's the only way he could have discovered it, as it doesn't
affect correctness:) The assertion that failed was the one at the head of
countRunAndMakeAscending. The cause was that I called the method with
(a, start, length) instead of (a, start, end).
Android (Google) Code Review [Thu, 16 Jul 2009 01:14:52 +0000 (18:14 -0700)]
am
6fbc4eb4: Merge change 7410 into donut
Merge commit '
6fbc4eb48bf368199f31a25fae60f8f7a378cc52'
* commit '
6fbc4eb48bf368199f31a25fae60f8f7a378cc52':
Fix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.
Andy McFadden [Wed, 15 Jul 2009 23:56:00 +0000 (16:56 -0700)]
Throw OutOfMemoryError on oversize array allocs.
We've been throwing InternalError because of a particular statement in
the JPL that suggests we should be clearing out SoftReferences before
throwing OOM. That seems unnecessary for an array allocation that we're
rejecting because the total size doesn't fit in a 32-bit integer.
Now we just throw OOM.
Android (Google) Code Review [Wed, 15 Jul 2009 23:33:20 +0000 (16:33 -0700)]
Merge change 6983
* changes:
Include the full stacktrace when a test times out.
Andy McFadden [Wed, 15 Jul 2009 21:34:49 +0000 (14:34 -0700)]
Make verifier field/method resolution conformant.
The VM spec spells out a particular way to look for fields. It assumes
that static and virtual fields are piled together into a single pool,
so it makes sense to scan through both kinds when resolving. In Dalvik,
field definitions are separated by scope, so we can save a little time
by only searching through the appropriate list.
It turns out that you can create a situation where a field with the same
name is available in both static and virtual forms in the same class.
javac won't let you do this in a single class, but with separate
compilation and inheritance you can pull it off. In these situations,
Dalvik can do the wrong thing. For example, if you ask for a static
field, Dalvik will happily use the static field from a superclass without
realizing that there's an instance field with the same name in the current
class. It's supposed to find the instance field, realize that it's not
static, and throw an exception.
This change updates the verifier to do an "untyped" scan like the VM
spec wants. Problematic situations are identifed and result in an
"incompatible class change" exception.
This does not alter "direct" method lookups (constructors, private
methods).
I also altered the annotation "ambiguous" method lookup to use the new
function, since that's probably the desired behavior there as well.
Android (Google) Code Review [Wed, 15 Jul 2009 21:18:58 +0000 (14:18 -0700)]
Merge change 7410 into donut
* changes:
Fix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.
Joshua Bloch [Wed, 15 Jul 2009 18:29:28 +0000 (11:29 -0700)]
Fix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.