OSDN Git Service

android-x86/dalvik.git
14 years agoStay in the dbg interpreter if the entry reason is to deal with exceptions.
Ben Cheng [Sat, 13 Mar 2010 00:58:24 +0000 (16:58 -0800)]
Stay in the dbg interpreter if the entry reason is to deal with exceptions.

Bug: 2487514
Change-Id: Id1eb91f347ff772714d9560370b9994f46d3c5cb

14 years agoMerge "Add a native method dalvik.system.VMDebug.infopoint(int id)."
Ben Cheng [Sat, 13 Mar 2010 00:33:27 +0000 (16:33 -0800)]
Merge "Add a native method dalvik.system.VMDebug.infopoint(int id)."

14 years agoAdd a native method dalvik.system.VMDebug.infopoint(int id).
Ben Cheng [Sat, 13 Mar 2010 00:11:49 +0000 (16:11 -0800)]
Add a native method dalvik.system.VMDebug.infopoint(int id).

With gdb, the JIT can use it to inspect the VM state when an instrumented line
is reached.

Change-Id: Id39ac4cd564bc1a61208cb7527c30f62b5de3e4e

14 years agoJit: Fix for [Issue 2487514] Dropped exception
Bill Buzbee [Sat, 13 Mar 2010 00:01:35 +0000 (16:01 -0800)]
Jit: Fix for [Issue 2487514] Dropped exception

The jit was failing to call dvmCanPutArrayElement for aput-object.

Change-Id: I8ca618048dc4d1be5b1f1ed85078759041883b09

14 years agoMerge "Add a JIT unit test for ArrayStoreException in APUT_OBJECT."
Ben Cheng [Fri, 12 Mar 2010 23:04:18 +0000 (15:04 -0800)]
Merge "Add a JIT unit test for ArrayStoreException in APUT_OBJECT."

14 years agoAdd a JIT unit test for ArrayStoreException in APUT_OBJECT.
Ben Cheng [Fri, 12 Mar 2010 22:39:53 +0000 (14:39 -0800)]
Add a JIT unit test for ArrayStoreException in APUT_OBJECT.

Bug: 2487514

tests> ./run-test --fast 083-jit-regressions
/home/bccheng/local/master-git/dalvik/tests/083-jit-regressions: running...
/home/bccheng/local/master-git/dalvik/tests/083-jit-regressions: succeeded!

tests> ./run-test --jit 083-jit-regressions
/home/bccheng/local/master-git/dalvik/tests/083-jit-regressions: running...
/home/bccheng/local/master-git/dalvik/tests/083-jit-regressions: FAILED!

--- expected.txt    2010-03-12 13:45:13.000000000 -0800
+++ output.txt  2010-03-12 14:51:38.000000000 -0800
@@ -1,3 +1,3 @@
 b2296099 passes
 b2302318 passes
-b2487514 passes
+b2487514 fails: catchCount is 17 (expecting 1000)

Change-Id: I6651a3e0945f96bbb9e0c0af13f2c322b82d0cb0

14 years agoAdding support for DOM3 attribute IDs and SchemaTypeInfos.
Jesse Wilson [Thu, 11 Mar 2010 23:39:41 +0000 (15:39 -0800)]
Adding support for DOM3 attribute IDs and SchemaTypeInfos.

Change-Id: I35e56ed989820df6b8fea36bbf81fe0314c76304

14 years agoMerge "Implementing getBaseUri() for DOM."
Jesse Wilson [Thu, 11 Mar 2010 23:03:28 +0000 (15:03 -0800)]
Merge "Implementing getBaseUri() for DOM."

14 years agoImplementing getBaseUri() for DOM.
Jesse Wilson [Thu, 11 Mar 2010 02:42:32 +0000 (18:42 -0800)]
Implementing getBaseUri() for DOM.

The tests for this uncover problems with the RI's implementation.
It does bizarre things with hashes, trashing the absolute URI and
returning a page-relative one (like "#foo").

Change-Id: Ib8af163a7b359e3f72a9c94eb3dd7e81e3a9a95c

14 years agoJit: Make debugging mode aware of inlineExecute/moveResult optimization
Bill Buzbee [Thu, 11 Mar 2010 19:12:15 +0000 (11:12 -0800)]
Jit: Make debugging mode aware of inlineExecute/moveResult optimization

The Jit has a mode in which selected opcodes can be handled normally
or single-stepped in the interpter.  This was broken for cases in
which the Jit applied an optimization to fold inlineExecute/moveResult
intruction pairs into a single operation and the debug mode was set
to handle the two opcodes differently.

Change-Id: Ifa436d4ba66ba0c13ea366c0956e6cf92ce9cdfd

14 years agoMerge "Add armv7-a-neon build target"
Colin Cross [Thu, 11 Mar 2010 02:14:13 +0000 (18:14 -0800)]
Merge "Add armv7-a-neon build target"

