public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Re: Fw: Re: problem when running the following script
       [not found] ` <200905101256432501377@cse.buaa.edu.cn>
@ 2009-05-10 15:06   ` Frank Ch. Eigler
       [not found]     ` <200905110005329536333@cse.buaa.edu.cn>
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2009-05-10 15:06 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

Hi -

On Sun, May 10, 2009 at 12:56:44PM +0800, zshan wrote:
> [...]
> if I want to probe this function:  tun_chr_aio_read   , which located in the path :  kernel\driver\net\tun.c
> how can I probe that?
> 
> I did that throught the following script:
> stap -l 'kernel.function("*@/drivers/net/tun.c")'

The problem is the "kernel." part.  tun is often compiled into
a separate module, so one would use something like:

  stap -l 'module("tun").function("*@drivers/net/*")'


- FChE

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Fw: Re: problem when running the following script
       [not found]     ` <200905110005329536333@cse.buaa.edu.cn>
@ 2009-05-17 18:02       ` Frank Ch. Eigler
       [not found]         ` <200905180923257051704@cse.buaa.edu.cn>
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2009-05-17 18:02 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

Hi -

On Mon, May 11, 2009 at 12:05:34AM +0800, zshan wrote:

> [...]
> I tried the script you mentioned , but it fails, and the message is as follows:
> WARNING: cannot find module tun debuginfo: No DWARF information found
> semantic error: no match while resolving probe point module("tun").function("*@drivers/net/*")
> I wonder whether do I need to install something like tun-debuginfo
> or others ?

Well, maybe the TUN driver is not compiled into your kernel at all.
Maybe it's somehow lumped into another module.  (There is likely no
"tun-debuginfo" package.)

You could try 
% stap -l 'module("*").function("tun*")'
% stap -l 'kernel.function("tun*")'

- FChE

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
       [not found]         ` <200905180923257051704@cse.buaa.edu.cn>
@ 2009-05-18  4:34           ` Frank Ch. Eigler
       [not found]             ` <200905192224248083495@cse.buaa.edu.cn>
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2009-05-18  4:34 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

Hi -

On Mon, May 18, 2009 at 09:23:26AM +0800, zshan wrote:
> > Well, maybe the TUN driver is not compiled into your kernel at all.
> > Maybe it's somehow lumped into another module.  (There is likely no
> > "tun-debuginfo" package.)

> I run the script and it shows that: 
> semantic error: no match while resolving probe point module("*").function("tun*")
> [root@localhost ~]# stap -l 'kernel.function("tun*")'
> semantic error: no match while resolving probe point kernel.function("tun*")

grep TUN in your kernel .config file; grep tun_ in /proc/kallsyms.
If empty, you don't have tun built, so pick another driver/module.
Check that you have the correct version debuginfo for your kernel.
Try the debuginfo-free kprobes.function("FOOBAR") variant.

- FChE

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
       [not found]             ` <200905192224248083495@cse.buaa.edu.cn>
@ 2009-05-19 14:57               ` Frank Ch. Eigler
       [not found]                 ` <200905192316411523143@cse.buaa.edu.cn>
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2009-05-19 14:57 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

Hi -

On Tue, May 19, 2009 at 10:24:25PM +0800, zshan wrote:
> I run  "grep tun_ /proc/kallsyms "
> it shows that:
> f8c68000 t tun_net_open [tun]
> [...]

OK, from this we know that you do have a "tun" module.

If the tun.ko file was stripped (readelf -S .../tun.ko shows no
.debug_* sections), your distribution ought provide a tun.ko.debug
file somewhere with that information.  You will have to find out
whether this is the case, and what your distribution plans to do
about it.

Alternately, you may be able to use
   probe kprobe.function("tun_SOME_FUNCTION") { /* ... */ }
but then you won't have access to context $variables.

- FChE

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
       [not found]                 ` <200905192316411523143@cse.buaa.edu.cn>
@ 2009-05-19 15:27                   ` Frank Ch. Eigler
       [not found]                   ` <200905192324558244437@cse.buaa.edu.cn>
  1 sibling, 0 replies; 9+ messages in thread
From: Frank Ch. Eigler @ 2009-05-19 15:27 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

Hi -

On Tue, May 19, 2009 at 11:16:43PM +0800, zshan wrote:
> yes, the tun.ko.debug really exists
> find ./ -name "tun.ko.debug"
> ./usr/lib/debug/lib/modules/2.6.18-92.el5PAE/kernel/drivers/net/tun.ko.debug
> ./usr/lib/debug/lib/modules/2.6.18-92.el5/kernel/drivers/net/tun.ko.debug
> then what should I do?

Find out what systemtap is looking for:

% stap --vp 25 -e 'probe module("tun").function("tun_net_open") {}' -p4

and/or

% strace -f stap ... 2>&1 | grep tun.ko

- FChE

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
       [not found]                   ` <200905192324558244437@cse.buaa.edu.cn>
