[0/4] Fewer calls to "open" when stepping

Message ID 20190726133422.5896-1-tromey@adacore.com
Headers show
Series
  • Fewer calls to "open" when stepping
Related show

Message

Tom Tromey July 26, 2019, 1:34 p.m.
A user noticed that gdb calls open very many times while stepping.

This series improves gdb's behavior by changing the source cache to
also cache un-highlighted text, and to track the "line_charpos" data
that is currently put into the symtab.  It also includes a patch to
fix an apparently longstanding logic bug in the source file error
reporting.

Tested on x86-64 Fedora 29.

Tom

Comments

Eli Zaretskii July 26, 2019, 2:56 p.m. | #1
> From: Tom Tromey <tromey@adacore.com>

> Date: Fri, 26 Jul 2019 07:34:19 -0600

> 

> A user noticed that gdb calls open very many times while stepping.

> 

> This series improves gdb's behavior by changing the source cache to

> also cache un-highlighted text, and to track the "line_charpos" data

> that is currently put into the symtab.  It also includes a patch to

> fix an apparently longstanding logic bug in the source file error

> reporting.

> 

> Tested on x86-64 Fedora 29.


IMO, it should be tested on MS-Windows as well, since there's a
complex relationship there between lseek and fstat (and offsets into
the file in general), due to the CRLF EOL format.

Thanks.
Tom Tromey July 26, 2019, 8:51 p.m. | #2
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:


>> Tested on x86-64 Fedora 29.


Eli> IMO, it should be tested on MS-Windows as well, since there's a
Eli> complex relationship there between lseek and fstat (and offsets into
Eli> the file in general), due to the CRLF EOL format.

I should have mentioned that this also went through internal testing at
AdaCore.  That test suite has some Windows hosts, so these code paths
were tested there.

Tom
Tom Tromey Aug. 6, 2019, 2:09 p.m. | #3
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:


Tom> A user noticed that gdb calls open very many times while stepping.
Tom> This series improves gdb's behavior by changing the source cache to
Tom> also cache un-highlighted text, and to track the "line_charpos" data
Tom> that is currently put into the symtab.  It also includes a patch to
Tom> fix an apparently longstanding logic bug in the source file error
Tom> reporting.

Tom> Tested on x86-64 Fedora 29.

I'm checking this in now.

Tom
Pedro Alves Aug. 16, 2019, 6:58 p.m. | #4
On 7/26/19 2:34 PM, Tom Tromey wrote:
> A user noticed that gdb calls open very many times while stepping.

> 

> This series improves gdb's behavior by changing the source cache to

> also cache un-highlighted text, and to track the "line_charpos" data

> that is currently put into the symtab.  It also includes a patch to

> fix an apparently longstanding logic bug in the source file error

> reporting.

> 

> Tested on x86-64 Fedora 29.


Coming late to the party, but, nice, pretty cool.

Thanks,
Pedro Alves