This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: [PATCH Newlib]Introducing new config option to disable optimization on unbuffered unix stream file
- From: "Howland Craig D (Craig)" <howland at LGSInnovations dot com>
- To: "Bin Cheng" <bin dot cheng at arm dot com>, <newlib at sourceware dot org>
- Date: Fri, 14 Jun 2013 10:53:12 -0400
- Subject: RE: [PATCH Newlib]Introducing new config option to disable optimization on unbuffered unix stream file
- References: <00c001ce68b9$7a36c010$6ea44030$ at cheng@arm.com>
-----Original Message-----
>From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
On >>>>Behalf Of Bin Cheng
>Sent: Friday, June 14, 2013 12:42 AM
>To: newlib@sourceware.org
>Subject: [PATCH Newlib]Introducing new config option to disable
optimization on >unbuffered unix stream file
>
>Hi,
>
>For now newlib vfprintf_r calls __sbprintf doing optimization on
unbuffered
>unix stream file. This brings about 120 bytes overhead for text and 1KB
for
>stack consumption for fprintf(stderr, ...)
>This patch introduces option "--disable-newlib-unbuf-opt" to allow end
user
>to disable the optimization and it doesn't change the default behavior.
>...
>bin
I suggest that #ifdef _UNBUF_STREAM_OPT should be added to the
__sbprintf() and __sbwprintf() definitions in vfprintf.c and
vfwprintf.c,
too, as that will eliminate those otherwise-unused functions, reducing
text even further. (737 bytes is saved for vfprintf, in a quick trial
compile on i686.)
Craig