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] C++ thunk section names


Sri, can you provide examples to show why putting thunks into the same
section as the target function when function reorder is on can be bad
?

Thanks,

David

On Thu, Jun 26, 2014 at 10:29 AM, Sriraman Tallam <tmsriram@google.com> wrote:
> Hi Honza,
>
>    Could you review this patch when you find time?
>
> Thanks
> Sri
>
> On Tue, Jun 17, 2014 at 10:42 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>> Ping.
>>
>> On Mon, Jun 9, 2014 at 3:54 PM, Sriraman Tallam <tmsriram@google.com> wrote:
>>> Ping.
>>>
>>> On Mon, May 19, 2014 at 11:25 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>>>> Ping.
>>>>
>>>> On Thu, Apr 17, 2014 at 10:41 AM, Sriraman Tallam <tmsriram@google.com> wrote:
>>>>> Ping.
>>>>>
>>>>> On Wed, Feb 5, 2014 at 4:31 PM, Sriraman Tallam <tmsriram@google.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>>   I would like this patch reviewed and considered for commit when
>>>>>> Stage 1 is active again.
>>>>>>
>>>>>> Patch Description:
>>>>>>
>>>>>> A C++ thunk's section name is set to be the same as the original function's
>>>>>> section name for which the thunk was created in order to place the two
>>>>>> together.  This is done in cp/method.c in function use_thunk.
>>>>>> However, with function reordering turned on, the original function's section
>>>>>> name can change to something like ".text.hot.<orginal>" or
>>>>>> ".text.unlikely.<original>" in function default_function_section in varasm.c
>>>>>> based on the node count of that function.  The thunk function's section name
>>>>>> is not updated to be the same as the original here and also is not always
>>>>>> correct to do it as the original function can be hotter than the thunk.
>>>>>>
>>>>>> I have created a patch to not name the thunk function's section to be the same
>>>>>> as the original function when function reordering is enabled.
>>>>>>
>>>>>> Thanks
>>>>>> Sri


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