diff options
author | Tom Tromey <tromey@adacore.com> | 2020-04-02 12:49:35 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-02 12:49:35 -0600 |
commit | e7da7f8f71572e3ef71a22ad3fae2388a53bd84c (patch) | |
tree | a9878cff6821b6e1c1829eea5a3bde8f68b5c36f /gdb/ChangeLog | |
parent | c90d28ac8903c5781b1a82e487072081383fd7b9 (diff) | |
download | gdb-e7da7f8f71572e3ef71a22ad3fae2388a53bd84c.zip gdb-e7da7f8f71572e3ef71a22ad3fae2388a53bd84c.tar.gz gdb-e7da7f8f71572e3ef71a22ad3fae2388a53bd84c.tar.bz2 |
Micro-optimize partial_die_info::read
While profiling the DWARF reader, I noticed that
partial_die_info::read creates a vector to store attributes. However,
the vector is not needed, as this code only processes a single
attribute at a time.
This patch removes the vector. On my machine, this improves the time
of "./gdb ./gdb" from 2.22 seconds to 1.92 seconds (mean times over 10
runs).
Note that the attribute is initialized by read_attribute, so it does
not need any special initialization. Avoiding this also improves
performance a bit.
Tested on x86-64 Fedora 30. I'm checking this in.
gdb/ChangeLog
2020-04-02 Tom Tromey <tromey@adacore.com>
* dwarf2/read.c (partial_die_info::read): Do not create a vector
of attributes.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d801971..993a358 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-04-02 Tom Tromey <tromey@adacore.com> + + * dwarf2/read.c (partial_die_info::read): Do not create a vector + of attributes. + 2020-04-02 Andrew Burgess <andrew.burgess@embecosm.com> Bernd Edlinger <bernd.edlinger@hotmail.de> Tom Tromey <tromey@adacore.com> |