This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/13498] save-index makes gdb slow with dwarf4
- From: "l.lunak at suse dot cz" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 14 Dec 2011 23:27:48 +0000
- Subject: [Bug gdb/13498] save-index makes gdb slow with dwarf4
- Auto-submitted: auto-generated
- References: <bug-13498-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13498
--- Comment #1 from LuboÅ LuÅÃk <l.lunak at suse dot cz> 2011-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 the
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 index
or psymtabs (in my case, it's 35M filenames with dwarf4 index, 380k with dwarf4
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 there
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 duplicates.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.