From owner-freebsd-dtrace@FreeBSD.ORG Thu Sep 11 15:01:30 2014 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BAAF5A9 for ; Thu, 11 Sep 2014 15:01:30 +0000 (UTC) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7005A8FE for ; Thu, 11 Sep 2014 15:01:30 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kq14so6974014pab.25 for ; Thu, 11 Sep 2014 08:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=aCUUeALa/ZzJOLqV/rkPsNcjO3K1qTjOIxGU70tHQ8g=; b=izmELcd6yj+FbCdTGcOfu9gSfgAfIyf6SRVf3k89Vmqi75CxcYa5Wa/lafFsxIuZ0r IumNYe0cngnd3txhO/E9ZLcCqbfGpNb1qjQP1O5Syersfy32RIXnZ9D6VCV0+8oGAqz0 T55iAkMswHSjHh/j4WVdQzw/R6m9R+53tr2U6TMJVYR8gWW54f9L1auLGs5ISDXloKtK cy5VuWZuP2q4pxe/keA4FTDFsCwjO7V+/su+SB5Cu1PaODR9zrVkw/ioRNOOt2VJoBWY fpKcZv4IMzy/GNiHoty9LoWEeFI+C7FAac0cNJHuu4PCZLb0/hHRZfCrz2xTcFCcPVNc 7qPw== X-Received: by 10.68.69.97 with SMTP id d1mr2331061pbu.49.1410447689484; Thu, 11 Sep 2014 08:01:29 -0700 (PDT) Received: from charmander.Belkin (c-66-235-3-150.sea.wa.customer.broadstripe.net. [66.235.3.150]) by mx.google.com with ESMTPSA id dg5sm1437162pac.12.2014.09.11.08.01.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Sep 2014 08:01:28 -0700 (PDT) Sender: Mark Johnston Date: Thu, 11 Sep 2014 08:01:11 -0700 From: Mark Johnston To: Anton Yuzhaninov Subject: Re: Pid provider Message-ID: <20140911150111.GA71246@charmander.Belkin> References: <5411A7BD.7020705@citrin.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5411A7BD.7020705@citrin.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 15:01:30 -0000 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