RFC: Test set for systemtap instrumentation
Andrew John Hughes
gnu_andrew at member.fsf.org
Wed Mar 3 08:27:16 PST 2010
On 3 March 2010 16:00, Jon VanAlten <jon.vanalten at redhat.com> wrote:
> Hi,
>
> Sorry my earlier email didn't make it clear, I was hoping someone could take a look at this and see if it is an appropriate addition to icedtea. Patch is against icedtea6 (from a week ago or so), presumably would look pretty much the same for 7.
>
> cheers,
>
> jon
>
>
> ----- "jon vanalten" <jon.vanalten at redhat.com> wrote:
>
>> Hi,
>>
>> For the past little while, I've been putting together a set of tests
>> confirming functionality of the systemtap support that was added by
>> Mark Wielaard. Currently, it is able to test that probe aliases to
>> markers in libjvm.so can be properly resolved by systemtap, and will
>> fire when expected, for all probe aliases in hotspot.stp and
>> hotspot_jni.stp. The attached patch would create a "tapset" directory
>> under the "test" directory, containing all source files needed as well
>> as a script that builds and runs the tests. Also, I've added comments
>> regarding a necessary JVM option for a particular class of probes (not
>> otherwise documented, but discovered during testing) to the
>> appropriate probe descriptions in the hotspot_jni.stp tapset.
>>
>> I'm planning on enhancing the script so that variables exposed at the
>> probe points are checked for accuracy as well, but the point where I'm
>> at now with all probes confirmed as firing seems a big milestone and
>> I'd hate to lose what's here so far in a power surge or whatnot.
>>
>> OK to commit?
>>
>> cheers,
>>
>> jon
>
I'll leave Mark to comment on the actual SystemTap usage. I don't see
any additions to the Makefile.am to make this test build and run.
Assuming it can be automated, it needs a check-systemtap target which
check-local depends on and whose body is inside an if
ENABLE_SYSTEMTAP. The script seems to have hardcoded locations:
+JAVA_EXEC="java"
+JAVAC_EXEC="javac"
+JVM_DIR="/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server/"
+JVM_SO="-ljvm"
+INCLUDE_DIR="-I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/include/
-I/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/include/linux/"
These are only likely to work on x86_64 Fedora boxes. The script
should take the JAVA_HOME as an argument and calculate the paths from
this. The Makefile can pass the location of the just-built IcedTea to
the script.
Cheers,
--
Andrew :-)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the distro-pkg-dev
mailing list