From owner-freebsd-dtrace@freebsd.org Fri Aug 10 07:15:22 2018 Return-Path: Delivered-To: freebsd-dtrace@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2714105F613; Fri, 10 Aug 2018 07:15:22 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from kagate.punkt.de (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 587B27CB9B; Fri, 10 Aug 2018 07:15:22 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from hugo10.ka.punkt.de (hugo10.ka.punkt.de [217.29.44.10]) by gate1.intern.punkt.de with ESMTP id w7A7FKpR027926; Fri, 10 Aug 2018 09:15:20 +0200 (CEST) Received: from [217.29.44.49] ([217.29.44.49]) by hugo10.ka.punkt.de (8.14.2/8.14.2) with ESMTP id w7A7FJbF064903; Fri, 10 Aug 2018 09:15:20 +0200 (CEST) (envelope-from hausen@punkt.de) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Why can't I dtrace processes running in a jail from the host? From: "Patrick M. Hausen" In-Reply-To: <20180809145258.GA68459@raichu> Date: Fri, 10 Aug 2018 09:15:22 +0200 Cc: freebsd-virtualization@freebsd.org, freebsd-dtrace@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <8B1BDE9F-BDAD-4CEB-B7A2-8052497F50EA@punkt.de> References: <20180809145258.GA68459@raichu> To: Mark Johnston X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.27 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: Fri, 10 Aug 2018 07:15:23 -0000 Hi! > Am 09.08.2018 um 16:52 schrieb Mark Johnston : > For userland static probes to be globally visible, the process needs to > register them with the kernel when it starts. This is done > automatically using a constructor which issues ioctls to > /dev/dtrace/helper, hence the requirement for /dev/dtrace/* in the jail. I figured as much. Enabling /dev/dtrace/* in the jail and restarting the jail made the probes visible in the host system I'm still somewhat stuck. What I'm trying to do is track down some performance problems in a large complex PHP web application. I have done this in the past on "regular" setups without jails and with PHP 5.6 compiled with dtrace support using /usr/local/share/dtrace-toolkit/Php/* ... This setup is jailed with PHP 7.2, dtrace support seems to be the default for the port. I'm specifically after php-fpm dtrace_execute_ex function-entry php-fpm dtrace_execute_ex function-return of course, to see where the application spends it's CPU cycles. But regardless if I'm doing this on the host or in the jail, I only get these results: dtrace -m php\* ZEND_CATCH_SPEC_CONST_CV_HANDLER:exception-caught php_request_shutdown:request-shutdown php_request_startup:request-startup zend_error:error zend_throw_exception_internal:exception-thrown Nothing else. Still `dtrace -m php\* -l` does show all the probes. Any ideas? Thanks Patrick -- punkt.de GmbH Internet - Dienstleistungen - Beratung Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100 76133 Karlsruhe info@punkt.de http://punkt.de AG Mannheim 108285 Gf: Juergen Egeling