From owner-svn-src-stable@FreeBSD.ORG Fri Aug 22 06:22:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 212D3C54; Fri, 22 Aug 2014 06:22:14 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3F2739AA; Fri, 22 Aug 2014 06:22:13 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s7M6M7Jv047181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Aug 2014 09:22:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s7M6M7Jv047181 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s7M6M7Cl047180; Fri, 22 Aug 2014 09:22:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 22 Aug 2014 09:22:07 +0300 From: Konstantin Belousov To: Mark Johnston Subject: Re: svn commit: r270294 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <20140822062207.GK2737@kib.kiev.ua> References: <201408211945.s7LJjqST049739@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNa0Phtf76TQ4tlb" Content-Disposition: inline In-Reply-To: <201408211945.s7LJjqST049739@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 06:22:14 -0000 --cNa0Phtf76TQ4tlb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 21, 2014 at 07:45:52PM +0000, Mark Johnston wrote: > Author: markj > Date: Thu Aug 21 19:45:52 2014 > New Revision: 270294 > URL: http://svnweb.freebsd.org/changeset/base/270294 >=20 > Log: > MFC r269525: > Return 0 for the PPID of threads in process 0, as process 0 doesn't hav= e a > parent process. >=20 > Modified: > stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace= =2Ec > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu= Aug 21 19:42:24 2014 (r270293) > +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Thu= Aug 21 19:45:52 2014 (r270294) > @@ -3415,7 +3415,10 @@ dtrace_dif_variable(dtrace_mstate_t *mst > */ > return ((uint64_t)curthread->t_procp->p_ppid); > #else > - return ((uint64_t)curproc->p_pptr->p_pid); > + if (curproc->p_pid =3D=3D proc0.p_pid) > + return (curproc->p_pid); > + else > + return (curproc->p_pptr->p_pid); > #endif > =20 > case DIF_VAR_TID: BTW, does the code look for the parent, or for the debugger of the current process ? I mean, should the snippet above use p_pptr or real_parent() ? --cNa0Phtf76TQ4tlb Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT9uGPAAoJEJDCuSvBvK1BY1MP/ix0AFaw0b54RIfCuPzC2s4x tYD4HU/xa7kcs3/vBXooiPneZZTD5q/V/jtGPrcPMdZ0RscMl2RQK1KIpmnOk80f I95vWpt3u51hfI7ySjmGlUSzbJspom6Ap2lWNFJXv2r/QlMjWAhcDGql8nmZkJLk b96IRCXcdgOqJf6eLir/csyTqU9CVWpLPR6CshJbCOiSnUkfpByWQSeKSOLzDjNZ mB83KEjSsZr12sf0jy78jlQy6LJ9KvuwDUgCvGLYMHDJXRRWZihzWcV5qWKGKKn9 HDi9ZpahJGw/RvP6lNhgUNNdEtHIL5rqGM1udkKyW6TUCXtBv4EVaraqj2NHcbIM z9aAeUm+a7uBjF+By4uJOocTGYDbrDClD8DhsF0i1FwC8/whNH2fwSPFSfAyPOF0 V8z8V7c3W6XcxPwhIznB4CYtsRmxIt5Y4WWlAL0Z++gDb4+V2UXiIhStSJCuFzr+ X6kLHAxAZQM4OYPGplGwErV22XBAD7G4VW2SIgv/WU7WhjSHuxyDkY+z1ZzAgxWE R0umPnacB3gglybjkkp7I/U5A3jcY+pVxyflD4r5eSyGlUD9uudTsOhRM8eHy/4I b6O+h7xkvr3wwpJE5p4zB++2va6mWT0kK0QIyHk73/OgU5fjIkmcJxIWrPdwLEye vk+eAEa/DG9hxJh9EWAS =YyOi -----END PGP SIGNATURE----- --cNa0Phtf76TQ4tlb--