Re: [lttng-dev] [PATCH v2] Improve tracef/tracelog to use the stack for small strings

2022-08-01 Thread Mathieu Desnoyers via lttng-dev
- On Aug 1, 2022, at 10:44 AM, Norbert Lange via lttng-dev lttng-dev@lists.lttng.org wrote: [...] > > Any chance of not having to link liblttng-ust for the tracelog/tracef > functions, > like all other tracepoints (only hard dependency on liblttng-ust-tracepoint)? > My involvement is limited

Re: [lttng-dev] [PATCH v2] Improve tracef/tracelog to use the stack for small strings

2022-08-01 Thread Mathieu Desnoyers via lttng-dev
- On Aug 1, 2022, at 10:35 AM, Norbert Lange via lttng-dev lttng-dev@lists.lttng.org wrote: > From: Norbert Lange > > 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")' sche

Re: [lttng-dev] [PATCH v2] Improve tracef/tracelog to use the stack for small strings

2022-08-01 Thread Norbert Lange via lttng-dev
Am Mo., 1. Aug. 2022 um 16:35 Uhr schrieb Norbert Lange : > > From: Norbert Lange > > 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_l

[lttng-dev] [PATCH v2] Improve tracef/tracelog to use the stack for small strings

2022-08-01 Thread Norbert Lange via lttng-dev
From: Norbert Lange 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