Re: where does initialization time go?
Re: where does initialization time go?
- Subject: Re: where does initialization time go?
- From: Joel Reymont <email@hidden>
- Date: Fri, 28 Aug 2009 23:05:22 +0100
On Aug 28, 2009, at 7:22 PM, Eric Gouriou wrote:
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
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;
}
END
{
this->total = timestamp - start;
printf("Total: %u.ums\n", this->total / 1000000, this->total %
1000000);
}
---
and stop-main.d:
mozilla$target:::main-entry
{
exit(0);
}
Note that stop-main.d does not work without $target, even though main-
entry is a USDT probe.
Thanks, Joel
---
fastest mac firefox!
http://wagerlabs.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden