[Bug 527] New: Bad variable in hotspot.method_entry|exit probes from hotspot.stp

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Wed Jul 28 15:01:30 PDT 2010


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=527

           Summary: Bad variable in hotspot.method_entry|exit probes from
                    hotspot.stp
           Product: IcedTea
           Version: unspecified
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: IcedTea6
        AssignedTo: unassigned at icedtea.classpath.org
        ReportedBy: jon.vanalten at redhat.com


Variables $arg4 and $arg5 in these probes are pointer to and length of method
name, respectively.  In my recent build, the $arg5 (length) has been quite
wrong, giving values much larger than the length of the string.  The probe
alias sets up a $method variable using systemtap function user_string_n($arg4,
$arg5).  Which if the method name happens to be null terminated this function
manages to do the right thing, but if not there is some other character at the
end of the $method string.

Example of output:

$ stap -I/notnfs/builds/icedtea6_staptest/openjdk.build/j2sdk-image/tapset -e
'probe hotspot.method_entry { printf("method=%s   size=%d\n",method, $arg5) }'
\-c '/notnfs/builds/icedtea6_staptest/openjdk.build/j2sdk-image/jre/bin/java
-XX:+DTraceMethodProbes -version'
method=<clinit>   size=1664876552
method=registerNatives   size=1701969935
method=<clinit>   size=1664876552
method=<init>     size=1765539846
method=<init>     size=1765539846
<SNIP>

I am working from revision r7a124a6f0568
$ /notnfs/builds/icedtea6_staptest/openjdk.build/j2sdk-image/jre/bin/java
-version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9pre+r7a124a6f0568) (linux-gnu build
1.6.0_20-b20)
OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)


Some of the nonprintable characters show up as control codes if the output is
piped through less.  For example, the <init> methods above appear with "^A"
after the method name.

For reference, correct output using my Fedora 12 1.8-based install:

$ stap -e 'probe hotspot.method_entry { printf("method:%s 
length:%d\n",method,$arg5) }' -c 'java -XX:+DTraceMethodProbes -version'
method:<init>  size:6
method:<init>  size:6
method:<init>  size:6
method:<clinit>  size:8
method:registerNatives  size:15
<SNIP>


-- 
Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the distro-pkg-dev mailing list