From owner-freebsd-dtrace@FreeBSD.ORG Thu May 30 04:07:13 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 03B0960F; Thu, 30 May 2013 04:07:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id C44E6AEA; Thu, 30 May 2013 04:07:12 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id aq17so3927930iec.33 for ; Wed, 29 May 2013 21:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=9LH1wZtmY1Kl08CW1nUP4FYivd5qqLSf6dle700N9n8=; b=j9Llvfc80ZUYmTZEdIKTL6Lhjarz6aF6BiJyJmmAJqOq5SdSjSi65h2+2aJKSBPplP 5rXf7/Um0PExnml3QePfuf11KJrYtcjA6DZKywGlwL5DcF4iLW6z36oruDpax1+mszEH HYZvV9LWx4ejOL/rE5AFqF2mfgapLqQEOssdO4Cg0DK5uctdVbgYlIavStaL1SK+JDS9 5DbCtmrkN+Yerw/FKqyrwQte83iMt21CCg94G65DxzPKxOT/EVNTTJr4ifelirZ9Qc3q jOvj5Y3qvIq13Plv4GOje1gflVv9bqTleIT/AMKeH68R2NzogcqSY1iB86HaYQSHNJBJ 367g== X-Received: by 10.50.108.70 with SMTP id hi6mr10964614igb.21.1369886832557; Wed, 29 May 2013 21:07:12 -0700 (PDT) Received: from gloom (198-84-184-218.cpe.teksavvy.com. [198.84.184.218]) by mx.google.com with ESMTPSA id ji5sm29888752igb.0.2013.05.29.21.07.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 May 2013 21:07:11 -0700 (PDT) Sender: Mark Johnston Date: Thu, 30 May 2013 00:07:05 -0400 From: Mark Johnston To: freebsd-dtrace@freebsd.org Subject: adding SDT probe functions with 6+ DTrace arguments Message-ID: <20130530040705.GA40320@gloom> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: rstone@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 30 May 2013 04:07:13 -0000 Hello, Does anyone have objections or comments on the patch below? It simply makes it possible to use the SDT_* macros to implement DTrace probes with more than 5 arguments. dtrace_probe() only takes 5 arguments, so some ugly casting is needed, but it works properly in my testing on amd64. In fact, there are a couple of bugs in the way that DTrace fetches the 6th argument (or the 7th, and so on) from the probe site, but I'll be fixing that soon as well, along with the test case that's supposed to detect this problem in the first place. I don't know of any existing SDT providers in FreeBSD that would use these macros, but the ip, iscsi and tcp providers will - hence my interest in making sure that this functionality works properly. Thanks! -Mark diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 522e1f2..21edd53 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -91,6 +91,10 @@ #define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, arg1, arg2) #define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3) #define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE_DEFINE6(prov, mod, func, name, snamp, arg0, arg1, arg2, \ + arg3, arg4, arg5) +#define SDT_PROBE_DEFINE7(prov, mod, func, name, snamp, arg0, arg1, arg2, \ + arg3, arg4, arg5, arg6) #define SDT_PROBE0(prov, mod, func, name) #define SDT_PROBE1(prov, mod, func, name, arg0) @@ -98,6 +102,9 @@ #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ + arg6) #else @@ -233,6 +240,27 @@ struct sdt_provider { SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4) +#define SDT_PROBE_DEFINE6(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ + arg4, arg5) \ + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); + +#define SDT_PROBE_DEFINE7(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ + arg4, arg5, arg6) \ + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); \ + SDT_PROBE_ARGTYPE(prov, mod, func, name, 6, arg6); + #define SDT_PROBE0(prov, mod, func, name) \ SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) #define SDT_PROBE1(prov, mod, func, name, arg0) \ @@ -245,6 +273,27 @@ struct sdt_provider { SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0) #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \ + do { \ + if (sdt_##prov##_##mod##_##func##_##name->id) \ + (*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \ + uintptr_t, uintptr_t, uintptr_t))sdt_probe_func)( \ + sdt_##prov##_##mod##_##func##_##name->id, \ + (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ + (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\ + } while (0) +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ + arg6) \ + do { \ + if (sdt_##prov##_##mod##_##func##_##name->id) \ + (*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \ + uintptr_t, uintptr_t, uintptr_t, uintptr_t)) \ + sdt_probe_func)( \ + sdt_##prov##_##mod##_##func##_##name->id, \ + (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ + (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \ + (uintptr_t)arg6); \ + } while (0) typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *); typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *); From owner-freebsd-dtrace@FreeBSD.ORG Thu May 30 06:02:05 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F21F13B3 for ; Thu, 30 May 2013 06:02:05 +0000 (UTC) (envelope-from adam.leventhal@delphix.com) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) by mx1.freebsd.org (Postfix) with ESMTP id BDF16DF for ; Thu, 30 May 2013 06:02:05 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id eh20so3951716obb.25 for ; Wed, 29 May 2013 23:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphix.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KCiV/AfqCH6TmcNVMUZ/TPN3KRrz/dVZXJKWUqEzKT8=; b=GhDM+ja62zdYtAUUUw3CdxLBxB4OJhq5PbT/TPVcsHbjFW5dfiUOokgm27Dn97dQz6 OMNskQn/npqQH+JIN1aTokDhcuul32fWGs4j54WjlTYN9uRGgRPq7gyzJeE3l/J4ilMh LXBH8ShsxJYb01wC9iQGNRdtobzlbpQ0ccIBQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=KCiV/AfqCH6TmcNVMUZ/TPN3KRrz/dVZXJKWUqEzKT8=; b=JC7VG4fUW/NGxEaDW7aWmWsEXnTlOHraIz1M1d+HNdbiI6RpPIbZp2GCOLpiEfhfuD MmjnWfndn8jaNPRxBzvUostmSk6tfUzOYDQxS8DIyxIwiGSs4Cquyk/eSz4IIjEIBQ2i 6a1RjTh02i1WwW0EgkF3wxvoI1xBz6Mg3/osAP1yjx9carg+AuMYnAfMJN9PvSqF6xbv bInk6hoEmMccankwCCR64JuPLDftJ1WEBu6xI4B1+P2EB+u1IWeKXfxWonlduOYlJvLZ Mf3dJPlKSlqxaesLLbGBlA9BjkUkD7N/sIVwmDDjRcb0ZW8Ok3VuKBwO2CG11sz4Xnxs i9yA== MIME-Version: 1.0 X-Received: by 10.60.98.173 with SMTP id ej13mr3561361oeb.72.1369893725377; Wed, 29 May 2013 23:02:05 -0700 (PDT) Received: by 10.76.168.34 with HTTP; Wed, 29 May 2013 23:02:05 -0700 (PDT) In-Reply-To: <20130530040705.GA40320@gloom> References: <20130530040705.GA40320@gloom> Date: Wed, 29 May 2013 23:02:05 -0700 Message-ID: Subject: Re: adding SDT probe functions with 6+ DTrace arguments From: Adam Leventhal To: Mark Johnston Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnqb4lnIk0fmlF3qDkxbVGACTx4rEP04MzrsB6+EJhvIyj9dadSwY2MLnYeCiedKB5wD2KA Cc: rstone@freebsd.org, freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 30 May 2013 06:02:06 -0000 Hey Mark, I'm just now familiarizing myself with the way that FreeBSD DTrace handles SDT probes, but certainly having more arguments (as needed) makes sense, and the approach you've taken seems in keeping with the existing methodology. Adam On Wed, May 29, 2013 at 9:07 PM, Mark Johnston wrote: > Hello, > > Does anyone have objections or comments on the patch below? It simply > makes it possible to use the SDT_* macros to implement DTrace probes > with more than 5 arguments. dtrace_probe() only takes 5 arguments, so > some ugly casting is needed, but it works properly in my testing on > amd64. In fact, there are a couple of bugs in the way that DTrace > fetches the 6th argument (or the 7th, and so on) from the probe site, > but I'll be fixing that soon as well, along with the test case that's > supposed to detect this problem in the first place. > > I don't know of any existing SDT providers in FreeBSD that would use > these macros, but the ip, iscsi and tcp providers will - hence my > interest in making sure that this functionality works properly. > > Thanks! > -Mark > > diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h > index 522e1f2..21edd53 100644 > --- a/sys/sys/sdt.h > +++ b/sys/sys/sdt.h > @@ -91,6 +91,10 @@ > #define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, arg1, arg2) > #define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3) > #define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4) > +#define SDT_PROBE_DEFINE6(prov, mod, func, name, snamp, arg0, arg1, arg2, \ > + arg3, arg4, arg5) > +#define SDT_PROBE_DEFINE7(prov, mod, func, name, snamp, arg0, arg1, arg2, \ > + arg3, arg4, arg5, arg6) > > #define SDT_PROBE0(prov, mod, func, name) > #define SDT_PROBE1(prov, mod, func, name, arg0) > @@ -98,6 +102,9 @@ > #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) > #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) > #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) > +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) > +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ > + arg6) > > #else > > @@ -233,6 +240,27 @@ struct sdt_provider { > SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4) > > +#define SDT_PROBE_DEFINE6(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ > + arg4, arg5) \ > + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); > + > +#define SDT_PROBE_DEFINE7(prov, mod, func, name, sname, arg0, arg1, arg2, arg3,\ > + arg4, arg5, arg6) \ > + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); \ > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 6, arg6); > + > #define SDT_PROBE0(prov, mod, func, name) \ > SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) > #define SDT_PROBE1(prov, mod, func, name, arg0) \ > @@ -245,6 +273,27 @@ struct sdt_provider { > SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0) > #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ > SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) > +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \ > + do { \ > + if (sdt_##prov##_##mod##_##func##_##name->id) \ > + (*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \ > + uintptr_t, uintptr_t, uintptr_t))sdt_probe_func)( \ > + sdt_##prov##_##mod##_##func##_##name->id, \ > + (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ > + (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\ > + } while (0) > +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5, \ > + arg6) \ > + do { \ > + if (sdt_##prov##_##mod##_##func##_##name->id) \ > + (*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \ > + uintptr_t, uintptr_t, uintptr_t, uintptr_t)) \ > + sdt_probe_func)( \ > + sdt_##prov##_##mod##_##func##_##name->id, \ > + (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ > + (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \ > + (uintptr_t)arg6); \ > + } while (0) > > typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *); > typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *); > _______________________________________________ > freebsd-dtrace@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org" -- Adam Leventhal CTO, Delphix http://blog.delphix.com/ahl From owner-freebsd-dtrace@FreeBSD.ORG Thu May 30 06:14:33 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1975F4C6 for ; Thu, 30 May 2013 06:14:33 +0000 (UTC) (envelope-from brendan.gregg@joyent.com) Received: from mail-pb0-x234.google.com (mail-pb0-x234.google.com [IPv6:2607:f8b0:400e:c01::234]) by mx1.freebsd.org (Postfix) with ESMTP id E8DCF14E for ; Thu, 30 May 2013 06:14:32 +0000 (UTC) Received: by mail-pb0-f52.google.com with SMTP id xa12so85266pbc.11 for ; Wed, 29 May 2013 23:14:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=HH3Y0VyZOQdq484QP5GhnduPGZyMdoauJWQak6JOm4s=; b=SwRJIHq+gNR1WEA9oPZOydP1mI8f0lGp6fsDJA6j32845O92nYzUuv2Hj0FH7nzt4S M4pir12V5rZWo/rxh2g5iOI9WZmP3XtJbZc2MeUW+25eDQ232YIUJ5CjwuyuZdvNEDGz rTTHdU4NKVGiUogLGteEafHaTsxSpkYb/uoNlOFJT8dpqcR5YRIZa9KQ/Khh/jZ9SU4u aX+Dxx1tUyIcgaZgy8me5V9t5K1uhG3Y+Sr3sv95SLVqjjlemg1xMDCb/koj9Zhcl0Ru 9UFcL0fpMUEwM19nBVX3FT5ojV8JGCeyUm9/uzO6b6Z7z2KYmPC1IMLnd8SRz40R1jVE LHTA== MIME-Version: 1.0 X-Received: by 10.68.196.231 with SMTP id ip7mr6256375pbc.61.1369894472687; Wed, 29 May 2013 23:14:32 -0700 (PDT) Received: by 10.70.94.233 with HTTP; Wed, 29 May 2013 23:14:32 -0700 (PDT) In-Reply-To: References: <20130530040705.GA40320@gloom> Date: Wed, 29 May 2013 23:14:32 -0700 Message-ID: Subject: Re: adding SDT probe functions with 6+ DTrace arguments From: Brendan Gregg To: Adam Leventhal X-Gm-Message-State: ALoCoQnZ8wvBj9uwJ21XrUCtZsUDNsar/F0Y/A73L2oni6cfdE1n5W+SVMAKXaY6m5dur9J+8kTm Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: rstone@freebsd.org, Mark Johnston , freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 30 May 2013 06:14:33 -0000 G'Day Mark, As this might be interesting: to check that DTRACE_PROBE7 worked, in Solaris I had added an sdt:::test probe, which could be invoked by the DTrace test suite (sdt/tst.sdtargs.c) by calling uadmin() with A_SDTTEST: case A_SDTTEST: { DTRACE_PROBE7(test, int, 1, int, 2, int, 3, int, 4, int, 5, int, 6, int, 7); break; } Getting the tcp and ip providers working will be great. Brendan On Wed, May 29, 2013 at 11:02 PM, Adam Leventhal wrote: > Hey Mark, > > I'm just now familiarizing myself with the way that FreeBSD DTrace > handles SDT probes, but certainly having more arguments (as needed) > makes sense, and the approach you've taken seems in keeping with the > existing methodology. > > Adam > > On Wed, May 29, 2013 at 9:07 PM, Mark Johnston wrote: > > Hello, > > > > Does anyone have objections or comments on the patch below? It simply > > makes it possible to use the SDT_* macros to implement DTrace probes > > with more than 5 arguments. dtrace_probe() only takes 5 arguments, so > > some ugly casting is needed, but it works properly in my testing on > > amd64. In fact, there are a couple of bugs in the way that DTrace > > fetches the 6th argument (or the 7th, and so on) from the probe site, > > but I'll be fixing that soon as well, along with the test case that's > > supposed to detect this problem in the first place. > > > > I don't know of any existing SDT providers in FreeBSD that would use > > these macros, but the ip, iscsi and tcp providers will - hence my > > interest in making sure that this functionality works properly. > > > > Thanks! > > -Mark > > > > diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h > > index 522e1f2..21edd53 100644 > > --- a/sys/sys/sdt.h > > +++ b/sys/sys/sdt.h > > @@ -91,6 +91,10 @@ > > #define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, > arg1, arg2) > > #define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, > arg1, arg2, arg3) > > #define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, > arg1, arg2, arg3, arg4) > > +#define SDT_PROBE_DEFINE6(prov, mod, func, name, snamp, arg0, > arg1, arg2, \ > > + arg3, arg4, arg5) > > +#define SDT_PROBE_DEFINE7(prov, mod, func, name, snamp, arg0, > arg1, arg2, \ > > + arg3, arg4, arg5, arg6) > > > > #define SDT_PROBE0(prov, mod, func, name) > > #define SDT_PROBE1(prov, mod, func, name, arg0) > > @@ -98,6 +102,9 @@ > > #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) > > #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) > > #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, > arg3, arg4) > > +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, > arg3, arg4, arg5) > > +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, > arg3, arg4, arg5, \ > > + arg6) > > > > #else > > > > @@ -233,6 +240,27 @@ struct sdt_provider { > > SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > > SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4) > > > > +#define SDT_PROBE_DEFINE6(prov, mod, func, name, sname, arg0, > arg1, arg2, arg3,\ > > + arg4, arg5) \ > > + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); > > + > > +#define SDT_PROBE_DEFINE7(prov, mod, func, name, sname, arg0, > arg1, arg2, arg3,\ > > + arg4, arg5, arg6) \ > > + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); \ > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 6, arg6); > > + > > #define SDT_PROBE0(prov, mod, func, name) > \ > > SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) > > #define SDT_PROBE1(prov, mod, func, name, arg0) > \ > > @@ -245,6 +273,27 @@ struct sdt_provider { > > SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0) > > #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, > arg3, arg4) \ > > SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) > > +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, > arg3, arg4, arg5) \ > > + do { > \ > > + if (sdt_##prov##_##mod##_##func##_##name->id) > \ > > + (*(void (*)(uint32_t, uintptr_t, uintptr_t, > uintptr_t, \ > > + uintptr_t, uintptr_t, > uintptr_t))sdt_probe_func)( \ > > + sdt_##prov##_##mod##_##func##_##name->id, > \ > > + (uintptr_t)arg0, (uintptr_t)arg1, > (uintptr_t)arg2, \ > > + (uintptr_t)arg3, (uintptr_t)arg4, > (uintptr_t)arg5);\ > > + } while (0) > > +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, > arg3, arg4, arg5, \ > > + arg6) > \ > > + do { > \ > > + if (sdt_##prov##_##mod##_##func##_##name->id) > \ > > + (*(void (*)(uint32_t, uintptr_t, uintptr_t, > uintptr_t, \ > > + uintptr_t, uintptr_t, uintptr_t, uintptr_t)) > \ > > + sdt_probe_func)( > \ > > + sdt_##prov##_##mod##_##func##_##name->id, > \ > > + (uintptr_t)arg0, (uintptr_t)arg1, > (uintptr_t)arg2, \ > > + (uintptr_t)arg3, (uintptr_t)arg4, > (uintptr_t)arg5, \ > > + (uintptr_t)arg6); > \ > > + } while (0) > > > > typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *); > > typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *); > > _______________________________________________ > > freebsd-dtrace@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org > " > > > > -- > Adam Leventhal > CTO, Delphix > http://blog.delphix.com/ahl > _______________________________________________ > freebsd-dtrace@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org" > -- Brendan Gregg, Joyent http://dtrace.org/blogs/brendan From owner-freebsd-dtrace@FreeBSD.ORG Thu May 30 13:02:59 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 245D6A69; Thu, 30 May 2013 13:02:59 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id F05CCE8B; Thu, 30 May 2013 13:02:58 +0000 (UTC) Received: from [209.249.190.124] (port=57358 helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1Ui2VK-0002Pl-87; Thu, 30 May 2013 09:02:54 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: adding SDT probe functions with 6+ DTrace arguments From: George Neville-Neil In-Reply-To: Date: Thu, 30 May 2013 09:02:54 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <9900CFFB-6E68-4034-805A-859A937179EF@freebsd.org> References: <20130530040705.GA40320@gloom> To: Brendan Gregg X-Mailer: Apple Mail (2.1503) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: rstone@freebsd.org, freebsd-dtrace@freebsd.org, Mark Johnston X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 30 May 2013 13:02:59 -0000 On May 30, 2013, at 2:14 , Brendan Gregg = wrote: > G'Day Mark, >=20 > As this might be interesting: to check that DTRACE_PROBE7 worked, in > Solaris I had added an sdt:::test probe, which could be invoked by the > DTrace test suite (sdt/tst.sdtargs.c) by calling uadmin() with = A_SDTTEST: >=20 > case A_SDTTEST: > { > DTRACE_PROBE7(test, int, 1, int, 2, int, 3, int, 4, = int, 5, > int, 6, int, 7); > break; > } >=20 > Getting the tcp and ip providers working will be great. >=20 Chiming in late. Yes, let's extend the SDT macros in line with what = we've done already. This will also make it easy to MFC to 9 and 8. Best, George From owner-freebsd-dtrace@FreeBSD.ORG Thu May 30 13:53:06 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 64B5F41C; Thu, 30 May 2013 13:53:06 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 2EE3D344; Thu, 30 May 2013 13:53:06 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id tp5so623803ieb.6 for ; Thu, 30 May 2013 06:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=xYumpEGiYuEo3aIfBV0dAH1WeEUuRUvXxDN/nFSMQL4=; b=hmecbRN2SFvCmpN/325ulVs1Dew2ZSQGOBrxBrDeAiWPMIL+QIubALSxUbTV6OnxM1 VoZKQlPDD0gPcHthRK4Pd76BY+xH7fmJG15RfK83hPWNMExHf+W++3KBregw8FsO771r uHGjr4rnzk/dM8z4sUw2vgZnaQk6ECDPd+NE81qDGc6SUn723K0MgMiSbn0FBT88qjoF VixQ/tY0N/UjWZSWm3oHW1X5WCtlgx2Tqyy7rV1RyVcGhWxbyp6fVP3xYP+gFTjJeK6L 8mtgGCSBU1RU1dvm9nyHHaR1DMHcnuQc/AdMMnwlYU9vumgPwc0n5ttmIr/C/+TJOo7D 8qHg== X-Received: by 10.50.130.78 with SMTP id oc14mr3763600igb.48.1369921985831; Thu, 30 May 2013 06:53:05 -0700 (PDT) Received: from gloom.sandvine.com ([64.7.137.182]) by mx.google.com with ESMTPSA id d9sm27474724igr.4.2013.05.30.06.53.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 06:53:05 -0700 (PDT) Sender: Mark Johnston Date: Thu, 30 May 2013 09:52:43 -0400 From: Mark Johnston To: Brendan Gregg Subject: Re: adding SDT probe functions with 6+ DTrace arguments Message-ID: <20130530135243.GA1406@gloom.sandvine.com> References: <20130530040705.GA40320@gloom> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: rstone@freebsd.org, freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 30 May 2013 13:53:06 -0000 On Wed, May 29, 2013 at 11:14:32PM -0700, Brendan Gregg wrote: > G'Day Mark, > > As this might be interesting: to check that DTRACE_PROBE7 worked, in > Solaris I had added an sdt:::test probe, which could be invoked by the > DTrace test suite (sdt/tst.sdtargs.c) by calling uadmin() with A_SDTTEST: > > case A_SDTTEST: > { > DTRACE_PROBE7(test, int, 1, int, 2, int, 3, int, 4, int, 5, > int, 6, int, 7); > break; > } Yep, this is the test case that I mentioned below. I had to do a bit of work to port it - uadmin doesn't exist on FreeBSD (and before yesterday, I had never heard of it :). I fixed the test in the patch below: http://people.freebsd.org/~markj/patches/sdt-many-args.diff As mentioned below, there are a couple of off-by-one bugs in the way dtrace_getarg() gets extra arguments off the stack. One of them is FreeBSD-specific (our SDT implementation doesn't set the aframes parameter properly), and the other is an amd64-specific bug which I think also exists in illumos; this is fixed in the change to dtrace_isa.c in the above patch. Here's a little diagram of how the local variables are set up at the end of dtrace_getarg() when fetching the sixth argument of an SDT probe on FreeBSD: ... --------------- | arg 1 | --------------- <----- stack | arg 0 | stack[-1] --------------- | ret addr | --------------- | frame ptr | --------------- <----- fp This is the stack frame of dtrace_probe(). To get at arg 0 - which is the sixth argument of a DTrace probe, the local variable 'arg' should be -1; in the current code, it ends up being 0. Specifically, in this case dtrace_getarg() is called with arg == 5. Then we increment it once a bit later, and then we put arg -= (inreg + 1); so arg ends up being 0 when it should be -1. Then the seventh argument is at stack[0], so 'arg' should be 0 but is 1, and so on. I think this bug comes from looking at the i386 code; the difference there is that all arguments to the probe are on the stack, and the first argument is the probe ID. So we _want_ to skip it. Then 'stack' is basically a pointer to the array of probe arguments. -Mark > > Getting the tcp and ip providers working will be great. > > Brendan > > On Wed, May 29, 2013 at 11:02 PM, Adam Leventhal wrote: > > > Hey Mark, > > > > I'm just now familiarizing myself with the way that FreeBSD DTrace > > handles SDT probes, but certainly having more arguments (as needed) > > makes sense, and the approach you've taken seems in keeping with the > > existing methodology. > > > > Adam > > > > On Wed, May 29, 2013 at 9:07 PM, Mark Johnston wrote: > > > Hello, > > > > > > Does anyone have objections or comments on the patch below? It simply > > > makes it possible to use the SDT_* macros to implement DTrace probes > > > with more than 5 arguments. dtrace_probe() only takes 5 arguments, so > > > some ugly casting is needed, but it works properly in my testing on > > > amd64. In fact, there are a couple of bugs in the way that DTrace > > > fetches the 6th argument (or the 7th, and so on) from the probe site, > > > but I'll be fixing that soon as well, along with the test case that's > > > supposed to detect this problem in the first place. > > > > > > I don't know of any existing SDT providers in FreeBSD that would use > > > these macros, but the ip, iscsi and tcp providers will - hence my > > > interest in making sure that this functionality works properly. > > > > > > Thanks! > > > -Mark > > > > > > diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h > > > index 522e1f2..21edd53 100644 > > > --- a/sys/sys/sdt.h > > > +++ b/sys/sys/sdt.h > > > @@ -91,6 +91,10 @@ > > > #define SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, > > arg1, arg2) > > > #define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, > > arg1, arg2, arg3) > > > #define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, > > arg1, arg2, arg3, arg4) > > > +#define SDT_PROBE_DEFINE6(prov, mod, func, name, snamp, arg0, > > arg1, arg2, \ > > > + arg3, arg4, arg5) > > > +#define SDT_PROBE_DEFINE7(prov, mod, func, name, snamp, arg0, > > arg1, arg2, \ > > > + arg3, arg4, arg5, arg6) > > > > > > #define SDT_PROBE0(prov, mod, func, name) > > > #define SDT_PROBE1(prov, mod, func, name, arg0) > > > @@ -98,6 +102,9 @@ > > > #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) > > > #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) > > > #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, > > arg3, arg4) > > > +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, > > arg3, arg4, arg5) > > > +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, > > arg3, arg4, arg5, \ > > > + arg6) > > > > > > #else > > > > > > @@ -233,6 +240,27 @@ struct sdt_provider { > > > SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > > > SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4) > > > > > > +#define SDT_PROBE_DEFINE6(prov, mod, func, name, sname, arg0, > > arg1, arg2, arg3,\ > > > + arg4, arg5) \ > > > + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); > > > + > > > +#define SDT_PROBE_DEFINE7(prov, mod, func, name, sname, arg0, > > arg1, arg2, arg3,\ > > > + arg4, arg5, arg6) \ > > > + SDT_PROBE_DEFINE(prov, mod, func, name, sname); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5); \ > > > + SDT_PROBE_ARGTYPE(prov, mod, func, name, 6, arg6); > > > + > > > #define SDT_PROBE0(prov, mod, func, name) > > \ > > > SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) > > > #define SDT_PROBE1(prov, mod, func, name, arg0) > > \ > > > @@ -245,6 +273,27 @@ struct sdt_provider { > > > SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0) > > > #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, > > arg3, arg4) \ > > > SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) > > > +#define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, > > arg3, arg4, arg5) \ > > > + do { > > \ > > > + if (sdt_##prov##_##mod##_##func##_##name->id) > > \ > > > + (*(void (*)(uint32_t, uintptr_t, uintptr_t, > > uintptr_t, \ > > > + uintptr_t, uintptr_t, > > uintptr_t))sdt_probe_func)( \ > > > + sdt_##prov##_##mod##_##func##_##name->id, > > \ > > > + (uintptr_t)arg0, (uintptr_t)arg1, > > (uintptr_t)arg2, \ > > > + (uintptr_t)arg3, (uintptr_t)arg4, > > (uintptr_t)arg5);\ > > > + } while (0) > > > +#define SDT_PROBE7(prov, mod, func, name, arg0, arg1, arg2, > > arg3, arg4, arg5, \ > > > + arg6) > > \ > > > + do { > > \ > > > + if (sdt_##prov##_##mod##_##func##_##name->id) > > \ > > > + (*(void (*)(uint32_t, uintptr_t, uintptr_t, > > uintptr_t, \ > > > + uintptr_t, uintptr_t, uintptr_t, uintptr_t)) > > \ > > > + sdt_probe_func)( > > \ > > > + sdt_##prov##_##mod##_##func##_##name->id, > > \ > > > + (uintptr_t)arg0, (uintptr_t)arg1, > > (uintptr_t)arg2, \ > > > + (uintptr_t)arg3, (uintptr_t)arg4, > > (uintptr_t)arg5, \ > > > + (uintptr_t)arg6); > > \ > > > + } while (0) > > > > > > typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *); > > > typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *); > > > _______________________________________________ > > > freebsd-dtrace@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > > > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org > > " > > > > > > > > -- > > Adam Leventhal > > CTO, Delphix > > http://blog.delphix.com/ahl > > _______________________________________________ > > freebsd-dtrace@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-dtrace > > To unsubscribe, send any mail to "freebsd-dtrace-unsubscribe@freebsd.org" > > > > > > -- > Brendan Gregg, Joyent http://dtrace.org/blogs/brendan From owner-freebsd-dtrace@FreeBSD.ORG Thu May 30 13:56:21 2013 Return-Path: Delivered-To: freebsd-dtrace@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E441648C; Thu, 30 May 2013 13:56:21 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) by mx1.freebsd.org (Postfix) with ESMTP id 95C2F36F; Thu, 30 May 2013 13:56:21 +0000 (UTC) Received: by mail-ob0-f178.google.com with SMTP id fb19so609704obc.9 for ; Thu, 30 May 2013 06:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=PAal6V3NcF3Y+kqlQ7BdRgum6d8k4PIJlT/LQVf4eAY=; b=ayt6blshIewwgOJrpP+nqNP8gx/Hw1mr46I3oWQQfBUUDVdeptNC8D+3sRokKYAEBY SZMI6wOyIHv9VI0lQkmFmPJ/a7v6IxgHCvB8i6BkqR64P0cG7bwX+LY6+0S2XScw02ss 88WwYuGR5HlWDDgt7sZ/N+U2Om8B7Mch0l4Po6pFjp/mIMm++yXF2Zl22TyrHyOaAyNA 5N/fswP/myvljJJocTT0IAVyI/ZKWiU4DBO0HBy3DiNLVDuWYYF2JAWiqyWfq5ot7W7C +Oi/266nwiCQfbQLok0nqsASUNz4g5O3AUiVI9eS7EO7K4yuOiIGCvV3J4zGbvNu0p85 g5Qw== X-Received: by 10.60.79.231 with SMTP id m7mr4241994oex.105.1369922181221; Thu, 30 May 2013 06:56:21 -0700 (PDT) Received: from gloom.sandvine.com ([64.7.137.182]) by mx.google.com with ESMTPSA id jt1sm44045744oeb.5.2013.05.30.06.56.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 06:56:20 -0700 (PDT) Sender: Mark Johnston Date: Thu, 30 May 2013 09:56:14 -0400 From: Mark Johnston To: George Neville-Neil Subject: Re: adding SDT probe functions with 6+ DTrace arguments Message-ID: <20130530135601.GA1631@gloom.sandvine.com> References: <20130530040705.GA40320@gloom> <9900CFFB-6E68-4034-805A-859A937179EF@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9900CFFB-6E68-4034-805A-859A937179EF@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: rstone@freebsd.org, freebsd-dtrace@freebsd.org X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 30 May 2013 13:56:22 -0000 On Thu, May 30, 2013 at 09:02:54AM -0400, George Neville-Neil wrote: > > On May 30, 2013, at 2:14 , Brendan Gregg wrote: > > > G'Day Mark, > > > > As this might be interesting: to check that DTRACE_PROBE7 worked, in > > Solaris I had added an sdt:::test probe, which could be invoked by the > > DTrace test suite (sdt/tst.sdtargs.c) by calling uadmin() with A_SDTTEST: > > > > case A_SDTTEST: > > { > > DTRACE_PROBE7(test, int, 1, int, 2, int, 3, int, 4, int, 5, > > int, 6, int, 7); > > break; > > } > > > > Getting the tcp and ip providers working will be great. > > > > Chiming in late. Yes, let's extend the SDT macros in line with what we've done > already. This will also make it easy to MFC to 9 and 8. Ok, thanks. I'll commit them later today. The network providers depend on them, so I wanted to get them in first as well as fix the bugs mentioned in my other email on this thread. -Mark