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: Stap option to specify location of kernel binary


Hi Roland, 

Thanks for your quick reply. 

> > The release(-r) option in stap helps in building a tracing module(upto
> > pass 4) for a kernel version which is different from the currently
> > booted kernel.
> > 
> > It would be useful if user can specify the debuginfo file/path for the
> > currently running kernel. If non-root stap user has debuginfo
> > corresponding to the current kernel but does not have enuf permissions
> > to place the debuginfo file in specified paths then this feature would
> > be very useful.
> 
> You are making a distinction that I don't understand.  If you use 
> stap -r ~/mybuild when the kernel you are running right now came from
> ~/mybuild/vmlinux, doesn't it work?

Actually stap -r doesn't seem to work. 

I tried passing a directory with debug vmlinux as argument to -r option.

# stap -v -r  ~srikar/linux-2.6.24.1 ~srikar/src/examples/sig_by_pid.stp
Pass 1: parsed user script and 38 library script(s) in
200usr/10sys/216real ms.
Pass 2: analyzed script: 6 probe(s), 8 function(s), 15 embed(s), 3
global(s) in 350usr/150sys/491real ms.
Pass 3: translated to C into
"/tmp/stap0tkCpG/stap_624ddb34a6f29de63cc94db78abcdb33_16709.c" in
0usr/0sys/3real ms.
Module directory /lib/modules//home/srikar/work/linux-2.6.24.1/build
check failed: No such file or directory
Make sure kernel devel is installed.
Pass 4: compiled C into "stap_624ddb34a6f29de63cc94db78abcdb33_16709.ko"
in 0usr/0sys/0real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.


At Pass4, It seems to link with a wrong directory.


I tried passing a release (2.6.24.1)as argument to -r option.
Infact the same release as the current kernel.

# stap -v -r  2.6.24.1  ~srikar/src/examples/sig_by_pid.stp
Pass 1: parsed user script and 38 library script(s) in
190usr/10sys/197real ms.
semantic error: libdwfl failure (missing kernel 2.6.24.1 x86_64
debuginfo): No such file or directory while resolving probe point
kernel.function("__group_send_sig_info")
semantic error: no match while resolving probe point
kernel.function("send_group_sigqueue")
semantic error: no match while resolving probe point
kernel.function("send_sigqueue")
semantic error: no match while resolving probe point
kernel.function("specific_send_sig_info")
semantic error: probe point mismatch at position 2 (alternatives: part1
part2 part3 part4) while resolving probe point _signal.send.*
semantic error: no match while resolving probe point signal.send
Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 3
global(s) in 10usr/0sys/8real ms.
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.

Here again its unable to find debuginfo in Pass 1. 

I also created a directory 2.6.24.1 in the current working directory and
copied vmlinux etc into that directory.  That also doesn't seem to help
and exits with same error.

Another trivial issue is the stap seems to override pass level to 4 when
user tries to explicitly use -p5 along with -r option. I verified this
by seeing the code.  The user would have to use staprun to actually use
the module created with -r option. 


> 
> > There are two related issues here.
> > - debug vmlinux file may reside in other than the default search path of
> >   systemtap.
> 
> That's why you can give an absolute directory name to -r.
> 
> > - Filename may have a name other than vmlinux like vmdbg.
> 
> So don't do that.  It's called vmlinux.  It only finds modules called *.ko,
> not *.randomothero, too.  Forgive me for being unsympathetic.

Okay .

--
Thanks 
Srikar 


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