Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 2013 09:05:00 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
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
Message-ID:  <201307090905.r69950Bt024633@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307090905.r69950Bt024633>