Error while executing fsrw.d from opendtrace toolkit
Ash Gokhale
ashfixit at gmail.com
Fri Apr 6 13:30:45 UTC 2018
> root at BSD11 <https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace>:/home/me/dtrace/toolkit/FS
# dtrace -s ./fsrw.d
>dtrace: failed to compile script ./fsrw.d: line 78: syntax error near ")"
(uint64_t)arg0 * (uint64_t)sizeof (uf_entry_t));
this->filep = this->ufentryp->uf_file;
self->offset = this->filep->f_offset
A bunch of the toolkit is not generally portable. You are not really
missing anything; except that those kernel structures are solaris
specific. Dtrace scripts that 'dig around' in kernel structures are
rarely portable.
What are you looking to instrument? It might be that you can write
your own dt by digging around in kernel source for yourself, or use
Devin Teskys dwatch to get what you need.
I've written some dtrace that traps zfs writes:
https://github.com/agokhale/cantrips/blob/master/dt/whowritestoadev.dtrace
And one that generates r/w size histograms for all file systems:
https://github.com/agokhale/cantrips/blob/master/dt/readwritesizehist.dt
More information about the freebsd-dtrace
mailing list