mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 08:50:07 +01:00
Assertions like g_assert*() and g_return_*() contain the stringified test expression. This string ends up in the binary and increases its size. We usually don't have failing assertions. These string are a waste, instead the file and line number shall suffice. It reduces the striped size of the NetworkManager binary from 2500k to 2392k, that is -108k, -4.3%. This changes - "g_assert (1 == 2);" from: NetworkManager:ERROR:source.c:347:some_function: assertion failed: (1 == 2) to: NetworkManager:ERROR:source.c:347:<unknown-fcn>: assertion failed: (<dropped>) - "g_return_if_fail (1 == 2);" from: (process:21024): NetworkManager-CRITICAL **: some_function: assertion '1 == 2' failed to: (process:21024): NetworkManager-CRITICAL **: ((source.c:347)): assertion '<dropped>' failed When doing a non-debug build, those string are now removed. Debug-builds can be enabled by setting --with-more-assert=$LEVEL to larger then zero. https://bugzilla.gnome.org/show_bug.cgi?id=767296 |
||
|---|---|---|
| .. | ||
| gsystem-local-alloc.h | ||
| Makefile.am | ||
| nm-common-macros.h | ||
| nm-dbus-compat.h | ||
| nm-default.h | ||
| nm-glib.h | ||
| nm-macros-internal.h | ||
| nm-shared-utils.c | ||
| nm-shared-utils.h | ||
| nm-test-libnm-utils.h | ||
| nm-test-utils-impl.c | ||
| nm-test-utils.h | ||
| nm-version-macros.h.in | ||