git: 16901dafdfb9 - main - dtrace: remove /dev/dtrace/dtmalloc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Jun 2022 17:04:25 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=16901dafdfb9a457fa31e247d8f1bea952e1ef97 commit 16901dafdfb9a457fa31e247d8f1bea952e1ef97 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2022-06-01 16:39:23 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-06-01 16:39:23 +0000 dtrace: remove /dev/dtrace/dtmalloc It is unused. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D35379 --- sys/cddl/dev/dtmalloc/dtmalloc.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/sys/cddl/dev/dtmalloc/dtmalloc.c b/sys/cddl/dev/dtmalloc/dtmalloc.c index 3f584dc0860e..ae21054315dd 100644 --- a/sys/cddl/dev/dtmalloc/dtmalloc.c +++ b/sys/cddl/dev/dtmalloc/dtmalloc.c @@ -39,7 +39,6 @@ extern bool dtrace_malloc_enabled; static uint32_t dtrace_malloc_enabled_count; -static d_open_t dtmalloc_open; static int dtmalloc_unload(void); static void dtmalloc_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *); static void dtmalloc_provide(void *, dtrace_probedesc_t *); @@ -48,12 +47,6 @@ static void dtmalloc_enable(void *, dtrace_id_t, void *); static void dtmalloc_disable(void *, dtrace_id_t, void *); static void dtmalloc_load(void *); -static struct cdevsw dtmalloc_cdevsw = { - .d_version = D_VERSION, - .d_open = dtmalloc_open, - .d_name = "dtmalloc", -}; - static dtrace_pattr_t dtmalloc_attr = { { DTRACE_STABILITY_STABLE, DTRACE_STABILITY_STABLE, DTRACE_CLASS_COMMON }, { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, @@ -75,7 +68,6 @@ static dtrace_pops_t dtmalloc_pops = { .dtps_destroy = dtmalloc_destroy }; -static struct cdev *dtmalloc_cdev; static dtrace_provider_id_t dtmalloc_id; static void @@ -173,10 +165,6 @@ dtmalloc_disable(void *arg, dtrace_id_t id, void *parg) static void dtmalloc_load(void *dummy) { - /* Create the /dev/dtrace/dtmalloc entry. */ - dtmalloc_cdev = make_dev(&dtmalloc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, - "dtrace/dtmalloc"); - if (dtrace_register("dtmalloc", &dtmalloc_attr, DTRACE_PRIV_USER, NULL, &dtmalloc_pops, NULL, &dtmalloc_id) != 0) return; @@ -195,8 +183,6 @@ dtmalloc_unload() if ((error = dtrace_unregister(dtmalloc_id)) != 0) return (error); - destroy_dev(dtmalloc_cdev); - return (error); } @@ -224,12 +210,6 @@ dtmalloc_modevent(module_t mod __unused, int type, void *data __unused) return (error); } -static int -dtmalloc_open(struct cdev *dev __unused, int oflags __unused, int devtype __unused, struct thread *td __unused) -{ - return (0); -} - SYSINIT(dtmalloc_load, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, dtmalloc_load, NULL); SYSUNINIT(dtmalloc_unload, SI_SUB_DTRACE_PROVIDER, SI_ORDER_ANY, dtmalloc_unload, NULL);