Re: [PATCH 00/14] Share DWARF partial symtabs between objfiles

Tom Tromey
2020-02-24T03:07:09Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

>> A few of these patches (1-3, 5, and 11) could probably go in sooner.
>> What do you think of that?

Simon> #1 is already in, right?
Simon> #2: Yes, sounds like a good cleanup.
Simon> #4: Yes, good cleanup.

Simon> #3: It's only useful if we end up doing psymtabs sharing, so I would not push
Simon> it yet.
Simon> #5 and #11: I'm not sure how much of that I end up un-doing in my prototype patch,
Simon> swapping the shareable and unshareable parts. And it is also only useful in
Simon> the context of psymtab sharing, so I wouldn't push it yet.

Ugh, I used the wrong numbers.

#1 is already in, so really I mean #2-#4, #6, #12.

#2 (simplify setting of reading_partial_symbols)
#3 dwarf2_per_objfile::obstack
#4 TYPE_UNIT_GROUP method
#6 Add "objfile" parameter to two partial_symtab methods
#12 Fix a memory leak

Maybe the baton change could be done as well.

Simon> I'm currently experimenting with what I suggested above, this is what I have for
Simon> now (this will get force-pushed as I progress):

Simon> https://github.com/simark/binutils-gdb/commits/share-psymtabs

Simon> The status is: I'm based on your patch 9/14 ("Add objfile member to DWARF batons"),
Simon> as it aims mainly to replace patch patch 10/14 ("Introduce dwarf2_enter_objfile and
Simon> use it") with the architecture I proposed. I see no regression in a simple
Simon> "make check" between it and the previous commit. I have yet to apply and adapt the
Simon> rest of your series on top of my commit. I would also like to test with the variety
Simon> of testsuite boards that Tom de Vries added, since they will test various DWARF
Simon> configurations (and I would feel bad if he had to clean up after us again).

Yeah.

Take a look at my branch, t/reorganize-dwarf-code-sharing-3.
I rearranged it to move all the "unshared" stuff to the end, so there
should be less to fix up (though I see now I neglected to move the baton
patch earlier).

Tom