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: Read fault when running example network/nfsd-trace.stp stap


Yun-Chih Chen <b03902074@ntu.edu.tw> writes:

> [...]
> To speed up the tracing, I ended up printing inode number only and get
> filename from inode number at post-processing stage:
>
> probe kernel.function("nfsd_vfs_read@fs/nfsd/vfs.c") !,
>           module("nfsd").function("nfsd_vfs_read@fs/nfsd/vfs.c") ? {
>     i = $file->f_inode;
>     inode = @cast(i, "struct inode")->i_ino;
>     printf("N %d %d %d\n", gettimeofday_ms(), inode);
> }

You can proceed a couple of ways:
- add a   try { } catch { }
  block around your context-variable expressions
- use stap --suppress-handler-errors
- use stap --skip-badvars
- add explicit checks to the variables:  if (i != 0) { ... }


- FChE


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