On Sep 9, 2009, at 12:47 PM, Joel Reymont wrote:

I'm trying to time a function within Firefoxwith a pid$target probe [2]. e.g

dtrace -Zqw -x dynvarsize=64m -x evaltime=preinit -p 13954 -s menu- construct.d -s sigcont.d
elapsed: 12.7942481ms
cpu    : 7.7911194ms
count  : 40 times

I'm also measuring Firefox startup time by running it arguments like this:

... file:///Users/joelr/work/mozilla/startup/startup.html#`python -c 'import time; print int(time.time() * 1000);'`

startup.html [3] prints the time delta.

I'm seing 0.9s without tracing with menu-construct.d and 17.9s when tracing with it.

Now the question... Should I be looking at the elapsed time above in the context of 0.9s or 17.9s?

        Thanks, Joel

Joel,

Given that you have only 40 hits, my guess is you should use the .9s context.

As Firefox starts up, each dyld load is "paused" until a handshake with dtrace has taken place. This allows dtrace to place probes in the newly loaded library before
any code has executed.

I think the extra startup time you are seeing is related to dtrace processing
the newly loaded libraries.

If those libraries include debug info (for example, libraries you might have built yourself)
it can take longer to process them.

        James M


_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to