Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 2008 01:50:32 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 142659 for review
Message-ID:  <200806010150.m511oWwd036102@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142659

Change 142659 by jb@freebsd3 on 2008/06/01 01:49:51

	IFdtrace

Affected files ...

.. //depot/projects/dtrace7/src/share/mk/bsd.own.mk#7 integrate
.. //depot/projects/dtrace7/src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#4 integrate
.. //depot/projects/dtrace7/src/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h#3 integrate
.. //depot/projects/dtrace7/src/sys/modules/Makefile#13 integrate
.. //depot/projects/dtrace7/src/sys/modules/cyclic_test/Makefile#3 integrate
.. //depot/projects/dtrace7/src/sys/modules/dtrace/Makefile#5 integrate

Differences ...

==== //depot/projects/dtrace7/src/share/mk/bsd.own.mk#7 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/mk/bsd.own.mk,v 1.67.2.4 2008/01/28 08:42:15 dougb Exp $
+# $FreeBSD: src/share/mk/bsd.own.mk,v 1.75 2008/05/26 10:39:52 bz Exp $
 #
 # The include file <bsd.own.mk> set common variables for owner,
 # group, mode, and directories. Defaults are in brackets.
@@ -162,8 +162,6 @@
 NLSGRP?=	${SHAREGRP}
 NLSMODE?=	${NOBINMODE}
 
-DEFAULT_THREAD_LIB?=	libthr
-
 INCLUDEDIR?=	/usr/include
 
 # Common variables
@@ -231,7 +229,6 @@
     GPIB \
     GROFF \
     HTML \
-    I4B \
     INET6 \
     INFO \
     IPFILTER \
@@ -318,7 +315,6 @@
     GPIB \
     GROFF \
     HTML \
-    I4B \
     INET6 \
     INFO \
     INSTALLLIB \
@@ -328,7 +324,6 @@
     KVM \
     LIB32 \
     LIBPTHREAD \
-    LIBKSE \
     LIBTHR \
     LOCALES \
     LPR \
@@ -359,8 +354,8 @@
     TOOLCHAIN \
     USB \
     WPA_SUPPLICANT_EAPOL \
-    ZONEINFO \
-    ZFS
+    ZFS \
+    ZONEINFO
 .if defined(WITH_${var}) && defined(WITHOUT_${var})
 .error WITH_${var} and WITHOUT_${var} can't both be set.
 .endif
@@ -399,11 +394,10 @@
 # Order is somewhat important.
 #
 .if ${MK_LIBPTHREAD} == "no"
-MK_LIBKSE:=	no
 MK_LIBTHR:=	no
 .endif
 
-.if ${MK_LIBKSE} == "no" && ${MK_LIBTHR} == "no"
+.if ${MK_LIBTHR} == "no"
 MK_BIND:=	no
 .endif
 

==== //depot/projects/dtrace7/src/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c#4 (text) ====

@@ -111,6 +111,7 @@
 
 /* FreeBSD includes: */
 #if !defined(sun)
+#include <sys/callout.h>
 #include <sys/ctype.h>
 #include <sys/limits.h>
 #include <sys/kdb.h>
@@ -5593,7 +5594,7 @@
 #if defined(sun)
 	debug_enter(c);
 #else
-	kdb_enter_why(KDB_WHY_DTRACE, "breakpoint action");
+	kdb_enter(KDB_WHY_DTRACE, "breakpoint action");
 #endif
 }
 
@@ -12690,6 +12691,7 @@
 	}
 }
 
