History log of /dalvik/vm/Misc.h
Revision Date Author Comments
c32a3774e9c1eeb289d71e0e53199893b6951b1b 19-Sep-2012 Andy McFadden <fadden@android.com> Log when the native trace is unavailable

This should allow us to differentiate between "couldn't get the
stack" and "didn't try to get the stack". Also show the thread's
state (e.g. 'R' for running, 'D' for uninterruptible syscall).

Bug 7053953

(cherry-pick of b3667a19f5c573b7785876979af4781292d27327.)

Change-Id: I0a40cb3d3cdd9aef8589a39586cccd9c229aa8cb
b3667a19f5c573b7785876979af4781292d27327 19-Sep-2012 Andy McFadden <fadden@android.com> Log when the native trace is unavailable

This should allow us to differentiate between "couldn't get the
stack" and "didn't try to get the stack". Also show the thread's
state (e.g. 'R' for running, 'D' for uninterruptible syscall).

Bug 7053953

Change-Id: Ibc9e6a6f0fc855a4e5e8e133122232dc939bcb16
5719d5c79558ffdbbb863ddcf61836221aba922d 22-Jun-2011 Elliott Hughes <enh@google.com> Improve -verbose:jni.

The old output just told you what functions were being called and made no
attempt to show you their arguments. The new output was sufficient to debug
an actual problem with an app we don't have the source to.

Still to do:
0. an easier way for third-party developers to enable this.
1. the primitive type arguments to SetIntField and so forth.
2. return values.

A few examples of the new output...

A decoded jclass:
JNI: libcore.io.Posix.readBytes called IsInstanceOf((JNIEnv*)0x9618470, 0x28100015, java.lang.Class<byte[]>)

A decoded jfieldID:
JNI: libcore.io.Posix.ioctlInt called GetIntField((JNIEnv*)0x9618470, 0x5cb00011, java.io.FileDescriptor.descriptor)

A decoded jmethodID (the FileDescriptor constructor):
JNI: libcore.io.Posix.open called NewObject((JNIEnv*)0x9780480, java.lang.Class<java.io.FileDescriptor>, java.io.FileDescriptor.<init>()V, ...)

A const char*:
JNI: libcore.io.Posix.getsockoptLinger called NewStringUTF((JNIEnv*)0x9618470, "getsockopt")

A jint release mode:
JNI: libcore.io.Posix.writeBytes called ReleaseByteArrayElements((JNIEnv*)0x9780480, 0x2700009, (void*) 0xf5f623c4, JNI_ABORT)

The -verbose:jni option now turns on a bit more output about JNI_OnLoad calls
but no longer causes any logging of calls to JNIEnv or JavaVM functions. The
old -Xjnitrace: option has been extended to enable this new tracing for the
native methods that it covers. They go very well together for debugging
purposes.

I've also made us a bit more verbose if we fail to initialize. In the longer
term I think we want to just abort if we hit any failure during startup, but
my extra logging will save us a bit of time next time we have one of these
failures (this one was caused for me by only having one half of the finalizer
watchdog change; I was missing the libcore side).

(Cherry pick of 6734b8224fb869c94e42e704ec03f2ce8483af2b from dalvik-dev.)

Change-Id: I69b7620b20620e9f06576da244520d9d83f89ab8
837eabb829417c1542037423c55536649de404b8 17-Jun-2011 Elliott Hughes <enh@google.com> Add and use StringAppendF.

I've also removed the dvm prefix from the existing StringPrintf.

Change-Id: I3d01f676c876957b6c6e032c674e1a06c3670021
fe7f2b3920bf5d66eda262e643245b03df3e57c8 17-Jun-2011 Elliott Hughes <enh@google.com> Improve reference table dumping.

1. Show the newest entry first; I always assume the top is the newest.
2. Use human-readable type names.
3. Improve the human-readable type name code to show _which_ Class (i.e.
java.lang.Class<java.lang.String> rather than just java.lang.Class).
4. Make it clear when we're reporting the number of elements in an array.
5. Show the first few characters of a string.
6. Show the length of a string if we truncate it.

