public inbox for
 help / color / mirror / Atom feed
* systemtap
@ 2021-07-09 17:44 王秋从
  0 siblings, 0 replies; 3+ messages in thread
From: 王秋从 @ 2021-07-09 17:44 UTC (permalink / raw)
  To: systemtap

[-- Attachment #1: PanCBbA0MEv.rgh --]
[-- Type: application/octet-stream, Size: 47459 bytes --]

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

* Re: SystemTap
       [not found]       ` <>
@ 2009-11-21 14:48         ` Frank Ch. Eigler
  0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2009-11-21 14:48 UTC (permalink / raw)
  To: Frans Verster; +Cc: systemtap

Hi -

> OK as soon as it works nicely i will add [ubuntu kernel rebuild
> instructions] to the wiki.


> I am trying out the samples, with one i have troubles, can you run
> inodewatch-simple.stp ?

Not quite; the old scripts transcribed into the documentation fell
behind modern kernels.  $file->f_dentry would need to be replaced with
$file->f_path->dentry.  The tapset library of script fragments is
meant to hide such changes (see tapset/vfs.stp for example), but that
script must have been written with an older version of the tapset in
mind.  With current tapset actually, you'd replace those two whole
$-expressions with:
   dev_nr = dev
   ino_nr = ino
since provide "cooked" dev & ino values.

See $prefix/share/doc/systemtap*/examples for more current samples.

- FChE

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

* Re: Systemtap
       [not found] <>
@ 2006-10-20 22:34 ` Vara Prasad
  0 siblings, 0 replies; 3+ messages in thread
From: Vara Prasad @ 2006-10-20 22:34 UTC (permalink / raw)
  To: Benjamin Thery, SystemTAP

Benjamin Thery wrote:

> [..]
> I'm trying to use Systemtap to trace some network events in order to 
> find a bug. I have a very basic knowledge of stap and there is a 
> couple of points I'd like to clarify:

Thanks for using SystemTap and we will try our best to help you.

> Placing a probe at the beginning of a given function always work, but 
> when I try to set the probe on the return statement of a function it 
> sometime fails. Stap says the probe can't be set.

Just to be sure i understand correctly, you are putting probes on a 
return statement to find when the function is returning, is it possible 
you could use return probes for the same. Return probe guarantees you 
will be able to run the handler at the time function returns no matter 
which of the return paths it takes as long as it is not an inline function.

Coming to not able to set probes on a return statement it could be 
related to compiler optimization. Was the function you are trying to do 
an inline function?

> I also have a problem when I try to set a probe at a given line in a 
> source file: sometimes it seems the probe isn't where I supposed it 
> is. For example, I tried to test if the code executed enters a 
> particular if-statement: stap trace never displayed my probe, whereas 
> I had a printk() trace that suggested the opposite).

It could be related to compiler optimization.

> Are these problems possibly due to the kernel being compiled with -O2 
> flag? Is it a side effect of optimization (similarly to debugging an 
> optimized program with gdb)?
It could be.  We know of  cases where we are not able to place probes in 
the middle of functions due to compiler optimizations hence we are 
pursuing static markers to address this issue.

> I'm wondering if it is advised to compile the kernel without 
> optimizations to be able to set probes wherever we want.
Certainly worth a try.

> Thanks for your help.
> Regards,
> Benjamin
Please let us know your results after trying without optimization.

Vara Prasad

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

end of thread, other threads:[~2021-07-09 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 17:44 systemtap 王秋从
     [not found] <>
     [not found] ` <>
     [not found]   ` <>
     [not found]     ` <>
     [not found]       ` <>
2009-11-21 14:48         ` SystemTap Frank Ch. Eigler
     [not found] <>
2006-10-20 22:34 ` Systemtap Vara Prasad

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