This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Read fault when running example network/nfsd-trace.stp stap
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Yun-Chih Chen <b03902074 at ntu dot edu dot tw>
- Cc: David Smith <dsmith at redhat dot com>, systemtap at sourceware dot org
- Date: Tue, 30 May 2017 19:00:43 -0400
- Subject: Re: Read fault when running example network/nfsd-trace.stp stap
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fche at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4764A61B8F
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4764A61B8F
- References: <CANeCTtTg0g9zP06XOVbKn-zoGujcsJiMNBebLC3vjDQ53NyYLg@mail.gmail.com> <0574e90c6ac44b1e8f4fb44029b69e7f@EXCHCAS07.ntu.internal> <CANeCTtQnLSWL9-Pq_hSzz2cf8W2YZhr1GRra2qc+jqq1COYVVw@mail.gmail.com>
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