Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [Bug symtab/8367] [RFA]  performance improvement of  lookup_partial_symtab
@ 2009-01-14 17:46 Jerome Guitton
  2009-01-15  9:45 ` Jerome Guitton
  0 siblings, 1 reply; 5+ messages in thread
From: Jerome Guitton @ 2009-01-14 17:46 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]


The move to bugzilla has "resurrected" this patch; I suggested it
several years ago, but it's still relevant.

The problem is explained in details in the comment (very useful when I
had to double-check that the patch was not obsolete, actually). To
summarize it: lookup_partial_symtab is particularly slow when it has
been given an absolute path. The reason is that it needs to build the
full filename for every psymtab; when building this full filename, the
corresponding file is opened/closed by find_and_open_source. As a
consequence, in the worst case, the loop ends up opening/closing
every source file of the application. Pretty bad for a big application,
in particular if the sources are located on a slow file system.

The idea of the patch is to avoid building the psymtab full filename
if the basenames are different.

Tested on linux, no regression.

OK to apply?


2009-01-14  Jerome Guitton  <guitton@adacore.com>

	* symtab.c (lookup_partial_symtab): When looking up an absolute path
	in the partial symtabs, compare the base names before checking the
	full names.


[-- Attachment #2: lookup_partial_symtab.dif --]
[-- Type: video/dv, Size: 2457 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-29  8:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-14 17:46 [Bug symtab/8367] [RFA] performance improvement of lookup_partial_symtab Jerome Guitton
2009-01-15  9:45 ` Jerome Guitton
2009-04-28 19:57   ` Joel Brobecker
2009-04-29  8:54     ` Jerome Guitton
2009-04-28 20:00   ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox