From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16201 invoked by alias); 14 Dec 2011 23:28:20 -0000 Received: (qmail 16172 invoked by uid 22791); 14 Dec 2011 23:28:19 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 23:28:07 +0000 From: "l.lunak at suse dot cz" To: gdb-prs@sourceware.org Subject: [Bug gdb/13498] save-index makes gdb slow with dwarf4 Date: Wed, 14 Dec 2011 23:28:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: l.lunak at suse dot cz X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00524.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=3D13498 --- Comment #1 from Lubo=C5=A1 Lu=C5=88=C3=A1k 201= 1-12-14 23:27:48 UTC --- Ok, I think I've figured out where the problem is. When completing, location_completer() calls also make_source_files_completion_list(), which calls map_partial_symbol_filenames(). That one is where most of the time during t= he completion is spent - it calls the proper map_symbol_filenames function depending on the debugging format - for .so's without an index, it's map_symbol_filenames_psymtab(), for indexed files, it is dw2_map_symbol_filenames(). The problem is, with dwarf4-based index, dw2_map_symbol_filenames() iterates over a huge number of filenames, magnitudes more than with dwarf2-based ind= ex or psymtabs (in my case, it's 35M filenames with dwarf4 index, 380k with dw= arf4 without index, 720k with dwarf2 index, 220k with dwarf2 without index). All= the time is spent just iterating over them. And the number is so high because t= here are many duplicates, as high as 175k duplicates for the most common header files. I don't know DWARF or gdb, so I'm not sure what the proper fix should be. Possibly the save-index functionality should try to eliminate these duplica= tes. --=20 Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are on the CC list for the bug.