Re: where does initialization time go?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Aug 28, 2009, at 7:22 PM, Eric Gouriou wrote: where cold.sh: #!/bin/bash progname=$1 shift scripts="-s sigcont.d" for i in $*; do scripts="$scripts -s $i"; done opts="-Zqw -x dynvarsize=64m -x evaltime=exec" dtrace=' inline string progname="'$progname'"; inline string scripts="'$scripts'"; inline string opts="'$opts'"; proc:::exec-success /execname == progname/ { stop(); printf("dtrace %s -p %d %s\n", opts, pid, scripts); system("dtrace %s -p %d %s\n", opts, pid, scripts); exit(0); } ' sync && purge && dtrace $opts -n "$dtrace" --- and startup.d: BEGIN { start = timestamp; } and stop-main.d: mozilla$target:::main-entry { exit(0); } Thanks, Joel --- fastest mac firefox! http://wagerlabs.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I'd recommend reworking your script to watch the exec-success of firefox-bin and use a static probe (no need for $target then) to mark the end time. Then you can use a more normal launch method, for example open .../Minefiled.app . ./cold.sh firefox-bin startup.d stop-main.d dtrace -Zqw -x dynvarsize=64m -x evaltime=exec -p 35209 -s sigcont.d - s startup.d -s stop-main.d kill -CONT 35209 Total: 2000.401494ms END { this->total = timestamp - start; printf("Total: %u.%06ums\n", this->total / 1000000, this->total % 1000000); } --- Note that stop-main.d does not work without $target, even though main- entry is a USDT probe. This email sent to site_archiver@lists.apple.com
participants (1)
-
Joel Reymont