14 years agoMerge "remove System.*.println when ddm dispatch fails."
Xavier Ducrohet [Wed, 10 Mar 2010 23:33:45 +0000 (15:33 -0800)]
Merge "remove System.*.println when ddm dispatch fails."

14 years agoremove System.*.println when ddm dispatch fails.
Xavier Ducrohet [Wed, 10 Mar 2010 22:11:40 +0000 (14:11 -0800)]
remove System.*.println when ddm dispatch fails.

Those messages are sometimes displayed to the user executing
the am command and can be really confusing (they are totally
benign)

Change-Id: I09c194a02ddc956ec52f19faa03ca9aa1eba604b

14 years agoMerge "Rearrange the way SignalCatcher writes logs."
Andy McFadden [Wed, 10 Mar 2010 22:05:54 +0000 (14:05 -0800)]
Merge "Rearrange the way SignalCatcher writes logs."

14 years agoRearrange the way SignalCatcher writes logs.
Andy McFadden [Wed, 10 Mar 2010 21:42:22 +0000 (13:42 -0800)]
Rearrange the way SignalCatcher writes logs.

This is an attempt to reduce the amount of time that threads are suspended
while dumping stack traces in response to a SIGQUIT.  This is primarily
for ANRs and bugreport generation, where many different apps may be trying
to write their stacks out concurrently.

Instead of grabbing the file with flock() and then printing the traces
to the file, we render the traces to memory and write them with a single
write() call to an O_APPEND fd.  Also, the file access now occurs after
the VM threads have been resumed to avoid stalling on I/O.

No change was made to the format of the output.

For bug 2504471.

Also: did some rearranging in the file.

Change-Id: If505ec014237289a6cc86aa09bc66b3a126b345c

14 years agoPad the page containing ARM code in the JIT code cache to work around a CPU bug.
Ben Cheng [Wed, 10 Mar 2010 21:12:55 +0000 (13:12 -0800)]
Pad the page containing ARM code in the JIT code cache to work around a CPU bug.

Bug: 2501147

Verified with seeing the following line in the log. The 4096 number confirms
that the ARM handler code is using a full page.

D/dalvikvm(  369): 21 compilations using 4096 + 1288 bytes

Change-Id: I89e1473ce9a4353f58f740e1c86d358d3fec33b2

14 years agoMerge "New tests for JSONObject and for JSON's self-use."
Jesse Wilson [Wed, 10 Mar 2010 18:11:59 +0000 (10:11 -0800)]
Merge "New tests for JSONObject and for JSON's self-use."

14 years agoNew tests for JSONObject and for JSON's self-use.
Jesse Wilson [Wed, 10 Mar 2010 01:54:35 +0000 (17:54 -0800)]
New tests for JSONObject and for JSON's self-use.

Alongside development of these tests, I'm working on a new
cleanroom implementation. The self use test was written to
prevent me from self-using in a way that the original
implementation does not.

Change-Id: Ie617aca1978bd39d85b05e5c2c7bd657ed159dd6

14 years agoMerge "If a finalizer wedges, raise prio and retry."
Andy McFadden [Wed, 10 Mar 2010 15:25:33 +0000 (07:25 -0800)]
Merge "If a finalizer wedges, raise prio and retry."

14 years agoMerge "Work around droiddoc bug http://b/2022288."
Elliott Hughes [Wed, 10 Mar 2010 06:59:36 +0000 (22:59 -0800)]
Merge "Work around droiddoc bug http://b/2022288."

14 years agoWork around droiddoc bug http://b/2022288.
Elliott Hughes [Wed, 10 Mar 2010 06:58:34 +0000 (22:58 -0800)]
Work around droiddoc bug http://b/2022288.

Change-Id: Ib46a260916dee99f190aa8b9465f4f2d3b04aa67

14 years agoMerge "Align fake data in the same page offsets as those in the bugreport."
Ben Cheng [Wed, 10 Mar 2010 06:38:34 +0000 (22:38 -0800)]
Merge "Align fake data in the same page offsets as those in the bugreport."

14 years agoAlign fake data in the same page offsets as those in the bugreport.
Ben Cheng [Wed, 10 Mar 2010 06:32:03 +0000 (22:32 -0800)]
Align fake data in the same page offsets as those in the bugreport.

Sometimes the crash in the JIT'ed code is due to CPU bugs which are sensitive
to placement of the code.

Change-Id: I017ec3620f8172e2fac9e7abfa07f76b65db2306

14 years agoAnother go at making droiddoc as happy as javadoc...
Elliott Hughes [Wed, 10 Mar 2010 06:19:34 +0000 (22:19 -0800)]
Another go at making droiddoc as happy as javadoc...

Change-Id: I70dd8d57053a6e60b9be0cbe8a95d9937d9b00ef

14 years agoFix javadoc errors.
Elliott Hughes [Wed, 10 Mar 2010 05:49:16 +0000 (21:49 -0800)]
Fix javadoc errors.

Change-Id: Ib3eb500006f5b4b1dadf959397fce7737fb53fe7

