From owner-svn-src-head@FreeBSD.ORG Tue Jul 9 09:05:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B2B3E1F3; Tue, 9 Jul 2013 09:05:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A53BE1211; Tue, 9 Jul 2013 09:05:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69950Zl024634; Tue, 9 Jul 2013 09:05:00 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69950Bt024633; Tue, 9 Jul 2013 09:05:00 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307090905.r69950Bt024633@svn.freebsd.org> From: Andriy Gapon Date: Tue, 9 Jul 2013 09:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253079 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jul 2013 09:05:00 -0000 Author: avg Date: Tue Jul 9 09:05:00 2013 New Revision: 253079 URL: http://svnweb.freebsd.org/changeset/base/253079 Log: dtrace/fasttrap: install hook functions only after all data is initialized Sponsored by: HybridCluster MFC after: 7 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Tue Jul 9 09:03:01 2013 (r253078) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Tue Jul 9 09:05:00 2013 (r253079) @@ -2283,13 +2283,6 @@ fasttrap_load(void) return (ret); } - /* - * Install our hooks into fork(2), exec(2), and exit(2). - */ - dtrace_fasttrap_fork = &fasttrap_fork; - dtrace_fasttrap_exit = &fasttrap_exec_exit; - dtrace_fasttrap_exec = &fasttrap_exec_exit; - #if defined(sun) fasttrap_max = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS, "fasttrap-max-probes", FASTTRAP_MAX_DEFAULT); @@ -2366,6 +2359,13 @@ fasttrap_load(void) } #endif + /* + * Install our hooks into fork(2), exec(2), and exit(2). + */ + dtrace_fasttrap_fork = &fasttrap_fork; + dtrace_fasttrap_exit = &fasttrap_exec_exit; + dtrace_fasttrap_exec = &fasttrap_exec_exit; + (void) dtrace_meta_register("fasttrap", &fasttrap_mops, NULL, &fasttrap_meta_id);