[lttng-dev] Cost of enabling context field procname

Jonas Andersson L jonas.l.andersson at ericsson.com
Thu Dec 13 08:26:56 EST 2018


Thanks for answers.. what spiked my interest was just making sure it would not cost too much to enable in an environment where a high number of traces are generated.
BR, Jonas

-----Original Message-----
From: Jonathan Rajotte-Julien <jonathan.rajotte-julien at efficios.com> 
Sent: den 5 december 2018 18:04
To: Jonas Andersson L <jonas.l.andersson at ericsson.com>
Cc: lttng-dev at lists.lttng.org
Subject: Re: [lttng-dev] Cost of enabling context field procname

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 wrapper_getprocname.

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?

Cheers

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
EfficiOS


More information about the lttng-dev mailing list