This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFC 3/3] Test on solib load and unload


> -----Original Message-----
> From: Yao Qi [mailto:yao@codesourcery.com]
> Sent: Tuesday, September 03, 2013 03:59 AM
> To: Agovic, Sanimir
> Cc: gdb-patches@sourceware.org
> Subject: Re: [RFC 3/3] Test on solib load and unload
> 
> On 08/28/2013 07:31 PM, Agovic, Sanimir wrote:
> >> +  for (i = 0; i < number; i++)
> >> >+    {
> >> >+      char funname[20];
> >> >+      void *p;
> >> >+
> >> >+      sprintf (funname, "shr%d", i);
> >> >+      p = dlsym (handles[i], funname);
> >> >
> > Does dlsym has any perf impact on the debugger?
> >
> 
> Probably no much performance impact on the debugger, IMO.  dlsym is to
> resolve symbol in runtime, debugger is not much involved.
>
Without impact/side-effect I`d rather remove it, given that this is a
NOP for the debugger. But this is nothing I`m worried about.

> >> >+
> >> >+gdb_test_no_output "python SolibLoadUnload\($SOLIB_NUMBER\)"
> >> >+
> >> >+# Call the convenience function registered by python script.
> >> >+send_gdb "call \$perftest()\n"
> >> >
> > Not sure if a convenience function is necessary:
> > python SolibLoadUnload().execute_test()
> > could do the job as well.
> >
> 
> Convenience function is useful to de-couple solib.py and solib.exp.
> solib.py adds a convenience function, while solib.exp is to call it.
> 
Got it.

> >> >+
> >> >+            start_time = time.clock()
> >> >+            gdb.execute (do_test_command)
> >> >+            elapsed_time = time.clock() - start_time
> >> >+
> >> >+            self.result.record (num, elapsed_time)
> >> >+
> >> >+            num = num / 2
> >> >+            iteration -= 1
> >> >
> > You may consider observing solibs loads/unloads to compute the time
> > between the events.
> > Can you re-run the sample with turned off garbage collector? It may
> > cause some jitter if turned on.
> 
> I don't know how much time is spent on jitter, but python code is
> simple and most of the time should be spent on GDB, which is what we
> want.  Thanks for your suggestion.  I'll re-run it with gc turned off,
> to see if I can get something different.
> 
Thanks.

 -Sanimir
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]