zephyr/subsys/bluetooth
Marcin Niestroj 850ed72214 Bluetooth: logging: don't imply LOG_FUNC_NAME_PREFIX_*
By default there is only CONFIG_LOG_FUNC_NAME_PREFIX_DBG=y enabled. When
both Bluetooth (CONFIG_BT=y) and logging (CONFIG_LOG=y) subsystems are
enabled, then other CONFIG_LOG_FUNC_NAME_PREFIX_{INF,WRN,ERR}=y options are
pulled in as well using an 'imply' Kconfig command indirectly from
`CONFIG_BT_LOG`. This behavior was introduced recently as part of
commit af01a0f313 ("Bluetooth: Logging: Move all logging symbols
together") with no explicit reason provided.

Pulling in LOG_FUNC_NAME_PREFIX_* options automatically with (CONFIG_BT=y
&& CONFIG_LOG=y) blows up flash usage. As an example of downstream project
(nRF52840-based, with Bluetooth and WiFi connectivity), it increases flash
usage from 473668 bytes to 487856 bytes. This seems "only" 3% difference,
but this is actually a lot when there is no good reason why this happens.
Downstream users quite often compare flash sizes of subsequent Zephyr
releases and this 3% footprint increase might be a blocker at some point.
Additionally, it is not trivial to find the root cause of footprint
increase for most (non-expert) users.

The reason why there is so much footprint overhead because of
CONFIG_LOG_FUNC_NAME_PREFIX_*=y is because each function in the
codebase (be it Zephyr or downstream application) that contains logging
macros (LOG_{DBG,INF,WRN,ERR}()) is bloated because the function name has
to be included in the output image.

Remove 'imply LOG_FUNC_NAME_PREFIX_*' commands from 'menuconfig BT_LOG'
option, so that flash usage does not increase too much. Those logging
options are not enabled by other subsystems, so Bluetooth should not be an
exception here.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2023-04-08 12:34:07 +02:00
..
audio Bluetooth: Audio: Add missing null checks in mpl 2023-04-07 11:29:54 +02:00
common Bluetooth: Logging: Remove BT_DEBUG 2023-03-30 10:40:01 +00:00
controller Bluetooth: Controller: Fix compile error due to missing DF include 2023-04-06 12:57:20 +00:00
crypto Bluetooth: Logging: Move all logging symbols together 2023-03-28 10:33:24 +02:00
host Bluetooth: Host: Fix legacy OOB pairing as central 2023-04-07 13:36:41 +02:00
lib Bluetooth: Logging: Move all logging symbols together 2023-03-28 10:33:24 +02:00
mesh Bluetooth: Mesh: Remove incorrect opcode check in RPR Client 2023-04-07 13:38:36 +02:00
services Bluetooth: Services: Add macro for verifying OTS object ID 2023-04-07 11:29:54 +02:00
shell Bluetooth: shell: Guard adv_opt with CONFIG_BT_BROADCASTER 2023-04-06 15:37:30 +02:00
CMakeLists.txt Bluetooth: Host: Add Encrypted Advertising Data 2023-03-21 13:39:09 +02:00
Kconfig Bluetooth: Add missing dependency for PAST feature 2023-04-04 14:31:17 +02:00
Kconfig.adv Bluetooth: Mesh: Extended advertiser as default 2022-11-01 08:52:56 +00:00
Kconfig.iso Bluetooth: ISO: Fix BT_ISO_TX_MTU range 2023-03-03 09:19:19 +01:00
Kconfig.logging Bluetooth: logging: don't imply LOG_FUNC_NAME_PREFIX_* 2023-04-08 12:34:07 +02:00