Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet Apply NetBSD changes to DTrace.
details: https://anonhg.NetBSD.org/src/rev/f10d03ed4f0d
branches: trunk
changeset: 752246:f10d03ed4f0d
user: darran <darran%NetBSD.org@localhost>
date: Sun Feb 21 01:46:32 2010 +0000
description:
Apply NetBSD changes to DTrace.
Ok with core@.
diffstat:
external/cddl/osnet/Makefile.inc | 6 +
external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c | 2 +
external/cddl/osnet/dev/cyclic/cyclic.c | 2 +
external/cddl/osnet/dev/cyclic/cyclic_test.c | 2 +
external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c | 2 +
external/cddl/osnet/dev/dtmalloc/dtmalloc.c | 2 +
external/cddl/osnet/dev/dtrace/amd64/dis_tables.c | 2 +
external/cddl/osnet/dev/dtrace/amd64/dis_tables.h | 2 +
external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S | 2 +
external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c | 2 +
external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c | 2 +
external/cddl/osnet/dev/dtrace/amd64/instr_size.c | 2 +
external/cddl/osnet/dev/dtrace/dtrace_anon.c | 1 +
external/cddl/osnet/dev/dtrace/dtrace_cddl.h | 22 +-
external/cddl/osnet/dev/dtrace/dtrace_clone.c | 2 +
external/cddl/osnet/dev/dtrace/dtrace_debug.c | 51 +-
external/cddl/osnet/dev/dtrace/dtrace_hacks.c | 4 +
external/cddl/osnet/dev/dtrace/dtrace_ioctl.c | 46 +-
external/cddl/osnet/dev/dtrace/dtrace_load.c | 50 +-
external/cddl/osnet/dev/dtrace/dtrace_modevent.c | 28 +-
external/cddl/osnet/dev/dtrace/dtrace_sysctl.c | 7 +-
external/cddl/osnet/dev/dtrace/dtrace_test.c | 2 +
external/cddl/osnet/dev/dtrace/dtrace_unload.c | 28 +-
external/cddl/osnet/dev/dtrace/dtrace_vtime.c | 2 +
external/cddl/osnet/dev/dtrace/i386/dis_tables.c | 2 +
external/cddl/osnet/dev/dtrace/i386/dis_tables.h | 2 +
external/cddl/osnet/dev/dtrace/i386/dtrace_asm.S | 26 +-
external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c | 57 +-
external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c | 104 +-
external/cddl/osnet/dev/dtrace/i386/instr_size.c | 2 +
external/cddl/osnet/dev/fbt/fbt.c | 2 +
external/cddl/osnet/dev/lockstat/lockstat.c | 2 +
external/cddl/osnet/dev/profile/profile.c | 2 +
external/cddl/osnet/dev/prototype.c | 2 +
external/cddl/osnet/dev/sdt/sdt.c | 2 +
external/cddl/osnet/dev/systrace/systrace.c | 2 +
external/cddl/osnet/dist/common/ctf/ctf_create.c | 6 +-
external/cddl/osnet/dist/common/ctf/ctf_open.c | 6 +-
external/cddl/osnet/dist/lib/libctf/common/ctf_lib.c | 2 +-
external/cddl/osnet/dist/lib/libdtrace/common/dt_aggregate.c | 8 +
external/cddl/osnet/dist/lib/libdtrace/common/dt_consume.c | 15 +
external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c | 46 +-
external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c | 6 +
external/cddl/osnet/dist/lib/libdtrace/common/dt_options.c | 3 +
external/cddl/osnet/dist/lib/libdtrace/common/dt_pid.c | 30 +
external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c | 83 +
external/cddl/osnet/dist/lib/libdtrace/common/dt_subr.c | 5 +
external/cddl/osnet/dist/lib/libdtrace/common/dtrace.h | 1 +
external/cddl/osnet/dist/tools/ctf/cvt/alist.c | 1 +
external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.c | 31 +-
external/cddl/osnet/dist/tools/ctf/cvt/ctfmerge.h | 2 +
external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c | 16 +-
external/cddl/osnet/dist/tools/ctf/cvt/output.c | 9 +-
external/cddl/osnet/dist/uts/common/dtrace/dtrace.c | 583 ++++++----
external/cddl/osnet/dist/uts/common/sys/dtrace.h | 22 +-
external/cddl/osnet/dist/uts/common/sys/dtrace_impl.h | 8 -
external/cddl/osnet/dist/uts/common/sys/processor.h | 3 +-
external/cddl/osnet/include/alloca.h | 4 +-
external/cddl/osnet/include/assert.h | 2 +
external/cddl/osnet/include/devid.h | 6 +-
external/cddl/osnet/include/dtrace.h | 2 +
external/cddl/osnet/include/fcntl.h | 4 +-
external/cddl/osnet/include/fsshare.h | 4 +-
external/cddl/osnet/include/libintl.h | 31 +-
external/cddl/osnet/include/libproc.h | 20 +
external/cddl/osnet/include/libshare.h | 2 +
external/cddl/osnet/include/mnttab.h | 33 +-
external/cddl/osnet/include/priv.h | 37 +-
external/cddl/osnet/include/solaris.h | 31 +-
external/cddl/osnet/include/stdio.h | 4 +-
external/cddl/osnet/include/stdlib.h | 4 +-
external/cddl/osnet/include/strings.h | 4 +-
external/cddl/osnet/include/unistd.h | 4 +-
external/cddl/osnet/include/zone.h | 31 +-
external/cddl/osnet/lib/Makefile | 31 +-
external/cddl/osnet/lib/Makefile.inc | 8 +-
external/cddl/osnet/lib/libavl/Makefile | 7 +-
external/cddl/osnet/lib/libctf/Makefile | 7 +-
external/cddl/osnet/lib/libctf/shlib_version | 6 +
external/cddl/osnet/lib/libdtrace/Makefile | 25 +-
external/cddl/osnet/lib/libdtrace/errno.d | 2 +
external/cddl/osnet/lib/libdtrace/net.d | 2 +
external/cddl/osnet/lib/libdtrace/nfs.d | 2 +
external/cddl/osnet/lib/libdtrace/psinfo.d | 2 +
external/cddl/osnet/lib/libdtrace/sched.d | 2 +
external/cddl/osnet/lib/libdtrace/shlib_version | 6 +
external/cddl/osnet/lib/libdtrace/signal.d | 2 +
external/cddl/osnet/lib/libdtrace/unistd.d | 2 +
external/cddl/osnet/lib/libnvpair/Makefile | 21 +-
external/cddl/osnet/lib/libumem/Makefile | 6 +-
external/cddl/osnet/lib/libuutil/Makefile | 24 +-
external/cddl/osnet/lib/libzfs/Makefile | 61 +-
external/cddl/osnet/lib/libzpool/Makefile | 79 +-
external/cddl/osnet/sys/elf.h | 38 +
external/cddl/osnet/sys/machine/endian.h | 2 +
external/cddl/osnet/sys/sys/acl.h | 2 +
external/cddl/osnet/sys/sys/acl/acl_common.h | 2 +
external/cddl/osnet/sys/sys/atomic.h | 168 +-
external/cddl/osnet/sys/sys/bitmap.h | 4 +-
external/cddl/osnet/sys/sys/byteorder.h | 4 +-
external/cddl/osnet/sys/sys/cmn_err.h | 82 +-
external/cddl/osnet/sys/sys/cpupart.h | 4 +-
external/cddl/osnet/sys/sys/cpuvar.h | 2 +
external/cddl/osnet/sys/sys/cpuvar_defs.h | 2 +
external/cddl/osnet/sys/sys/cred.h | 71 +-
external/cddl/osnet/sys/sys/cyclic.h | 92 +-
external/cddl/osnet/sys/sys/cyclic_impl.h | 2 +
external/cddl/osnet/sys/sys/debug.h | 4 +-
external/cddl/osnet/sys/sys/dirent.h | 4 +-
external/cddl/osnet/sys/sys/dkio.h | 7 +-
external/cddl/osnet/sys/sys/dnlc.h | 6 +-
external/cddl/osnet/sys/sys/elf.h | 39 +-
external/cddl/osnet/sys/sys/feature_tests.h | 2 +
external/cddl/osnet/sys/sys/file.h | 2 +
external/cddl/osnet/sys/sys/idmap.h | 2 +
external/cddl/osnet/sys/sys/kcondvar.h | 58 +-
external/cddl/osnet/sys/sys/kidmap.h | 4 +-
external/cddl/osnet/sys/sys/kmem.h | 101 +-
external/cddl/osnet/sys/sys/kobj.h | 5 +-
external/cddl/osnet/sys/sys/kstat.h | 39 +-
external/cddl/osnet/sys/sys/lock.h | 7 +-
external/cddl/osnet/sys/sys/misc.h | 17 +-
external/cddl/osnet/sys/sys/mman.h | 4 +-
external/cddl/osnet/sys/sys/mntent.h | 2 +
external/cddl/osnet/sys/sys/mnttab.h | 125 +-
external/cddl/osnet/sys/sys/modctl.h | 5 +-
external/cddl/osnet/sys/sys/mount.h | 33 +-
external/cddl/osnet/sys/sys/mutex.h | 76 +-
external/cddl/osnet/sys/sys/mutex_impl.h | 48 +
external/cddl/osnet/sys/sys/objfs.h | 4 +-
external/cddl/osnet/sys/sys/param.h | 10 +-
external/cddl/osnet/sys/sys/pathname.h | 10 +-
external/cddl/osnet/sys/sys/pcpu.h | 8 +-
external/cddl/osnet/sys/sys/policy.h | 55 +-
external/cddl/osnet/sys/sys/proc.h | 97 +-
external/cddl/osnet/sys/sys/processor.h | 30 -
external/cddl/osnet/sys/sys/random.h | 10 +-
external/cddl/osnet/sys/sys/refstr.h | 2 +
external/cddl/osnet/sys/sys/rwlock.h | 83 +-
external/cddl/osnet/sys/sys/rwlock_impl.h | 48 +
external/cddl/osnet/sys/sys/sdt.h | 4 +-
external/cddl/osnet/sys/sys/sema.h | 2 +
external/cddl/osnet/sys/sys/sid.h | 36 +-
external/cddl/osnet/sys/sys/sig.h | 2 +
external/cddl/osnet/sys/sys/stat.h | 6 +-
external/cddl/osnet/sys/sys/string.h | 6 +-
external/cddl/osnet/sys/sys/sunddi.h | 6 +-
external/cddl/osnet/sys/sys/sysmacros.h | 316 +++++-
external/cddl/osnet/sys/sys/systm.h | 41 +-
external/cddl/osnet/sys/sys/time.h | 13 +-
external/cddl/osnet/sys/sys/types.h | 88 +-
external/cddl/osnet/sys/sys/uio.h | 43 +-
external/cddl/osnet/sys/sys/varargs.h | 4 +-
external/cddl/osnet/sys/sys/vfs.h | 70 +-
external/cddl/osnet/sys/sys/vnode.h | 617 ++++++++--
external/cddl/osnet/sys/sys/zone.h | 16 +-
external/cddl/osnet/usr.bin/Makefile | 8 +-
external/cddl/osnet/usr.bin/ctfconvert/Makefile | 20 +-
external/cddl/osnet/usr.bin/ctfdump/Makefile | 16 +-
external/cddl/osnet/usr.bin/ctfmerge/Makefile | 21 +-
external/cddl/osnet/usr.sbin/Makefile | 8 +-
external/cddl/osnet/usr.sbin/dtrace/Makefile | 20 +-
162 files changed, 3173 insertions(+), 1492 deletions(-)
diffs (truncated from 8691 to 300 lines):
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/cddl/osnet/Makefile.inc Sun Feb 21 01:46:32 2010 +0000
@@ -0,0 +1,6 @@
+# $FreeBSD: src/cddl/Makefile.inc,v 1.6.2.1 2009/08/03 08:13:06 kensmith Exp $
+
+OSNETDIR= ${NETBSDSRCDIR}/external/cddl/osnet
+
+OPENSOLARIS_USR_DISTDIR=${OSNETDIR}/dist
+OPENSOLARIS_SYS_DISTDIR=${OSNETDIR}/dist
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c
--- a/external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/cyclic/amd64/cyclic_machdep.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: cyclic_machdep.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*-
* Copyright 2007 John Birrell <jb%FreeBSD.org@localhost>
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/cyclic/cyclic.c
--- a/external/cddl/osnet/dev/cyclic/cyclic.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/cyclic/cyclic.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: cyclic.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/cyclic/cyclic_test.c
--- a/external/cddl/osnet/dev/cyclic/cyclic_test.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/cyclic/cyclic_test.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: cyclic_test.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*-
* Copyright 2007 John Birrell <jb%FreeBSD.org@localhost>
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c
--- a/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/cyclic/i386/cyclic_machdep.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: cyclic_machdep.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*-
* Copyright 2006-2008 John Birrell <jb%FreeBSD.org@localhost>
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtmalloc/dtmalloc.c
--- a/external/cddl/osnet/dev/dtmalloc/dtmalloc.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtmalloc/dtmalloc.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtmalloc.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/amd64/dis_tables.c
--- a/external/cddl/osnet/dev/dtrace/amd64/dis_tables.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dis_tables.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dis_tables.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/amd64/dis_tables.h
--- a/external/cddl/osnet/dev/dtrace/amd64/dis_tables.h Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dis_tables.h Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dis_tables.h,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtrace_asm.S,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtrace_isa.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c
--- a/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtrace_subr.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/amd64/instr_size.c
--- a/external/cddl/osnet/dev/dtrace/amd64/instr_size.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/amd64/instr_size.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: instr_size.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/dtrace_anon.c
--- a/external/cddl/osnet/dev/dtrace/dtrace_anon.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/dtrace_anon.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,4 @@
+/* $NetBSD: dtrace_anon.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
/*
* CDDL HEADER START
*
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/dtrace_cddl.h
--- a/external/cddl/osnet/dev/dtrace/dtrace_cddl.h Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/dtrace_cddl.h Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtrace_cddl.h,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*
* CDDL HEADER START
*
@@ -84,25 +86,25 @@
* that the separation on FreeBSD is a licensing constraint designed to
* keep the GENERIC kernel BSD licensed.
*/
-#define t_dtrace_vtime td_dtrace->td_dtrace_vtime
-#define t_dtrace_start td_dtrace->td_dtrace_start
-#define t_dtrace_stop td_dtrace->td_dtrace_stop
-#define t_dtrace_sig td_dtrace->td_dtrace_sig
-#define t_predcache td_dtrace->td_predcache
+#define t_dtrace_vtime l_dtrace->td_dtrace_vtime
+#define t_dtrace_start l_dtrace->td_dtrace_start
+#define t_dtrace_stop l_dtrace->td_dtrace_stop
+#define t_dtrace_sig l_dtrace->td_dtrace_sig
+#define t_predcache l_dtrace->td_predcache
#define p_dtrace_helpers p_dtrace->p_dtrace_helpers
/*
* Definitions for fields in struct proc which are named differntly in FreeBSD.
*/
-#define p_cred p_ucred
+//#define p_cred p_ucred
#define p_parent p_pptr
/*
- * Definitions for fields in struct thread which are named differntly in FreeBSD.
+ * Definitions for fields in struct thread which are named differntly in NetBSD.
*/
-#define t_procp td_proc
-#define t_tid td_tid
-#define t_did td_tid
+#define t_procp l_proc
+#define t_tid l_lid
+#define t_did l_lid
int priv_policy(const cred_t *, int, boolean_t, int, const char *);
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/dtrace_clone.c
--- a/external/cddl/osnet/dev/dtrace/dtrace_clone.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/dtrace_clone.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtrace_clone.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*-
* Copyright (C) 2006 John Birrell <jb%freebsd.org@localhost>.
* All rights reserved.
diff -r ec3be1f15c49 -r f10d03ed4f0d external/cddl/osnet/dev/dtrace/dtrace_debug.c
--- a/external/cddl/osnet/dev/dtrace/dtrace_debug.c Sun Feb 21 00:57:44 2010 +0000
+++ b/external/cddl/osnet/dev/dtrace/dtrace_debug.c Sun Feb 21 01:46:32 2010 +0000
@@ -1,3 +1,5 @@
+/* $NetBSD: dtrace_debug.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */
+
/*-
* Copyright (C) 2008 John Birrell <jb%freebsd.org@localhost>.
* All rights reserved.
@@ -29,6 +31,9 @@
*
*/
+static char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz";
+#define hex2ascii(hex) (hex2ascii_data[hex])
+
#ifdef DEBUG
#if defined(__amd64__)
@@ -82,11 +87,11 @@
char *first;
char *last;
char *next;
-} dtrace_debug_data[MAXCPU];
+} dtrace_debug_data[MAXCPUS];
static char dtrace_debug_bufr[DTRACE_DEBUG_BUFR_SIZE];
-static volatile u_long dtrace_debug_flag[MAXCPU];
+static volatile u_long dtrace_debug_flag[MAXCPUS];
static void
dtrace_debug_lock(int cpu)
@@ -107,12 +112,11 @@
{
int i;
struct dtrace_debug_data *d;
+ CPU_INFO_ITERATOR cpuind;
+ struct cpu_info *cinfo;
- for (i = 0; i <= mp_maxid; i++) {
- if (pcpu_find(i) == NULL)
- continue;
-
- d = &dtrace_debug_data[i];
+ for (CPU_INFO_FOREACH(cpuind, cinfo)) {
+ d = &dtrace_debug_data[cpu_index(cinfo)];
if (d->first == NULL) {
d->first = d->bufr;
@@ -123,24 +127,25 @@
}
}
-SYSINIT(dtrace_debug_init, SI_SUB_KDTRACE, SI_ORDER_ANY, dtrace_debug_init, NULL);
-SYSINIT(dtrace_debug_smpinit, SI_SUB_SMP, SI_ORDER_ANY, dtrace_debug_init, NULL);
+//SYSINIT(dtrace_debug_init, SI_SUB_KDTRACE, SI_ORDER_ANY, dtrace_debug_init, NULL);
+//SYSINIT(dtrace_debug_smpinit, SI_SUB_SMP, SI_ORDER_ANY, dtrace_debug_init, NULL);
static void
dtrace_debug_output(void)
{
char *p;
- int i;
struct dtrace_debug_data *d;
uintptr_t count;
+ CPU_INFO_ITERATOR cpuind;
+ struct cpu_info *cinfo;
+ cpuid_t cpuid;
- for (i = 0; i <= mp_maxid; i++) {
- if (pcpu_find(i) == NULL)
- continue;
+ for (CPU_INFO_FOREACH(cpuind, cinfo)) {
+ cpuid = cpu_index(cinfo);
- dtrace_debug_lock(i);
+ dtrace_debug_lock(cpuid);
- d = &dtrace_debug_data[i];
+ d = &dtrace_debug_data[cpuid];
count = 0;
@@ -168,7 +173,7 @@
d->first = d->bufr;
d->next = d->bufr;
- dtrace_debug_unlock(i);
+ dtrace_debug_unlock(cpuid);
if (count > 0) {
char *last = dtrace_debug_bufr + count;
@@ -199,7 +204,7 @@
static __inline void
dtrace_debug__putc(char c)
{
- struct dtrace_debug_data *d = &dtrace_debug_data[curcpu];
+ struct dtrace_debug_data *d = &dtrace_debug_data[cpu_number()];
*d->next++ = c;
@@ -218,24 +223,24 @@
static void __used
dtrace_debug_putc(char c)
{
- dtrace_debug_lock(curcpu);
+ dtrace_debug_lock(cpu_number());
dtrace_debug__putc(c);
- dtrace_debug_unlock(curcpu);
+ dtrace_debug_unlock(cpu_number());
}
static void __used
dtrace_debug_puts(const char *s)
{
- dtrace_debug_lock(curcpu);
+ dtrace_debug_lock(cpu_number());
while (*s != '\0')
dtrace_debug__putc(*s++);
dtrace_debug__putc('\0');
- dtrace_debug_unlock(curcpu);
+ dtrace_debug_unlock(cpu_number());
}
Home |
Main Index |
Thread Index |
Old Index