(I've also removed some redundant casts and improved const-correctness.)

Example:

Last 10 entries in JNI local reference table:
16: 0x40f8ec70 java.lang.String "android.permissi... (41 chars)
15: 0x40f8d450 android.os.Parcel
14: 0x40f8eb90 java.lang.String "BlackSurface"
13: 0x408caca0 android.view.SurfaceSession
12: 0x40f8eb60 android.view.Surface
11: 0x406bc6f0 java.lang.Class<com.android.server.SystemServer>
10: 0x406c0278 java.lang.String "com/android/serv... (31 chars)
9: 0x4015d488 dalvik.system.PathClassLoader
8: 0x40148de8 java.lang.Class<java.lang.ClassLoader>
7: 0x406bc560 java.lang.String[]
JNI local reference table summary (17 entries):
6 of java.lang.Class<com.android.server.SystemServer> (5 unique instances)
5 of java.lang.String (5 unique instances)
1 of java.lang.String[]
1 of java.lang.String[] (2 elements)
1 of dalvik.system.PathClassLoader
1 of android.os.Parcel
1 of android.view.SurfaceSession
1 of android.view.Surface

Change-Id: I56494104cd0daada3ecc1e610f1c94df1e11c640
375fb116bcb817b37509ab579dbd55cdbb765cbf 15-Jun-2011 Carl Shapiro <cshapiro@google.com> Normalize the include guard style.

An leading underscore followed by a capital letter is a reserved
name space in C and C++.

This change also moves any #include directives within the include
guard in some of the compiler/codegen/arm header files.

Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
708f143f318bb2167c810f9506102f4ad656545c 08-Jun-2011 Elliott Hughes <enh@google.com> Improve "waiting on"/"waiting to lock" SIGQUIT dump info.

In particular, when we're waiting on a Class, say which class:

I(16573) - waiting on <0xf5ed54f8> (java.lang.Class<java.lang.ref.ReferenceQueue>)

versus:

I(16573) - waiting on <0xf5feda38> (a java.util.LinkedList)

Bug: http://code.google.com/p/android/issues/detail?id=17349
Change-Id: I844d02c008b1499adb02995ff3da25ba8cad0e0a
b08e2b6017770e887f6072c1520b2d7f2ef6916c 07-Jun-2011 Elliott Hughes <enh@google.com> Switch dvmHumanReadableDescriptor over to std::string.

(Prep work before making a change to stack dumps.)

Change-Id: I0af49b920f450fd2611e4b96e717a637483122d6
d862faa2ceae186da5518607505eb942d634ced9 28-Apr-2011 Carl Shapiro <cshapiro@google.com> Get rid of uneeded extern, enum, typedef and struct qualifiers.

Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
d5c36b9040bd26a81219a7f399513526f9b46324 16-Apr-2011 Carl Shapiro <cshapiro@google.com> Move the remaining non-compiler VM code into C++.

Change-Id: Id8693208d2741c55a7b0474d1264f2112019d11f
ae188c676c681e47a93ade7fdf0144099b470e03 08-Apr-2011 Carl Shapiro <cshapiro@google.com> Compile the garbage collector and heap profiler as C++.

Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
abd4f6e5afacb712e27e2df66479fb4b1809a63d 25-Mar-2011 Elliott Hughes <enh@google.com> Automatically dump stack traces in dvmAbort on the host.

Before:

E(25569) VM aborting (dalvikvm)

After:

E( 9806) VM aborting (dalvikvm)
W( 9806) Obtained 7 stack frames. (dalvikvm)
W( 9806) #0 /usr/local/google/home/enh/dd4/out/host/linux-x86/bin/../lib/libdvm.so(dvmPrintNativeBackTrace+0x3f) [0xf7678f2f] (dalvikvm)
W( 9806) #1 /usr/local/google/home/enh/dd4/out/host/linux-x86/bin/../lib/libdvm.so(dvmAbort+0x52) [0xf7679072] (dalvikvm)
W( 9806) #2 /usr/local/google/home/enh/dd4/out/host/linux-x86/bin/../lib/libdvm.so(dvmStartup+0x67f) [0xf767a45f] (dalvikvm)
W( 9806) #3 /usr/local/google/home/enh/dd4/out/host/linux-x86/bin/../lib/libdvm.so(JNI_CreateJavaVM+0x1ee) [0xf768152e] (dalvikvm)
W( 9806) #4 /usr/local/google/home/enh/dd4/out/host/linux-x86/bin/dalvikvm() [0x8048ae3] (dalvikvm)
W( 9806) #5 /lib32/libc.so.6(__libc_start_main+0xe6) [0xf6ed5bd6] (dalvikvm)
W( 9806) #6 /usr/local/google/home/enh/dd4/out/host/linux-x86/bin/dalvikvm() [0x8048761] (dalvikvm)

This makes continuous build crashes more directly useful, and saves having to
switch to the device/break out gdb when doing simple debugging.

Bug: 4176271
Change-Id: I49b40fd56e6aa89d1ddc7c7f299314761456fc28
00603079b8723b32c955513eae63a8f97898074d 28-Oct-2010 Ben Cheng <bccheng@android.com> Implement method parser and SSA transformation.

Change-Id: If3fb3a36f33aaee8e5fdded4e9fa607be54f0bfb
2867f0b3f48d3dcbdba9b4ba7db27f6107313663 10-Dec-2010 Andy McFadden <fadden@android.com> Split BitVector into its own file.

This just pulls the BitVector stuff out into separate files.

IIRC the motivation for building Misc.c for ARM rather than Thumb was
the bit-manipulation going on in BitVector (e.g. the use of ffs()),
so I switched that around in the makefile.

The only change of any substance was relocation of the kBitVectorGrowth
define from the .h to the .c.

Change-Id: Ib35fda81809081bd629b4f344e41f21966e1441c
5016966b91f1bc36b2bd52ec13ecfd8de1c68209 22-Nov-2010 Elliott Hughes <enh@google.com> Add dvmHumanReadableDescriptor function, and use it.

We were abusing the fact that dvmDescriptorToDot, which is actually meant
for the class loading machinery, produces more readable output than a
regular descriptor. This patch adds a dvmHumanReadableDescriptor function,
switches all the relevant callers over to it, and and reuses the code that
was already in HprodClass.c.

This means we now say "java.lang.String[]" instead of "[Ljava.lang.String;".

Note that the old hprof code would have left "I" unchanged; I modified it
to translate "I" to "int" (et cetera). This was probably an oversight because
primitive scalars can't appear on the heap, so hprof had no need to format
those types (just arrays of primitives, which it got right).

Bug: 3216276
Change-Id: I63f32a2b020674dfa62ce198ff2699ec01857540
32bc0787307ba57e92fa74c52da550e2ca22af7f 14-Sep-2010 Dan Bornstein <danfuzz@android.com> Add use of sentinel in BOOTCLASSPATH entries during preopt.

This change introduces the use of the sentinel string "/./" inside
BOOTCLASSPATH entries to signal the start of the portion of the paths
that should be preserved in optimized dex file dependency lists. It's
a little grotty, but it does serve the purpose of allowing host side
dexopt to do its thing inside a build directory without letting the
host path leading up to that build directory to leak into the results.

This change also makes it an error (instead of just a warning) for
there to be BOOTCLASSPATH entries that are not absolute paths (either
truly absolute or ones with the sentinels as per above).

FWIW, dx uses this sentinel in a similar way.

Change-Id: Ic8d0533d3ee0bd7a1d4d06fcf9232c56f0a60abf
0a3f698117bd6438d0b668dfbb72828d25a23a3b 31-Aug-2010 Andy McFadden <fadden@android.com> Show CPU# and utime/stime in the Dalvik thread dump.

This adds the "CPU number last executed on" from /proc/stat to
the Dalvik thread output. This may come in handy when looking at
thread dumps. While I was at it I added the utime/stime values,
which may not be all that useful since they represent lifetime usage
rather than recent usage.

Output appears on the schedstat line:
| schedstat=( 2930542006 9197204583 1284 ) ut=287 st=6 core=0

The routine that parses /proc/stat, previously only used for DDMS, has
been generalized. This also fixes a problem with parsing threads
whose name includes a space.

I also changed this and the /proc/schedstat code to use /proc/self
instead of /proc/%d + getpid().

Bug 2884342.

Change-Id: Iec85bc929005044427ebbb468bfa0c9693444bca
03f3b1394cc8421d125fd00455858944f0e9808d 28-Jul-2010 Carl Shapiro <cshapiro@google.com> Separately report thread suspension and garbage collection times.

The GC elapsed time written to the log used to be the sum of the time
spent suspending threads and the time spent executing the rest of the
garbage collector code. With this change we account for each of these
phases separately. With the concurrent GC, thread suspension can
dominate the GC pause times so breaking this number out gives a clear
picture of the efficiency of the underlying GC algorithm.

Also, accounting for the concurrent garbage collector is more
accurate. The start and end times did not subtract the amount of time
spent during the concurrent mark. The clock is now stopped and
restarted during the concurrent phase of the collector.

Change-Id: Icf3f8c0e183166a62ca1bf32fc77f17e3b5aa963
6e5cf6021b2f3e00e18ab402f23ab93b27c6061b 22-Jun-2010 Barry Hayes <bhayes@google.com> Quicker partial collection by using card marking.

Add calls to the card marking from the write barrier routines, so that
a write to an Object marks the appropriate card. Add code in the GC to
use and rebuild the cards at a partial GC, clearing cards in the
Zygote heap which do not in fact contain references to the application
heap.

Change-Id: Ie6f29fd096e029f48085715b282b6db8a7122555
72e93344b4d1ffc71e9c832ec23de0657e5b04a5 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
bb710e3294c57587f327c5e365353af81aa2cb5f 24-Sep-2009 Andy McFadden <fadden@android.com> Remove ((noreturn)) from dvmAbort().

Functions that could call dvmAbort() from more than one place were
merging the calls together, which is great until you need to decode a
native stack trace.

For 2144313.
4238ec2ad1ace5103b2206a483f5f03d2e96c476 25-Aug-2009 Ben Cheng <bccheng@android.com> Implement SSA-based loop optimizations.

For traces of simple natural loops (ie no invokes/side exits) null and range
checks will be hoisted in to entry block.

For acyclic traces SSA representation will be formed but no optimizations are
applied (for now).

SSA representation will be printed with the normal verbose output. For example:

D/dalvikvm( 1248): Dumping LIR insns
D/dalvikvm( 1248): installed code is at 0x428559d4
D/dalvikvm( 1248): total size is 324 bytes
D/dalvikvm( 1248): 0x428559d4 (0000): data 0x012c(300)
D/dalvikvm( 1248): -------- entry offset: 0x002b
D/dalvikvm( 1248): -------- MIR_OP_NULL_N_RANGE_UP_CHECK
D/dalvikvm( 1248): 0x428559d6 (0002): ldr r0, [r5, #36]
D/dalvikvm( 1248): 0x428559d8 (0004): ldr r1, [r5, #12]
D/dalvikvm( 1248): 0x428559da (0006): cbz r0,0x42855a06
D/dalvikvm( 1248): 0x428559dc (0008): ldr r0, [r0, #8]
D/dalvikvm( 1248): 0x428559de (000a): subs r1, #1
D/dalvikvm( 1248): 0x428559e0 (000c): cmp r1, r0
D/dalvikvm( 1248): 0x428559e2 (000e): bge 0x42855a06
D/dalvikvm( 1248): -------- MIR_OP_NULL_N_RANGE_UP_CHECK
D/dalvikvm( 1248): 0x428559e4 (0010): ldr r0, [r5, #40]
D/dalvikvm( 1248): 0x428559e6 (0012): ldr r1, [r5, #12]
D/dalvikvm( 1248): 0x428559e8 (0014): cbz r0,0x42855a06
D/dalvikvm( 1248): 0x428559ea (0016): ldr r0, [r0, #8]
D/dalvikvm( 1248): 0x428559ec (0018): subs r1, #1
D/dalvikvm( 1248): 0x428559ee (001a): cmp r1, r0
D/dalvikvm( 1248): 0x428559f0 (001c): bge 0x42855a06
D/dalvikvm( 1248): -------- MIR_OP_NULL_N_RANGE_UP_CHECK
D/dalvikvm( 1248): 0x428559f2 (001e): ldr r0, [r5, #32]
D/dalvikvm( 1248): 0x428559f4 (0020): ldr r1, [r5, #12]
D/dalvikvm( 1248): 0x428559f6 (0022): cbz r0,0x42855a06
D/dalvikvm( 1248): 0x428559f8 (0024): ldr r0, [r0, #8]
D/dalvikvm( 1248): 0x428559fa (0026): cmp r1, r0
D/dalvikvm( 1248): 0x428559fc (0028): bge 0x42855a06
D/dalvikvm( 1248): -------- MIR_OP_LOWER_BOUND_CHECK
D/dalvikvm( 1248): 0x428559fe (002a): ldr r0, [r5, #44]
D/dalvikvm( 1248): 0x42855a00 (002c): cmp r0, #1
D/dalvikvm( 1248): 0x42855a02 (002e): blt 0x42855a06
D/dalvikvm( 1248): 0x42855a04 (0030): b 0x42855a08
D/dalvikvm( 1248): 0x42855a06 (0032): b 0x42855af0
D/dalvikvm( 1248): L0x002b:
D/dalvikvm( 1248): -------- MIR_OP_PHI
D/dalvikvm( 1248): -------- s20(v11_1) <- s11(v11_0) s46(v11_2)
D/dalvikvm( 1248): -------- dalvik offset: 0x002b @ aget-wide
D/dalvikvm( 1248): -------- s21(v12_1) s22(v13_1) <- s9(v9_0) s20(v11_1)
D/dalvikvm( 1248): 0x42855a08 (0034): ldr r2, [r5, #36]
D/dalvikvm( 1248): 0x42855a0a (0036): ldr r3, [r5, #44]
D/dalvikvm( 1248): 0x42855a0c (0038): adds r2, r2, #16
D/dalvikvm( 1248): 0x42855a0e (003a): lsls r3, r3, #3
D/dalvikvm( 1248): 0x42855a10 (003c): ldr r0, [r2, r3]
D/dalvikvm( 1248): 0x42855a12 (003e): adds r2, r2, #4
D/dalvikvm( 1248): 0x42855a14 (0040): ldr r1, [r2, r3]
D/dalvikvm( 1248): -------- dalvik offset: 0x002d @ aget-wide
D/dalvikvm( 1248): -------- s23(v14_1) s24(v15_1) <- s10(v10_0) s20(v11_1)
D/dalvikvm( 1248): 0x42855a16 (0042): ldr r3, [r5, #40]
D/dalvikvm( 1248): 0x42855a18 (0044): str r0, [r5, #48]
D/dalvikvm( 1248): 0x42855a1a (0046): ldr r0, [r5, #44]
D/dalvikvm( 1248): 0x42855a1c (0048): adds r3, r3, #16
D/dalvikvm( 1248): 0x42855a1e (004a): lsls r0, r0, #3
D/dalvikvm( 1248): 0x42855a20 (004c): str r1, [r5, #52]
D/dalvikvm( 1248): 0x42855a22 (004e): ldr r1, [r3, r0]
D/dalvikvm( 1248): 0x42855a24 (0050): adds r3, r3, #4
D/dalvikvm( 1248): 0x42855a26 (0052): ldr r2, [r3, r0]
D/dalvikvm( 1248): -------- dalvik offset: 0x002f @ add-double/2addr
D/dalvikvm( 1248): -------- s25(v12_2) s26(v13_2) <- s21(v12_1) s22(v13_1) s23(v14_1) s24(v15_1)
D/dalvikvm( 1248): 0x42855a28 (0054): str r1, [r5, #56]
D/dalvikvm( 1248): 0x42855a2a (0056): str r2, [r5, #60]
D/dalvikvm( 1248): 0x42855a2c (0058): vldr d1, [r5, #48]
D/dalvikvm( 1248): 0x42855a30 (005c): vldr d2, [r5, #56]
D/dalvikvm( 1248): 0x42855a34 (0060): vadd d0, d1, d2
D/dalvikvm( 1248): -------- dalvik offset: 0x0030 @ const/4
D/dalvikvm( 1248): -------- s27(v14_2) <-
D/dalvikvm( 1248): 0x42855a38 (0064): movs r2, #1
D/dalvikvm( 1248): -------- dalvik offset: 0x0031 @ sub-int
D/dalvikvm( 1248): -------- s28(v14_3) <- s20(v11_1) s27(v14_2)
D/dalvikvm( 1248): 0x42855a3a (0066): ldr r3, [r5, #44]
D/dalvikvm( 1248): 0x42855a3c (0068): subs r0, r3, r2
D/dalvikvm( 1248): -------- dalvik offset: 0x0033 @ aget-wide
D/dalvikvm( 1248): -------- s29(v14_4) s30(v15_2) <- s8(v8_0) s28(v14_3)
D/dalvikvm( 1248): 0x42855a3e (006a): ldr r3, [r5, #32]
D/dalvikvm( 1248): 0x42855a40 (006c): adds r3, r3, #16
D/dalvikvm( 1248): 0x42855a42 (006e): str r0, [r5, #56]
D/dalvikvm( 1248): 0x42855a44 (0070): lsls r0, r0, #3
D/dalvikvm( 1248): 0x42855a46 (0072): vstr d0, [r5, #48]
D/dalvikvm( 1248): 0x42855a4a (0076): ldr r1, [r3, r0]
D/dalvikvm( 1248): 0x42855a4c (0078): adds r3, r3, #4
D/dalvikvm( 1248): 0x42855a4e (007a): ldr r2, [r3, r0]
D/dalvikvm( 1248): -------- dalvik offset: 0x0035 @ add-double/2addr
D/dalvikvm( 1248): -------- s31(v12_3) s32(v13_3) <- s25(v12_2) s26(v13_2) s29(v14_4) s30(v15_2)
D/dalvikvm( 1248): 0x42855a50 (007c): str r1, [r5, #56]
D/dalvikvm( 1248): 0x42855a52 (007e): str r2, [r5, #60]
D/dalvikvm( 1248): 0x42855a54 (0080): vldr d1, [r5, #48]
D/dalvikvm( 1248): 0x42855a58 (0084): vldr d2, [r5, #56]
D/dalvikvm( 1248): 0x42855a5c (0088): vadd d0, d1, d2
D/dalvikvm( 1248): -------- dalvik offset: 0x0036 @ add-int/lit8
D/dalvikvm( 1248): -------- s33(v14_5) <- s20(v11_1)
D/dalvikvm( 1248): 0x42855a60 (008c): ldr r2, [r5, #44]
D/dalvikvm( 1248): 0x42855a62 (008e): adds r2, r2, #1
D/dalvikvm( 1248): -------- dalvik offset: 0x0038 @ aget-wide
D/dalvikvm( 1248): -------- s34(v14_6) s35(v15_3) <- s8(v8_0) s33(v14_5)
D/dalvikvm( 1248): 0x42855a64 (0090): ldr r1, [r5, #32]
D/dalvikvm( 1248): 0x42855a66 (0092): adds r1, r1, #16
D/dalvikvm( 1248): 0x42855a68 (0094): str r2, [r5, #56]
D/dalvikvm( 1248): 0x42855a6a (0096): lsls r2, r2, #3
D/dalvikvm( 1248): 0x42855a6c (0098): vstr d0, [r5, #48]
D/dalvikvm( 1248): 0x42855a70 (009c): ldr r3, [r1, r2]
D/dalvikvm( 1248): 0x42855a72 (009e): adds r1, r1, #4
D/dalvikvm( 1248): 0x42855a74 (00a0): ldr r0, [r1, r2]
D/dalvikvm( 1248): -------- dalvik offset: 0x003a @ add-double/2addr
D/dalvikvm( 1248): -------- s36(v12_4) s37(v13_4) <- s31(v12_3) s32(v13_3) s34(v14_6) s35(v15_3)
D/dalvikvm( 1248): 0x42855a76 (00a2): str r3, [r5, #56]
D/dalvikvm( 1248): 0x42855a78 (00a4): str r0, [r5, #60]
D/dalvikvm( 1248): 0x42855a7a (00a6): vldr d1, [r5, #48]
D/dalvikvm( 1248): 0x42855a7e (00aa): vldr d2, [r5, #56]
D/dalvikvm( 1248): 0x42855a82 (00ae): vadd d0, d1, d2
D/dalvikvm( 1248): 0x42855a86 (00b2): vstr d0, [r5, #48]
D/dalvikvm( 1248): -------- dalvik offset: 0x003b @ mul-double/2addr
D/dalvikvm( 1248): -------- s38(v12_5) s39(v13_5) <- s36(v12_4) s37(v13_4) s4(v4_0) s5(v5_0)
D/dalvikvm( 1248): 0x42855a8a (00b6): vmov.f64 s2, s0
D/dalvikvm( 1248): 0x42855a8e (00ba): vldr d2, [r5, #16]
D/dalvikvm( 1248): 0x42855a92 (00be): vmuld d0, d1, d2
D/dalvikvm( 1248): -------- dalvik offset: 0x003c @ aget-wide
D/dalvikvm( 1248): -------- s40(v14_7) s41(v15_4) <- s8(v8_0) s20(v11_1)
D/dalvikvm( 1248): 0x42855a96 (00c2): ldr r2, [r5, #32]
D/dalvikvm( 1248): 0x42855a98 (00c4): ldr r3, [r5, #44]
D/dalvikvm( 1248): 0x42855a9a (00c6): adds r2, r2, #16
D/dalvikvm( 1248): 0x42855a9c (00c8): lsls r3, r3, #3
D/dalvikvm( 1248): 0x42855a9e (00ca): vstr d0, [r5, #48]
D/dalvikvm( 1248): 0x42855aa2 (00ce): ldr r0, [r2, r3]
D/dalvikvm( 1248): 0x42855aa4 (00d0): adds r2, r2, #4
D/dalvikvm( 1248): 0x42855aa6 (00d2): ldr r1, [r2, r3]
D/dalvikvm( 1248): 0x42855aa8 (00d4): str r0, [r5, #56]
D/dalvikvm( 1248): 0x42855aaa (00d6): str r1, [r5, #60]
D/dalvikvm( 1248): -------- dalvik offset: 0x003e @ mul-double
D/dalvikvm( 1248): -------- s42(v14_8) s43(v15_5) <- s40(v14_7) s41(v15_4) s16(v16_0) s17(v17_0)
D/dalvikvm( 1248): 0x42855aac (00d8): vldr d1, [r5, #56]
D/dalvikvm( 1248): 0x42855ab0 (00dc): vldr d2, [r5, #64]
D/dalvikvm( 1248): 0x42855ab4 (00e0): vmuld d0, d1, d2
D/dalvikvm( 1248): 0x42855ab8 (00e4): vstr d0, [r5, #56]
D/dalvikvm( 1248): -------- dalvik offset: 0x0040 @ add-double/2addr
D/dalvikvm( 1248): -------- s44(v12_6) s45(v13_6) <- s38(v12_5) s39(v13_5) s42(v14_8) s43(v15_5)
D/dalvikvm( 1248): 0x42855abc (00e8): vldr d1, [r5, #48]
D/dalvikvm( 1248): 0x42855ac0 (00ec): vldr d2, [r5, #56]
D/dalvikvm( 1248): 0x42855ac4 (00f0): vadd d0, d1, d2
D/dalvikvm( 1248): 0x42855ac8 (00f4): vstr d0, [r5, #48]
D/dalvikvm( 1248): -------- dalvik offset: 0x0041 @ aput-wide
D/dalvikvm( 1248): -------- s44(v12_6) s45(v13_6) s8(v8_0) s20(v11_1)
D/dalvikvm( 1248): 0x42855acc (00f8): ldr r3, [r5, #32]
D/dalvikvm( 1248): 0x42855ace (00fa): ldr r0, [r5, #44]
D/dalvikvm( 1248): 0x42855ad0 (00fc): adds r3, r3, #16
D/dalvikvm( 1248): 0x42855ad2 (00fe): ldr r1, [r5, #48]
D/dalvikvm( 1248): 0x42855ad4 (0100): ldr r2, [r5, #52]
D/dalvikvm( 1248): 0x42855ad6 (0102): lsls r0, r0, #3
D/dalvikvm( 1248): 0x42855ad8 (0104): str r1, [r3, r0]
D/dalvikvm( 1248): 0x42855ada (0106): adds r3, r3, #4
D/dalvikvm( 1248): 0x42855adc (0108): str r2, [r3, r0]
D/dalvikvm( 1248): -------- dalvik offset: 0x0043 @ add-int/lit8
D/dalvikvm( 1248): -------- s46(v11_2) <- s20(v11_1)
D/dalvikvm( 1248): 0x42855ade (010a): ldr r2, [r5, #44]
D/dalvikvm( 1248): 0x42855ae0 (010c): adds r2, r2, #1
D/dalvikvm( 1248): 0x42855ae2 (010e): str r2, [r5, #44]
D/dalvikvm( 1248): -------- dalvik offset: 0x0045 @ goto
D/dalvikvm( 1248): --------
D/dalvikvm( 1248): L0x0029:
D/dalvikvm( 1248): -------- dalvik offset: 0x0029 @ if-ge
D/dalvikvm( 1248): -------- s46(v11_2) s3(v3_0)
D/dalvikvm( 1248): 0x42855ae4 (0110): ldr r0, [r5, #44]
D/dalvikvm( 1248): 0x42855ae6 (0112): ldr r1, [r5, #12]
D/dalvikvm( 1248): 0x42855ae8 (0114): cmp r0, r1
D/dalvikvm( 1248): 0x42855aea (0116): bge 0x42855aee
D/dalvikvm( 1248): 0x42855aec (0118): b 0x42855a08
D/dalvikvm( 1248): -------- exit offset: 0x0046
D/dalvikvm( 1248): 0x42855aee (011a): b 0x42855af8
D/dalvikvm( 1248): -------- reconstruct dalvik PC : 0x42a644d6 @ +0x002b
D/dalvikvm( 1248): 0x42855af0 (011c): ldr r0, [pc, #32]
D/dalvikvm( 1248): Exception_Handling:
D/dalvikvm( 1248): 0x42855af2 (011e): ldr r1, [r6, #84]
D/dalvikvm( 1248): 0x42855af4 (0120): blx r1
D/dalvikvm( 1248): 0x42855af6 (0122): .align4
D/dalvikvm( 1248): -------- chaining cell (normal): 0x0046
D/dalvikvm( 1248): 0x42855af8 (0124): ldr r0, [r6, #76]
D/dalvikvm( 1248): 0x42855afa (0126): blx r0
D/dalvikvm( 1248): 0x42855afc (0128): data 0x450c(17676)
D/dalvikvm( 1248): 0x42855afe (012a): data 0x42a6(17062)
D/dalvikvm( 1248): 0x42855b14 (0140): .word (0x42a644d6)
D/dalvikvm( 1248): End Ljnt/scimark2/SOR;execute, 18 Dalvik instructions
87cf7312247b341b54be26904e3600e98967d695 30-Jun-2009 Andy McFadden <fadden@android.com> Inline some java.lang.Math functions.

For a first pass, I inlined the various flavors of abs(), min()/max() on
integers, sqrt(), cos(), and sin(). These were selected based on a
static analysis of a few of our jar files.

A test of repeated sin/cos/sqrt calls on a G1-class device showed an
improvement of 28%. This would improve more on devices with VFP
support if the VM is compiled with -mfpu=vfp.

Also: clarified a warning and removed some "#if 0" stuff.
e9695e5d281ad8bfbe3091e825befbedfc1b2007 17-Jun-2009 Ben Cheng <bccheng@android.com> Implemented peephole optimizations including null-check elimination, redundant ld/st elimination, ad-hoc register renaming and store sinking.
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
f6c387128427e121477c1b32ad35cdcaa5101ba3 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
f72d5de56a522ac3be03873bdde26f23a5eeeb3c 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
89c1feb0a69a7707b271086e749975b3f7acacf7 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
2ad60cfc28e14ee8f0bb038720836a4696c478ad 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution