From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13514 invoked by alias); 3 May 2004 17:17:35 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13503 invoked from network); 3 May 2004 17:17:32 -0000 Received: from unknown (HELO mailhost.calypto.com) (66.17.65.87) by sources.redhat.com with SMTP; 3 May 2004 17:17:32 -0000 Received: from rio (rio.calypto.com [192.168.100.120]) by mailhost.calypto.com (8.11.6/8.11.6) with ESMTP id i43HHV711577 for ; Mon, 3 May 2004 10:17:31 -0700 From: Nick Savoiu To: gdb@sources.redhat.com Subject: Re: Improving GDB startup time with large programs Date: Mon, 03 May 2004 17:17:00 -0000 User-Agent: KMail/1.6.2 References: <20040502224944.847584B104@berman.michael-chastain.com> <200405021948.50571.savoiu@ics.uci.edu> In-Reply-To: <200405021948.50571.savoiu@ics.uci.edu> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405031016.39973.savoiu@ics.uci.edu> X-SW-Source: 2004-05/txt/msg00022.txt.bz2 For comparison here are the GDB 6.0 results: Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls s/call s/call name 32.24 2.36 2.36 2013564 0.00 0.00 hash 16.12 3.54 1.18 2300832 0.00 0.00 htab_hash_string 6.42 4.01 0.47 3975016 0.00 0.00 read_partial_die 5.46 4.41 0.40 1906174 0.00 0.00 bcache 3.21 4.64 0.23 2024256 0.00 0.00 htab_find_slot_with_hash 2.60 4.83 0.19 591490 0.00 0.00 dyn_string_substring 2.32 5.00 0.17 436495 0.00 0.00 strcmp_iw_ordered 1.98 5.15 0.14 11899013 0.00 0.00 read_attribute_value 1.78 5.28 0.13 118643 0.00 0.00 msymbol_hash 1.57 5.39 0.12 6972300 0.00 0.00 read_unsigned_leb128 1.50 5.50 0.11 4412114 0.00 0.00 dwarf2_lookup_abbrev 1.50 5.62 0.11 2128935 0.00 0.00 read_indirect_string 1.30 5.71 0.10 1906174 0.00 0.00 add_psymbol_to_list 1.23 5.80 0.09 74808 0.00 0.00 msymbol_hash_iw 1.16 5.88 0.09 6507274 0.00 0.00 dyn_string_resize 1.09 5.96 0.08 11899013 0.00 0.00 read_attribute 1.02 6.04 0.07 1699 0.00 0.00 scan_partial_symbols Nick On Sunday 02 May 2004 07:48 pm, Nick Savoiu wrote: > >> How do I profile gdb? > > > >When you build gdb, configure as normal. > >Then use this command to build: > > Here's what I got (the most significant stuff) with g++ 3.2. Seems that the > number of symbols is the culprit. > > Nick > > -------------------------------- > > Flat profile: > > Each sample counts as 0.01 seconds. > % cumulative self self total > time seconds seconds calls s/call s/call name > 18.61 1.93 1.93 2013562 0.00 0.00 hash > 13.55 3.33 1.41 9757458 0.00 0.00 strcmp_iw_ordered > 11.86 4.57 1.23 2310964 0.00 0.00 htab_hash_string > 9.55 5.55 0.99 6206314 0.00 0.00 read_partial_die > 4.97 6.07 0.52 1906172 0.00 0.00 bcache_data > 3.38 6.42 0.35 5101168 0.00 0.00 read_indirect_string > 3.33 6.76 0.34 23770551 0.00 0.00 read_attribute_value > 3.18 7.09 0.33 948693 0.00 0.00 d_print_comp > 2.60 7.37 0.27 2032858 0.00 0.00 > htab_find_slot_with_hash 1.59 7.53 0.17 9203512 0.00 0.00 > read_unsigned_leb128 1.54 7.69 0.16 23770551 0.00 0.00 > read_attribute 1.25 7.82 0.13 256652 0.00 0.00 > find_last_component 1.25 7.95 0.13 131142 0.00 0.00 > msymbol_hash_iw 1.16 8.07 0.12 6643402 0.00 0.00 > dwarf2_lookup_abbrev 1.16 8.19 0.12 3934670 0.00 0.00 > d_make_comp > 1.06 8.30 0.11 1906172 0.00 0.00 add_psymbol_to_list > 0.96 8.40 0.10 89224 0.00 0.00 > cp_find_first_component_aux 0.87 8.49 0.09 19615690 0.00 > 0.00 symbol_natural_name 0.87 8.58 0.09 12864595 0.00 > 0.00 bfd_getl32 > 0.87 8.67 0.09 1699 0.00 0.00 scan_partial_symbols > 0.77 8.75 0.08 2032858 0.00 0.00 symbol_set_names > 0.68 8.82 0.07 11166899 0.00 0.00 read_1_byte