This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: Patch: gcj ggc patch


On Wed, Mar 06, 2002 at 10:58:18PM -0800, Per Bothner wrote:
> 
> This is a specification issue of the semantics of identifier
> nodes, and there should be a clear answer:  Can an identifier,
> once it has been created, ever be garbage collected?

The whole point of the stringpool code was to make IDENTIFIER_NODEs
permanently allocated, so that we need not bother to mark them.
Before, something like 2% of runtime on large C++ test cases was being
wasted repeatedly looking up the page entries for identifiers.

There are two nuances here:

- IDENTIFIER_NODEs must always be allocated through get_identifier,
not make_node or whatever.

- The trees stored in struct lang_identifier do need to be marked and
swept; this is taken care of by lang_mark_tree.

zw


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