|
From: rich.fromm <nos...@ya...> - 2008-02-20 23:38:46
|
rich.fromm wrote:
>
> No problems are being reported, but I suspect that the problem is that the
> code that I care about isn't actually being instrumented at all.
>
> As other *.so files are read, there are messages output like:
>
> Reading syms from foo.so
> Reading debug info from bar.so
>
> But I never see any such message for the *.so containing the JNI code.
>
> ...
>
> I tried adding "--trace-syscalls=yes" to my execution line, and I don't
> see
> any evidence of the *.so file containing the JNI code being opened.
>
I have found out how to at least allegedly get valgrind to profile my *.so,
by
setting the LD_PRELOAD environment variable to contain the name of the file.
Then I see the message:
Reading syms from <filename>
and if I run with --trace-syscalls=yes I see a sys_open() call on the file.
valgrind still isn't reporting any leaks in my code, so I still need to
explore further, but I thought I'd share this datapoint in case it benefits
anyone else.
LD_PRELOAD is documented in the LD.SO(8) man page:
LD_PRELOAD
A whitespace-separated list of additional, user-specified, ELF
shared libraries to be loaded before all others. This can be
used to selectively override functions in other shared
libraries. For setuid/setgid ELF binaries, only libraries in
the standard search directories that are also setgid will be
loaded.
- Rich
--
View this message in context: http://www.nabble.com/memcheck-of-JNI-library-loaded-via-System.loadLibrary%28%29-tp15582655p15601589.html
Sent from the Valgrind - Users mailing list archive at Nabble.com.
|