[Buildroot] [External] Re: [PATCH v2 1/1] package/hostapd: add debug information options

Arnout Vandecappelle arnout at mind.be
Tue Jun 18 22:05:07 UTC 2019



On 17/06/2019 22:27, Jared Bents wrote:
> On Mon, Jun 17, 2019 at 2:02 PM Thomas Petazzoni
> <thomas.petazzoni at bootlin.com> wrote:
>>
>> Hello,
>>
>> On Mon, 17 Jun 2019 12:56:08 -0500
>> Jared Bents <jared.bents at collins.com> wrote:
>>
>>>> Could you explain what CONFIG_DEBUG_FILE is doing compared to
>>>> CONFIG_DEBUG_SYSLOG, and why one is conditional and not the other ? Do
>>>> we really want CONFIG_DEBUG_FILE unconditionally ?
>>>
>>> I based it off of wpa_supplicant's implementation for each.  In
>>> wpa_supplicant, CONFIG_DEBUG_FILE is turned on unconditionally while
>>> CONFIG_DEBUG_SYSLOG is optional.  CONFIG_DEBUG_FILE enables a runtime
>>> option (-f) to specify a file to direct the hostapd output to instead
>>> of stdout.  CONFIG_DEBUG_SYSLOG enables a runtime option (-s) to have
>>> the output go to syslog instead of stdout.  These are purely optional
>>> at runtime as if neither of the -f or -s command line arguments are
>>> used, the output will go to stdout as before.
>>
>> What is the size impact of each option, compared to the overall
>> installation size of hostapd ?
> 
> I haven't been able to determine a size impact.  When trying to see a
> size difference, I am getting sizes for hostapd varying between 1.4M
> and 1.6M without any real correlation with whether I have one of the
> two options selected, both selected, or neither of them selected

 I've done a native build of all combinations, with -g0 and strip, and it always
gives 380K.

 Which is not surprising. The only difference is one additional condition and
function call. The syslog option might make a tiny difference when linking
statically (which I haven't tried) because it doesn't need to include the
openlog() and syslog() functions.

 So no, it's not worth to make this configurable.

 For wpa_supplicant, the syslog option was added in 2013. I guess at the time
nobody wondered about the size impact. The file option was forced on in 2015 -
at that time, the size impact was considered and measured to be 963 bytes so no
user-configurable option was added for it.

 Regards,
 Arnout



More information about the buildroot mailing list