• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: where does initialization time go?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: where does initialization time go?
      • From: Eric Gouriou <email@hidden>
    • dtrace and missing a good chunk of startup time
      • From: Joel Reymont <email@hidden>
References: 
 >dyld cache: shared_region_roots/Applications.paths (From: Joel Reymont <email@hidden>)
 >Re: dyld cache: shared_region_roots/Applications.paths (From: Joel Reymont <email@hidden>)
 >Re: dyld cache: shared_region_roots/Applications.paths (From: Jean-Daniel Dupas <email@hidden>)
 >Re: dyld cache: shared_region_roots/Applications.paths (From: Joel Reymont <email@hidden>)
 >Re: dyld cache: shared_region_roots/Applications.paths (From: Jonas Maebe <email@hidden>)
 >where does initialization time go? (From: Joel Reymont <email@hidden>)
 >Re: where does initialization time go? (From: Eric Gouriou <email@hidden>)

  • Prev by Date: Re: Darwin Open Source Release
  • Next by Date: Re: Darwin Open Source Release
  • Previous by thread: Re: where does initialization time go?
  • Next by thread: dtrace and missing a good chunk of startup time
  • Index(es):
    • Date
    • Thread