Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jun 2012 19:56:11 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: decoding of multi-byte nops in dtrace
Message-ID:  <20120610195611.5a8eeaec@fabiankeil.de>
In-Reply-To: <4FD4CD8B.1080803@FreeBSD.org>
References:  <4FD490D5.1070207@FreeBSD.org> <20120610152721.3b627896@fabiankeil.de> <4FD4CD8B.1080803@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/EdysLkl+sew/y3vrqCADOmZ
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Andriy Gapon <avg@FreeBSD.org> wrote:

> on 10/06/2012 16:27 Fabian Keil said the following:
> > Andriy Gapon <avg@FreeBSD.org> wrote:
> >=20
> >> It seems that the $subj is missing :-)
> >> In my environment that causes many functions to not have fbt return pr=
obe,
> >> because function body decoding fails before 'ret' is found.
> >>
> >> Here is my attempt at fixing the problem:
> >> http://people.freebsd.org/~avg/fbt-nop.patch
> >> Reviews and suggestions are welcome.
> >=20
> > The patch seems to reduce the number of missing
> > fbt return probes by about 50% for me.
> >=20
> > Without the patch:
> >=20
> > fk@r500 /usr/src $sudo dtrace -ln fbt::: | grep -c entry
> > 23395
> > fk@r500 /usr/src $sudo dtrace -ln fbt::: | grep -c return
> > 16739
> >=20
> > With the patch (and updated kernel sources):
> >=20
> > fk@r500 ~ $sudo dtrace -ln fbt::: | grep -c entry
> > 23409
> > fk@r500 ~ $sudo dtrace -ln fbt::: | grep -c return
> > 19879
>=20
> Interesting observations, thank you.
> Do you use -O2 or higher optimization for kernel/modules build?

Yes, I kept the default -O2.

> I use only -O1.

With -O1 (and your patch) I get:

fk@r500 ~ $sudo dtrace -ln fbt::: | grep -c entry
23421
fk@r500 ~ $sudo dtrace -ln fbt::: | grep -c return
22621

> Here are some stats from my system:
> $ dtrace -ln fbt::: | fgrep -c entry
> 16876
> $ dtrace -ln fbt::: | fgrep -c return
> 16729
>=20
> So, 147 functions without return probe.
> >From a quick look at them they all seem to really never return.  Either =
they are
> noreturn type such panic, or functions that always call the functions of =
the
> first type, or functions with endless loops in them such as top level fun=
ctions
> of many system threads.

I looked at a couple of the functions that still lack return
probes and the ones I looked at don't seem to belong into these
categories.

For example I get no return probes for g_eli_crypto_decrypt()
and g_eli_crypto_encrypt(). Both return the return code of
g_eli_crypto_cipher() for which I get a return probe.

Fabian

--Sig_/EdysLkl+sew/y3vrqCADOmZ
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAk/U378ACgkQBYqIVf93VJ3bogCdHji0xGZCixxxcUhmTImxORzI
tNEAoLigOjhi16L/CvR/w4vw8XnJeVlh
=YNSV
-----END PGP SIGNATURE-----

--Sig_/EdysLkl+sew/y3vrqCADOmZ--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120610195611.5a8eeaec>