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]

[Bug tapsets/18942] any script will include all the globals from tapset/argv.stp


https://sourceware.org/bugzilla/show_bug.cgi?id=18942

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from David Smith <dsmith at redhat dot com> ---
Josh Stone helped me realize that __count_envp() and __count_compat_envp()
tapset functions from tapset/linux/aux_syscalls.stp have a local variable
called 'argc'. The translator can't tell the difference between this local and
the global, so it pulled the global in.

With the variable names changed in tapset/linux/aux_syscalls.stp, no globals
get pulled into that test script.

Fixed in commit 36aa918. With this change, that same script uses no global
variables:

====
# stap -vp4 -e 'probe syscall.read { printf("%s, %s\n", name, argstr) }'
Pass 1: parsed user script and 113 library script(s) using
214560virt/32056res/2944shr/29492data kb, in 640usr/30sys/673real ms.
Pass 2: analyzed script: 1 probe(s), 5 function(s), 94 embed(s), 0 global(s)
using 250356virt/68776res/3860shr/65288data kb, in 1130usr/160sys/1290real ms.
Pass 3: translated to C into
"/tmp/stapBPUP2p/stap_80a9d5c9c352558521b5742a83e36296_54572_src.c" using
250356virt/69128res/4212shr/65288data kb, in 20usr/80sys/106real ms.
/home/dsmith/.systemtap/cache/80/stap_80a9d5c9c352558521b5742a83e36296_54572.ko
Pass 4: compiled C into "stap_80a9d5c9c352558521b5742a83e36296_54572.ko" in
11250usr/2030sys/13082real ms.
====

-- 
You are receiving this mail because:
You are the assignee for the bug.


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