+#if defined(sun)
 static void
 dtrace_state_clean(dtrace_state_t *state)
 {
@@ -12707,9 +12709,51 @@
 
 	dtrace_sync();
 
-#if !defined(sun)
+	now = dtrace_gethrtime();
+
+	if (state != dtrace_anon.dta_state &&
+	    now - state->dts_laststatus >= dtrace_deadman_user)
+		return;
+
+	/*
+	 * We must be sure that dts_alive never appears to be less than the
+	 * value upon entry to dtrace_state_deadman(), and because we lack a
+	 * dtrace_cas64(), we cannot store to it atomically.  We thus instead
+	 * store INT64_MAX to it, followed by a memory barrier, followed by
+	 * the new value.  This assures that dts_alive never appears to be
+	 * less than its true value, regardless of the order in which the
+	 * stores to the underlying storage are issued.
+	 */
+	state->dts_alive = INT64_MAX;
+	dtrace_membar_producer();
+	state->dts_alive = now;
+}
+#else
+static void
+dtrace_state_clean(void *arg)
+{
+	dtrace_state_t *state = arg;
+	dtrace_optval_t *opt = state->dts_options;
+
+	if (state->dts_activity == DTRACE_ACTIVITY_INACTIVE)
+		return;
+
+	dtrace_dynvar_clean(&state->dts_vstate.dtvs_dynvars);
+	dtrace_speculation_clean(state);
+
+	callout_reset(&state->dts_cleaner, hz * opt[DTRACEOPT_CLEANRATE] / NANOSEC,
+	    dtrace_state_clean, state);
+}
+
+static void
+dtrace_state_deadman(void *arg)
+{
+	dtrace_state_t *state = arg;
+	hrtime_t now;
+
+	dtrace_sync();
+
 	dtrace_debug_output();
-#endif
 
 	now = dtrace_gethrtime();
 
@@ -12729,7 +12773,11 @@
 	state->dts_alive = INT64_MAX;
 	dtrace_membar_producer();
 	state->dts_alive = now;
+
+	callout_reset(&state->dts_deadman, hz * dtrace_deadman_interval / NANOSEC,
+	    dtrace_state_deadman, state);
 }
+#endif
 
 static dtrace_state_t *
 #if defined(sun)
@@ -12803,8 +12851,14 @@
 	 */
 	state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP);
 	state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP);
+
+#if defined(sun)
 	state->dts_cleaner = CYCLIC_NONE;
 	state->dts_deadman = CYCLIC_NONE;
+#else
+	callout_init(&state->dts_cleaner, CALLOUT_MPSAFE);
+	callout_init(&state->dts_deadman, CALLOUT_MPSAFE);
+#endif
 	state->dts_vstate.dtvs_state = state;
 
 	for (i = 0; i < DTRACEOPT_MAX; i++)
@@ -13086,8 +13140,10 @@
 	dtrace_optval_t *opt = state->dts_options, sz, nspec;
 	dtrace_speculation_t *spec;
 	dtrace_buffer_t *buf;
+#if defined(sun)
 	cyc_handler_t hdlr;
 	cyc_time_t when;
+#endif
 	int rval = 0, i, bufsize = NCPU * sizeof (dtrace_buffer_t);
 	dtrace_icookie_t cookie;
 
@@ -13265,11 +13321,11 @@
 	if (opt[DTRACEOPT_CLEANRATE] > dtrace_cleanrate_max)
 		opt[DTRACEOPT_CLEANRATE] = dtrace_cleanrate_max;
 
+	state->dts_alive = state->dts_laststatus = dtrace_gethrtime();
+#if defined(sun)
 	hdlr.cyh_func = (cyc_func_t)dtrace_state_clean;
 	hdlr.cyh_arg = state;
-#if defined(sun)
 	hdlr.cyh_level = CY_LOW_LEVEL;
-#endif
 
 	when.cyt_when = 0;
 	when.cyt_interval = opt[DTRACEOPT_CLEANRATE];
@@ -13278,15 +13334,18 @@
 
 	hdlr.cyh_func = (cyc_func_t)dtrace_state_deadman;
 	hdlr.cyh_arg = state;
-#if defined(sun)
 	hdlr.cyh_level = CY_LOW_LEVEL;
-#endif
 
 	when.cyt_when = 0;
 	when.cyt_interval = dtrace_deadman_interval;
 
-	state->dts_alive = state->dts_laststatus = dtrace_gethrtime();
 	state->dts_deadman = cyclic_add(&hdlr, &when);
+#else
+	callout_reset(&state->dts_cleaner, hz * opt[DTRACEOPT_CLEANRATE] / NANOSEC,
+	    dtrace_state_clean, state);
+	callout_reset(&state->dts_deadman, hz * dtrace_deadman_interval / NANOSEC,
+	    dtrace_state_deadman, state);
+#endif
 
 	state->dts_activity = DTRACE_ACTIVITY_WARMUP;
 
@@ -13547,11 +13606,16 @@
 	for (i = 0; i < nspec; i++)
 		dtrace_buffer_free(spec[i].dtsp_buffer);
 
+#if defined(sun)
 	if (state->dts_cleaner != CYCLIC_NONE)
 		cyclic_remove(state->dts_cleaner);
 
 	if (state->dts_deadman != CYCLIC_NONE)
 		cyclic_remove(state->dts_deadman);
+#else
+	callout_stop(&state->dts_cleaner);
+	callout_stop(&state->dts_deadman);
+#endif
 
 	dtrace_dstate_fini(&vstate->dtvs_dynvars);
 	dtrace_vstate_fini(vstate);

