History log of /dalvik/vm/Misc.cpp
Revision Date Author Comments
a5e0812ac14be9c74ae78a27ab03bb7aa5af7adf 17-Dec-2012 You Kim <you.kim72@gmail.com> Possible leak in dvmAllocRegion

In error case mmapped ptr 'base' is not munmapped.

Change-Id: I9e43841371fee6b7c092fe9a8922ae82e78805ed
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
33c8ae5bb1bb8052680108d999c608df8c72a613 22-Aug-2012 Mathieu Chartier <mathieuc@google.com> Fix for 6994917 GC is slower since JOO33B per FrameworkPerf test

Fixes the GC aspect of the regression in FrameworkTest for Gc.
Large bitmap test seems to be unaffected.

Changes are:
We now have minimum sleep of 1ms instead of 10ms in dvmSuspendAll.
Some heuristics to avoid doing extra GCs if an allocation waited for a concurrent Gc.

Change-Id: I3797c7dc813e26bd1f7bb0a9dbe55eb70dd1c9c9
c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Also fix an occurrence of LOGW missed in an earlier change.

Bug: 5449033
Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
e8e1ddccd616e8226b7cc1e4e9fdb327429249e8 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
4308417beec548c2b2c06ecec4f7f4a965b09fb2 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ic558031c75b3702d90eb78bd730501ae5d3c077b
92c1f6f1b4249e4e379452ee7b49f027052bf4ce 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I8bd96961e369a08e86ff78b82d90f20f42787eb1
3ff838ee3920ef819d207cbf4148cc9c7939ef69 14-Aug-2011 Jesse Wilson <jessewilson@google.com> Don't wrap the actual type in parens if its null.

Otherwise the exception message has unnecessary parens:
"expected receiver of type java.lang.String, but got (null)"

Change-Id: Iacd806d018019784afa6e9f25f7c039d9ca18fae
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
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
60fc806b679a3655c228b4093058c59941a49cfe 26-May-2011 Dan Bornstein <danfuzz@android.com> Further conservation of newlines.

Friends don't let friends end LOG() strings with newlines.

Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
1e1433e78f560a01744e870c19c162ab88df9dc1 21-Apr-2011 Carl Shapiro <cshapiro@google.com> Remove unneeded void argument list declarations.

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

Change-Id: Id8693208d2741c55a7b0474d1264f2112019d11f