Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2014 08:01:11 -0700
From:      Mark Johnston <markj@FreeBSD.org>
To:        Anton Yuzhaninov <citrin+bsd@citrin.ru>
Cc:        freebsd-dtrace@freebsd.org
Subject:   Re: Pid provider
Message-ID:  <20140911150111.GA71246@charmander.Belkin>
In-Reply-To: <5411A7BD.7020705@citrin.ru>
References:  <5411A7BD.7020705@citrin.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 11, 2014 at 05:46:37PM +0400, Anton Yuzhaninov wrote:
> Is PID provider is usable in FreeBSD?
> 
> I try to list probes with
> 
> dtrace -ln 'pid$target:::entry' -p NNN
> 
> And for most processes no function from main binary shown (only functions from 
> shared libraries are listed). For some only some functions are shown, e. g. for 
> tcsh only two functions shown:
>     ID   PROVIDER            MODULE                          FUNCTION NAME
> 61372   pid57232              tcsh                              glob entry
> 61373   pid57232              tcsh                          globfree entry

Is the tcsh binary stripped? The pid provider can't reliably do symbol
lookups in this case, so most of the probes will be missing. Try
rebuilding with

  cd /usr/src/bin/csh && make && make install STRIP= 

On my system this results in many more probes from the tcsh executable.

> 
> Also there is bug_or_feature: examined process terminated if dtrace command 
> terminated, e. g. run:
> dtrace -ln 'pid$target:::entry' -p XX | less
> then type q to quit from less - process with pid XX will be terminated.

Seems like a bug to me. :)
I suspect that dtrace(1) is exiting without detaching from the child
process first. Could you submit a PR for this?

Thanks,
-Mark



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