Chris,
attached is a script I use for memset.
rick

On Sat, Apr 12, 2008 at 06:06:30PM -0700, Chris Williams wrote:
> Date: Sat, 12 Apr 2008 18:06:30 -0700 (PDT)
> From: Chris Williams <[EMAIL PROTECTED]>
> Subject: [dtrace-discuss] Newbie help with a dtrace script
> To: [email protected]
> Errors-to: [EMAIL PROTECTED]
> Precedence: list
> X-BeenThere: [email protected]
> Delivered-to: [email protected]
> X-PMX-Version: 5.4.1.325704
> X-Brightmail-Tracker: AAAAAA==
> X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on
>       oss-mail1.opensolaris.org
> X-Original-To: [email protected]
> X-OpenSolaris-URL:
>  http://www.opensolaris.org/jive/message.jspa?messageID=224840&tstart=0#224840
> X-Antispam: No, score=-0.3/5.0, scanned in 0.101sec at (localhost [127.0.0.1])
>       by smf-spamd v1.3.1 - http://smfs.sf.net/
> X-Mailman-Version: 2.1.9
> List-Post: <mailto:[email protected]>
> List-Subscribe: <http://mail.opensolaris.org/mailman/listinfo/dtrace-discuss>,
>       <mailto:[EMAIL PROTECTED]>
> List-Unsubscribe:
>  <http://mail.opensolaris.org/mailman/listinfo/dtrace-discuss>,
>       <mailto:[EMAIL PROTECTED]>
> List-Archive: <http://mail.opensolaris.org/pipermail/dtrace-discuss>
> List-Help: <mailto:[EMAIL PROTECTED]>
> List-Id: DTrace General Discussion <dtrace-discuss.opensolaris.org>
> X-Spam-Status: No, score=1.6 required=5.0 tests=AWL,FORGED_YAHOO_RCVD,
>       RDNS_NONE autolearn=no version=3.2.3
> X-Spam-Level: *
> 
> I am looking for some help with a dtrace I would like to create.  I am using 
> the dtrace toolkit and used dappprof to see some of my user functions that 
> are getting called ALOT.  What I would like to do is to create a dtrace 
> script that would give me a count of where those functions are being called 
> and get an aggregate count.  I am just looking for some pointers on how I 
> would go about staring the script.
> 
> Thanks!
> Chris
> 
> 
> --
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> [email protected]

-- 

Rickey C. Weisner 
Software Development and Performance Specialist 
Sun Microsystems, INC
cell phone: 615-308-1147
email: [EMAIL PROTECTED]
#!/usr/sbin/dtrace -s

pid$1::memset:entry
/ arg2 < 17 /
{
        this->tval=arg2;
        @[ustack(2),arg2] = count(); 
/*        @[ustack(5),this->tval] = count(); */
/*        @[this->tval] = count(); */
/*        @["memset"] = quantize(arg2); */
}
tick-10sec
{
        printf("\n memset stack, size count Date: %Y ", walltimestamp); 
/*         printf("\n memset size count Date: %Y ", walltimestamp); */
        printa(@);
        clear(@);
}
tick-100sec
{
exit(0);
}
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to