==== //depot/projects/dtrace7/src/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h#3 (text) ====

@@ -1137,8 +1137,13 @@
 	uint32_t dts_dblerrors;			/* errors in ERROR probes */
 	uint32_t dts_reserve;			/* space reserved for END */
 	hrtime_t dts_laststatus;		/* time of last status */
+#if defined(sun)
 	cyclic_id_t dts_cleaner;		/* cleaning cyclic */
 	cyclic_id_t dts_deadman;		/* deadman cyclic */
+#else
+	struct callout dts_cleaner;		/* Cleaning callout. */
+	struct callout dts_deadman;		/* Deadman callout. */
+#endif
 	hrtime_t dts_alive;			/* time last alive */
 	char dts_speculates;			/* boolean: has speculations */
 	char dts_destructive;			/* boolean: has dest. actions */

==== //depot/projects/dtrace7/src/sys/modules/Makefile#13 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.540.2.13 2008/05/09 02:20:39 weongyo Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.571 2008/05/28 20:26:25 jhb Exp $
 
 .include <bsd.own.mk>
 
@@ -8,6 +8,7 @@
 	accf_data \
 	accf_http \
 	${_acpi} \
+	age \
 	${_agp} \
 	aha \
 	${_ahb} \
@@ -23,6 +24,7 @@
 	${_arcmsr} \
 	${_arcnet} \
 	${_arl} \
+	${_asmc} \
 	${_asr} \
 	ata \
 	${_ath} \
@@ -32,7 +34,6 @@
 	${_ath_rate_sample} \
 	aue \
 	${_auxio} \
-	${_awi} \
 	axe \
 	bce \
 	bfe \
@@ -52,6 +53,7 @@
 	${_ciss} \
 	${_cm} \
 	${_cmx} \
+	${_cnw} \
 	coda \
 	coda5 \
 	${_coff} \
@@ -63,9 +65,10 @@
 	${_cs} \
 	${_ctau} \
 	cue \
+	${_cx} \
 	cxgb \
-	${_cx} \
 	${_cyclic} \
+	${_cyclic_test} \
 	dc \
 	dcons \
 	dcons_crom \
@@ -92,9 +95,7 @@
 	fxp \
 	gem \
 	geom \
-	${_harp} \
 	hatm \
-	${_hfa} \
 	hifn \
 	hme \
 	${_hptiop} \
@@ -105,7 +106,6 @@
 	${_ibcs2} \
 	${_ichwd} \
 	${_ida} \
-	${_idt} \
 	${_ie} \
 	if_bridge \
 	if_disc \
@@ -129,8 +129,8 @@
 	${_ipfilter} \
 	ipfw \
 	ipfw_nat \
+	${_ipmi} \
 	ip_mroute_mod \
-	${_ipmi} \
 	${_ips} \
 	${_ipw} \
 	${_ipwfw} \
@@ -139,8 +139,12 @@
 	ispfw \
 	${_iwi} \
 	${_iwifw} \
+	${_iwn} \
+	${_iwnfw} \
 	${_ixgb} \
+	jme \
 	joy \
+	${_k8temp} \
 	kbdmux \
 	krpc \
 	kue \
@@ -195,11 +199,11 @@
 	${_nsp} \
 	ntfs \
 	ntfs_iconv \
-	${_nxge} \
 	nullfs \
 	${_nve} \
 	${_nvram} \
 	${_nwfs} \
+	${_nxge} \
 	${_oltr} \
 	${_opensolaris} \
 	${_padlock} \
@@ -226,6 +230,7 @@
 	${_ray} \
 	rc \
 	rc4 \
+	${_rdma} \
 	re \
 	reiserfs \
 	rl \
@@ -310,11 +315,10 @@
 	wb \
 	${_wi} \
 	wlan \
-	wlan_scan_ap \
-	wlan_scan_sta \
 	wlan_acl \
 	wlan_amrr \
 	wlan_ccmp \
+	wlan_rssadapt \
 	wlan_tkip \
 	wlan_wep \
 	wlan_xauth \
@@ -336,11 +340,6 @@
 _ufs=		ufs
 .endif
 
-# Disabled in 7.0 as netatm is not MPSAFE.
-#if ${MK_ATM} != "no"
-#_harp=		harp
-#.endif
-
 .if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
 .if exists(${.CURDIR}/../opencrypto)
 _crypto=	crypto
@@ -378,7 +377,6 @@
 _ath_rate_amrr=	ath_rate_amrr
 _ath_rate_onoe=	ath_rate_onoe
 _ath_rate_sample=ath_rate_sample
