Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 09:30:42 -0400
From:      Ash Gokhale <ashfixit@gmail.com>
To:        freebsd-dtrace@freebsd.org, aijazbaig1@gmail.com
Subject:   re: Error while executing fsrw.d from opendtrace toolkit
Message-ID:  <CAHpe%2B0Z8Thy_rtJgMWOU_44gjuMC=XwzD9HM8SP06%2BPC1d4oAw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHpe%2B0Z8Thy_rtJgMWOU_44gjuMC=XwzD9HM8SP06%2BPC1d4oAw>