14 years agoMerge "Print errors encountered while writing XML reports"
Jesse Wilson [Wed, 10 Mar 2010 02:10:19 +0000 (18:10 -0800)]
Merge "Print errors encountered while writing XML reports"

14 years agoMerge "Implement adoptNode() and importNode()."
Jesse Wilson [Wed, 10 Mar 2010 02:08:04 +0000 (18:08 -0800)]
Merge "Implement adoptNode() and importNode()."

14 years agoImplement adoptNode() and importNode().
Jesse Wilson [Wed, 10 Mar 2010 00:33:18 +0000 (16:33 -0800)]
Implement adoptNode() and importNode().

importNode() shares all of its implementation with Node.clone();
the only areas they differ are the ones we don't support. The
shared code is in 2 new methods, shallowCopy() and cloneOrImportNode(),
both based on the old clone() method.

Also removing some unnecessary "throws DOMException" clauses.

The tests for the new methods are slightly cumbersome. Most move/copy
nodes to another document, serialize that, and compare.

Change-Id: Id9fb076e020d8327a8f70da401af9bd95d7a3d1b

14 years agoPrint errors encountered while writing XML reports
Jesse Wilson [Wed, 10 Mar 2010 01:59:43 +0000 (17:59 -0800)]
Print errors encountered while writing XML reports

Change-Id: I7fdf9f6989c94a3f0fd3ff93db3426a4d080120f

14 years agoIf a finalizer wedges, raise prio and retry.
Andy McFadden [Wed, 10 Mar 2010 00:38:36 +0000 (16:38 -0800)]
If a finalizer wedges, raise prio and retry.

The VM uses a watchdog mechanism to detect stuck finalizers.  It appears
that, in some cases, the watchdog may be firing because the HeapWorker
thread in a background process doesn't get any CPU time after a
remotely-induced GC finishes.  With this change, if the HeapWorker is
running at a reduced priority, we raise the priority and allow it to
try some more.

No attempt is made to put the thread priority back.  (The HeapWorker
thread doesn't do anything in an idle process, and what it does do is
geared toward freeing one kind of resource or another.)

For bug 2492196.

Change-Id: Ic734c2e2819b9d60d20b2961f2a75085d5879495

14 years agoMerge "Minor documentation improvements."
Elliott Hughes [Tue, 9 Mar 2010 22:49:47 +0000 (14:49 -0800)]
Merge "Minor documentation improvements."

14 years agoMinor documentation improvements.
Elliott Hughes [Tue, 9 Mar 2010 00:54:42 +0000 (16:54 -0800)]
Minor documentation improvements.

Based on user-submitted bugs that were just misunderstandings, plus
implementation bugs caused by the intended behavior being somewhat
subtle.

Change-Id: Ic2606b5e57dadc95a35c2d0a977c01434a2fa28a

14 years agoMerge "Fix certimport.sh to check for Bouncy Castle provider installation (and add...
Brian Carlstrom [Tue, 9 Mar 2010 22:23:08 +0000 (14:23 -0800)]
Merge "Fix certimport.sh to check for Bouncy Castle provider installation (and add 1.6 JDK to PATH)"

