git: 4544a795b281 - main - dtrace: remove /dev/dtrace/profile

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 01 Jun 2022 17:04:26 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=4544a795b281cab5bdbe27604a337e21944af3b5

commit 4544a795b281cab5bdbe27604a337e21944af3b5
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2022-06-01 16:42:35 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-06-01 16:42:35 +0000

    dtrace: remove /dev/dtrace/profile
    
    It is unused.
    
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D35380
---
 sys/cddl/dev/profile/profile.c | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/sys/cddl/dev/profile/profile.c b/sys/cddl/dev/profile/profile.c
index 1e7a84c272cd..87289ff2717c 100644
--- a/sys/cddl/dev/profile/profile.c
+++ b/sys/cddl/dev/profile/profile.c
@@ -155,7 +155,6 @@ typedef struct profile_probe_percpu {
 #endif
 } profile_probe_percpu_t;
 
-static d_open_t	profile_open;
 static int	profile_unload(void);
 static void	profile_create(hrtime_t, char *, int);
 static void	profile_destroy(void *, dtrace_id_t, void *);
@@ -189,12 +188,6 @@ static uint32_t profile_max = PROFILE_MAX_DEFAULT;
 					/* maximum number of profile probes */
 static uint32_t profile_total;		/* current number of profile probes */
 
-static struct cdevsw profile_cdevsw = {
-	.d_version	= D_VERSION,
-	.d_open		= profile_open,
-	.d_name		= "profile",
-};
-
 static dtrace_pattr_t profile_attr = {
 { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON },
 { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN },
@@ -216,7 +209,6 @@ static dtrace_pops_t profile_pops = {
 	.dtps_destroy =		profile_destroy
 };
 
-static struct cdev		*profile_cdev;
 static dtrace_provider_id_t	profile_id;
 static hrtime_t			profile_interval_min = NANOSEC / 5000;	/* 5000 hz */
 static int			profile_aframes = PROF_ARTIFICIAL_FRAMES;
@@ -638,10 +630,6 @@ profile_disable(void *arg, dtrace_id_t id, void *parg)
 static void
 profile_load(void *dummy)
 {
-	/* Create the /dev/dtrace/profile entry. */
-	profile_cdev = make_dev(&profile_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
-	    "dtrace/profile");
-
 	if (dtrace_register("profile", &profile_attr, DTRACE_PRIV_USER,
 	    NULL, &profile_pops, NULL, &profile_id) != 0)
 		return;
@@ -656,8 +644,6 @@ profile_unload()
 	if ((error = dtrace_unregister(profile_id)) != 0)
 		return (error);
 
-	destroy_dev(profile_cdev);
-
 	return (error);
 }
 
@@ -685,13 +671,6 @@ profile_modevent(module_t mod __unused, int type, void *data __unused)
 	return (error);
 }
 
-/* ARGSUSED */
-static int
-profile_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, struct thread *td __unused)
-{
-	return (0);
-}
-
 SYSINIT(profile_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, profile_load, NULL);
 SYSUNINIT(profile_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, profile_unload, NULL);