This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch RFC] Tolerate if nsrcs>1 in iterate_over_srcfile_lines


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]