| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Change-Id: Iace5d33cbeafbf8b840bebb4bb709e32053f142d
|
| |
|
|
|
|
| |
Fixes a bug introduced in the previous patch.
Change-Id: I34ea63d323a0125c3c4ae140a2ae9b8e9ed3e1df
|
| |
|
|
|
| |
Bug: https://code.google.com/p/android/issues/detail?id=58012
Change-Id: I7b062564573107df54f9e8d71df0e1583d83d421
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that some apps swallow the UnsatisfiedLinkError, making it
really hard to work out why they failed to launch.
Before:
D dalvikvm: Trying to load lib /data/app-lib/com.adobe.air-1/libCore.so 0x415be8a8
W dalvikvm: No implementation found for native Lcom/adobe/air/AIRWindowSurfaceView;.nativeSurfaceCreated:()V
After:
D dalvikvm: Trying to load lib /data/app-lib/com.adobe.air-1/libCore.so 0x415be8a8
E dalvikvm: dlopen("/data/app-lib/com.adobe.air-1/libCore.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android10VectorImpl19reservedVectorImpl1Ev" referenced by "libCore.so"...
W dalvikvm: No implementation found for native Lcom/adobe/air/AIRWindowSurfaceView;.nativeSurfaceCreated:()V
(cherry-pick of 6567510ba1470bba6036d2b0b042425bdd03cf2b.)
Bug: 7093208
Change-Id: I4dcdff2ffe49a4897d8f5279d09a0dcc3de70db6
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Change this:
java.lang.UnsatisfiedLinkError: getSuperclass
to this:
java.lang.UnsatisfiedLinkError: Native method not found:
java.lang.Class.getSuperclass:()Ljava/lang/Class;
Change-Id: I23bd4350caf743ad9ba3524da0a10107c63af56a
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/157065
Bug: 5449033
Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
|
| |
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/156801
Bug: 5449033
Change-Id: Ic558031c75b3702d90eb78bd730501ae5d3c077b
|
| |
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/156016
Bug: 5449033
Change-Id: Ic663376d1ad6a6cb14bf81405ad9afd247cf2f60
|
| |
|
|
|
|
|
| |
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I8bd96961e369a08e86ff78b82d90f20f42787eb1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary (but not sufficient) for debugging third-party JNI bugs.
It's the second half of the logging story, but still doesn't address the
question of "how does the developer turn on the logging?".
This removes the variant JNI bridges at the cost of adding a couple of
booleans to struct Method. Performance is about the same, except synchronized
native methods are quite a bit faster after the change.
Before:
benchmark ns linear runtime
_emptyJniMethod0 333 ==========
_emptyJniMethod6 367 ===========
_emptyJniMethod6L 921 ==============================
_emptyJniStaticMethod0 259 ========
_emptyJniStaticMethod6 287 =========
_emptyJniStaticMethod6L 873 ============================
_emptyJniStaticSynchronizedMethod0 404 =============
_emptyJniSynchronizedMethod0 452 ==============
After:
benchmark ns linear runtime
_emptyJniMethod0 344 ==========
_emptyJniMethod6 348 ==========
_emptyJniMethod6L 969 ==============================
_emptyJniStaticMethod0 265 ========
_emptyJniStaticMethod6 293 =========
_emptyJniStaticMethod6L 968 =============================
_emptyJniStaticSynchronizedMethod0 265 ========
_emptyJniSynchronizedMethod0 323 ==========
A better optimization for the case where there are reference arguments
would be to keep a list of argument indexes in the struct Method, so we
could iterate directly over those arguments that need converting to
local references. That would also let us do something about the overhead
of repeatedly looking up which local reference table and cookie to use.
But now is not the time.
Change-Id: Ie32daca1b31be057a44f1ed4b5d28d1634380e1d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
(Prep work before making a change to stack dumps.)
Change-Id: I0af49b920f450fd2611e4b96e717a637483122d6
|
| |
|
|
|
|
| |
I exist to serve.
Change-Id: I8e2880b20eefd466da8515d5b6b0c5cb75d56169
|
| |
|
|
|
|
| |
Friends don't let friends end LOG() strings with newlines.
Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
|
| |
|
|
| |
Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
|
| |
|
|
|
|
|
|
|
| |
Also remove some more half-baked multi-VM cruft, fix command-line
parsing (so -Xforcecopy-fuck-yeah won't work any more), and remove
an unused #define.
Bug: 3412449
Change-Id: If914e23dd3bbcf0ac113a445777e0f550ca05703
|
| |
|
|
| |
Change-Id: Ica749f6defa890363ec531b29e25bc415dc2cbb9
|
|
|
Change-Id: Id8693208d2741c55a7b0474d1264f2112019d11f
|