From owner-svn-src-all@FreeBSD.ORG Sun Aug 22 11:09:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52FE71065673; Sun, 22 Aug 2010 11:09:54 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42E8C8FC12; Sun, 22 Aug 2010 11:09:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7MB9sNF001842; Sun, 22 Aug 2010 11:09:54 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7MB9sD6001840; Sun, 22 Aug 2010 11:09:54 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201008221109.o7MB9sD6001840@svn.freebsd.org> From: Rui Paulo Date: Sun, 22 Aug 2010 11:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211614 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 11:09:54 -0000 Author: rpaulo Date: Sun Aug 22 11:09:53 2010 New Revision: 211614 URL: http://svn.freebsd.org/changeset/base/211614 Log: Bump KDTRACE_THREAD_ZERO and use M_ZERO as a malloc flag instead of calling bzero. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_dtrace.c Modified: head/sys/kern/kern_dtrace.c ============================================================================== --- head/sys/kern/kern_dtrace.c Sun Aug 22 11:08:18 2010 (r211613) +++ head/sys/kern/kern_dtrace.c Sun Aug 22 11:09:53 2010 (r211614) @@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$"); #include #define KDTRACE_PROC_SIZE 64 -#define KDTRACE_PROC_ZERO 8 #define KDTRACE_THREAD_SIZE 256 -#define KDTRACE_THREAD_ZERO 64 MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); @@ -56,9 +54,8 @@ kdtrace_proc_size() static void kdtrace_proc_ctor(void *arg __unused, struct proc *p) { - p->p_dtrace = malloc(KDTRACE_PROC_SIZE, M_KDTRACE, M_WAITOK); - bzero(p->p_dtrace, KDTRACE_PROC_ZERO); + p->p_dtrace = malloc(KDTRACE_PROC_SIZE, M_KDTRACE, M_WAITOK|M_ZERO); } static void @@ -75,15 +72,15 @@ kdtrace_proc_dtor(void *arg __unused, st size_t kdtrace_thread_size() { + return (KDTRACE_THREAD_SIZE); } static void kdtrace_thread_ctor(void *arg __unused, struct thread *td) { - td->td_dtrace = malloc(KDTRACE_THREAD_SIZE, M_KDTRACE, M_WAITOK); - bzero(td->td_dtrace, KDTRACE_THREAD_ZERO); + td->td_dtrace = malloc(KDTRACE_THREAD_SIZE, M_KDTRACE, M_WAITOK|M_ZERO); } static void