lttng-dev.lists.lttng.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers via lttng-dev <lttng-dev@lists.lttng.org>
To: Norbert Lange <nolange79@gmail.com>
Cc: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: [lttng-dev] reading context fields causes syscalls
Date: Mon, 18 Jul 2022 11:46:21 -0400 (EDT)	[thread overview]
Message-ID: <659331176.71995.1658159181188.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <CADYdroN9STUUxYZAYx2R-X2MjuGGF8kVOXEHG156ZTmnoiY9wQ@mail.gmail.com>

----- On Jul 14, 2022, at 9:10 AM, Norbert Lange nolange79@gmail.com wrote:

> Hello Mathieu,
> 
> Am Do., 20. Mai 2021 um 16:16 Uhr schrieb Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com>:
>>
>> ----- On May 20, 2021, at 9:42 AM, Norbert Lange nolange79@gmail.com wrote:
>>
>> > Am Do., 20. Mai 2021 um 15:28 Uhr schrieb Mathieu Desnoyers
>> > <mathieu.desnoyers@efficios.com>:
>> >>
>> >> ----- On May 20, 2021, at 8:46 AM, Norbert Lange nolange79@gmail.com wrote:
>> >>
>> >> > Am Mi., 19. Mai 2021 um 20:52 Uhr schrieb Mathieu Desnoyers
>> >> > <mathieu.desnoyers@efficios.com>:
>> >> >>
>> >> >> ----- On May 19, 2021, at 8:11 AM, lttng-dev lttng-dev@lists.lttng.org wrote:
>> >> >>
>> >> >> > Hello,
>> >> >> >
>> >> >> > Several context fields will cause a syscall atleast the first time a
>> >> >> > tracepoint is
>> >> >> > recorded. For example all of the following:
>> >> >> >
>> >> >> > `lttng add-context -c chan --userspace --type=vpid --type=vtid --type=procname`
>> >> >> >
>> >> >> > Each of them seems cached in TLS however, and most should never change
>> >> >> > after startup.
>> >> >> >
>> >> >> > As I am using Lttng over Xenomai, syscalls are strictly forbidden, I
>> >> >> > would like to have some function that prepares all data, which I can
>> >> >> > call on each thread before it switches to realtime work.
>> >> >> >
>> >> >> > Kinda similar to urcu_bp_register_thread, I'd like to have some
>> >> >> > `lttng_ust_warmup_thread` function that fetches the context values
>> >> >> > that can be cached. (urcu_bp_register_thread should be called there
>> >> >> > aswell)
>> >> >> > I considered just doing a tracepoint, but AFAIK the channel can be
>> >> >> > changed/configured after the process is running. So this is not robust
>> >> >> > enough.
>> >> >>
>> >> >> The new lttng_ust_init_thread() API in lttng-ust 2.13 would be the right
>> >> >> place to do this I think:
>> >> >>
>> >> >> /*
>> >> >>  * Initialize this thread's LTTng-UST data structures. There is
>> >> >>  * typically no need to call this, because LTTng-UST initializes its
>> >> >>  * per-thread data structures lazily, but it should be called explicitly
>> >> >>  * upon creation of each thread before signal handlers nesting over
>> >> >>  * those threads use LTTng-UST tracepoints.
>> >> >>  */
>> >> >>
>> >> >> It would make sense that this new initialization helper also initializes
>> >> >> all contexts which cache the result of a system call. Considering that
>> >> >> contexts can be used from the filter and capture bytecode interpreter, as
>> >> >> well as contexts added to channels, I think we'd need to simply initialize
>> >> >> them all.
> 
> Any update on that, is there an list of open points/features for lttng?

Hi Norbert,

You can find a feature wish list for the LTTng-UST project here:

  https://bugs.lttng.org/projects/lttng-ust

One option you have is to implement a patch and send it our way for review. We will
then review it as time/bandwidth allows.

However, if you would like the EfficiOS team to do the implementation, testing, and
integration, please contact us in private so we can discuss our consulting services.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

      reply	other threads:[~2022-07-18 15:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 12:11 [lttng-dev] reading context fields causes syscalls Norbert Lange via lttng-dev
2021-05-19 18:52 ` Mathieu Desnoyers via lttng-dev
2021-05-20 12:46   ` Norbert Lange via lttng-dev
2021-05-20 13:28     ` Mathieu Desnoyers via lttng-dev
2021-05-20 13:42       ` Norbert Lange via lttng-dev
2021-05-20 14:15         ` Mathieu Desnoyers via lttng-dev
2022-07-14 13:10           ` Norbert Lange via lttng-dev
2022-07-18 15:46             ` Mathieu Desnoyers via lttng-dev [this message]

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=659331176.71995.1658159181188.JavaMail.zimbra@efficios.com \
    --to=lttng-dev@lists.lttng.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=nolange79@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).