Pid provider

Mark Johnston markj at FreeBSD.org
Thu Sep 11 15:01:30 UTC 2014


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


More information about the freebsd-dtrace mailing list