[lttng-dev] Cost of enabling context field procname

Jonathan Rajotte-Julien jonathan.rajotte-julien at efficios.com
Wed Dec 5 12:04:09 EST 2018

Hi Jonas,

Good question.

Let's take a look at the source code.

We should find what we are looking for in liblttng-ust/lttng-context-procname.c [1].

[1] https://github.com/lttng/lttng-ust/blob/master/liblttng-ust/lttng-context-procname.c

The comment at the top hint that we do cache the result and perform lookup only
one time except for case where the cache is reset.

You can dig a bit more if you want but most of the job is done in

As for the cost, I guess we could find this doing a "simulation" using the same
TLS scheme and measuring the cost of accessing procname the first time and each
subsequent access to the TLS.

Mathieu Desnoyers might have more information on this and also the cost of
having context information compare to not having any at all.

I'm curious. What spiked your interest in this?


On Wed, Dec 05, 2018 at 12:21:22PM +0000, Jonas Andersson L wrote:
> Hi
> I'm interested in information regarding the cost of enabling procname context field. Is this field cached and read only at initialization or is the thread name fetched at each trace point? Thanks!
> BR, Jonas

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Jonathan Rajotte-Julien

More information about the lttng-dev mailing list