Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2013 09:11:05 -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:  <20131104141105.GE8007@raichu>
In-Reply-To: <CAHkCX6iT2MKMRwQDQrWLLjMXx9kiiYneT4J_qirxn1EwshmGng@mail.gmail.com>
References:  <CAHkCX6j1H4cxeb255gdH_cLop5Lv0xJABbuma%2B835gNNq-Nshg@mail.gmail.com> <20131103235936.GB15661@raichu> <CAHkCX6g1jUirMDP4T7W%2BrP6P8JV5wF-Wsa984op_HP1WftSitA@mail.gmail.com> <20131104043519.GB8007@raichu> <CAHkCX6h312PJvukGo_MNowNpENDLT=hvmXymZRsDFW%2BtzYNPug@mail.gmail.com> <CAHkCX6iT2MKMRwQDQrWLLjMXx9kiiYneT4J_qirxn1EwshmGng@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 04, 2013 at 04:56:43PM +0800, John Luk wrote:
> EDIT:Apologies for miss-sent mail.
> 
> Great! Seems that we're on the right way, I got the output below:
> 
> # dtrace -s ufunc.d -c ./a.out a.out
> dtrace: script 'ufunc.d' matched 5 probes
> ^C
> 
>   foo                                                               1
>   foo1                                                              1
>   main                                                              1
> 
> through the inet_makeaddr was missing. I applied the patch with:

It could be that your compiler is inlining it. Can you run the following
commands and paste the output?

# gdb ./a.out
(gdb) disas main

Thanks
-Mark

> 
> patch < libproc_sym_lookup-9.1.diff
> 
> Thanks again for your patch, Mark :)
> 
> 
> Cheers,
> spin6lock
> 
> 2013/11/4 John Luk <john.37@gmail.com>:
> > Great! Seems that we're on the right way, I got the output below:
> >
> > # dtrace -s ufunc.d -c ./a.out a.out
> > dtrace: script 'ufunc.d' matched 5 probes
> > ^C
> >
> >   foo                                                               1
> >   foo1                                                              1
> >   main                                                              1
> >
> > through the inet_makeaddr was missing. I applied the patch with:
> >
> > patch < libproc_sym_lookup-9.1.diff
> >
> > Thanks again for your patch, Mark :)
> >
> > Cheers,
> > spin6lock
> >
> >
> > 2013/11/4 Mark Johnston <markj@freebsd.org>:
> >> 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?20131104141105.GE8007>