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


Date: Mon, 7 Jul 2014 22:32:38 -0400
From: Francis Deslauriers <fdeslaur@xxxxxxxxx>
Subject: Re: [DynInst_API:] Dyninst is taking 35 seconds to attach to Firefox
On Mon, Jul 7, 2014 at 6:45 PM, Josh Stone <jistone@xxxxxxxxxx> wrote:
> 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. :)
>
It does make sense.
> 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. :)
I will focus on a project with a more regular size. Nautilus seems to
be a good choice. It still good to know the upper bound.
Also, what is the purpose of the option RelWithDebInfo? Is there a
place where I can more info on the different build options? If there
isn't, I would be glad to contribute with what I learned.

Thank you for your help!

Francis
>
> Josh
> _______________________________________________
> Dyninst-api mailing list
> Dyninst-api@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
[← Prev in Thread] Current Thread [Next in Thread→]