Date: Sun, 23 Apr 2006 21:43:38 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95955 for review Message-ID: <200604232143.k3NLhc7F001128@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95955 Change 95955 by jb@jb_freebsd2 on 2006/04/23 21:43:32 Now that the dtrace device supports cloning, it doesn't actually need to create a base device at all. In fact, the way that FreeBSD's device cloning works, if /dev/dtrace is actually created, then cloning fails. Cloning was only working when the base device was created as /dev/dtrace0, but it turns out that was just being ignored when dtrace(1) opened /dev/dtrace. So now we have a stealth device. To open it, you just have to trust it's there. 8-) Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#12 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#7 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#12 (text+ko) ==== @@ -90,9 +90,6 @@ .d_name = "dtrace", }; -/* For use with make_dev(9)/destroy_dev(9). */ -static struct cdev *dtrace_dev; - /* * DTrace Tunable Variables * ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#7 (text+ko) ==== @@ -56,10 +56,6 @@ dtrace_mutex_init(&dtrace_provider_lock,"dtrace provider state"); dtrace_mutex_init(&dtrace_meta_lock,"dtrace meta-provider state"); - /* Create the /dev/dtrace entry. */ - dtrace_dev = make_dev(&dtrace_cdevsw, DTRACE_MINOR, UID_ROOT, - GID_WHEEL, 0660, "dtrace0"); - mutex_enter(&cpu_lock); mutex_enter(&dtrace_provider_lock); mutex_enter(&dtrace_lock); ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#6 (text+ko) ==== @@ -146,9 +146,6 @@ dtrace_taskq = NULL; #endif - /* Destroy the /dev/dtrace entry. */ - destroy_dev(dtrace_dev); - dtrace_mutex_destroy(&dtrace_meta_lock); dtrace_mutex_destroy(&dtrace_provider_lock); dtrace_mutex_destroy(&dtrace_lock);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604232143.k3NLhc7F001128>