@ 2009-05-19 15:31                     ` Frank Ch. Eigler
  2009-05-19 17:07                       ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Frank Ch. Eigler @ 2009-05-19 15:31 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

Hi -

On Tue, May 19, 2009 at 11:24:56PM +0800, zshan wrote:
> I learn from the Internet that :
> the operation  "ln -s /boot/vmlinxu-debug-$(uname -r)" /lib/modules/$(uname -r)/vmlinux "
>    and "ln -s /boot/vmlinux-debug-$(uname -r)" /boot/vmlinux-$(uname -r)"  are needed 
> 
> I wonder whether they are needed?

It would be faster to try it than to ask about it.

But no, it should not be needed on your machine (rhel5 or centos based
it seems).

- FChE

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
  2009-05-19 15:31                     ` Frank Ch. Eigler
@ 2009-05-19 17:07                       ` Mark Wielaard
       [not found]                         ` <200905210813228089986@cse.buaa.edu.cn>
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Wielaard @ 2009-05-19 17:07 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: zshan, systemtap

Meta comment. Your conversation is kind of hard to follow since only one
side appears in the archives, the messages from zshan don't seem to make
it to the list:
http://sourceware.org/ml/systemtap/2009-q2/threads.html#00531


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
       [not found]                         ` <200905210813228089986@cse.buaa.edu.cn>
@ 2009-05-21  6:16                           ` Mark Wielaard
  2009-05-23 13:13                             ` Mark Wielaard
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Wielaard @ 2009-05-21  6:16 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

On Thu, 2009-05-21 at 08:13 +0800, zshan wrote:
 
> why my messages are not in the list?
> what can I do to make it success?
You seem to forget to put systemtap@sourceware.org on to To: or Cc: line
of your emails. If you do, like in this case, they will appear on the
list.

Cheers,

Mark


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Re: Re: Fw: Re: problem when running the following script
  2009-05-21  6:16                           ` Mark Wielaard
@ 2009-05-23 13:13                             ` Mark Wielaard
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Wielaard @ 2009-05-23 13:13 UTC (permalink / raw)
  To: zshan; +Cc: systemtap

On Thu, 2009-05-21 at 08:15 +0200, Mark Wielaard wrote:
> On Thu, 2009-05-21 at 08:13 +0800, zshan wrote:
>  
> > why my messages are not in the list?
> > what can I do to make it success?
> You seem to forget to put systemtap@sourceware.org on to To: or Cc: line
> of your emails. If you do, like in this case, they will appear on the
> list.

Except that they don't.
That is because the list rejects emails with large HTML attachments.
Please do send emails in plain text only.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-05-23 13:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200905091541529849322@cse.buaa.edu.cn>
     [not found] ` <200905101256432501377@cse.buaa.edu.cn>
2009-05-10 15:06   ` Fw: Re: problem when running the following script Frank Ch. Eigler
     [not found]     ` <200905110005329536333@cse.buaa.edu.cn>
2009-05-17 18:02       ` Frank Ch. Eigler
     [not found]         ` <200905180923257051704@cse.buaa.edu.cn>
2009-05-18  4:34           ` Frank Ch. Eigler
     [not found]             ` <200905192224248083495@cse.buaa.edu.cn>
2009-05-19 14:57               ` Frank Ch. Eigler
     [not found]                 ` <200905192316411523143@cse.buaa.edu.cn>
2009-05-19 15:27                   ` Frank Ch. Eigler
     [not found]                   ` <200905192324558244437@cse.buaa.edu.cn>
2009-05-19 15:31                     ` Frank Ch. Eigler
2009-05-19 17:07                       ` Mark Wielaard
     [not found]                         ` <200905210813228089986@cse.buaa.edu.cn>
2009-05-21  6:16                           ` Mark Wielaard
2009-05-23 13:13                             ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).