public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* about systemtap script
@ 2010-07-20  1:26 陈静相
  2010-07-20  1:29 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: 陈静相 @ 2010-07-20  1:26 UTC (permalink / raw)
  To: systemtap

hi --
about systemtap script
when I use this kind probe "module(MPATTERN).statement(PATTERN)"
allway write PATTERN like:*@globalvar/globalvar.c:59
the line number is a problem. I want this kind probe can support
PATTERN like this :

globalvar.c:

15:void globalvar_read()
16:{
17:   int a;
18    int b;
     ....;
30    a += 100;
31   return;
32}


if I want attch line 30, I want to use functionname add offset in function
can systemtap support this PATTERN?
or anyway can support like this?

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

* Re: about systemtap script
  2010-07-20  1:26 about systemtap script 陈静相
@ 2010-07-20  1:29 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2010-07-20  1:29 UTC (permalink / raw)
  To: 陈静相; +Cc: systemtap

This is described in the stapprobes man page.
Try .statement("globalvar_read@globalvar/globalvar.c+15").


Thanks,
Roland

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

end of thread, other threads:[~2010-07-20  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-20  1:26 about systemtap script 陈静相
2010-07-20  1:29 ` Roland McGrath

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).