Re: [DynInst_API:] Dyninst is taking 35 seconds to attach to Firefox


Date: Mon, 07 Jul 2014 15:45:00 -0700
From: Josh Stone <jistone@xxxxxxxxxx>
Subject: Re: [DynInst_API:] Dyninst is taking 35 seconds to attach to Firefox
On 07/07/2014 02:44 PM, Francis Deslauriers wrote:
> Hi folks,
> 
> I tried to attach a Firefox process and it took Dyninst ~35 seconds.
> My mutator program forks and the child process exec firefox with the
> -h argument.
> 
> Here is a pastebin where I used the time command and DYNINST_DEBUG_STARTUP=1 :
> http://pastebin.com/Tx5NhqpR
> 
> Here is the code i used: http://pastebin.com/rVikLb6m
> Makefile : http://pastebin.com/3rvgFUWi
> 
> Am i using Dyninst the wrong way? Is there something I can do to speed
> up the attaching? Maybe Firefox debug symbols are just too huge.

On Fedora 20 x86_64, firefox's libxul.so.debug is about 600MB.  It's
definitely a monster.  With full "debuginfo-install firefox" on my
system, your sample also takes me about 35s, so we're similar. :)

But gdb is also slow on firefox -- try:

  gdb -ex 'b Output' -ex run -ex quit \
    --args /usr/lib64/firefox/firefox -h

That takes about 1m40s for me.  Now, it's not a direct comparison since
I added a breakpoint, but if I remove that gdb takes only 1.2s.  Clearly
they're lazy-loading quite a bit, and it may be that gdb loads more than
dyninst when it gets to work.

So maybe dyninst could stand some optimization, and maybe gdb too, but
it's quite a heavy workload you're using. :)

Josh
[← Prev in Thread] Current Thread [Next in Thread→]