This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [COMMITTED] malloc/malloc.c : Remove nested function mi_arena.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Ludovic CourtÃs <ludo at gnu dot org>, libc-alpha at sourceware dot org
- Date: Wed, 28 May 2014 21:51:46 -0400
- Subject: Re: [COMMITTED] malloc/malloc.c : Remove nested function mi_arena.
- Authentication-results: sourceware.org; auth=none
- References: <5383536D dot 5010601 at redhat dot com> <87vbssxs50 dot fsf at gnu dot org>
On 05/26/2014 03:21 PM, Ludovic CourtÃs wrote:
> "Carlos O'Donell" <carlos@redhat.com> skribis:
>
>> We do this because it's harder to debug nested functions,
>> and it allows non-GNU compilers to compile this code, and
>> this code is not performance critical.
>>
>> The resulting code is ~100 bytes larger because the compiler
>> has to handle the function arguments and pointers to size_t
>> objects. This code, and in particular calling malloc_info, is
>> not considered in the hot path of average applications.
>
> Seems to me like it meets the criteria for rejection that Roland
> suggested:
>
> http://sourceware.org/ml/libc-alpha/2014-05/msg00707.html
The removal of nested functions is an orthogonal discussion that
has been going on since February (before the clang discussion).
The patch improves debugging this code. The code is not on the
fast path, and it's not terrible to read.
Let me point at the bugs again:
Bug 8300 - no local symbol information within nested or nesting procedures
https://sourceware.org/bugzilla/show_bug.cgi?id=8300
Bug 53927 - wrong value for DW_AT_static_link
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53927
The point is moot though consensus is to inline the function.
I've ACK'd Ondrej's patch to inline it.
I'm happy as long as there is consensus for a solution.
Cheers,
Carlos.