This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Patch RFC] Tolerate if nsrcs>1 in iterate_over_srcfile_lines
- From: David Smith <dsmith at redhat dot com>
- To: Jia He <hejianet at gmail dot com>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, systemtap at sourceware dot org
- Date: Wed, 26 Jun 2013 10:04:26 -0500
- Subject: Re: [Patch RFC] Tolerate if nsrcs>1 in iterate_over_srcfile_lines
- References: <CAL+6Mkdtb6=0E0GrSk6fWWbO8TxRg51T9orWtYguKs=+ucamUQ at mail dot gmail dot com> <y0m7ghym4jv dot fsf at fche dot csb> <CAL+6Mkf+erf4Av7v5zck-z-uZ9N-AifoJhXMhPLT7LZHqb3VBQ at mail dot gmail dot com> <CAL+6Mkf4_KBZenAvTs9q2ZEWaNeKx+sQKg7sQcKYVKdz4=-rfg at mail dot gmail dot com>
On 06/17/2013 07:31 PM, Jia He wrote:
> Hi Frank, Do u agree or disagree with my analysis?
I'm not Frank, but I've looked at your patch. The proposed 'stap -L'
output look ok, but the following does not (the two "multiple addresses"
messages).
====
stap -p4 -ve 'probe kernel.statement("sys_nanosleep@kernel/hrtimer.c:*")
{ printf("here\n") }'
Pass 1: parsed user script and 94 library script(s) using
209488virt/27280res/3016shr/24568data kb, in 170usr/70sys/232real ms.
multiple addresses for kernel/hrtimer.c:1644 [man error::dwarf] (try
kernel/hrtimer.c:1643 or kernel/hrtimer.c:1645)
multiple addresses for kernel/hrtimer.c:1650 [man error::dwarf] (try
kernel/hrtimer.c:1649 or kernel/hrtimer.c:1651)
Pass 2: analyzed script: 7 probe(s), 0 function(s), 0 embed(s), 0
global(s) using 428896virt/103496res/22564shr/83872data kb, in
850usr/120sys/972real ms.
Pass 3: translated to C into
"/tmp/stap5k0Jxw/stap_8585646b49e1a5e52739bef89619426d_2021_src.c" using
428896virt/103788res/22856shr/83872data kb, in 10usr/0sys/10real ms.
/home/dsmith/.systemtap/cache/85/stap_8585646b49e1a5e52739bef89619426d_2021.ko
Pass 4: compiled C into "stap_8585646b49e1a5e52739bef89619426d_2021.ko"
in 2600usr/2700sys/8669real ms.
====
This certainly isn't my area of expertise, but I'm beginning to think
that both approaches are wrong. Rejecting everthing when nsrcs>1 seems
to restrictive, but accepting everything when nsrcs>1 seems too broad.
Perhaps there is a middle ground where if nsrcs>1 we go through each one
and validate it. We'd only give an error if none were usable.
To do this the existing code would probably need to be rearranged a bit.
However I'm still unsure about what to do if nsrcs>1 and more than one
validate correctly, assuming that is possible.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)