-_awi=		awi
 _bktr=		bktr
 _cardbus=	cardbus
 _cbb=		cbb
@@ -389,6 +387,7 @@
 _cs=		cs
 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
 _cyclic=	cyclic
+_cyclic_test=	cyclic_test
 .endif
 _digi=		digi
 _drm=		drm
@@ -402,8 +401,6 @@
 _exca=		exca
 _ext2fs=	ext2fs
 _fe=		fe
-# Disabled due to non-MPSAFEty in 7.0
-#_hfa=		hfa
 _i2c=		i2c
 _ibcs2=		ibcs2
 _ie=		ie
@@ -432,6 +429,7 @@
 _pecoff=	pecoff
 _pst=		pst
 _ray=		ray
+_rdma=		rdma
 _safe=		safe
 _sbni=		sbni
 _scsi_low=	scsi_low
@@ -444,7 +442,7 @@
 _sr=		sr
 _stg=		stg
 _streams=	streams
-_tmpfs= 	tmpfs
+_tmpfs=		tmpfs
 _wi=		wi
 _xe=		xe
 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
@@ -456,11 +454,13 @@
 _ahb=		ahb
 _arcmsr=	arcmsr
 _arl=		arl
+_asmc=		asmc
 _asr=		asr
 _bios=		bios
 _ciss=		ciss
 _cm=		cm
 _cmx=		cmx
+_cnw=		cnw
 _coretemp=	coretemp
 _ctau=		ctau
 _cx=		cx
@@ -471,8 +471,6 @@
 _hptrr=		hptrr
 _ichwd=		ichwd
 _ida=		ida
-# Disabled due to non-MPSAFEty in 7.0
-#_idt=		idt
 _iir=		iir
 _ipmi=		ipmi
 _ips=		ips
@@ -480,7 +478,9 @@
 _ipwfw=		ipwfw
 _iwi=		iwi
 _iwifw=		iwifw
-_ixgb=   	ixgb
+_iwn=		iwn
+_iwnfw=		iwnfw
+_ixgb=		ixgb
 _mly=		mly
 _nfe=		nfe
 _nve=		nve
@@ -510,6 +510,7 @@
 _agp=		agp
 _an=		an
 _arcmsr=	arcmsr
+_asmc=		asmc
 _ath=		ath
 _ath_hal=	ath_hal
 _ath_rate_amrr=	ath_rate_amrr
@@ -523,6 +524,7 @@
 _cpufreq=	cpufreq
 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
 _cyclic=	cyclic
+_cyclic_test=	cyclic_test
 .endif
 _digi=		digi
 _drm=		drm
@@ -547,7 +549,10 @@
 _ips=		ips
 _ipw=		ipw
 _ipwfw=		ipwfw
-_ixgb=   	ixgb
+_iwn=		iwn
+_iwnfw=		iwnfw
+_ixgb=		ixgb
+_k8temp=	k8temp
 _linprocfs=	linprocfs
 _linsysfs=	linsysfs
 _linux=		linux
@@ -561,13 +566,14 @@
 _opensolaris=	opensolaris
 .endif
 _pccard=	pccard
+_rdma=		rdma	
 _safe=		safe
 _scsi_low=	scsi_low
 _smbfs=		smbfs
 _sound=		sound
 _speaker=	speaker
 _sppp=		sppp
-_tmpfs= 	tmpfs
+_tmpfs=		tmpfs
 _twa=		twa
 _wi=		wi
 _wpi=		wpi
@@ -584,9 +590,9 @@
 # acpi is not enabled because it is broken as a module on ia64
 _aic=		aic
 #_ar=		ar	not 64-bit clean
+_an=		an
 _arcnet=	arcnet
 _asr=		asr
-_an=		an
 _bktr=		bktr
 _cardbus=	cardbus
 _cbb=		cbb
@@ -599,7 +605,6 @@
 _ep=		ep
 _exca=		exca
 _fe=		fe
-_hfa=		hfa
 _igb=		igb
 _iir=		iir
 _mly=		mly

==== //depot/projects/dtrace7/src/sys/modules/cyclic_test/Makefile#3 (text+ko) ====

@@ -1,6 +1,6 @@
 # $FreeBSD#
 
-.PATH: ${.CURDIR}/../../cddl/cyclic
+.PATH: ${.CURDIR}/../../cddl/dev/cyclic
 
 KMOD=		cyclic_test
 SRCS=		cyclic_test.c

==== //depot/projects/dtrace7/src/sys/modules/dtrace/Makefile#5 (text+ko) ====




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