Valgrind problems on Hotspot
imdupeng at gmail.com
Mon Feb 9 10:57:24 PST 2009
Recently, I tried to use Valgrind --tool=lackey to do some analysis on
Hotspot. However, I ran into some troubles. It seems nothing can be printed
out except the startup messages listed below. But I am sure the
instrumentation code was indeed executed up to some point (not sure where).
==9919== Lackey, an example Valgrind tool.
==9919== Copyright (C) 2002-2008, and GNU GPL'd, by Nicholas Nethercote.
==9919== Using LibVEX rev 1878, a library for dynamic binary translation.
==9919== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==9919== Using valgrind-3.4.0, a dynamic binary instrumentation framework.
==9919== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==9919== For more details, rerun with: -v
==9919== My PID = 9919, parent PID = 9916. Prog and args are:
Which means the finalization function "static void lk_fini(Int exitcode)" of
valgrind (lackey), which prints out the result, can't be invoked. However,
if I use the "gamma' launcher on "Hello World" program, I could get the
results printed out properly. That being said, only "Hello World" program.
If I ran programs like SPEC JBB, it was inhibitively slow such that, from my
point of view, it almost "hanged". Therefore, the problem with "gamma" is I
can't get meaningful results out of REAL applications.
By the way, when using the official SPEC JBB, Hotspot will crash on
"JVM_handle_linux_signal(int sig, siginfo_t* info, void* ucVoid, int
abort_if_unrecognized)" in os_linux_x86.cpp (351). It turned out, to verify
the validity of the JVM, JBB deliberately does a Divide-by-Zero exception
test, which is supposed to be handled by the JVM. So, I commented out the
PepTest code and the JBB can be run under my Hotspot. However, under the
same circumstance, my local SUN JDK v6u11 did not crash on the check. Don't
>From somewhere, I learned that the "java" launcher uses "execv()", whereas
"gamma" does not. Is "execv()" the one that makes Valgrind not happy? How
can I work around this issue? What causes the significant slow down of gamma
comparing to java launcher?
ps. lackey is a simple program instrumentation tool in valgrind.
Nonetheless, same problems exist with more sophisticated tools, like
Feb 9, 2009
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-dev