dtrace showed matched probes but nothing in output on FreeBSD 9.1-RELEASE

Mark Johnston markj at freebsd.org
Mon Nov 4 04:35:23 UTC 2013


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 at 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 at 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

> 
> [...]
>


More information about the freebsd-dtrace mailing list