Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2013 23:35:19 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        John Luk <john.37@gmail.com>
Cc:        freebsd-dtrace@freebsd.org
Subject:   Re: dtrace showed matched probes but nothing in output on FreeBSD 9.1-RELEASE
Message-ID:  <20131104043519.GB8007@raichu>
In-Reply-To: <CAHkCX6g1jUirMDP4T7W%2BrP6P8JV5wF-Wsa984op_HP1WftSitA@mail.gmail.com>
References:  <CAHkCX6j1H4cxeb255gdH_cLop5Lv0xJABbuma%2B835gNNq-Nshg@mail.gmail.com> <20131103235936.GB15661@raichu> <CAHkCX6g1jUirMDP4T7W%2BrP6P8JV5wF-Wsa984op_HP1WftSitA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 04, 2013 at 12:11:55PM +0800, John Luk wrote:
> Thanks, Mark. But I still got nothing :(
> The line number of your patch wasn't match with mine, I patched it
> on hand. Was it because I was on an older version of src? The head
> of proc_sym.c shows:
> 
>  $FreeBSD: release/9.1.0/lib/libproc/proc_sym.c 211184 2010-08-11
> 17:33:26Z rpaulo
> 
> And the patch of mine is include below, is it correct?

Sorry, I missed that you were on 9.1. The patch you pasted had a mistake
in it; can you instead try applying the patch here:

http://people.freebsd.org/~markj/patches/libproc_sym_lookup-9.1.diff

I created it against the 9.1 tree, so it should apply cleanly. I built and
installed the patched 9.1 libproc on a machine running head, and got the
expected behaviour:

    mark@raichu: ~/src/dtrace/ufunc $ sudo dtrace -s ufunc.d -c ./test test
    dtrace: script 'ufunc.d' matched 9 probes
    dtrace: pid 11555 has exited

      __do_global_dtors_aux                                             1
      foo                                                               1
      foo1                                                              1
      inet_makeaddr                                                     1
      main                                                              1

    mark@raichu: ~/src/dtrace/ufunc $

I don't think that this will be the final patch; checking for ET_EXEC to
determine whether to add a relocation offset seems a bit dubious; I'm
pretty sure it won't work for position-independent executables.

Thanks,
-Mark

> 
> [...]
>



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