From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id arfXFtYV0GImuBIAWB0awg (envelope-from ) for ; Thu, 14 Jul 2022 09:10:46 -0400 Received: by simark.ca (Postfix, from userid 112) id 4487E1E5EA; Thu, 14 Jul 2022 09:10:46 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=F3+DHwGZ; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_REPLYTO_END_DIGIT,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3340A1E222 for ; Thu, 14 Jul 2022 09:10:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1657804244; bh=e69TSrCq7cfKo3ZWXkcEVbH9xPMU9mR1sGt4cbtrqUs=; h=References:In-Reply-To:Date:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=F3+DHwGZ7hD84MJ3me1Y2NvDyFGGJmhN4/ufuiBgZ++JzVdN/jk3zn6flCn5Mc5vL ijDuErlgV7Cj8ZGRDjepFD/Re3LIDPLkOEFwQfAO07sZUyRHt+FtBfJHggBxTCApqG ZhPjllp4BJ5OjToUxEjrG3ybEfnGrudsS2xizsmYLnyDFHMxZBgTzHW6i9kcNU7Abg /DC9s3NqylSA7M0uuA1Ri8MppmTuQyOkzL0MEBmZiFq8LgN3OrTlJpyuy4d8ENtzXv lv2BO6RmkwuiB2aN3EhhVPnJ+KbWXQC9821/u7VSwGoTh2CvX+B/E+XsTTD++sCYmv ktF2KlWm1rN6g== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4LkFGr46hpzN3g; Thu, 14 Jul 2022 09:10:44 -0400 (EDT) Received: from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com [IPv6:2607:f8b0:4864:20::a31]) by lists.lttng.org (Postfix) with ESMTPS id 4LkFGq2gmSzN3f for ; Thu, 14 Jul 2022 09:10:43 -0400 (EDT) Received: by mail-vk1-xa31.google.com with SMTP id g25so765389vkm.13 for ; Thu, 14 Jul 2022 06:10:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=saD3EmM1px1CZSMUWWD6jBJVtknxkV8oJx++7848E/E=; b=MW4dRS9oM4qMDr4nUy2kMBCrnwglpCuP2NADeLSWtFj/gOtmHDOE0dugR3Ics0hMRE oWmzDp8g3NzHMQzxmbfZGJbwZJ6xp2u3bh6Ggtc7Qy+7PNIy5+ycRRrLtGKqy4yRcBeV i8GlJyMWJkxlvu2zKEboi/4+LrnGUBRAPId6vJrHFRfUJR6y/gypnk4iE+4vi0uaUj29 HS538Byz2PsUZxHc/XlWkG2I+EEW85d2LKoplO7FLgGTuQhm+4M/sqEtuplulJA7cxCh lu8ipLePRDGj4Lyxlc1zR6bbJppKrlLiIrIuh9h/lOq9LHZnKU81jkM2VOYjgWbEvLuW OmfA== X-Gm-Message-State: AJIora8exGq8ozN9nnvpky9L0axdOybMv58b9bTzGyOkDz9MKDFKxcDo ACQsKEH1Tb+Yr09V9/m6MwWCeEEpW7wm+gb6y4I= X-Google-Smtp-Source: AGRyM1sxfbMtRG8mLFp5CTWYXClCPOP/mJsws0GyN1hTbR67mmzxOdRe8HEqdQovXXTXe8LTwbm4MjJMhGbV7ncS/IA= X-Received: by 2002:a1f:294c:0:b0:374:834f:366b with SMTP id p73-20020a1f294c000000b00374834f366bmr3385828vkp.21.1657804242552; Thu, 14 Jul 2022 06:10:42 -0700 (PDT) MIME-Version: 1.0 References: <217443874.51651.1621450365666.JavaMail.zimbra@efficios.com> <1519877397.52210.1621517299822.JavaMail.zimbra@efficios.com> <1054776587.52332.1621520134754.JavaMail.zimbra@efficios.com> In-Reply-To: <1054776587.52332.1621520134754.JavaMail.zimbra@efficios.com> Date: Thu, 14 Jul 2022 15:10:31 +0200 Message-ID: To: Mathieu Desnoyers Cc: lttng-dev Subject: Re: [lttng-dev] reading context fields causes syscalls X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Norbert Lange via lttng-dev Reply-To: Norbert Lange Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" Hello Mathieu, Am Do., 20. Mai 2021 um 16:16 Uhr schrieb Mathieu Desnoyers : > > ----- 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 > > : > >> > >> ----- 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 > >> > : > >> >> > >> >> ----- 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? Norbert _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev