From: Norbert Lange via lttng-dev <email@example.com> To: Mathieu Desnoyers <firstname.lastname@example.org> Cc: lttng-dev <email@example.com> Subject: Re: [lttng-dev] [PATCH lttng-ust] Improve tracelog handling, reduce exported functions Date: Thu, 20 May 2021 17:54:16 +0200 [thread overview] Message-ID: <CADYdroPZTrNg+gYy9SLyDnUGUd1kNq3vkzzjSwJx9e7Tz68quw@mail.gmail.com> (raw) In-Reply-To: <982122605.52445.1621524098787.JavaMail.firstname.lastname@example.org> Am Do., 20. Mai 2021 um 17:21 Uhr schrieb Mathieu Desnoyers <email@example.com>: > > ----- On May 20, 2021, at 10:57 AM, Norbert Lange firstname.lastname@example.org wrote: > > > Am Do., 20. Mai 2021 um 16:19 Uhr schrieb Mathieu Desnoyers > > <email@example.com>: > >> > >> ----- On May 20, 2021, at 8:18 AM, lttng-dev firstname.lastname@example.org wrote: > >> > >> > Instead of creating functions for each loglevel, simply pass the > >> > callback as argument. > >> > > >> > Further pack all preprocessor information into a struct that > >> > the compiler already can prepare. > >> > >> This introduces an ABI break too late in the cycle. > > > > So 2.14 would be the next chance I guess > > No. The original ABI was introduced about 10 years ago with lttng-ust 2.0, > and lttng-ust 2.13 introduces the first ABI break since. I don't > plan on doing any ABI break in lttng-ust in the foreseeable future. > > ABI breaks require that our users recompile all their instrumented > applications, which is really cumbersome for large software deployments. > We don't break ABI lightly. Yeah, I understand. > >> Also, I'm not so keen on adding an indirect call on the fast-path > >> when it's not absolutely needed. > > > > Code seems pretty similar: https://godbolt.org/z/oK1WhWqGT > > By fast-path, I also mean: > > + (*callback)(source->file, source->line, source->func, msg, len, > + LTTNG_UST_CALLER_IP()); > > Which introduces an indirect call which needs to be taken when tracing > is active. The worst thing is that it would tax branch-predictors. Indirect jumps aren't that horrible, and if you have public interpose-able ELF symbols you have more of them than you might know... And that's a function that calls a printf variant, and did alloc memory. > >> What is wrong with having one symbol per loglevel ? > > > > Macro-magic is cumbersome to edit, more code, more relocations. > > If it was still time for ABI breaks, I would be tempted to consider it > especially given that tracelog and tracef are not expected to be "high-speed", > but now is too late for breaking ABI. > > > > > Easier to adapt aswell, could roll my own tracelog functions while > > using lttng_ust__tracelog_printf (started soind that as I don't want > > to link to lttng-ust.so) > > What prevents you from linking against lttng-ust.so again ? I did not poke around enough with Lttng to be confident it wont have side effects, I really don't want it active in production. It doesn't seem there is much public knowledge with Xenomai either. lttng-ust.so will spawn threads, lttng-ust-tracepoint.so is mostly passive, So Id want a dynamic tracepoint-provider than i can dlopen (so that the signal masks are inherited, I hope you dont touch them). Of course I could just remove all lttng libraries on the production system aswell. Still doesnt change that tracelog and tracef doesnt work that way. I implemented my own tracelog/tracef using the normal lttng tracepoints for now, they totally break on source level with 2.13 aswell ;) is it ok if I do this to access them: #define TRACEPOINT_DEFINE #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE // 2.12 // #include <lttng/lttng-ust-tracelog.h> // #include <lttng/lttng-ust-tracef.h> // 2.13 #include <lttng/tp/lttng-ust-tracelog.h> #include <lttng/tp/lttng-ust-tracef.h> ie. I would load lttng-ust.so later and can then use those tracepoints. Norbert _______________________________________________ lttng-dev mailing list email@example.com https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2021-05-20 15:54 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-20 12:18 Norbert Lange via lttng-dev 2021-05-20 12:18 ` [lttng-dev] [PATCH lttng-ust] Improve tracef/tracelog to use the stack for small strings Norbert Lange via lttng-dev 2021-05-20 14:19 ` [lttng-dev] [PATCH lttng-ust] Improve tracelog handling, reduce exported functions Mathieu Desnoyers via lttng-dev 2021-05-20 14:57 ` Norbert Lange via lttng-dev 2021-05-20 15:21 ` Mathieu Desnoyers via lttng-dev 2021-05-20 15:54 ` Norbert Lange via lttng-dev [this message] 2021-05-20 16:25 ` Mathieu Desnoyers via lttng-dev 2021-05-20 16:51 ` Norbert Lange via lttng-dev 2021-05-20 17:18 ` Mathieu Desnoyers via lttng-dev 2021-05-20 17:43 ` Norbert Lange via lttng-dev 2021-05-21 14:55 ` Mathieu Desnoyers via lttng-dev 2021-05-25 13:32 ` Norbert Lange via lttng-dev
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CADYdroPZTrNg+gYy9SLyDnUGUd1kNq3vkzzjSwJx9e7Tz68quw@mail.gmail.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [lttng-dev] [PATCH lttng-ust] Improve tracelog handling, reduce exported functions' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).