From owner-freebsd-dtrace@FreeBSD.ORG Fri Dec 13 21:05:18 2013 Return-Path: Delivered-To: dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D382F35D for ; Fri, 13 Dec 2013 21:05:18 +0000 (UTC) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) by mx1.freebsd.org (Postfix) with SMTP id 4A4A31DAD for ; Fri, 13 Dec 2013 21:05:17 +0000 (UTC) Received: from [66.196.81.171] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 21:05:11 -0000 Received: from [98.139.211.201] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 21:05:11 -0000 Received: from [127.0.0.1] by smtp210.mail.bf1.yahoo.com with NNFMP; 13 Dec 2013 21:05:11 -0000 X-Yahoo-Newman-Id: 650107.12465.bm@smtp210.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OKXHqacVM1mJ9XGXKRnto6ANuasQyEVX61bHd.vEOLUZ0iN FdzX.2DCbwKBjYxokSdj9A0Y9fA07jL5qrD6j044HbMbrsfoxOnMsQgoqZTp D1FIYKD52qczz6fsxF.w8UAlyA4l3wJIpWzvzQmUaoZ7gcdO7Q.jc4Y2TeAP dIfffOe1tFg._cQfCHfeIImbfIQuIjuPZNXzVW4C7yc0URX76_vG961TAwdZ 3kcUQp99aFq1J21lFbuApV9QNmUw.nLiSSAzRXnK1wp7RbLOr9gqb6u2easF hiNPP7SRMsltp_VWCbHw6sdUPh8BkLWnmoYq9TKQxahNtfxxss4bGAL2eGVL FVXRYyAe0BZWFA5R3tDKECDgTV6ELFQo63ZCYhdfGB4ML3vDT3LoW3FlT3ah qCgd5sIY1cIFvEX4dNJnuaV__PSvjjQTYtRA6VMNSDgQQr91XrGMMjtPeC37 0a45hthXwntUIuXLCaNS2wp4qXof7wCFSlkkN3oOhSYfjjSKH7DaW3RnWP2F LLh3DR1aPwPucLjgFdtR3sSA6CBBVW14XIACEGRIN3P5G6lRCrgMLrrso8eJ JNx0Xd.5Or3BG6Bibi5MCOavOxKHblEdmopz94w7R0djTKP9N06sQojCzI9D Cx0jRR5DNatIYFOsLD9RJheOgkMJqZivcAu6__rS.APQtfOyE X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp210.mail.bf1.yahoo.com with SMTP; 13 Dec 2013 13:05:11 -0800 PST Message-ID: <52AB7685.7080803@FreeBSD.org> Date: Fri, 13 Dec 2013 16:05:09 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Mike Ma , "dtrace@freebsd.org" Subject: Re: [CFT] Use vmem in dtrace References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "A discussion list for developers working on DTrace in FreeBSD." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 21:05:18 -0000 Hi Mike; On 13.12.2013 02:17, Mike Ma wrote: > Hi there, > > I'm a GSoC student this year, and Pedro guided me to dtrace recently. > > I'm sending my patch for a vmem task listed in the TODO list (12th > item), as there is vmem subsystem in FreeBSD 10/11 available now. > Basically, it is to revert changes from this patch > http://lists.freebsd.org/pipermail/p4-projects/2008-January/023466.html > And the main difference is that vmem_create and vmem_alloc take > different number of parameters on FreeBSD. > > I did run dtrace testsuite on my own machine. > And I hope someone here can try my patch. > > Any comments are appreciated. I did some purely cosmetic cleanups (tabs and use use of the #defines) and placed the patch here: http://people.freebsd.org/~pfg/patches/dtrace/dtrace_vmem.diff However, on sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c This chunk looks suspicious: @@ -13160,10 +13160,10 @@ state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP); #endif +#if defined(sun) state->dts_epid = DTRACE_EPIDNONE + 1; (void) snprintf(c, sizeof (c), "dtrace_aggid_%d", m); -#if defined(sun) state->dts_aggid_arena = vmem_create(c, (void *)1, UINT32_MAX, 1, NULL, NULL, NULL, 0, VM_SLEEP | VMC_IDENTIFIER); _____ Any reason for removing the assignment and the snprintf out of FreeBSD and into sun-specific code? FWIW, SUN's code also uses dtrace_minor but it seems like it may be for Solaris driver specific code. Not sure if it's worth investigating. Regards, Pedro.