aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2022-06-01 16:42:35 +0000
committerMark Johnston <markj@FreeBSD.org>2022-06-01 16:42:35 +0000
commit4544a795b281cab5bdbe27604a337e21944af3b5 (patch)
treecf5f1e049afeb7b8d762f8184d8aadf2df60b4fd /sys/cddl
parent16901dafdfb9a457fa31e247d8f1bea952e1ef97 (diff)
downloadsrc-4544a795b281cab5bdbe27604a337e21944af3b5.tar.gz
src-4544a795b281cab5bdbe27604a337e21944af3b5.zip
dtrace: remove /dev/dtrace/profile
It is unused. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D35380
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/dev/profile/profile.c21
1 files changed, 0 insertions, 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);