This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1 of 2] dwarf type unit scaling fix preparatory work

>>>>> "Doug" == Doug Evans <> writes:

Doug> It redoes the storage for global_psymbols and static_psymbols.
Doug> Currently they're each one big vector containing every psymtab for
Doug> the entire objfile, and it's hard to add to a psymtab after it's
Doug> created.  This patch moves the storage of these objects to the
Doug> psymtab itself.

I think the idea is fine.

Doug> IMO the patch is a clean up in and of itself, it could go in
Doug> absent anything that depends on it.

I agree.

Doug> @@ -153,22 +153,20 @@ struct partial_symtab

I think the changes to psymtab makes each one use more memory.
I assume this is not too bad in practice, but did you quantify it?

I wonder if psymbol_allocation_list could be moved to psympriv.h now.
IIRC, I only left it where it was since it was used in objfiles.h.

Doug>  /* Traverse all psymtabs in one objfile.  */
Doug> +/* FIXME: This should be in objfile.h.  */
Doug>  #define	ALL_OBJFILE_PSYMTABS(objfile, p) \
Doug>      for ((p) = (objfile) -> psymtabs; (p) != NULL; (p) = (p) -> next)

It is here on purpose -- to help keep psymbol details private.
Only symbol readers, and psymtab.c, should include psympriv.h and know
anything about partial symbols or partial symbol tables.
To this end I put as much as reasonably possible into psympriv.h, to
make the auditing task simpler.

Why do you want to move it?

Doug> +  /* Blech.  IWBN to use ALL_OBJFILE_PSYMTABS here.  */

Why not?

Doug> +      /* There's no measurable cost to starting this small, and there is a
Doug> +	 sufficient space savings for selected testcases.  */
Doug> +      new_size = 1;

Is this intended to address the space wastage due to doubling the size
of the vector at every allocation?

I wonder if instead we could shrink-wrap psymtabs.
Maybe also copying the lists onto the objfile obstack at the same time.

Doug> +  /* Blech.  IWBN to use ALL_OBJFILE_PSYMTABS here.  */

Why not?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]