This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Backward compatibility for insn probe point
- From: Maynard Johnson <maynardj at us dot ibm dot com>
- To: David Smith <dsmith at redhat dot com>
- Cc: systemtap at sourceware dot org, "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Wed, 29 Apr 2009 16:08:16 -0500
- Subject: Re: Backward compatibility for insn probe point
- References: <49D3E3DF.1000108@us.ibm.com> <49F61D09.8090503@redhat.com>
David Smith wrote:
> Maynard Johnson wrote:
>> Frank has already made the changes in runtime/itrace.c to support
>> backward compatibility with older utrace.
>> I wanted to test the insn probe point on an older utrace, so I built
>> and installed systemtap 0.9.5 on a ppc970 blade running RHEL 5.3. I
>> ran the following simple test:
>>
>> # stap -c /bin/ls simple-test.stp /bin/ls -o simple-out -k -vvv
>> where simple-test.stp is . . .
>> =========simple-test.stp ========================
>> global instrs = 0
>>
>> probe begin {
>> printf("systemtap starting probe\n")
>> }
>>
>> probe process(@1).insn {
>> instrs += 1
>> }
>>
>> probe end { printf("systemtap ending probe\n")
>> printf("itraced = %d\n", instrs)
>> }
>> ==================================
>>
>> The result of the above test is that the stap command hangs at
>> "stapio:start_cmd:195 execing target_cmd /bin/ls". If I Ctl-C the
>> job, it finished (i.e, I see "Pass 5: run completed ..."), but the
>> output file contents indicate the insn probe was not hit (i.e.,
>> "itraced = 0").
>>
>> Any suggestions on where to look for the problem?
>
> I took a look at this and fixed it. For more details, see
I've not tested the fix on x86 yet, but I'm afraid the results don't look right on ppc64/RHEL 5. But test results of 0.9.7 with your patch on ppc64/F11 were good -- no regressions. I used the following simple test script:
========================================================
global instrs = 0
probe process(@1).begin {
printf("pid %d begins\n", pid())
}
probe process(@1).end {
printf("pid %d ends\n", pid())
}
probe begin { printf("systemtap starting probe\n") }
probe process(@1).insn {
instrs += 1
}
probe end { printf("systemtap ending probe\n")
printf("itraced = %d\n", instrs)
}
========================================================
I invoked the script as follows:
stap -c /usr/bin/whoami simple-test.stp /usr/bin/whoami -o simple-out
On Fedora 11, the simple-out file showed that I had nearly 330,000 insn probe hits. On ppc64/RHEL 5.3, I had only 65 probe hits. Can you try out the above script on an x86/RHEL 5.3 system?
Thanks.
-Maynard
> <http://sources.redhat.com/bugzilla/show_bug.cgi?id=10091>.
>