14 years agoFix certimport.sh to check for Bouncy Castle provider installation (and add 1.6 JDK...
Brian Carlstrom [Tue, 9 Mar 2010 19:30:13 +0000 (11:30 -0800)]
Fix certimport.sh to check for Bouncy Castle provider installation (and add 1.6 JDK to PATH)

Now if certimport.sh is run on a machine without the
BouncyCastleProvider installed, it will suggest how to apt-get install
the proper package.

At enh's suggestion, I tried running with out own local Bouncy Castle
classes to see what would happen, but the code ended up depending on
our NativeCrypto JNI code and there that isn't proper JNI code to be
loading into a RI JDK.

Also at enh's suggestion, we now prepend a JDK 1.6 bin directory to
the path for correctly correct default behavior. I do make sure it
exists and warn if it does not.

Change-Id: Ic936a6cc69fa3795e917c052ed79d19b2e66b5a1

14 years agoAdd armv7-a-neon build target
Colin Cross [Tue, 9 Mar 2010 21:23:40 +0000 (13:23 -0800)]
Add armv7-a-neon build target

Change-Id: I981d55b53f6b3c185fe93384924bdbe18057132c

14 years agoMerge "Hoist shape discrimination above thin lock owner test in the lock procedure...
Carl Shapiro [Tue, 9 Mar 2010 20:25:51 +0000 (12:25 -0800)]
Merge "Hoist shape discrimination above thin lock owner test in the lock procedure.  It is unsafe to reckon a thin lock owner without having first determined that the bit pattern of the lock word corresponds to that of a thin lock.  Without proper ordering, a monitor lock can and will be created which, excluding the shape bit, corresponds to a lock owned by the calling thread."

14 years agoAdd an empty CleanSpec.mk
Jean-Baptiste Queru [Tue, 9 Mar 2010 02:04:06 +0000 (18:04 -0800)]
Add an empty CleanSpec.mk

Change-Id: I43d2404e71aa2bc0d3d6aada35d613bb484129e7

14 years agoMerge "Adding support for getUserData() and setUserData() to DOM nodes."
Jesse Wilson [Tue, 9 Mar 2010 00:55:58 +0000 (16:55 -0800)]
Merge "Adding support for getUserData() and setUserData() to DOM nodes."

14 years agoAdding support for getUserData() and setUserData() to DOM nodes.
Jesse Wilson [Tue, 9 Mar 2010 00:19:39 +0000 (16:19 -0800)]
Adding support for getUserData() and setUserData() to DOM nodes.

Also making sure both Document and DocumentType get assigned
a Document value when possible; this is necessary to store the
user data objects.

14 years agoHoist shape discrimination above thin lock owner test in the lock
Carl Shapiro [Mon, 8 Mar 2010 22:38:42 +0000 (14:38 -0800)]
Hoist shape discrimination above thin lock owner test in the lock
procedure.  It is unsafe to reckon a thin lock owner without having
first determined that the bit pattern of the lock word corresponds to
that of a thin lock.  Without proper ordering, a monitor lock can and
will be created which, excluding the shape bit, corresponds to a lock
owned by the calling thread.

In addition, move compiler barriers so they immediately preceed base
address publication.  Also, kill cargo-cult volatiles that confounded
my bug hunt.

14 years agoJit: fix for 2483131 - VM daemon thread shutdown with JIT enabled
Bill Buzbee [Mon, 8 Mar 2010 19:30:19 +0000 (11:30 -0800)]
Jit: fix for 2483131 - VM daemon thread shutdown with JIT enabled

As part of shutdown, the Jit needs to unchain all translations so that
they can respond to suspend requests.  This change introduces a
dvmJitUnchainAll() into shutdown, and also removes some previous
housecleaning that freed our key tables.  We can't actually free those
because suspended threads in the process of shutting down may hold
references.

Change-Id: I7aad332e7195a94970c25a25b2d9fda5607bec08

14 years agoJit: Make most Jit compile failures non-fatal; just abort offending translation
Bill Buzbee [Sun, 7 Mar 2010 07:30:57 +0000 (23:30 -0800)]
Jit: Make most Jit compile failures non-fatal; just abort offending translation

Issue 2175597 Jit compile failures should abort translation, but not the VM

Added new dvmCompileAbort() to replace uses of dvmAbort() when something goes
wrong during the compliation of a trace.  In that case, we'll abort the translation
and set it's head to the interpret-only "translation".

14 years agoMerge "Jit: Fix for issue 2487769, Simplify in-line thin lock release"
Carl Shapiro [Sat, 6 Mar 2010 01:34:05 +0000 (17:34 -0800)]
Merge "Jit: Fix for issue 2487769, Simplify in-line thin lock release"

14 years agoMerge "Collect more JIT stats in the assert build."
Ben Cheng [Fri, 5 Mar 2010 23:37:30 +0000 (15:37 -0800)]
Merge "Collect more JIT stats in the assert build."

14 years agoCollect more JIT stats in the assert build.
Ben Cheng [Fri, 5 Mar 2010 23:27:21 +0000 (15:27 -0800)]
Collect more JIT stats in the assert build.

New stuff includes breakdown of callsite types (ie monomorphic vs polymorphic
vs monoporphic resolved to native), total time spent in JIT'ing, and average
JIT time per compilation.

Example output:
D/dalvikvm(  840): 4042 compilations using 1976 + 329108 bytes
D/dalvikvm(  840): Compiler arena uses 10 blocks (8100 bytes each)
D/dalvikvm(  840): Compiler work queue length is 0/36
D/dalvikvm(  840): size if 8192, entries used is 4137
D/dalvikvm(  840): JIT: 4137 traces, 8192 slots, 1099 chains, 40 thresh, Non-blocking
D/dalvikvm(  840): JIT: Lookups: 1128780 hits, 168564 misses; 179520 normal, 6 punt
D/dalvikvm(  840): JIT: noChainExit: 528464 IC miss, 194708 interp callsite, 0 switch overflow
D/dalvikvm(  840): JIT: Invoke: 507 mono, 988 poly, 72 native, 1038 return
D/dalvikvm(  840): JIT: Total compilation time: 2342 ms
D/dalvikvm(  840): JIT: Avg unit compilation time: 579 us
D/dalvikvm(  840): JIT: 3357 Translation chains, 97 interp stubs
D/dalvikvm(  840): dalvik.vm.jit.op = 0-2,4-5,7-8,a-c,e-16,19-1a,1c-23,26,28-29,2b-2f,31-3d,44-4b,4d-51,60,62-63,68-69,70-72,76-78,7b,81-82,84,87,89,8d-93,95-98,a1,a3,a6,a8-a9,b0-b3,b5-b6,bb-bf,c6-c8,d0,d2-d6,d8,da-e2,ee-f0,f2-fb,
D/dalvikvm(  840): Code size stats: 50666/105126 (compiled/total Dalvik), 329108 (native)

14 years agoMerge "Fix server side SSLEngine ServerKeyExchange signature."
Costin Manolache [Fri, 5 Mar 2010 22:56:05 +0000 (14:56 -0800)]
Merge "Fix server side SSLEngine ServerKeyExchange signature."

14 years agoJit: Fix for issue 2487769, Simplify in-line thin lock release
Bill Buzbee [Fri, 5 Mar 2010 18:56:37 +0000 (10:56 -0800)]
Jit: Fix for issue 2487769, Simplify in-line thin lock release

The Jit was using ldrex/strex to clear an owned thin lock in the
fast path.  This was not necessary - an integer store works and is
much faster.

14 years agoMerge "Implementing the Java 7 APIs for DeflaterOutputStreams."
Jesse Wilson [Fri, 5 Mar 2010 18:21:16 +0000 (10:21 -0800)]
Merge "Implementing the Java 7 APIs for DeflaterOutputStreams."

14 years agoImplementing the Java 7 APIs for DeflaterOutputStreams.
Jesse Wilson [Fri, 5 Mar 2010 01:18:44 +0000 (17:18 -0800)]
Implementing the Java 7 APIs for DeflaterOutputStreams.

See bug 1729487.

14 years agoFix server side SSLEngine ServerKeyExchange signature.
Costin Manolache [Tue, 2 Mar 2010 21:47:01 +0000 (13:47 -0800)]
Fix server side SSLEngine ServerKeyExchange signature.

Code using SSLEngine for non-blocking SSL can't talk with openssl as a client,
since the signature is computed on different content (and openssl checks it,
unlike java). The fix is to use strip the 0x00 prefix when signing - like
it is done when generating the message, refactored both to use a common
method. We also include the length in the signature, it was also missing.

14 years agoPrevent java.text.Normalizer from getting a default constructor.
Elliott Hughes [Thu, 4 Mar 2010 05:35:41 +0000 (21:35 -0800)]
Prevent java.text.Normalizer from getting a default constructor.

The dalvik continuous build's new jdiff run caught this.

14 years agoMerge "Don't call a method that can be overridden from File's constructors."
Elliott Hughes [Thu, 4 Mar 2010 02:14:40 +0000 (18:14 -0800)]
Merge "Don't call a method that can be overridden from File's constructors."

14 years agoMerge "Update local copy of getSchedulerGroup."
Andy McFadden [Thu, 4 Mar 2010 01:53:00 +0000 (17:53 -0800)]
Merge "Update local copy of getSchedulerGroup."

14 years agoDon't call a method that can be overridden from File's constructors.
Elliott Hughes [Thu, 4 Mar 2010 01:39:14 +0000 (17:39 -0800)]
Don't call a method that can be overridden from File's constructors.

Bug: 2486943

14 years agoUpdate local copy of getSchedulerGroup.
Andy McFadden [Wed, 3 Mar 2010 23:37:10 +0000 (15:37 -0800)]
Update local copy of getSchedulerGroup.

The getSchedulerGroup() in libcutils was updated, but for some reason we
have our own copy in the VM.  This change brings it up to date so we
stop crashing every time something requests a virtual stack (e.g. with a
"kill -3 <pid>").

(The function is now an exact clone -- the previous version was slightly
modified.)

14 years agoMerge "Jit: Sapphire tuning - mostly scheduling."
Bill Buzbee [Wed, 3 Mar 2010 23:30:35 +0000 (15:30 -0800)]
Merge "Jit: Sapphire tuning - mostly scheduling."

14 years agoJit: Sapphire tuning - mostly scheduling.
Bill Buzbee [Wed, 3 Mar 2010 00:14:41 +0000 (16:14 -0800)]
Jit: Sapphire tuning - mostly scheduling.

Re-enabled load/store motion that had inadvertently been turned off for
non-armv7 targets.  Tagged memory references with the kind of memory
they touch (Dalvik frame, literal pool, heap) to enable more aggressive
load hoisting.  Eliminated some largely duplicate code in the target
specific files.  Reworked temp register allocation code to allocate next
temp round-robin (to improve scheduling opportunities).

Overall, nice gain for Sapphire.  Shows 5% to 15% on some benchmarks, and
measurable improvements for Passion.

14 years agoam b16b78db: am 275acdff: Copy Froyo\'s version of MulticastSocketTest to Eclair...
Elliott Hughes [Wed, 3 Mar 2010 21:23:46 +0000 (13:23 -0800)]
am b16b78db: am 275acdff: Copy Froyo\'s version of MulticastSocketTest to Eclair for CTS.

Merge commit 'b16b78db118036d7df2cf5705baa18f34bd42eec'

* commit 'b16b78db118036d7df2cf5705baa18f34bd42eec':
  Copy Froyo's version of MulticastSocketTest to Eclair for CTS.

14 years agoam 275acdff: Copy Froyo\'s version of MulticastSocketTest to Eclair for CTS.
Elliott Hughes [Wed, 3 Mar 2010 21:12:27 +0000 (13:12 -0800)]
am 275acdff: Copy Froyo\'s version of MulticastSocketTest to Eclair for CTS.

Merge commit '275acdff64a58f407cec552e7027cb07414b48ef' into eclair-plus-aosp

* commit '275acdff64a58f407cec552e7027cb07414b48ef':
  Copy Froyo's version of MulticastSocketTest to Eclair for CTS.

14 years agoCopy Froyo's version of MulticastSocketTest to Eclair for CTS. eclair-x86
Elliott Hughes [Wed, 3 Mar 2010 07:58:39 +0000 (23:58 -0800)]
Copy Froyo's version of MulticastSocketTest to Eclair for CTS.

Partners are seeing test failures from the old tests, which were very bogus.

14 years agoMerge "Switch thread's cgroup during spin-on-suspend."
Andy McFadden [Tue, 2 Mar 2010 23:21:18 +0000 (15:21 -0800)]
Merge "Switch thread's cgroup during spin-on-suspend."

14 years agoMerge "Print the self thread id and the owning thread id in the description of the...
Carl Shapiro [Tue, 2 Mar 2010 23:12:53 +0000 (15:12 -0800)]
Merge "Print the self thread id and the owning thread id in the description of the IllegalMonitorExcpetion throw by unlockMonitor."

14 years agoUse assertEquals rather than assertTrue/assertFalse.
Elliott Hughes [Tue, 2 Mar 2010 23:04:09 +0000 (15:04 -0800)]
Use assertEquals rather than assertTrue/assertFalse.

14 years agoSwitch thread's cgroup during spin-on-suspend.
Andy McFadden [Tue, 2 Mar 2010 22:23:04 +0000 (14:23 -0800)]
Switch thread's cgroup during spin-on-suspend.

Dalvik uses a safe-point suspend mechanism, in which threads are asked
to suspend and do so at their earliest convenience.  The thread doing
the asking will sleep-spin until all threads have complied.  If a thread
keeps on running, we get a "spin on suspend" situation.

The VM tries to correct matters by raising the priority of the spinning
thread if it's below normal.  Until now it was just fiddling with the
"nice" value, but it appears that isn't enough (e.g. bug 2467653).  We
now also change the thread's process group from "background" to
"foreground" in an attempt to get it some CPU.

Also includes some changes as part of the Log Reduction Act:

- Don't log the thread stacks on the first spin-on-suspend iteration.
  The act of logging can itself be quite a drag.
- Removed the redundant and unnecessary "dumping state" line, as well
  as some dead glibc-only code.
- While waiting for daemon threads to shut down, only show the "not
  ready yet" message on the first iteration.

14 years agoAdd our home-grown Normalizer tests.
Elliott Hughes [Tue, 2 Mar 2010 21:24:31 +0000 (13:24 -0800)]
Add our home-grown Normalizer tests.

Originally https://android-git.corp.google.com/g/42517.

14 years agoMerge "Implement (but @hide) java.text.Normalizer from Java 6."
Elliott Hughes [Tue, 2 Mar 2010 04:07:07 +0000 (20:07 -0800)]
Merge "Implement (but @hide) java.text.Normalizer from Java 6."

14 years agoMerge "Implementing almost all of Document.normalizeDocument()."
Jesse Wilson [Tue, 2 Mar 2010 03:15:57 +0000 (19:15 -0800)]
Merge "Implementing almost all of Document.normalizeDocument()."

14 years agoImplementing almost all of Document.normalizeDocument().
Jesse Wilson [Tue, 2 Mar 2010 01:31:53 +0000 (17:31 -0800)]
Implementing almost all of Document.normalizeDocument().

This follows the rules specified by DOMConfiguration. In particular:
 - replacing CDATA nodes with text
 - splitting CDATA nodes
 - merging text nodes
 - stripping comments
 - detecting invalid characters

I haven't added the normalization code for XML validation or namespaces.

14 years agoImplement (but @hide) java.text.Normalizer from Java 6.
Elliott Hughes [Tue, 2 Mar 2010 00:28:05 +0000 (16:28 -0800)]
Implement (but @hide) java.text.Normalizer from Java 6.

Based on https://android-git.corp.google.com/g/42516.

Includes the harmony tests from their Java 6 branch.

Bug: 719001

14 years agoMerge "Allow unpriviledged gdbserver to attach to debuggable processes."
David 'Digit' Turner [Mon, 1 Mar 2010 23:45:58 +0000 (15:45 -0800)]
Merge "Allow unpriviledged gdbserver to attach to debuggable processes."

14 years agoAllow unpriviledged gdbserver to attach to debuggable processes.
David 'Digit' Turner [Tue, 23 Feb 2010 00:56:58 +0000 (16:56 -0800)]
Allow unpriviledged gdbserver to attach to debuggable processes.

This patch is used to allow an unprivileged gdbserver binary to
perform a ptrace attach to a debuggable process.

The kernel will only allow the attach to succeed under the following
conditions:

- gdbserver and the process are run under the exact same uids/gids
- the process is dumpable

The second condition requires this patch. The first one is ensured
by different changes to the platform (that don't directly touch Dalvik).

This is part of the work performed to allow native debugging of
applications on production devices.

14 years agoMerge "Added a simple check for stray tracked refs."
Andy McFadden [Mon, 1 Mar 2010 21:39:38 +0000 (13:39 -0800)]
Merge "Added a simple check for stray tracked refs."

14 years agoMerge "Added an x86-atom "TODO" list."
Andy McFadden [Mon, 1 Mar 2010 20:40:06 +0000 (12:40 -0800)]
Merge "Added an x86-atom "TODO" list."

14 years agoAdded an x86-atom "TODO" list.
Andy McFadden [Mon, 1 Mar 2010 20:16:12 +0000 (12:16 -0800)]
Added an x86-atom "TODO" list.

Besides the obvious things (unimplemented opcodes), this points out a
couple of changes that were made to the interpreter and require a
corresponding change for x86-atom.

14 years agoAdded a simple check for stray tracked refs.
Andy McFadden [Mon, 1 Mar 2010 18:52:00 +0000 (10:52 -0800)]
Added a simple check for stray tracked refs.

The idea is to make sure the main thread is getting through the VM init
process with an empty tracked references table.  If we find any, we
print a warning and dump the table, but continue on anyway.

My test was a trivial dvmMalloc(), which turned up a flaw in the ref
table dump code: it didn't deal with "raw" dvmMalloc sections.  So
that's fixed as well.

14 years agoMerge "New implementation for DOMConfiguration."
Jesse Wilson [Mon, 1 Mar 2010 18:21:05 +0000 (10:21 -0800)]
Merge "New implementation for DOMConfiguration."

14 years agoNew implementation for DOMConfiguration.
Jesse Wilson [Sat, 27 Feb 2010 08:00:54 +0000 (00:00 -0800)]
New implementation for DOMConfiguration.

This API is disgusting. Its not regular, not typesafe, sparsely
implemented and overly specific. I'm implementing the minimum I can
get away with - exactly the same route taken by the RI.

The Parameter stuff feels a little bit like overkill, but it allowed
me to group related chunks of code together and avoid long chains of
equalsIgnoreCase if statements.

This is necessary to implement Document.normalize(), one of the
last remaining APIs in DOMv3.

Also fixing our implementation of Node.normalize() and adding tests
to discover a bug in that code. Previously a document like this:
  "<foo>abc<br>def</foo>"
Would be normalized to this:
  "<foo>abcdef<br></foo>"
Which is a horrible bug! Yuck.

Implementation and tests for Document.normalize() are forthcoming.

14 years agoMerge "Fix a FormatFlagsConversionMismatchException bug I introduced in Froyo."
Elliott Hughes [Mon, 1 Mar 2010 18:19:46 +0000 (10:19 -0800)]
Merge "Fix a FormatFlagsConversionMismatchException bug I introduced in Froyo."

14 years agoFix a FormatFlagsConversionMismatchException bug I introduced in Froyo.
Elliott Hughes [Sun, 28 Feb 2010 19:10:10 +0000 (11:10 -0800)]
Fix a FormatFlagsConversionMismatchException bug I introduced in Froyo.

We want to show the characters representing the flags, not the decimal
values of their ASCII representation. "Use overloading judiciously",
as the man says, or cause errors like this.

Seen in FRE56B (see https://android-git.corp.google.com/g/42528).

14 years agoMerge "Don't set x86 arch variant."
Andy McFadden [Fri, 26 Feb 2010 22:25:32 +0000 (14:25 -0800)]
Merge "Don't set x86 arch variant."

14 years agoDon't set x86 arch variant.
Andy McFadden [Fri, 26 Feb 2010 21:34:01 +0000 (13:34 -0800)]
Don't set x86 arch variant.

This was a workaround for a missing bit in the core build.  No longer
needed.

14 years agoMerge "Adding tests to parse document attributes from the DOM."
Jesse Wilson [Fri, 26 Feb 2010 21:16:39 +0000 (13:16 -0800)]
Merge "Adding tests to parse document attributes from the DOM."

14 years agoAdding tests to parse document attributes from the DOM.
Jesse Wilson [Fri, 26 Feb 2010 20:17:32 +0000 (12:17 -0800)]
Adding tests to parse document attributes from the DOM.

This adds implementation and tests for these methods:
getInputEncoding(), getDocumentURI().

And tests for these methods:
getXmlEncoding(), getXmlVersion(), getXmlStandalone().

14 years agoMerge "Update a few things in x86-atom."
Andy McFadden [Fri, 26 Feb 2010 18:16:38 +0000 (10:16 -0800)]
Merge "Update a few things in x86-atom."

14 years agoUpdate a few things in x86-atom.
Andy McFadden [Fri, 26 Feb 2010 15:35:20 +0000 (07:35 -0800)]
Update a few things in x86-atom.

This replaced unuses opcodes EC and EF with C stubs for the breakpoint
and execute-inline/range instructions, which were added after the last
bunch of stuff we rolled out to eclair open-source.  I also rebuilt the
"out" dir to pick up the various other changes.

14 years agoTweak the interpreter entries and 2nd level trace filter to capture more traces.
Ben Cheng [Thu, 25 Feb 2010 04:58:44 +0000 (20:58 -0800)]
Tweak the interpreter entries and 2nd level trace filter to capture more traces.

Real changes:
1) Add a new entry point from JIT to the interpreter to request hot traces w/o
   doing chaining.
2) Increase the granularity of the secondary profile filter to match 64-byte
   chunks using 64 entries.

The remaining are just cosmetic changes.

14 years agoMerge "First pass at reorganizing org.apache.harmony.xnet.provider.jsse native code...
Brian Carlstrom [Fri, 26 Feb 2010 00:15:50 +0000 (16:15 -0800)]
Merge "First pass at reorganizing org.apache.harmony.xnet.provider.jsse native code into a single file."

14 years agoMerge "Fix a couple of typos in JIT function names."
Elliott Hughes [Fri, 26 Feb 2010 00:04:11 +0000 (16:04 -0800)]
Merge "Fix a couple of typos in JIT function names."

14 years agoFirst pass at reorganizing org.apache.harmony.xnet.provider.jsse native code into...
Brian Carlstrom [Thu, 11 Feb 2010 06:56:47 +0000 (22:56 -0800)]
First pass at reorganizing org.apache.harmony.xnet.provider.jsse native code into a single file.

At enh's suggestion, I'm consoldiating the OpenSSL related native code
into a single wrapper class NativeCrypto. This changes is the firs
step, combining the cpp code into a single NativeCode.cpp. The next
step will involved introducting a single SSL_CTX in NativeCode and
cleaning up SSL_CTX use. As part of this, I'll start moving the native
wrappers to from various OpenSSL*.java classes into NativeCode.

14 years agoMerge "Jit: fix typo that caused incorrect def mask for blr's."
Bill Buzbee [Thu, 25 Feb 2010 23:43:39 +0000 (15:43 -0800)]
Merge "Jit: fix typo that caused incorrect def mask for blr's."

14 years agoFix a couple of typos in JIT function names.
Elliott Hughes [Thu, 25 Feb 2010 23:41:42 +0000 (15:41 -0800)]
Fix a couple of typos in JIT function names.

(I saw these the other day, but preferred a separate patch.)

14 years agoJit: fix typo that caused incorrect def mask for blr's.
Bill Buzbee [Thu, 25 Feb 2010 23:38:40 +0000 (15:38 -0800)]
Jit: fix typo that caused incorrect def mask for blr's.

14 years agoMerge "Document that Class.getSigners() always returns null."
Elliott Hughes [Thu, 25 Feb 2010 22:59:44 +0000 (14:59 -0800)]
Merge "Document that Class.getSigners() always returns null."

14 years agoDocument that Class.getSigners() always returns null.
Elliott Hughes [Thu, 25 Feb 2010 22:42:17 +0000 (14:42 -0800)]
Document that Class.getSigners() always returns null.

Bug: 1594865
Bug: http://code.google.com/p/android/issues/detail?id=1766

14 years agoMerge "Rearrange JDWP cleanup."
Andy McFadden [Thu, 25 Feb 2010 22:12:32 +0000 (14:12 -0800)]
Merge "Rearrange JDWP cleanup."

14 years agoRearrange JDWP cleanup.
Andy McFadden [Thu, 25 Feb 2010 20:31:04 +0000 (12:31 -0800)]
Rearrange JDWP cleanup.

This moves the "get rid of the breakpoints" part before the "tell the
rest of the VM that there's no debugger attached" part.  Hitting a
breakpoint when there's no debugger attached is not expected.

For bug 2461667.

14 years agoMerge "Keep the order from getaddrinfo() unchanged if preferIPv6Addresses() is true."
Elliott Hughes [Thu, 25 Feb 2010 16:22:52 +0000 (08:22 -0800)]
Merge "Keep the order from getaddrinfo() unchanged if preferIPv6Addresses() is true."

14 years agoPrint the self thread id and the owning thread id in the description
Carl Shapiro [Wed, 24 Feb 2010 10:30:55 +0000 (02:30 -0800)]
Print the self thread id and the owning thread id in the description
of the IllegalMonitorExcpetion throw by unlockMonitor.

14 years agoMerge "Print "JIT" in the thread dump if the top frame is in JIT'ed code."
Ben Cheng [Thu, 25 Feb 2010 02:34:25 +0000 (18:34 -0800)]
Merge "Print "JIT" in the thread dump if the top frame is in JIT'ed code."

14 years agoMerge "Added printf attribute to exception function."
Andy McFadden [Thu, 25 Feb 2010 02:28:14 +0000 (18:28 -0800)]
Merge "Added printf attribute to exception function."