public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFA 00/15] Work toward making psymtabs reusable
@ 2018-05-10 22:25 Tom Tromey
  2018-05-10 22:25 ` [RFA 08/15] Remove readin and compunit_symtab fields from psymtab Tom Tromey
                   ` (15 more replies)
  0 siblings, 16 replies; 42+ messages in thread
From: Tom Tromey @ 2018-05-10 22:25 UTC (permalink / raw)
  To: gdb-patches

Recently I realized that, while the full objfile splitting project is
still a good idea, many of the potential gains from it could be had
more immediately -- by making psymtabs shareable across objfiles.

The idea behind this is that scanning psymbols is what is noticeably
slow; expanding a given CU is ordinarily pretty fast.  So, if psymbols
could be shared, then the most user-visible slowdown could be avoided,
at least in the multi-inferior case.

As an aside, this case matters to me, because Firefox is now
multi-process by default and each process uses the enormous libxul.so.
Multi-inferior debugging still has a ways to go in gdb, but if you are
working in this area, rest assured that there are people who want to
use the results...

This series does not actually achieve the goal of sharing psymbols.
It is just a bunch of necessary-but-not-sufficient infrastructure.  I
figured I would send it as it is relatively self-contained and already
pretty long.

Also note that it is built on top of my earlier series to make
psymbols independent of the program space.

This series begins (patches 1-7) with some minor cleanups that I found
while working in this area.  Perhaps patches 6 and 7 aren't really
needed; I wrote them when working toward a slightly different end
goal, but I think they are reasonable so I left them in.

Patch 8 is perhaps the ugliest of the bunch.  Because backlinks from
pymtabs to per-objfile objects will be disallowed, the
psymtab->compunit_symtab link had to be broken.  This patch does so
via a map.

The rest, I think, is reasonably straightforward.  Various
psymtab-related objects are moved to a new psymtab state-holding
object, and finally, this object is given its own obstack, moving the
psymbols into a shareable object.

This is the series I referenced in reply to Simon's auto-indexing
series -- I think with this it is pretty easy to picturing handing the
psymtab_storage shared_ptr to a separate thread to write out the index
file.

Regression tested by the buildbot.

There are still some remaining cleanups that could be done.  psymtab.c
uses ALL_OBJFILE_PSYMTABS_REQUIRED everywhere, but in some spots it
doesn't make sense.  Also, ~objfile (indirectly) calls
psym_forget_cached_source_info, but really psymtab_storage should be
handling this in its own destructor.

Tom

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2018-10-08  0:01 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 22:25 [RFA 00/15] Work toward making psymtabs reusable Tom Tromey
2018-05-10 22:25 ` [RFA 08/15] Remove readin and compunit_symtab fields from psymtab Tom Tromey
2018-07-18  3:34   ` Simon Marchi
2018-07-18 18:56     ` Tom Tromey
2018-09-28  5:02     ` Tom Tromey
2018-10-06  1:24       ` Tom Tromey
2018-10-07 22:04         ` Simon Marchi
2018-10-08  0:01           ` Tom Tromey
2018-05-10 22:25 ` [RFA 04/15] Change add_psymbol_to_list to use an enum Tom Tromey
2018-07-18  2:41   ` Simon Marchi
2018-05-10 22:25 ` [RFA 06/15] Change create_demangled_names_hash to take an objfile_per_bfd_storage Tom Tromey
2018-07-18  2:52   ` Simon Marchi
2018-05-10 22:25 ` [RFA 03/15] Remove parameters from start_psymtab_common Tom Tromey
2018-07-17 15:41   ` Simon Marchi
2018-05-10 22:25 ` [RFA 11/15] Allocate the address map on the psymtab obstack Tom Tromey
2018-07-18 14:08   ` Simon Marchi
2018-05-10 22:25 ` [RFA 01/15] Move some declarations to mdebugread.h Tom Tromey
2018-07-17 15:20   ` Simon Marchi
2018-05-10 22:25 ` [RFA 05/15] Simplify calls to init_psymbol_list Tom Tromey
2018-07-18  2:51   ` Simon Marchi
2018-09-23 21:12     ` Tom Tromey
2018-05-10 22:25 ` [RFA 07/15] Change symbol_set_names to take an objfile_per_bfd_storage Tom Tromey
2018-05-10 22:25 ` [RFA 10/15] Introduce objfile::reset_psymtabs Tom Tromey
2018-07-18 14:04   ` Simon Marchi
2018-05-10 22:25 ` [RFA 15/15] Move psymtabs to their own obstack Tom Tromey
2018-07-18 14:41   ` Simon Marchi
2018-09-23 21:34     ` Tom Tromey
2018-05-10 22:25 ` [RFA 14/15] Make psymtab_storage::free_psymtabs private Tom Tromey
2018-07-18 14:36   ` Simon Marchi
2018-09-23 21:13     ` Tom Tromey
2018-05-10 22:25 ` [RFA 02/15] Remove some unneeded psymtab initializations Tom Tromey
2018-07-17 15:27   ` Simon Marchi
2018-07-18  2:29     ` Simon Marchi
2018-05-10 22:45 ` [RFA 09/15] Introduce class psymtab_storage Tom Tromey
2018-07-18 14:02   ` Simon Marchi
2018-05-11 10:53 ` [RFA 13/15] Add psymtab_storage::allocate_dependencies Tom Tromey
2018-07-18 14:32   ` Simon Marchi
2018-09-23 21:25     ` Tom Tromey
2018-05-11 10:53 ` [RFA 12/15] Move more allocations to psymtab obstack Tom Tromey
2018-07-18 14:24   ` Simon Marchi
2018-06-18 14:42 ` [RFA 00/15] Work toward making psymtabs reusable Tom Tromey
2018-07-16 16:33   ` Tom Tromey

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).