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] New fixes for hot/cold partitioning


Caroline M Tice <ctice@apple.com> writes:

> > Caroline M Tice <ctice@apple.com> writes:
> >
> >> - It changes unlikely_text_section_name from a char* to an array;
> >>    initializes it appropriately, changes all uses of it to reflect the
> >>    new format; and removes the call to free it.
> >
> > I missed the reasons for making this change, but it looks questionable
> > to me.  It's not hard to construct C++ templates in which section
> > names are identical in the first 256 characters.
> 
> What would be a reasonable size limit to use then?

It's not clear to me why you need a size limit at all, at least not a
limit which is target independent.  There is no limit on the length of
section names in ELF.  For any given limit, it wouldn't be hard to
construct a C++ test case which used longer section names.  I'm not
sure, but I think it would be possible to construct a case which would
fail, in which different .o files instantiated different sets of
template functions, thus leading to different code in otherwise
identically named .linkonce sections.

If you need a size limit for some reason that I don't see, perhaps you
should turn off hot/cold partioning in sections whose names are too
long.

Ian


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