[PATCH] Generate a label for the split cold function while using -freorder-blocks-and-partition
Sriraman Tallam
tmsriram@google.com
Thu May 9 21:22:00 GMT 2013
cc:Diego
On Tue, May 7, 2013 at 2:41 PM, Sriraman Tallam <tmsriram@google.com> wrote:
> Ping.
>
> On Thu, Apr 25, 2013 at 4:50 PM, Sriraman Tallam <tmsriram@google.com> wrote:
>> Attaching an updated patch.
>>
>> Thanks
>> Sri
>>
>> On Thu, Apr 25, 2013 at 4:42 PM, Sriraman Tallam <tmsriram@google.com> wrote:
>>> On Tue, Apr 23, 2013 at 9:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>>>> On Tue, Apr 23, 2013 at 03:58:06PM -0700, Sriraman Tallam wrote:
>>>>> This patch generates labels for cold function parts that are split when
>>>>> using the option -freorder-blocks-and-partition. The cold label name
>>>>> is generated by suffixing ".cold" to the assembler name of the hot
>>>>> function.
>>>>>
>>>>> This is useful when getting back traces from gdb when the cold function
>>>>> part does get executed.
>>>>>
>>>>> * final.c (final_scan_insn): Generate cold label name by suffixing
>>>>> ".cold" to function's assembler name.
>>>>> * gcc.dg/tree-prof/cold_partition_label.c: New test.
>>>>
>>>> This doesn't honor NO_DOT_IN_LABEL (and NO_DOLLAR_IN_LABEL).
>>>
>>> Fixed, by calling clean_symbol_name
>>>
>>>> Also, don't some function start in cold section and then switch into hot
>>>> section?
>>>
>>> I am not able to generate a test where this happens. However, I fixed
>>> this problem by generating the cold label only when the first function
>>> block is not cold.
>>>
>>> Patch attached, please see if this is ok.
>>>
>>> Thanks
>>> Sri
>>>
>>>>
>>>> Jakub
More information about the Gcc-patches
mailing list