diff options
| author | Elliott Hughes <enh@google.com> | 2010-07-07 14:47:25 -0700 |
|---|---|---|
| committer | Elliott Hughes <enh@google.com> | 2010-07-15 16:03:09 -0700 |
| commit | 8afa9dfe04354e5b3917e31e3e2772885f507580 (patch) | |
| tree | d96eab4a9f89da1615c07ee54e255d4dcff77c23 /vm/arch | |
| parent | 8e7704d14f6f756f7b1ff8a0eeaff52717ad8009 (diff) | |
| download | android_dalvik-8afa9dfe04354e5b3917e31e3e2772885f507580.tar.gz android_dalvik-8afa9dfe04354e5b3917e31e3e2772885f507580.tar.bz2 android_dalvik-8afa9dfe04354e5b3917e31e3e2772885f507580.zip | |
Tracing for developers of native methods.
The existing -verbose:jni is mainly useful for VM developers hacking on the JNI
implementation; this is intended to replace the ad hoc logging developers of
native methods need to write.
Use "-Xint:portable -Xjnitrace:ClassNameSubstring" on the command line. To
trace all native methods (mainly useful for testing the tracing), use
"-Xjnitrace:"; to trace just methods in java.util.regex.Matcher, use
"-Xjnitrace:Matcher" or "-Xjnitrace:Ljava/util/regex/Matcher;" or whatever.
To trace all the methods in Matcher and Pattern, you have to use something
like "-Xjnitrace:java/util/regex/". There's no facility for tracing an
individual method or group of methods because I haven't needed such a thing.
Here's a basic example:
-> Ljava/nio/charset/Charsets;.toUtf8Bytes([CII)[B (0x400474b8, 0, 5)
<- Ljava/nio/charset/Charsets;.toUtf8Bytes([CII)[B returned 0x40047548
Here's an example of a non-static native method:
-> Lorg/apache/harmony/luni/platform/OSFileSystem;.writeImpl(I[BII)J this=0x40012e78 (1, 0x400476d0, 0, 5)
<- Lorg/apache/harmony/luni/platform/OSFileSystem;.writeImpl(I[BII)J returned 5
Here's an interesting example showing another native method being called, and
an exception being thrown by a native method:
-> Ljava/lang/VMClassLoader;.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; (0x400466b8, false)
-> Ljava/lang/Throwable;.nativeFillInStackTrace()Ljava/lang/Object; ()
<- Ljava/lang/Throwable;.nativeFillInStackTrace()Ljava/lang/Object; returned 0x400467c8
<- Ljava/lang/VMClassLoader;.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; threw Ljava/lang/ClassNotFoundException;
(This functionality needs to be enabled at compile time. A later patch will
address that.)
Change-Id: I6da8930bd4b4f228e07b05cc59a3aea331c5cee1
Diffstat (limited to 'vm/arch')
| -rw-r--r-- | vm/arch/x86-atom/Call386ABI.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vm/arch/x86-atom/Call386ABI.S b/vm/arch/x86-atom/Call386ABI.S index 1146c2d10..db1541e25 100644 --- a/vm/arch/x86-atom/Call386ABI.S +++ b/vm/arch/x86-atom/Call386ABI.S @@ -16,7 +16,7 @@ /* * File: CallABI.S * - * Code: facitliates call to native code C and C++ routines. + * Code: facilitates call to native code C and C++ routines. * */ |
