Date: Mon, 24 Apr 2006 03:52:24 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95986 for review Message-ID: <200604240352.k3O3qO8M009787@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95986 Change 95986 by jb@jb_freebsd2 on 2006/04/24 03:51:28 Use the kmem_cache hacks. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#8 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#7 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#8 (text+ko) ==== @@ -31,10 +31,8 @@ dtrace_load() { dtrace_provider_id_t id; -#ifdef DOODAD dtrace_state_t *state = NULL; dtrace_enabling_t *enab; -#endif int error = 0; /* @@ -111,11 +109,11 @@ #ifdef DOODAD dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, 1, INT_MAX, 0); +#endif dtrace_state_cache = kmem_cache_create("dtrace_state_cache", sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN, NULL, NULL, NULL, NULL, NULL, 0); -#endif ASSERT(MUTEX_HELD(&cpu_lock)); dtrace_bymod = dtrace_hash_create(offsetof(dtrace_probe_t, dtpr_mod), @@ -177,7 +175,6 @@ dtrace_helptrace_next = 0; } -#ifdef DOODAD /* * If there are already providers, we must ask them to provide their * probes, and then match any anonymous enabling against them. Note @@ -210,19 +207,16 @@ mutex_exit(&cpu_lock); } -#endif mutex_exit(&dtrace_lock); mutex_exit(&dtrace_provider_lock); -#ifdef DOODAD if (state != NULL) { /* * If we created any anonymous state, set it going now. */ (void) dtrace_state_go(state, &dtrace_anon.dta_beganon); } -#endif return (error); } ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#7 (text+ko) ==== @@ -106,9 +106,7 @@ dtrace_byfunc = NULL; dtrace_byname = NULL; -#ifdef DOODAD kmem_cache_destroy(dtrace_state_cache); -#endif vmem_destroy(dtrace_minor); vmem_destroy(dtrace_arena);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604240352.k3O3qO8M009787>