Attention is currently required from: laforge.
Hoernchen has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/30633 )
Change subject: logging: add log level cache
......................................................................
Patch Set 5:
(3 comments)
Patchset:
PS5:
thanks, it looks reasonably simple in general, which
is good. […]
I am also not hapy but we do unfortunately not know the difference
between internal functions and exported lib functions so the symbol and function will
always exist and can't be removed by the optimizer. The function should in practice
not be exported by the lib anyway, it is only used by the vty because there is no proper
split, but there is nothing I can do about that... (no, hidden does not help)
A "removed" function with no body looks like this:
❯ gdb -batch -ex 'file libosmocore.so' -ex 'disassemble log_cache_update'
Dump of assembler code for function log_cache_update:
0x00000000000281e6 <+0>: endbr64
0x00000000000281ea <+4>: push %rbp
0x00000000000281eb <+5>: mov %rsp,%rbp
0x00000000000281ee <+8>: mov %edi,-0x4(%rbp)
0x00000000000281f1 <+11>: mov %esi,%ecx
0x00000000000281f3 <+13>: mov %edx,%eax
0x00000000000281f5 <+15>: mov %ecx,%edx
0x00000000000281f7 <+17>: mov %dl,-0x8(%rbp)
0x00000000000281fa <+20>: mov %al,-0xc(%rbp)
0x00000000000281fd <+23>: nop
0x00000000000281fe <+24>: pop %rbp
0x00000000000281ff <+25>: ret
End of assembler dump.
Quite a lot of code for "nothing", and not really something I'd like to have
for actual embedded targets...
File src/logging.c:
https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/774b77dd_d5765455
PS5, Line 1037: log_update_cache
this is not guarded by !EMBEDDED, unlike other
invocations?
got lost, since i'm unable to build "embedded"
libosmocore.
https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/b656a0f5_fadc45de
PS5, Line 1534: log
you just checked it is != NULL above, so that should
be a NOP?
d
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 5
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 16 Dec 2022 17:46:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment