This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix 100x slowdown regression on DWZ files
- From: Doug Evans <dje at google dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 1 Oct 2014 16:57:03 -0700
- Subject: Re: [patch] Fix 100x slowdown regression on DWZ files
- Authentication-results: sourceware.org; auth=none
- References: <20141001194439 dot GA15161 at host2 dot jankratochvil dot net> <21548 dot 37770 dot 274873 dot 760290 at ruffy2 dot mtv dot corp dot google dot com>
On Wed, Oct 1, 2014 at 4:51 PM, Doug Evans <dje@google.com> wrote:
> [...]
> OTOH, I do want to avoid any confusion that this patch may inadvertently
> introduce. For example, IIUC with your patch as is,
> if we read a partial_unit first, before a compile_unit
> that has the same stmt_list value, we'll do more processing in
> dwarf_decode_lines than we really need to since we only need a file
> number to symtab mapping. And if we later read in a compile_unit
> with the same stmt_value we'll call dwarf_decode_lines again,
> and this time we need the pc/line mapping it computes.
> Whereas if we process these in the opposite order we'll only call
> dwarf_decode_lines once. I'm sure this will be confusing at first
> to some later developer going through this code.
> [I could be missing something of course, and I'm happy for any corrections.]
Ah, I guess the offset_in_dwz flag will ensure dwarf_decode_lines gets called
twice regardless of order. But is that the only reason for the flag?