From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Molenda To: Tom Tromey Cc: Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [RFA] patch to add 'maint profile-gdb' command Date: Wed, 12 Sep 2001 13:16:00 -0000 Message-id: <20010912131609.A2946@shell17.ba.best.com> References: <20010911013721.A25996@shell17.ba.best.com> <20010911235955.A21595@shell17.ba.best.com> <7263-Wed12Sep2001155646+0300-eliz@is.elta.co.il> <20010912074141.A17732@shell17.ba.best.com> <2950-Wed12Sep2001190334+0300-eliz@is.elta.co.il> <87ofogdy1d.fsf@creche.redhat.com> X-SW-Source: 2001-09/msg00170.html On Wed, Sep 12, 2001 at 01:11:42PM -0600, Tom Tromey wrote: > moncontrol(0) is called as the second thing in main(). That's pretty > early. My experience with this patch from when I wrote it is that the > startup noise is ignorable. I'd second that. I just tried starting an --enable-profiling gdb and exiting without running "maint profile-gdb on", and I got this in the "flat profile" section of gprof's output: % cumulative self self total time seconds seconds calls ms/call ms/call name 0.0 0.00 0.00 1 0.00 0.00 _captured_main [26] 0.0 0.00 0.00 1 0.00 0.00 _catch_errors [27] 0.0 0.00 0.00 1 0.00 0.00 _main [28] 0.0 0.00 0.00 1 0.00 0.00 _save_cleanups [29] 0.0 0.00 0.00 1 0.00 0.00 _save_my_cleanups [30] For comparison, yesterday I was profiling the behavior of a single 'next' under MI and the functions being called the most (lookup_minimal_symbol_by_pc_section_from_objfile and friends) were being called thousands of times. Jason