From owner-freebsd-dtrace@FreeBSD.ORG Tue Jun 16 18:01:28 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388A1AFE for ; Tue, 16 Jun 2015 18:01:28 +0000 (UTC) (envelope-from abhya007@gmail.com) Received: from mail-pd0-x22e.google.com (mail-pd0-x22e.google.com [IPv6:2607:f8b0:400e:c02::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C9BF854 for ; Tue, 16 Jun 2015 18:01:28 +0000 (UTC) (envelope-from abhya007@gmail.com) Received: by pdjn11 with SMTP id n11so19480924pdj.0 for ; Tue, 16 Jun 2015 11:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2ZgVOG0Dv0GeTHqD9QhsZhL9UAcE78Pz/fUyTy8lr30=; b=KsdsxbOnVcEUOCHr/1y64y3jtwdHOcWve50vxa+ZYKGh5IhWSvM9K5jFj8X2ODqqDB yp1zLF5GiGTxPd0izvSgYPM08pcVCewZug/E1XbpohxPeJNKSLLYf1lxuWWOyJqWAwrG d+mI0PyDsZfepFRwcemTOSDV+1tF7FIGbFGKv+NiPjE89m7l2Zpc48T0T6CiOnzyZHPv 2csbpNTi4xURFP1RNBjilSv52ZSO2bO/7K7FipdomAeK6vCPZb8EL/EEcCO4uzjPEUW4 vNc4bhiJewiZyW9ucRUTgGL5cm49fbhL54bRSAPsJYh1pb6ouyLRVK9bZX5PPSrAt091 DBcw== MIME-Version: 1.0 X-Received: by 10.70.47.9 with SMTP id z9mr2783110pdm.69.1434477687614; Tue, 16 Jun 2015 11:01:27 -0700 (PDT) Received: by 10.70.46.99 with HTTP; Tue, 16 Jun 2015 11:01:27 -0700 (PDT) Date: Tue, 16 Jun 2015 11:01:27 -0700 Message-ID: Subject: Regarding a Sched Dtrace Script for FreeBSD From: abhishek kulkarni To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 16 Jun 2015 18:01:28 -0000 Hello all, I am working on Dtrace and trying to implement a sched script for FreeBSD 10.0 The script uses the probes on-cpu and off-cpu. The purpose is to measure the time that a CPU spends on the current thread. I am trying to use the aggregation function =E2=80=9CSUM=E2=80=9D to captur= e the CPU time for the ping utility. I am doing it by opening a new putty terminal and running the ping utility in it, and then running the Dtrace script in another instance of the terminal. I am also using the time utility in order to verify the Kernel Time for a ping. The time given by the =E2=80=9CTime=E2=80=9D utility and the Dtrace s= cript do not match. Could you please help with this . The following is the Dtrace script we are trying out : sched:::on-cpu /curthread->td_name =3D=3D "ping"/ { self->ts =3D timestamp; } sched:::off-cpu /self->ts !=3D 0/ { @delta[curthread->td_name] =3D sum(timestamp - self->ts)/1000000; self->ts =3D0; } Looking forward to hear from you. Regards Abhishek kulkarni From owner-freebsd-dtrace@FreeBSD.ORG Wed Jun 17 19:50:54 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C732D85 for ; Wed, 17 Jun 2015 19:50:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qc0-x230.google.com (mail-qc0-x230.google.com [IPv6:2607:f8b0:400d:c01::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8E9292D for ; Wed, 17 Jun 2015 19:50:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by qcbfz6 with SMTP id fz6so17317067qcb.0 for ; Wed, 17 Jun 2015 12:50:52 -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:content-transfer-encoding :in-reply-to:user-agent; bh=+WY8bGj/5Dq9O7K60/9oUcHzWgsywCtGBSrBQSVb3l4=; b=iuyY3+ukJR8/i/zDHYX7yT+K/a2PQoVZof1gmO8D59rZDcUhmB2rALZv09SHf+aeib Q9XBE13u1rn8Q0Bz4MUcAlwLu8fgJfcR+0/eQiY8gdP3rooaBDL4F7lvMkVh0ciQYuUE 1KvD5nvv+nZRoPMZL8mqwi0PcxJ3GOrlci49zT/WdwoQCXZEXiniYg1JD9PU19XSn14X vsJlR0CstX17lVw16YEJNBod8h4Z7VmbA/6KAKf1+N5Dm6qMWQV4MlYXHQuBNDL+/em3 97Z4WCusEZBpPd2E3KWes2rwCVUXFO5YOjPAzr4fsi7dZnbY1gNyRUnF3s8/IVg80NM/ I88w== X-Received: by 10.55.48.18 with SMTP id w18mr17072376qkw.34.1434570652833; Wed, 17 Jun 2015 12:50:52 -0700 (PDT) Received: from muskytusk ([104.236.250.12]) by mx.google.com with ESMTPSA id 63sm2695827qgx.25.2015.06.17.12.50.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 12:50:51 -0700 (PDT) Sender: Mark Johnston Date: Wed, 17 Jun 2015 19:49:46 +0000 From: Mark Johnston To: abhishek kulkarni Cc: freebsd-dtrace@freebsd.org Subject: Re: Regarding a Sched Dtrace Script for FreeBSD Message-ID: <20150617194946.GA34351@muskytusk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 17 Jun 2015 19:50:54 -0000 On Tue, Jun 16, 2015 at 11:01:27AM -0700, abhishek kulkarni wrote: > Hello all, > > > > I am working on Dtrace and trying to implement a sched script for FreeBSD > 10.0 > > The script uses the probes on-cpu and off-cpu. > > The purpose is to measure the time that a CPU spends on the current thread. > > I am trying to use the aggregation function “SUM” to capture the CPU time > for the ping utility. I am doing it by opening a new putty terminal and > running the ping utility in it, and then running the Dtrace script in > another instance of the terminal. > > I am also using the time utility in order to verify the Kernel Time for a > ping. The time given by the “Time” utility and the Dtrace script do not > match. Could you please help with this . The following is the Dtrace script > we are trying out : Hello, There are a couple of problems in the script, which I've pointed out below. > > > > sched:::on-cpu > > /curthread->td_name == "ping"/ Generally, only kernel threads will have names, so this condition will never be true. You can use the execname variable to match processes named "ping", but note that this will give incorrect results if there are multiple ping processes running at the same time as the script. You can match a specific process using its PID and dtrace(1)'s -c option. For example: dtrace -n 'syscall:::entry /pid == $target/{}' -c "ping -c 3 google.com" > > { > > self->ts = timestamp; > > } > > > > sched:::off-cpu > > /self->ts != 0/ > > { > > @delta[curthread->td_name] = sum(timestamp - self->ts)/1000000; This will result in an error since the sum function doesn't return an integer. I suspect you meant "sum((timestamp - self->ts) / 1000000);"? > > self->ts =0; > > } From owner-freebsd-dtrace@FreeBSD.ORG Wed Jun 17 21:59:51 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4E0841E for ; Wed, 17 Jun 2015 21:59:51 +0000 (UTC) (envelope-from abhya007@gmail.com) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7565FCA7 for ; Wed, 17 Jun 2015 21:59:51 +0000 (UTC) (envelope-from abhya007@gmail.com) Received: by paceq1 with SMTP id eq1so21136772pac.3 for ; Wed, 17 Jun 2015 14:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=zarGeoGAW6IF6tMkmCxu90jUdPZWZXFeXJwEolzeAV8=; b=SN2T23fyS0Vf2vcd6nNOVmfRT2MmWbL8038ZZ0+LF4L7w5CX/AvHUkGKOaRQkQ9jN2 swJOkp5hxe9Hx+CimKm6y/oHopcdZegA6gl7bQcNhQreN4sZ9lksR1uUfoydAMRm4JKe iNwndU/9FlmnIx8SmSjjj7HEJ0fkhnlSTc6s7+Alpzv2FbJivBghSRyYU54gvLlvlVBG UMSrA/Gpr3a2vmdNLGyrVzAPAxFsyaRyWjiyr8prpWzVSpoaW01SbWwaPT/HZxZ8EV9Y iRi0C5cHrgEZPtKtY+BrGet8sYRzbYAa1txwXYAgR/DQkQZ0d/VZoKeE5SSB2PXZg2/v ruaQ== MIME-Version: 1.0 X-Received: by 10.66.217.161 with SMTP id oz1mr14951351pac.56.1434578390734; Wed, 17 Jun 2015 14:59:50 -0700 (PDT) Received: by 10.70.46.99 with HTTP; Wed, 17 Jun 2015 14:59:50 -0700 (PDT) Date: Wed, 17 Jun 2015 14:59:50 -0700 Message-ID: Subject: Aggregation in Dtrace Script Causing performance issues From: abhishek kulkarni To: freebsd-dtrace@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 17 Jun 2015 21:59:51 -0000 Hello All, Iam Working on a Dtrace Script for the ping utility. The purpose is to measure the CPU time for the current thread which is PING.We tried doing it using an aggregation function and once while avoiding it.We observed the times for a ping response, for both scripts. The response was roughly taking thrice the time ( around 3.519 ms ) when an aggregation function was used as against a script not using aggregation ( which took around 0.219 ms ) . Could this be explained in detail.I believe, Dtrace , being considered a lightweight tool shouldnt affect the performance upto such an extent. Here are the 2 scripts : *Not using an aggregate function* : BEGIN { times = 0; } sched:::on-cpu /execname == "ping"/ { /* thread entering CPU */ start[execname] = timestamp; } sched:::off-cpu /start[execname] != 0/ { /* Thread leaving CPU */ times += timestamp - start[execname]; start[execname] = 0 ; } END { printf("The delta is : %d", (times/1000000)); times =0; } *Using an aggregate function "SUM"* sched:::on-cpu /execname == "ping"/ { self->ts = timestamp; } sched:::off-cpu /self->ts != 0/ { @delta[execname] = sum((timestamp - self-.ts)/1000000); self->ts =0; } From owner-freebsd-dtrace@FreeBSD.ORG Wed Jun 17 22:20:40 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1E258AF for ; Wed, 17 Jun 2015 22:20:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qg0-x231.google.com (mail-qg0-x231.google.com [IPv6:2607:f8b0:400d:c04::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B79A1DD for ; Wed, 17 Jun 2015 22:20:40 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by qgf75 with SMTP id 75so20565829qgf.1 for ; Wed, 17 Jun 2015 15:20:39 -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=b+iipNzLu1Vaav4lEEdmxxyKUrGqJM5zGgf5EmaTO0U=; b=bMPx5UMxKXpsBKdceXcvk5H9UMaWBncAbyJmGT2fjt5ssqM04NBjRf+XFNSQbQsQoH Qz73SNZmElw2nvqx984DJ+myg7hK+ZuBWrRfw9M3fsCbzgpgDpl/QWKrkEB3QcdUULte hwtWGoI891HkKGeec4jlVrCqoGXbN/1oetPAMW8ZvQkyY52vwZKTRr+e6cEUYuIpMAWX /t7uE3ICCOO6bY3Nh+1v8IKuw/cSQU6xrRSfJO30kpr9z/gxUbNHaStur43bcoZe+Jay r/Gg8qMR3FCaQq3T6PQrKB/BbVyBjwyqHiYm+UXLC8zoCyN7Xj9QadFQl+JDkA7qTmdx S4FA== X-Received: by 10.55.53.70 with SMTP id c67mr18205825qka.62.1434579638983; Wed, 17 Jun 2015 15:20:38 -0700 (PDT) Received: from muskytusk ([104.236.250.12]) by mx.google.com with ESMTPSA id p84sm2885268qkh.10.2015.06.17.15.20.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 15:20:37 -0700 (PDT) Sender: Mark Johnston Date: Wed, 17 Jun 2015 22:20:04 +0000 From: Mark Johnston To: abhishek kulkarni Cc: freebsd-dtrace@freebsd.org Subject: Re: Aggregation in Dtrace Script Causing performance issues Message-ID: <20150617222004.GB34351@muskytusk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 17 Jun 2015 22:20:40 -0000 On Wed, Jun 17, 2015 at 02:59:50PM -0700, abhishek kulkarni wrote: > Hello All, > > Iam Working on a Dtrace Script for the ping utility. The purpose is to > measure the CPU time for the current thread which is PING.We tried doing it > using an aggregation function and once while avoiding it.We observed the > times for a ping response, for both scripts. The response was roughly > taking thrice the time ( around 3.519 ms ) when an aggregation function > was used as against a script not using aggregation ( which took around > 0.219 ms ) . Could this be explained in detail.I believe, Dtrace , being > considered a lightweight tool shouldnt affect the performance upto such an > extent. I tried both scripts on an otherwise mostly-idle system and didn't observe any significant latency difference between the two, or with ping latency when DTrace is not in use at all. Does your experiment produce the same result reliably? From owner-freebsd-dtrace@FreeBSD.ORG Thu Jun 18 00:21:25 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82E15EB4 for ; Thu, 18 Jun 2015 00:21:25 +0000 (UTC) (envelope-from priyanksanghavi92@gmail.com) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 535C5401 for ; Thu, 18 Jun 2015 00:21:25 +0000 (UTC) (envelope-from priyanksanghavi92@gmail.com) Received: by paceq1 with SMTP id eq1so23337806pac.3 for ; Wed, 17 Jun 2015 17:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=LSlu5e+i4JUz4Qq3LG5+YpMv2WSFzuZj6QFnA0IqJjM=; b=iPlNFrF7Uuu0xyyp2R/wk1FRyqOaD2KRg1Pf6+uV7QDu/l3/360AXaAYpY2l73P6Pj hLOHGKqGCwgVciiknQgEmlk2Ugzl7Y2EsAynCCG0H+D7ermf59g5kvWRojJ4eG4EOPVB /8FLheg849LCAJbGy/8IaOS1BWodRK9f3/I3/3ugByNZiVeTKrSmZ+fyISirtm5jmQjD 1PYpVxZjH4pO9HFWqNNZDK9BydwZ/URAiW2GftPXeunBv0uszF+Lxfn7ueE2E8uyzVc5 sjoA1vRC+VmcyjCqhDJpUAK/s3fywedoQKP+b1TDOyVXPIkM8wITMnb+HlutfwCoTu2j 21yA== X-Received: by 10.70.29.4 with SMTP id f4mr16166370pdh.23.1434586884870; Wed, 17 Jun 2015 17:21:24 -0700 (PDT) Received: from [172.29.106.45] ([66.129.239.12]) by mx.google.com with ESMTPSA id pj4sm5919727pbb.29.2015.06.17.17.21.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Jun 2015 17:21:24 -0700 (PDT) From: Priyank Sanghavi Subject: Quantize a probe only if it has a particular function in its stack. Message-Id: Date: Wed, 17 Jun 2015 17:21:23 -0700 To: freebsd-dtrace@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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, 18 Jun 2015 00:21:25 -0000 Hello, I am currently working on dtrace on free-bsd. What I want to do is put a = probe on uma_zalloc function and quantize its arguments. But along with = that I want to keep a condition to quantize ( or record the readings) = only if the stack of that uma_zalloc has a function ( foo ) in it. = =E2=80=94=E2=80=94 This means, consider the readings of uma_zalloc only = if it has come from the function foo.=20 Is there a condition that can do that work? - Thanks, Priyank.= From owner-freebsd-dtrace@FreeBSD.ORG Thu Jun 18 00:24:10 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C280DC2 for ; Thu, 18 Jun 2015 00:24:10 +0000 (UTC) (envelope-from rm@joyent.com) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B24A75F for ; Thu, 18 Jun 2015 00:24:10 +0000 (UTC) (envelope-from rm@joyent.com) Received: by pacyx8 with SMTP id yx8so47863893pac.2 for ; Wed, 17 Jun 2015 17:24:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=SkEcnpfVaASiG4KZPQ5nx7rSck6lBCviYJzLCuO1BxA=; b=JzVRwSeXjX1kPcYA3k6otIyTAJyrb9IxidI+qqEl4j4DsEHbZu5FqvBKEN2bV4XUCo s0LMYaHrBjiwG4qcR7QeselYQqmI7N782l0qJnRpMihocq5o7oi959MWC/vLUBEThhEg lEg1VVmaiPkqPLMRWOePJD3r9oyPTQSCbysbNwKaclhPxjIv80HzuTJ8HJ2HtKXedpSH OlM3BQGWuWuZTCM1n2xi0XgcUuJWn7JoqQnrOLNOtCigzS4/Jyy/NnzsXlsCn4M3ga7O JV4GetPhRQJ1QSgMIEWqSjGn+1VoLmfThCVWAuv7YmduO5mxjjIcUvHa9U5Z/vzHM4Ee d8BQ== X-Gm-Message-State: ALoCoQnfHRVji5kQfiLsz7s1HwTPgSRHlxR5uYvyA4Y/1BZcaNo0/iSl0QkU3Qn6KJVkjVdV8oDx X-Received: by 10.66.249.101 with SMTP id yt5mr15866876pac.116.1434587044338; Wed, 17 Jun 2015 17:24:04 -0700 (PDT) Received: from zanarkand.local ([208.184.5.170]) by mx.google.com with ESMTPSA id f1sm5965916pdp.24.2015.06.17.17.24.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2015 17:24:02 -0700 (PDT) Message-ID: <55820FA0.7090507@joyent.com> Date: Wed, 17 Jun 2015 17:24:00 -0700 From: Robert Mustacchi User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-dtrace@freebsd.org Subject: Re: Quantize a probe only if it has a particular function in its stack. References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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, 18 Jun 2015 00:24:10 -0000 On 6/17/15 17:21 , Priyank Sanghavi wrote: > Hello, > > I am currently working on dtrace on free-bsd. What I want to do is put a probe on uma_zalloc function and quantize its arguments. But along with that I want to keep a condition to quantize ( or record the readings) only if the stack of that uma_zalloc has a function ( foo ) in it. —— This means, consider the readings of uma_zalloc only if it has come from the function foo. > > Is there a condition that can do that work? Just use a thread local variable that tracks when you enter the function you care about and removes it when you return. eg. if you had a function called foobar: fbt::foobar:entry { self->t = 1; } fbt::foobar:return { self->t = 0; } Then you can use that as a predicate on an enabling of uma_zalloc. Robert From owner-freebsd-dtrace@FreeBSD.ORG Fri Jun 19 12:55:25 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DE2F5F3 for ; Fri, 19 Jun 2015 12:55:25 +0000 (UTC) (envelope-from venture37@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A278A1 for ; Fri, 19 Jun 2015 12:55:25 +0000 (UTC) (envelope-from venture37@gmail.com) Received: by wicnd19 with SMTP id nd19so18228168wic.1 for ; Fri, 19 Jun 2015 05:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=t6MdloBdP6sqf2IykbV2AGaX1tGyjONGK/XcSr679Gw=; b=PIVXTzBowjyt87MHqp54d07rBRv904pw8d6cmoztBzxXmp1zhC34K0gi7Eg6PFHs/0 Yr56Pe2JXRZBRl7+LWSrFEcYFVoeG64iRqIxJKHf4TnRqJEw6DzUHgEbaBxtTjTFHBcq cF/Z3wz0e4+Ki6fvlp+BpC0BUTb1ufOXW5sZbx8f17KRj2rskZ34G96UkGIlgTi3jGPc xO08SyidnS0EYIJJwrjyGi0Y6fdFi7+2agysbllqmMFRMTBLJZWIai9PWW5prWAO4bCC Zo7N0vaRjJ2Q+MY0uneOg5vNUbrXVwV7dWbRVrIfXbs+QdueK1uljweua3Kta5IyQTJw jb1A== MIME-Version: 1.0 X-Received: by 10.194.82.38 with SMTP id f6mr12787048wjy.16.1434718523388; Fri, 19 Jun 2015 05:55:23 -0700 (PDT) Received: by 10.194.187.234 with HTTP; Fri, 19 Jun 2015 05:55:23 -0700 (PDT) Date: Fri, 19 Jun 2015 13:55:23 +0100 Message-ID: Subject: DTrace Guide From: "Sevan / Venture37" To: "freebsd-dtrace@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Jun 2015 12:55:25 -0000 Hiya, The "Illumos Dynamic Tracing Guide" is now complete with images (previously missing) http://dtrace.org/guide There's a heads up from @opensolaris on twitter that https://wikis.oracle.com/display/DTrace/DTrace may be going away. Sevan / Venture37 From owner-freebsd-dtrace@FreeBSD.ORG Fri Jun 19 15:05:44 2015 Return-Path: Delivered-To: freebsd-dtrace@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4217B7 for ; Fri, 19 Jun 2015 15:05:44 +0000 (UTC) (envelope-from rm@joyent.com) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7BF5F77D for ; Fri, 19 Jun 2015 15:05:43 +0000 (UTC) (envelope-from rm@joyent.com) Received: by padev16 with SMTP id ev16so87130370pad.0 for ; Fri, 19 Jun 2015 08:05:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=012QDjB7B3SvM9Nq+QEXofhMH3ijPYIv91o0JmFJ44A=; b=e/3RzJDV7pnOjbcYNz7b6fdTkJMPTuCY2SlwrVpTiJgudLAtBNMKsobv3/IGqwAR61 2gkKREIcNGW+B/oSznoRFmMNzdWMiZZv+M3ft9t3Kj9EuYM5ouOjMmGxJKSthfgTo2e8 o/qGNLhQtpDHhImGX0u+AKQbhd/VVTK0A320H9ywFo/C5i7IOJ+Ji05TZ5Eb4u6Gd6bU dgrvmvig12K9bA8D0/+rhREfdr/MhRH+Ypx8/8pcyjDEOI1qB7znibaqejtr5dGzCpEj XB8xqFblMaMYslUUYJTonWM5sO1d+MotGIdr7/gixGTofAq3Y4pGhqS1swbrhKEnzFc3 JSbg== X-Gm-Message-State: ALoCoQk4t5gJiSHhWwnwnygj7MxkJky+Vl0FKw4RlrTqqrSO0CnGH5kbDqw6AW6+OH6js4fgC6lP X-Received: by 10.70.38.170 with SMTP id h10mr32415125pdk.20.1434726342998; Fri, 19 Jun 2015 08:05:42 -0700 (PDT) Received: from zanarkand.local (c-73-162-34-143.hsd1.ca.comcast.net. [73.162.34.143]) by mx.google.com with ESMTPSA id pp6sm11471086pbb.79.2015.06.19.08.05.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Jun 2015 08:05:41 -0700 (PDT) Message-ID: <55842FC3.8040104@joyent.com> Date: Fri, 19 Jun 2015 08:05:39 -0700 From: Robert Mustacchi User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-dtrace@freebsd.org Subject: Re: DTrace Guide References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-dtrace@freebsd.org X-Mailman-Version: 2.1.20 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, 19 Jun 2015 15:05:44 -0000 On 6/19/15 5:55 , Sevan / Venture37 wrote: > Hiya, > The "Illumos Dynamic Tracing Guide" is now complete with images > (previously missing) http://dtrace.org/guide > > There's a heads up from @opensolaris on twitter that > https://wikis.oracle.com/display/DTrace/DTrace may be going away. The source for it is maintained here: https://github.com/rmustacc/illumos-docbooks. Please let me know if you find issues with it and we'll get updates out there. Robert