[lttng-dev] [PATCH 1/2] lttng_ust_init_thread: initialise cached context values

Norbert Lange nolange79 at gmail.com
Wed Jul 20 16:00:00 EDT 2022


Am Di., 19. Juli 2022 um 21:39 Uhr schrieb Mathieu Desnoyers
<mathieu.desnoyers at efficios.com>:
>
> ----- On Jul 18, 2022, at 5:59 PM, Norbert Lange via lttng-dev lttng-dev at lists.lttng.org wrote:
>
> > Modify all relevant *_alloc_tls functions so that they take an
> > argument for 'init'. Setting this to 'true' will read
> > the actual context value and store it into a thread local
> > cache.
> >
> > The function 'lttng_ust_init_thread' will use this to
> > precalculate context values. Tracepoints can then avoid
> > systemcalls.
>
> Rather than integrating two unrelated things within "alloc_tls"
> functions, I would prefer that we split things like this, e.g.:
>
> keep lttng_cgroup_ns_alloc_tls() as is.
>
> Introduce lttng_ust_cgroup_init_thread() which would
> call (void)get_cgroup_ns().
>
> Likewise for all other contexts.
>
> Thoughts ?

is this just a matter of the function name? The "things" are
related as they both prepare the same thread local cache.

ie.
rename lttng_cgroup_ns_alloc_tls(bool init) to
lttng_ust_cgroup_init_thread(bool initcache)?

Don't care much either way,I  just usually try to limit symbols.

Regards,
Norbert


More information about the lttng-dev mailing list