From: Eli Zaretskii <eliz@gnu.org>
To: Matheus Branco Borella <dark.ryu.550@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add name_of_main and language_of_main to the DWARF index
Date: Sat, 01 Jul 2023 08:47:14 +0300 [thread overview]
Message-ID: <83bkgwrxnh.fsf@gnu.org> (raw)
In-Reply-To: <20230630203642.83819-1-dark.ryu.550@gmail.com> (message from Matheus Branco Borella via Gdb-patches on Fri, 30 Jun 2023 17:36:43 -0300)
> Cc: Matheus Branco Borella <dark.ryu.550@gmail.com>
> Date: Fri, 30 Jun 2023 17:36:43 -0300
> From: Matheus Branco Borella via Gdb-patches <gdb-patches@sourceware.org>
>
> Alright, this one should incorporate all of the changes you suggested. And, now
> that I've sorted out my copyright assignment, this should be good to go now?
> Unless I missed something.
Your assignment is not on file yet, AFAICT. Was the paperwork
completed, i.e. did you get a copy of the assignment signed by you and
by the FSF? If not, you need to wait some more.
> This patch adds a new section to the DWARF index containing the name
> and the language of the main function symbol, gathered from
> `cooked_index::get_main`, if available. Currently, for lack of a better name,
> this section is called the "shortcut table". The way this name is both saved and
> applied upon an index being loaded in mirrors how it is done in
> `cooked_index_functions`, more specifically, the full name of the main function
> symbol is saved and `set_objfile_main_name` is used to apply it after it is
> loaded.
>
> The main use case for this patch is in improving startup times when dealing with
> large binaries. Currently, when an index is used, GDB has to expand symtabs
> until it finds out what the language of the main function symbol is. For some
> large executables, this may take a considerable amount of time to complete,
> slowing down startup. This patch bypasses that operation by having both the name
> and language of the main function symbol be provided ahead of time by the index.
>
> In my testing (a binary with about 1.8GB worth of DWARF data) this change brings
> startup time down from about 34 seconds to about 1.5 seconds.
> ---
> gdb/NEWS | 2 ++
> gdb/doc/gdb.texinfo | 23 +++++++++++++--
> gdb/dwarf2/index-write.c | 47 +++++++++++++++++++++++++++----
> gdb/dwarf2/read-gdb-index.c | 56 +++++++++++++++++++++++++++++++++++--
> gdb/dwarf2/read.c | 13 +++++++--
> gdb/dwarf2/read.h | 12 ++++++++
> 6 files changed, 142 insertions(+), 11 deletions(-)
Thanks. The documentation parts are OK, but please fix the text to
leave two spaces between sentences, not one.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2023-07-01 5:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 21:40 Matheus Branco Borella
2023-06-09 16:56 ` Tom Tromey
2023-06-30 20:36 ` Matheus Branco Borella
2023-07-01 5:47 ` Eli Zaretskii [this message]
2023-07-07 15:00 ` Matheus Branco Borella
2023-07-07 18:00 ` Eli Zaretskii
2023-08-04 20:55 ` Tom de Vries
2023-08-05 5:36 ` Eli Zaretskii
2023-08-03 7:12 ` Tom de Vries
2023-08-03 7:29 ` Tom de Vries
2023-08-04 18:09 ` [PATCH v2] " Matheus Branco Borella
2023-08-11 18:21 ` [PATCH v3] " Matheus Branco Borella
2023-08-14 7:31 ` Tom de Vries
2023-08-14 7:36 ` Tom de Vries
2023-09-13 7:09 ` Tom de Vries
2023-09-25 18:47 ` Matheus Branco Borella (DarkRyu550)
2023-09-26 14:07 ` Tom de Vries
2023-10-04 22:30 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83bkgwrxnh.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dark.ryu.550@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).