Discussion:
Java JNI library load tracing
Rohitash
2010-06-24 05:59:46 UTC
Permalink
Hi,
I would like to know if its possible to trace the native library
loading ( including dependent library loads ) using Dtrace .

I'm somehow seeing a SIGBUS while I am trying to load my native
libraries , which used to work in a 32 bit Java environment . Now I am
trying to use 64-bit Java ( Java 6 ) and thats where I am hitting on the
problem . I think Java 6 has Dtrace support built in , and I did check
the documentation , but I could just find about tracing the class loads .

Appreciate if you could share your comments.

Thanks.
Mike Gerdts
2010-06-24 12:39:10 UTC
Permalink
Hi,
 I would like to know if its possible to trace the native library loading (
including dependent library loads ) using Dtrace .
I'm somehow seeing a SIGBUS while I am trying to load my native libraries ,
which used to work in a 32 bit Java environment . Now I am trying to use
64-bit Java ( Java 6 ) and thats where I am hitting on the problem . I think
Java 6 has Dtrace support built in , and I did check the documentation , but
I could just find about tracing the class loads .
Appreciate if you could share your comments.
Have you recompiled your native code into 64-bit? If not, that is the
first step. You can tell whether it is 32-bit or 64-bit with "file
/path/to/libwhatever.so".
--
Mike Gerdts
http://mgerdts.blogspot.com/
James Litchfield
2010-06-28 03:31:34 UTC
Permalink
You should be able to just do this with normal DTrace.The Java DTrace
support is for things
such as better support for looking at garbage collection and other things.
I assume that you've verified that your library had all dependencies
resolved via ldd?
Does truss show anything useful?

Jim
----
Post by Rohitash
Hi,
I would like to know if its possible to trace the native library
loading ( including dependent library loads ) using Dtrace .
I'm somehow seeing a SIGBUS while I am trying to load my native
libraries , which used to work in a 32 bit Java environment . Now I am
trying to use 64-bit Java ( Java 6 ) and thats where I am hitting on
the problem . I think Java 6 has Dtrace support built in , and I did
check the documentation , but I could just find about tracing the
class loads .
Appreciate if you could share your comments.
Thanks.
_______________________________________________
dtrace-discuss mailing list
Loading...