From: Norbert Lange Date: Mon, 1 Aug 2022 14:35:24 +0000 (+0200) Subject: Improve tracef/tracelog to use the stack for small strings X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=1c0569ec0d094571d181d1fce53ecfce8877614f;hp=1c0569ec0d094571d181d1fce53ecfce8877614f;p=lttng-ust.git Improve tracef/tracelog to use the stack for small strings Support two common cases, one being that the resulting message is small enough to fit into a on-stack buffer. The seconds being the common 'printf("%s", "Message")' scheme. Unfortunately, iterating a va_list is destructive, so it has to be copied before calling vprintf. The implementation was moved to a separate file, used by both tracef.c and tracelog.c. Signed-off-by: Norbert Lange Signed-off-by: Mathieu Desnoyers ---