Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Oct 2010 21:57:49 +0100
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        =?iso-8859-1?Q?Istv=E1n?= <leccine@gmail.com>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: DTrace bindings are missing in FreeBSD 9.0 - CURRENT for userland apps
Message-ID:  <7EC03A5E-61DA-46AB-95E1-1D844E10C735@FreeBSD.org>
In-Reply-To: <AANLkTins6w0znaw%2BvQ7M57cSXS1OK6aQ0KUyJMjD-ytq@mail.gmail.com>
References:  <AANLkTi=BTfcPYtO7Hby3dK7C7qiH2CXdThYyV9QBj8_T@mail.gmail.com> <DE0D21FF-0E8F-4993-87B0-69B7AA74861C@FreeBSD.org> <AANLkTins6w0znaw%2BvQ7M57cSXS1OK6aQ0KUyJMjD-ytq@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 18 Oct 2010, at 21:12, Istv=E1n wrote:

> Hey,
>=20
> how come it doesn't work?
>=20
> What are the necessary requirements for using dtrace on freebsd? Do =
you need a library or something?

It involves creating a DTrace provider and compiling it during the build =
phase. Please read: =
http://dtrace.org/blogs/ahl/user_land_tracing_gets_better

>=20
> Do you know why Ruby has no dtrace bindings on Freebsd?

You need to change the port Makefile to enable DTrace.


>=20
>=20
> Thank you.
>=20
> Istvan
>=20
>=20
> On Mon, Oct 18, 2010 at 7:45 PM, Rui Paulo <rpaulo@freebsd.org> wrote:
>=20
> On 12 Oct 2010, at 23:40, Istv=E1n wrote:
>=20
> > Hey,
> >
> >
> > I am not 100% sure this is the right list to approach with this =
problem but
> > let's try this one.
> >
> > So I am trying to use dtrace on the previously mentioned system, I =
followed
> > the usual kernel rebuild process using the following wiki:
> >
> > http://wiki.freebsd.org/DTrace
> >
> > Dtrace works fine and I am able to trace the kernel.[1]
> >
> >
> > My problem is: I can't trace any user land application including =
PostgreSQL
> > and Ruby.
> >
> > I added the following lines to the /etc/make.conf as it is written =
in the
> > wiki:
> >
> > STRIP=3D
> > CFLAGS+=3D-fno-omit-frame-pointer
> >
> > I compiled both of the softwares and trying to trace them but there =
are no
> > bindings in the dtrace -l ouput
> >
> >
> > # dtrace -l | grep -i ruby
> >
> > i might have overlooked something important but not sure what.
> >
> > Any help is appreciated. Pls cc my email since i am not on this =
list.
> >
> >
> > Thank you in advance.
> >
> > I.
> >
> > 1.
> >
> > [root@freebsd9 ~]# uname -a
> > FreeBSD freebsd9 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Fri Oct  8 =
21:09:20 UTC
> > 2010     root@freebsd9:/usr/obj/usr/src/sys/DTRACE  amd64
> > [root@freebsd9 ~]# kldstat
> > Id Refs Address            Size     Name
> > 1   26 0xffffffff80100000 f49bb0   kernel
> > 2    1 0xffffffff81212000 ad8      dtraceall.ko
> > 3    1 0xffffffff81213000 4a59     profile.ko
> > 4   11 0xffffffff81218000 3e2f     opensolaris.ko
> > 5    3 0xffffffff8121c000 3db0     cyclic.ko
> > 6    9 0xffffffff81220000 13af4b   dtrace.ko
> > 7    1 0xffffffff8135b000 fce0     systrace.ko
> > 8    1 0xffffffff8136b000 4128     sdt.ko
> > 9    1 0xffffffff81370000 44b8     lockstat.ko
> > 10    1 0xffffffff81375000 b94e     fasttrap.ko
> > 11    1 0xffffffff81381000 61ab     fbt.ko
> > 12    1 0xffffffff81388000 4a67     dtnfsclient.ko
> > 13    1 0xffffffff8138d000 4118     dtmalloc.ko
> > [root@freebsd9 ~]#
> >
> > [root@freebsd9 ~]# cat d.d
> > vfs:namecache:enter:done
> > {
> >
> >        @distribution =3D quantize(strlen((string)arg1));
> > }
> > [root@freebsd9 ~]# dtrace -s d.d
> > dtrace: script 'd.d' matched 1 probe
> > ^C
> >
> >
> >           value  ------------- Distribution ------------- count
> >               2 |                                         0
> >               4 |@@@@@@@                                  1
> >               8 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@        5
> >              16 |                                         0
> >
> >
> >
>=20
> The Ruby port doesn't have DTrace support, but the PostgreSQL port has =
a DTrace option (only the latest postgresql port).
>=20
> Regards,
> --
> Rui Paulo
>=20
>=20
>=20
>=20
>=20
> --=20
> the sun shines for all
>=20
> http://blog.l1x.me
> Use the link below to report this message as spam.
> https://lavabit.com/apps/teacher?sig=3D1414285&key=3D2325204208

Regards,
--
Rui Paulo





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7EC03A5E-61DA-46AB-95E1-1D844E10C735>