This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix size & type for cold partition names (hot-cold function partitioning)
- From: Caroline Tice <cmtice at google dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Wed, 29 Apr 2015 11:59:11 -0700
- Subject: Re: [PATCH] Fix size & type for cold partition names (hot-cold function partitioning)
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4anFuykMh6ZmDhJ7QM_5enEpR=1p=S5n5gRgcHHpR1zmA at mail dot gmail dot com> <CABtf2+Q-fqDMUwCBY5WdoRYnyOh+MOB9G8HQh9+e3U_wHRjpoQ at mail dot gmail dot com> <CAFULd4b9B5LD1khwkefwnLfarjJMMTayS=_uxaheiXPhjGj3CQ at mail dot gmail dot com> <CAFULd4Y4KnrkzuSKxsdkmHuMmZ-qzQvjR80BB44AP-SEiq=RLQ at mail dot gmail dot com>
Thank you; I will work with your suggestions and try to get a new
patch done soon.
-- Caroline Tice
cmtice@google.com
On Wed, Apr 29, 2015 at 11:34 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Wed, Apr 29, 2015 at 7:47 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Wed, Apr 29, 2015 at 7:38 PM, Caroline Tice <cmtice@google.com> wrote:
>>> The attached patch can revert the previous patch, if that is the way
>>> we should proceed on this. If you want me to apply the reversion,
>>> please let me know.
>>>
>>> I would be happy to fix to the problem, rather than just reverting the
>>> patch, but I do not have expertise in assembly language on other
>>> platforms, so I would need some help, if anyone would be interested in
>>> helping me?
>>
>> How about adding ASM_DECLARE_COLD_FUNCTION_NAME and
>> ASM_DECLARE_COLD_FUNCTION_SIZE? If these are defined, they can be used
>> instead, and targets are free to define them in any way.
>
> Something like the attached prototype RFC patch. Using this patch,
> readelf -sW returns:
>
> Symbol table '.symtab' contains 18 entries:
> Num: Value Size Type Bind Vis Ndx Name
> 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
> 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1
> 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3
> 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4
> 4: 0000000000000000 0 SECTION LOCAL DEFAULT 5
> 5: 0000000000000000 0 SECTION LOCAL DEFAULT 6
> 6: 0000000000000000 0 SECTION LOCAL DEFAULT 8
> 7: 0000000000000000 8 FUNC LOCAL DEFAULT 6 main.cold.0
> 8: 0000000000000000 0 SECTION LOCAL DEFAULT 10
> 9: 0000000000000000 0 SECTION LOCAL DEFAULT 13
> 10: 0000000000000000 0 SECTION LOCAL DEFAULT 12
> 11: 0000000000000000 312 FUNC GLOBAL DEFAULT [<other>: 88] 8 main
> 12: 0000000000000008 160 OBJECT GLOBAL DEFAULT COM buf
> 13: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND memset
> 14: 0000000000000000 44 FUNC GLOBAL DEFAULT [<other>: 88] 1 sub2
> 15: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND strcmp
> 16: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND exit
> 17: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND abort
>
> Uros.