OSDN Git Service
buzbee [Fri, 14 Jan 2011 21:37:31 +0000 (13:37 -0800)]
Consolidate mterp's debug/profile/suspend control
This is a step towards full debug & profiling support in JIT'd code.
Previously, the interpreter made multiple distinct checks for pending
suspend requests, debugger and profiler checks at each safe point.
This CL moves the individual controls into a single control word,
significantly speeding up the safe-point check code path in the common
fast case.
In short, any time some VM component wants control to break at a safe
point it will set a bit in gDvm.interpBreak, which will be examined
at the safe point check in footer.S. In the old code, the safe point
check consisted of 11 instructions (including 6 loads). The new sequence
is 6 instructions (4 loads - two of which are needed and two are
speculative to fill otherwise stalling slots).
This code path is hot enough in the interpreter that we actually see
some measureable speedups in benchmarks. The old sieve benchmark
improves from 252 to 256 (~1.5%).
As part of the change, global debuggerActive and activeProfilers variables
have been eliminated as redundant. Note also that there is a subtle
change in thread suspension. Thread suspend request counts are kept on
a per-thread basis, and previously each thread would only examine its own
suspend count. With this change, a bit has been allocated in interpBreak
to signify that at least one suspend request is active across all
threads. This bit is treated as "some thread is supposed to
suspend, check to see if it's me".
Change-Id: I527dc918f58d1486ef3324136080ef541a775ba8
Carl Shapiro [Thu, 13 Jan 2011 03:34:55 +0000 (19:34 -0800)]
am
0111aa23: am
eeb834a5: Remove enumerators for stale GC reasons.
* commit '
0111aa23f186122ca874d22e619467d22be564df':
Remove enumerators for stale GC reasons.
Carl Shapiro [Thu, 13 Jan 2011 03:30:29 +0000 (19:30 -0800)]
am
eeb834a5: Remove enumerators for stale GC reasons.
* commit '
eeb834a53da2d70bea754233469e2ab7a7957d84':
Remove enumerators for stale GC reasons.
Carl Shapiro [Thu, 13 Jan 2011 03:07:16 +0000 (19:07 -0800)]
am
9f2154a5: am
bdd79095: am
4d7dd569: Handle the case of referent clearing during tracing.
* commit '
9f2154a54d121d1cde61b2be9764fc44e31f534f':
Handle the case of referent clearing during tracing.
Carl Shapiro [Thu, 13 Jan 2011 03:01:41 +0000 (19:01 -0800)]
am
bdd79095: am
4d7dd569: Handle the case of referent clearing during tracing.
* commit '
bdd790957e8656b9166542b5b4f1a1aca19e77bf':
Handle the case of referent clearing during tracing.
Carl Shapiro [Thu, 13 Jan 2011 02:21:00 +0000 (18:21 -0800)]
Remove enumerators for stale GC reasons.
Change-Id: I297e3ce5ba75e308cc994a7303d6bfc70e819737
Carl Shapiro [Thu, 13 Jan 2011 00:10:56 +0000 (16:10 -0800)]
am
7f3e6d75: am
0560c6e2: Remove the allocation limits interfaces.
* commit '
7f3e6d753b190e8c57888829a9f804f9e77ce01f':
Remove the allocation limits interfaces.
Carl Shapiro [Thu, 13 Jan 2011 00:07:00 +0000 (16:07 -0800)]
am
0560c6e2: Remove the allocation limits interfaces.
* commit '
0560c6e2b5d3f6668f26858f86ce2cff0beffd86':
Remove the allocation limits interfaces.
Carl Shapiro [Wed, 12 Jan 2011 23:54:43 +0000 (15:54 -0800)]
Remove the allocation limits interfaces.
Change-Id: I97a098fe385cc12991b8f1277683fb1146673570
Carl Shapiro [Wed, 12 Jan 2011 22:22:35 +0000 (14:22 -0800)]
am
a657b66e: am
a05f6504: Remove support for setting the minimum size of the heap at runtime.
* commit '
a657b66e6e0c59501f25e4a17df5500dafe8fa0a':
Remove support for setting the minimum size of the heap at runtime.
Carl Shapiro [Wed, 12 Jan 2011 22:18:03 +0000 (14:18 -0800)]
am
a05f6504: Remove support for setting the minimum size of the heap at runtime.
* commit '
a05f6504440ccf460477e9883c87cd70aca77b24':
Remove support for setting the minimum size of the heap at runtime.
Carl Shapiro [Wed, 12 Jan 2011 19:04:55 +0000 (11:04 -0800)]
Remove support for setting the minimum size of the heap at runtime.
Change-Id: I1752c59184325b5929532b61f4fa0feaa03b8218
Carl Shapiro [Wed, 12 Jan 2011 18:49:25 +0000 (10:49 -0800)]
am
4d7dd569: Handle the case of referent clearing during tracing.
* commit '
4d7dd56902150ab8db4c20a191bad112928839e9':
Handle the case of referent clearing during tracing.
Carl Shapiro [Wed, 12 Jan 2011 01:16:48 +0000 (17:16 -0800)]
Handle the case of referent clearing during tracing.
Reference objects with non-null referent fields are collected during
tracing for processing after the trace has completed. Before the
trace was made concurrent there was no way for a reference with a
non-null referent field to have its referent become null by any action
of the garbage collector after it was discovered. Assertions were
placed in the reference processing code to check this invariant.
After the trace was made concurrent it became possible for a user to
clear the referent field of an already discovered reference. This
violates the assertions in the reference processing code.
This change replaces the assertions in the reference processing code
with logic to deal with null referent fields. The assert in the
SoftReference preservation code has been converted to a continue that
short circuits the preservation logic. The assert in the white
reference clearing code short circuits the clearing and enqueueing.
Bug:
3342757
Change-Id: I967b011485e2691b2752500a3488fbcb54f129d3
Carl Shapiro [Wed, 12 Jan 2011 01:57:29 +0000 (17:57 -0800)]
am
255cbef2: am
15e4a632: Handle the case of referent clearing during tracing.
* commit '
255cbef2fc4cd7ee679744dbdac6dfcdf0a35ca8':
Handle the case of referent clearing during tracing.
Carl Shapiro [Wed, 12 Jan 2011 01:45:39 +0000 (17:45 -0800)]
am
15e4a632: Handle the case of referent clearing during tracing.
* commit '
15e4a6325289d37ae9264f6c072d5071905c6929':
Handle the case of referent clearing during tracing.
Carl Shapiro [Wed, 12 Jan 2011 01:16:48 +0000 (17:16 -0800)]
Handle the case of referent clearing during tracing.
Reference objects with non-null referent fields are collected during
tracing for processing after the trace has completed. Before the
trace was made concurrent there was no way for a reference with a
non-null referent field to have its referent become null by any action
of the garbage collector after it was discovered. Assertions were
placed in the reference processing code to check this invariant.
After the trace was made concurrent it became possible for a user to
clear the referent field of an already discovered reference. This
violates the assertions in the reference processing code.
This change replaces the assertions in the reference processing code
with logic to deal with null referent fields. The assert in the
SoftReference preservation code has been converted to a continue that
short circuits the preservation logic. The assert in the white
reference clearing code short circuits the clearing and enqueueing.
Change-Id: I77bd18cd1ad52e9f457b0f9b1d4e1403e5de1a98
Elliott Hughes [Wed, 12 Jan 2011 01:10:12 +0000 (17:10 -0800)]
am
e506a20f: am
05bdc2f8: Merge "Check VMRuntime.addressOf is actually passed an array." into honeycomb
* commit '
e506a20fd13b9b1a941a70311f2cc2546db520c8':
Check VMRuntime.addressOf is actually passed an array.
Elliott Hughes [Wed, 12 Jan 2011 01:05:57 +0000 (17:05 -0800)]
am
05bdc2f8: Merge "Check VMRuntime.addressOf is actually passed an array." into honeycomb
* commit '
05bdc2f83cf5c64555c3acc94449e8baeb4d48f8':
Check VMRuntime.addressOf is actually passed an array.
Elliott Hughes [Wed, 12 Jan 2011 01:04:33 +0000 (17:04 -0800)]
Merge "Check VMRuntime.addressOf is actually passed an array." into honeycomb
Carl Shapiro [Wed, 12 Jan 2011 00:43:54 +0000 (16:43 -0800)]
am
943b3a18: am
b16add6a: Merge "Remove obsolete comments about small and large object heaps." into honeycomb
* commit '
943b3a18f38752cb128b3e4e7d7113574dd43efd':
Remove obsolete comments about small and large object heaps.
Carl Shapiro [Wed, 12 Jan 2011 00:39:29 +0000 (16:39 -0800)]
am
b16add6a: Merge "Remove obsolete comments about small and large object heaps." into honeycomb
* commit '
b16add6aec5e35743f19ab540630128730263b7f':
Remove obsolete comments about small and large object heaps.
Elliott Hughes [Wed, 12 Jan 2011 00:38:30 +0000 (16:38 -0800)]
Check VMRuntime.addressOf is actually passed an array.
Change-Id: I9571f13f397303963a99e380f9e1f8ef45fd504a
Carl Shapiro [Wed, 12 Jan 2011 00:37:21 +0000 (16:37 -0800)]
Merge "Remove obsolete comments about small and large object heaps." into honeycomb
Carl Shapiro [Wed, 12 Jan 2011 00:33:53 +0000 (16:33 -0800)]
Remove obsolete comments about small and large object heaps.
It looks like somebody intended to perform segregation of objects by
their size. This was never implemented and the terminology is similar
to what is used by a forthcoming API.
Change-Id: Iff016781fedefd55961c5c5168569c83ecdf5258
buzbee [Tue, 11 Jan 2011 23:57:54 +0000 (15:57 -0800)]
Merge "[JIT] Fix obscure code cache reset bug" into dalvik-dev
buzbee [Tue, 11 Jan 2011 23:45:49 +0000 (15:45 -0800)]
[JIT] Fix obscure code cache reset bug
A recent change (dalvik-dev only) introduced a bug in translation
cache reinitialization. In real life, this would be unlikely to
ever hit as it only shows up if you use a testing mode to force
a JIT translation cache flush when the JIT is disabled.
Change-Id: If4dbf2f959ac2f6a60505a816d17caca5f6b004e
Carl Shapiro [Tue, 11 Jan 2011 22:01:53 +0000 (14:01 -0800)]
am
faf869a3: am
e0124545: (-s ours) am
6159ef45: Parameterize instance counting to include subclasses.
* commit '
faf869a34f62f9270462077ba57209b2294a0dc2':
Parameterize instance counting to include subclasses.
Carl Shapiro [Tue, 11 Jan 2011 21:52:34 +0000 (13:52 -0800)]
am
e0124545: (-s ours) am
6159ef45: Parameterize instance counting to include subclasses.
* commit '
e012454580d01d6739864d303908d3699e3153e2':
Parameterize instance counting to include subclasses.
Elliott Hughes [Tue, 11 Jan 2011 02:10:02 +0000 (18:10 -0800)]
am
f5949168: Move nio direct byte buffers onto the Java heap.
* commit '
f5949168d4142cde1582117173b03c614b632938':
Move nio direct byte buffers onto the Java heap.
Elliott Hughes [Mon, 10 Jan 2011 23:30:18 +0000 (15:30 -0800)]
Move nio direct byte buffers onto the Java heap.
Specifically, implement VMRuntime.newNonMovableArray and VMRuntime.addressOf.
For now these are pretty trivial because we don't have a copying collector,
but this (a) prevents code from allocating arbitrary amounts of direct byte
buffer without being charged for it, and (b) lets us move to a copying
collector in future.
Change-Id: I5de156dc8ac4ab5c997e18d447f635eb01ff08ab
Ben Cheng [Mon, 10 Jan 2011 21:55:42 +0000 (13:55 -0800)]
Merge-conflict cleanup.
Change-Id: I252a0b9173e130020faa3b29ba34ec39dc18bb97
Carl Shapiro [Sat, 8 Jan 2011 02:46:57 +0000 (18:46 -0800)]
am
6159ef45: Parameterize instance counting to include subclasses.
* commit '
6159ef4520073ae8e7ce7b7d1f7648b161a33302':
Parameterize instance counting to include subclasses.
Andy McFadden [Fri, 7 Jan 2011 23:14:44 +0000 (15:14 -0800)]
am
5e261cd1: jniRegisterNativeMethods should abort on failure
* commit '
5e261cd107a923ffc4d4329aa9bd19da220981c8':
jniRegisterNativeMethods should abort on failure
Andy McFadden [Fri, 7 Jan 2011 21:34:47 +0000 (13:34 -0800)]
jniRegisterNativeMethods should abort on failure
The jniRegisterNativeMethods function currently behaves like the
RegisterNatives function that it wraps, returning 0 on success and
nonzero on failure. However, this is an internal-only function used
by bits of infrastructure that should never fail to initialize. By
aborting sooner we make the failure impossible to ignore.
This doesn't appear to break anything.
Bug
3323089
Change-Id: I48d1b02d90616d4c9ee01eb0e46cb61752727c5b
Andy McFadden [Fri, 7 Jan 2011 20:54:05 +0000 (12:54 -0800)]
am
02558df0: Merge "Fix JNI GetMethodID on interfaces" into honeycomb
* commit '
02558df0173befced077255dafddcc45afa4a009':
Fix JNI GetMethodID on interfaces
Andy McFadden [Fri, 7 Jan 2011 20:50:52 +0000 (12:50 -0800)]
am
175ce8a9: Fix EABI call bridge.
* commit '
175ce8a9192e5c6dfde8493231939e30e6c40eb6':
Fix EABI call bridge.
Andy McFadden [Fri, 7 Jan 2011 20:47:28 +0000 (12:47 -0800)]
Merge "Fix JNI GetMethodID on interfaces" into honeycomb
Andy McFadden [Fri, 7 Jan 2011 01:04:05 +0000 (17:04 -0800)]
Fix JNI GetMethodID on interfaces
The GetMethodID call was only searching through methods declared by
classes and superclasses. If you passed it an interface class and
asked for a method declared in a superinterface, the call would fail.
We now have separate code for handling lookups on interfaces.
This also refactors some similar code in the interface method resolver.
Bug
3329492
(Cherry-pick from dalvik-dev)
Change-Id: Icaf744b9e75a1fd6d99f47281002cc6b3c36e368
Andy McFadden [Thu, 6 Jan 2011 21:12:53 +0000 (13:12 -0800)]
Fix EABI call bridge.
Fix two bugs in the "slow" path, which is only exercised when calling a
native method with more than 28 words of arguments. First, the code wasn't
skipping past the return type in the shorty signature, so the stack layout
was likely to be messed up if you had long/double args. Second, the type
check on the value destined for r3 was broken, which would cause problems
if the method's first arg was 32-bit and the second arg was 64-bit.
Bug
3328925
(Cherry-pick from dalvik-dev)
Change-Id: I30a1972cf394dad993df574f17b8770ba9e840dd
Andy McFadden [Fri, 7 Jan 2011 19:08:52 +0000 (11:08 -0800)]
Merge "Fix JNI GetMethodID on interfaces" into dalvik-dev
Andy McFadden [Fri, 7 Jan 2011 01:04:05 +0000 (17:04 -0800)]
Fix JNI GetMethodID on interfaces
The GetMethodID call was only searching through methods declared by
classes and superclasses. If you passed it an interface class and
asked for a method declared in a superinterface, the call would fail.
We now have separate code for handling lookups on interfaces.
This also refactors some similar code in the interface method resolver.
Bug
3329492
Change-Id: I4db505231501ef089cd1c406b4654e897bd77d48
jeffhao [Tue, 4 Jan 2011 22:18:54 +0000 (14:18 -0800)]
Added vm support for new jumbo opcodes.
This enables jumbo opcodes by default, and they will get used by the
current build without modification. Support has been added for arm, x86,
and the portable interpreter. x86-atom support is on the TODO list. This
commit also includes a test for the new jumbo opcodes.
Change-Id: Ic3f1b41b51645861c5196f76aaf0e96e727ea537
Andy McFadden [Thu, 6 Jan 2011 21:12:53 +0000 (13:12 -0800)]
Fix EABI call bridge.
Fix two bugs in the "slow" path, which is only exercised when calling a
native method with more than 28 words of arguments. First, the code wasn't
skipping past the return type in the shorty signature, so the stack layout
was likely to be messed up if you had long/double args. Second, the type
check on the value destined for r3 was broken, which would cause problems
if the method's first arg was 32-bit and the second arg was 64-bit.
Bug
3328925
Change-Id: I6f243003458e38f3afb324b505225254240a75ff
Ben Cheng [Wed, 5 Jan 2011 23:11:29 +0000 (15:11 -0800)]
Update field offsets in InterpState per Jit-to-Interp cleanup
Change-Id: Icf4aeac2fabbd0b6cd33f4d946055a9dc7e49f49
Ben Cheng [Wed, 5 Jan 2011 22:16:30 +0000 (14:16 -0800)]
resolved conflicts for merge of
4fa9da7e to dalvik-dev
Change-Id: I56b52104f50d2e67115227e61e4b250e1116135d
Ben Cheng [Wed, 5 Jan 2011 20:39:42 +0000 (12:39 -0800)]
More Jit-to-Interp entry point cleanup.
Only register entry points dispatched through [r6+#offset] in
JitToInterpEntries.
For ARM targets check the size of JitToInterpEntries explicitly to
make sure that its last entry is within 128 byte from InterpState
due to the Thumb codegen constraint.
Change-Id: I74184115cb3a3c89afc3a5fe53685671d9cb1027
Carl Shapiro [Thu, 4 Nov 2010 22:12:09 +0000 (15:12 -0700)]
Parameterize instance counting to include subclasses.
Ben Cheng [Wed, 5 Jan 2011 00:03:46 +0000 (16:03 -0800)]
am
af5aa1f4: Don\'t treat dvmJitToPatchPredictedChain as a Jit-to-Interp entry point.
* commit '
af5aa1f4ce7eecc1b47a4c038cebb67d33f08f18':
Don't treat dvmJitToPatchPredictedChain as a Jit-to-Interp entry point.
Ben Cheng [Tue, 4 Jan 2011 23:37:04 +0000 (15:37 -0800)]
Don't treat dvmJitToPatchPredictedChain as a Jit-to-Interp entry point.
It is just a native callout helper function.
Change-Id: I6398b6876f5ba579b76e732107157a4c99337796
Bill Buzbee [Mon, 27 Dec 2010 18:19:26 +0000 (10:19 -0800)]
am
a8589335: [Jit] Fix for
3311468 Maps crashed at handleFmt...
* commit '
a85893356ac4d86ef7d7dd18807d7bef95d7dddb':
[Jit] Fix for
3311468 Maps crashed at handleFmt...
Bill Buzbee [Mon, 27 Dec 2010 17:31:21 +0000 (09:31 -0800)]
[Jit] Fix for
3311468 Maps crashed at handleFmt...
Change https://android-git.corp.google.com/g/#change,86452 eliminated unused
chaining cells for direct JNI calls. However, a code path in CodegenDriver.c
assumed all similar invokes would have such cells. Slightly re-arranged the
to avoid relying on the existance of the cell in cases in which it isn't
needed.
Change-Id: Ifc28acf559455a292b4b915ef1302085557e1d81
Carl Shapiro [Thu, 23 Dec 2010 02:23:53 +0000 (18:23 -0800)]
am
9679fddf: Merge "Restore a few external allocation constants for compatibility."
* commit '
9679fddfac3aad7f4f7407ae4f285d71140f6168':
Restore a few external allocation constants for compatibility.
Ben Cheng [Thu, 23 Dec 2010 02:23:50 +0000 (18:23 -0800)]
am
d255a545: (-s ours) Eliminate the chaining cells for direct JNI calls.
* commit '
d255a545ce8f7ab1848e6932e7136465e3852b39':
Eliminate the chaining cells for direct JNI calls.
Ben Cheng [Thu, 23 Dec 2010 00:40:46 +0000 (16:40 -0800)]
resolved conflicts for merge of
d255a545 to dalvik-dev
Change-Id: Ic8caa4cac0b442d5fe6c9fa6d37568c8f8e17c33
Carl Shapiro [Thu, 23 Dec 2010 00:22:11 +0000 (16:22 -0800)]
Merge "Restore a few external allocation constants for compatibility."
Ben Cheng [Wed, 22 Dec 2010 20:27:41 +0000 (12:27 -0800)]
Eliminate the chaining cells for direct JNI calls.
The JNI code is dispatched through TEMPLATE_INVOKE_METHOD_NATIVE, so
having a chaining cell for a non-virtual native call simply wastes
space.
Change-Id: Iaf944f745a0723a7772ea168fb35f79e79b21fae
Carl Shapiro [Wed, 22 Dec 2010 20:21:01 +0000 (12:21 -0800)]
Restore a few external allocation constants for compatibility.
Aspects of the external allocation facility were exposed through the
VMDebug getAllocCount method. In a previous change I removed all of
the references to external allocation from getAllocCount. This had
the unfortunate side effect of breaking some CTS tests and causing the
VM to abort if the old constants were provided to getAllocCount on an
asserts enabled dalvik build.
The straight forward workaround seems to be to restore the special
treatment of these values in getAllocCount for as long as we support
the public interfaces of the external allocation facility. An easier
way out may have been to make the failure case of getAllocCount return
0 instead of -1 and aborting on an asserts build. Without some
analysis of API usage in market I would prefer to not change the -1
return value to 0 as it seems the thread counts currently return -1.
This change also eliminates the conditional export of the enum values
related to external allocation. Those values are published API so it
makes no sense to maintain a way to guard their inclusion.
Change-Id: I49c173e0ec305536760c7aec15eebdc29213fc56
Jesse Wilson [Wed, 22 Dec 2010 20:08:30 +0000 (12:08 -0800)]
am
0d1aac38: Revert "Remove inline natives for an unused performance test."
* commit '
0d1aac383a4bdce9feaad2f614df42234c2dcced':
Revert "Remove inline natives for an unused performance test."
Jesse Wilson [Wed, 22 Dec 2010 20:01:23 +0000 (12:01 -0800)]
Revert "Remove inline natives for an unused performance test."
This reverts commit
7ecd89dc02ce00c425788bd4989bdb6cde9a618a.
Change-Id: I427635b7e3f7be45cfde78b8046dab3b23b64562
Jesse Wilson [Wed, 22 Dec 2010 18:11:26 +0000 (10:11 -0800)]
am
a7a2d108: Update DalvikVersion due to removed NativeTestTarget
* commit '
a7a2d108b10803e2b96a56ffb3957561f5534e79':
Update DalvikVersion due to removed NativeTestTarget
Jesse Wilson [Wed, 22 Dec 2010 18:06:58 +0000 (10:06 -0800)]
Update DalvikVersion due to removed NativeTestTarget
Change-Id: I891b63a676b6c3f12fdbc5858ef12f235bc1b9c1
Jesse Wilson [Wed, 22 Dec 2010 18:02:04 +0000 (10:02 -0800)]
am
7ecd89dc: Remove inline natives for an unused performance test.
* commit '
7ecd89dc02ce00c425788bd4989bdb6cde9a618a':
Remove inline natives for an unused performance test.
Jesse Wilson [Wed, 22 Dec 2010 13:20:31 +0000 (05:20 -0800)]
Remove inline natives for an unused performance test.
Change-Id: I80cfb918bdf174aeb6de83909c840563f6b945dd
Carl Shapiro [Tue, 21 Dec 2010 03:21:40 +0000 (19:21 -0800)]
am
039167e7: Simplify the interface for waiting for a concurrent GC to complete.
* commit '
039167e7894ae16880f51fa0b4d44316318aae1e':
Simplify the interface for waiting for a concurrent GC to complete.
Carl Shapiro [Tue, 21 Dec 2010 02:33:24 +0000 (18:33 -0800)]
Simplify the interface for waiting for a concurrent GC to complete.
Previously, there was no guarantee that a GC would have completed when
the waiting routine returned. This was an oversight, and the workaround
became to wait in a loop that tested the condition that the GC running
flag was not set. The right fix was always to push the loop into the
waiting routine itself to keep the interface simple. This change backs
out the hack, moving the waiting loop to where it belongs.
Change-Id: Idc6ab6e5d4379a5da27e9e115d23d4123c7cacc4
Carl Shapiro [Mon, 20 Dec 2010 01:31:39 +0000 (17:31 -0800)]
am
e7bdd8b8: Remove the external allocation facility.
* commit '
e7bdd8b8c6f3aae552b333d0bd9664ef5e63f0a0':
Remove the external allocation facility.
Andy McFadden [Fri, 17 Dec 2010 23:46:22 +0000 (15:46 -0800)]
Factor debug locals into liveness.
If the debugger asks for a reference held in a local variable, we know
that the reference is valid because the stack is part of the root set.
With liveness analysis, it's possible for a local to be considered dead
and get GCed. Since we don't currently have a way to deal with that
in the debugging code, we just mark debugger-visible locals as live.
Bug
2534655
Change-Id: I5b217f20a76364f1f6a89499058de6ec4eb07b7d
Carl Shapiro [Fri, 17 Dec 2010 23:34:52 +0000 (15:34 -0800)]
Remove the external allocation facility.
Change-Id: Iff508a9173382f29c67ca9e6eb6f65855dce0be4
Andy McFadden [Fri, 17 Dec 2010 23:07:09 +0000 (15:07 -0800)]
Rename BackwardFlow --> Liveness
Changed my mind.
Change-Id: I16cdba8ba20a4dc60db5fbd70e591fb375c48008
Andy McFadden [Fri, 17 Dec 2010 20:34:21 +0000 (12:34 -0800)]
Merge "Fix dmtracedump." into dalvik-dev
Andy McFadden [Fri, 17 Dec 2010 19:04:18 +0000 (11:04 -0800)]
Fix dmtracedump.
This rolls back a couple of checkins that were made some time ago. The
dmtracedump tool has largely been broken ever since (only the "-o" mode
worked reliably).
The key feature this removes is "filters". I don't know what they do.
Bug
2643529
Change-Id: I602c96da7a704286715d81d3fb227f490e933fcc
buzbee [Thu, 16 Dec 2010 00:32:35 +0000 (16:32 -0800)]
[JIT] Trace profiling support
In preparation for method compilation, this CL causes all traces to
include two entry points: profiling and non-profiling. For now, the
profiling entry will only be used if dalvik is run with -Xjitprofile,
and largely works like it did before. The difference is that profiling
support no longer requires the "assert" build - it's always there now.
This will enable us to do a form of sampling profiling of
traces in order to identify hot methods or hot trace groups,
while keeping the overhead low by only switching profiling on periodically.
To turn the periodic profiling on and off, we simply unchain all existing
translations and set the appropriate global profile state. The underlying
translation lookup and chaining utilties will examine the profile state to
determine which entry point to use (i.e. - profiling or non-profiling) while
the traces naturally rechain during further execution.
Change-Id: I9ee33e69e33869b9fab3a57e88f9bc524175172b
Andy McFadden [Fri, 17 Dec 2010 15:42:48 +0000 (07:42 -0800)]
Merge "Progress on live-precise GC." into dalvik-dev
Dan Bornstein [Thu, 16 Dec 2010 23:34:56 +0000 (15:34 -0800)]
am
650177ee: Expose sysCopyFileToFile() and use it.
* commit '
650177ee24fbe07cdd9ad9d8913fbf44cf44be13':
Expose sysCopyFileToFile() and use it.
Andy McFadden [Fri, 10 Dec 2010 23:34:00 +0000 (15:34 -0800)]
Progress on live-precise GC.
This implements computation of register liveness. This is still a work
in progress. The computation is disabled by default, and when enabled
it's not yet used during the generation of register maps. The code
has not been thoughly tested.
While working on this I fiddled around with the verifier's verbose
debugging stuff a bit.
This also changes some stuff in BitVector. Unsigned ints are now
prevalent, and functions like dvmSetBit abort rather than returning a
boolean value when an illegal operation is attempted. (Some parallel
functions in the compiler were also updated.)
Bug
2534655
Change-Id: Iea161c6d63a310e1dbdac2aeeb7b7aeadda8807c
Dan Bornstein [Thu, 16 Dec 2010 21:17:30 +0000 (13:17 -0800)]
Expose sysCopyFileToFile() and use it.
Moved from ZipArchive.c, with tweaks to for argument order and name. Also
tweaked a related function in ZipArchive to match.
Change-Id: I4d2e3c8b44386d87c5aa1c4565f72da87357fce8
Dan Bornstein [Thu, 16 Dec 2010 20:59:56 +0000 (12:59 -0800)]
am
eab7355f: Hook up the preexisting RawDexFile opener.
* commit '
eab7355f9280dabcfe62fa2f21ca4e5511a59a24':
Hook up the preexisting RawDexFile opener.
Dan Bornstein [Thu, 16 Dec 2010 00:58:48 +0000 (16:58 -0800)]
Hook up the preexisting RawDexFile opener.
This one is similar in functionality to what's in JarFile.
I also made a couple minor (whitespace/comment/logging) changes to
JarFile where I spotted the opportunities.
This change makes it so that, if you happen to put a plain dex file on
your classpath (e.g., "dalvikvm -classpath /data/local/blort.dex
Blort"), it will actually be able to be used. This was documented as
working, but it was a lie...until now.
Change-Id: I2c93a8fdb40afa2d920904ab1235b7909e5837f8
Dan Bornstein [Thu, 16 Dec 2010 00:37:48 +0000 (16:37 -0800)]
am
734ff82f: Merge "Initialize my field."
* commit '
734ff82ff55be8083fe78f96ac950e2252b1ea28':
Initialize my field.
Carl Shapiro [Thu, 16 Dec 2010 00:28:14 +0000 (16:28 -0800)]
resolved conflicts for merge of
5c398996 to dalvik-dev
Change-Id: I2abd02d2840cbb74b93516bb83c604753acafd4a
Dan Bornstein [Thu, 16 Dec 2010 00:06:33 +0000 (16:06 -0800)]
Merge "Initialize my field."
Dan Bornstein [Wed, 15 Dec 2010 23:59:19 +0000 (15:59 -0800)]
Initialize my field.
<self-flagellation/>We can't count on malloc() to hand us zeroed
memory. I should know better by now.</self-flagellation>
Change-Id: If63c9d213982236e6e0362d03a4dd772b15bc73c
Carl Shapiro [Wed, 15 Dec 2010 23:58:13 +0000 (15:58 -0800)]
Merge "Never write an hprof record for a null root."
Ben Cheng [Wed, 15 Dec 2010 22:18:31 +0000 (14:18 -0800)]
Store the key value with switch and catch blocks.
For switch blocks, the key is the enum value with the case.
For catch blocks, the key is the type id of the exception.
Change-Id: I66a7e31c917aba63a0b455ce1796e3d5e277ca5a
Carl Shapiro [Wed, 15 Dec 2010 21:36:59 +0000 (13:36 -0800)]
Never write an hprof record for a null root.
The old hprof implementation was never presented with null references
but with the new visitor based implementation null references are a
possibility. With this change, the root visitor short circuits after
encountering a null reference and does write to the hprof file.
Change-Id: I38e8808a6ea43cb4361582ada4714f20ace7bea6
Dan Bornstein [Wed, 15 Dec 2010 20:46:58 +0000 (12:46 -0800)]
am
c5ba2b6a: Plumbing for loading byte[]-based dex files.
* commit '
c5ba2b6a98636c841f6cb17094503c3c8199e852':
Plumbing for loading byte[]-based dex files.
Dan Bornstein [Wed, 15 Dec 2010 00:57:00 +0000 (16:57 -0800)]
Plumbing for loading byte[]-based dex files.
This is obviously incomplete, but it's at least similarly incomplete
to the related code path it's right next to.
Change-Id: I06af6df3a4c2d648bf5b61b30a1ed5bbab4d170e
Carl Shapiro [Tue, 14 Dec 2010 02:34:16 +0000 (18:34 -0800)]
Periodically reset the thin lock polling interval.
In a worst case scenario it was possible for a thread waiting to
inflate a lock to get stuck polling once a second. With this change
the waiting thread will reset its delay back to the minimum delay
after reaching a 1 second delay.
This change also replaces a call to the obsolete usleep function with
a call to nanosleep.
Change-Id: I25bc3e3907ec070250e1d7821b7770a8d1ba9627
buzbee [Wed, 15 Dec 2010 00:22:13 +0000 (16:22 -0800)]
Merge "[JIT] Regalloc cleanup" into dalvik-dev
Carl Shapiro [Tue, 14 Dec 2010 22:19:12 +0000 (14:19 -0800)]
Get rid of the HeapRefTable type.
This was a needless alias for a ReferenceTable.
Change-Id: I3450c4a731d06da0954e6d8b441e731a06ded321
jeffhao [Tue, 14 Dec 2010 22:03:56 +0000 (14:03 -0800)]
Swapped order of registers for jumbo format 5rc to match documentation.
Change-Id: I3da544e9d71c2f4460847928cfa1df54d6c8d42e
buzbee [Tue, 14 Dec 2010 21:16:43 +0000 (13:16 -0800)]
[JIT] Regalloc cleanup
Remove vestiges of code intended for linear scan register allocation
in the trace compiler. New plan is to stick with local allocation for
traces and build a new linear scan allocator for the method compiler.
Change-Id: Ic265ab5a7936b144cbe7fa4dc667fa7aba579045
buzbee [Tue, 14 Dec 2010 19:18:49 +0000 (11:18 -0800)]
Merge "Stamp out some x86/host mode warnings" into dalvik-dev
buzbee [Tue, 14 Dec 2010 19:06:25 +0000 (11:06 -0800)]
Stamp out some x86/host mode warnings
Nuked a void* cast warnings and moved cacheflush into a target-specific
utility wrapper.
Change-Id: I36c841288b9ec7e03c0cb29b2e89db344f36fad1
Brad Fitzpatrick [Tue, 14 Dec 2010 18:58:06 +0000 (10:58 -0800)]
_Bool to bool
Change-Id: Ib89ffca7b296dd18d06a72b65fbdea6571ed95b4
Brad Fitzpatrick [Tue, 14 Dec 2010 18:44:03 +0000 (10:44 -0800)]
Merge "resolved conflicts for merge of
3b55675a to dalvik-dev" into dalvik-dev
Brad Fitzpatrick [Tue, 14 Dec 2010 18:42:39 +0000 (10:42 -0800)]
resolved conflicts for merge of
3b55675a to dalvik-dev
Change-Id: Ibcce985e9a0130ec738b6729b17eb72acccc2285
Ben Cheng [Tue, 14 Dec 2010 18:25:52 +0000 (10:25 -0800)]
Add explicit casts from "void *" to destination types.
Change-Id: I8828bc628f110aaade578a197bf1f51b30bf1be7
Brad Fitzpatrick [Tue, 14 Dec 2010 00:53:28 +0000 (16:53 -0800)]
Add a new, optional "is sensitive thread?" hook.
The Android framework implements this hook in Ie6f58d130a29.
Bug:
3226270
Change-Id: I7342248e5699a22b71647e7cfeec52ec871cefaf