This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Speed up read_psymtabs_with_fullname
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 3 Apr 2013 17:26:47 +0200
- Subject: Re: [patch] Speed up read_psymtabs_with_fullname
- References: <yjt2a9pg4jgj dot fsf at ruffy2 dot mtv dot corp dot google dot com>
On Wed, 03 Apr 2013 01:10:52 +0200, Doug Evans wrote:
> --- psymtab.c 20 Mar 2013 18:28:48 -0000 1.70
> +++ psymtab.c 2 Apr 2013 22:58:36 -0000
> @@ -1114,7 +1114,11 @@ read_psymtabs_with_fullname (struct objf
> if (p->anonymous)
> continue;
>
> - if (filename_cmp (fullname, psymtab_to_fullname (p)) == 0)
> + /* psymtab_to_fullname tries to open the file which is unnecessarily
> + slow. Don't call it if we know the basenames don't match. */
> + if ((basenames_may_differ
> + || filename_cmp (lbasename (fullname), lbasename (p->filename)) == 0)
> + && filename_cmp (fullname, psymtab_to_fullname (p)) == 0)
> psymtab_to_symtab (objfile, p);
> }
> }
I agree with the patch. Sorry I performance regressed it. I would even
prefer to check it in 7.6 as you say it may have visible performance problem.
There were many similar changes done so it should be safe.
Thanks,
Jan