From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xWJdEV8wQmD9EAAAWB0awg (envelope-from ) for ; Fri, 05 Mar 2021 08:21:35 -0500 Received: by simark.ca (Postfix, from userid 112) id 3E1851EF78; Fri, 5 Mar 2021 08:21:35 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 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 453161E793 for ; Fri, 5 Mar 2021 08:21:34 -0500 (EST) Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4DsT0F6PvGzBrG; Fri, 5 Mar 2021 08:21:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1614950494; bh=YAy4TERbzsIplqaCGG5FjieaqiI41L8mtJDcIN6c6dM=; h=To:CC:Date:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=igRK3VXSppsuYgSbvXAWMaYYDDtY2HzBd8rm5Eib+8FFsC7fBvF0KKXFuDTIxrSiX LVLk0NN7m/OayxNDNugTrWhU4KmtrCs29KvFlUpkHXfYtMDqhkIDkBp73mAB8dda63 +GwB9lsKLX3gUmNj3UT98HYOJaVdtSdbybMm20H+TkbFZkdWOAxYKdMsJOJ87I0f+P WQisuRTURJQry8qk8ww5hpsLszkASoJWF0t9BTuXjvUbd6TuTTPEhjVl9++eCM/Wax SLpdDVXc9hfpSIDzcIpFFkujiKto+IFt6gP8b/cds4aq2CYARJsRq9bwzhx0QTfU05 Imab8YbZ9itLA== Received: from oxalide-smtp-out.extra.cea.fr (oxalide-smtp-out.extra.cea.fr [132.168.224.13]) by lists.lttng.org (Postfix) with ESMTPS id 4DsT0D1Lq5zBrF for ; Fri, 5 Mar 2021 08:21:31 -0500 (EST) Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by oxalide-sys.extra.cea.fr (8.14.7/8.14.7/CEAnet-Internet-out-4.0) with ESMTP id 125CRtDI030736; Fri, 5 Mar 2021 13:27:55 +0100 Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id E7C3D204D97; Fri, 5 Mar 2021 13:27:54 +0100 (CET) Received: from muguet2-smtp-out.intra.cea.fr (muguet2-smtp-out.intra.cea.fr [132.166.192.13]) by pisaure.intra.cea.fr (Postfix) with ESMTP id DDC71204D8E; Fri, 5 Mar 2021 13:27:54 +0100 (CET) Received: from I-EXCH-A3.intra.cea.fr (i-exch-a3.intra.cea.fr [132.166.88.227]) by muguet2-sys.intra.cea.fr (8.14.7/8.14.7/CEAnet-Internet-out-4.0) with ESMTP id 125CRsId006863; Fri, 5 Mar 2021 13:27:54 +0100 Received: from I-EXCH-A3.intra.cea.fr (132.166.88.227) by I-EXCH-A3.intra.cea.fr (132.166.88.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 5 Mar 2021 13:27:54 +0100 Received: from EXCAH-B3.intra.cea.fr (132.166.88.88) by I-EXCH-A3.intra.cea.fr (132.166.88.227) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2 via Frontend Transport; Fri, 5 Mar 2021 13:27:54 +0100 Received: from EXDAG0-B1.intra.cea.fr ([fe80::c18e:d8e8:9a27:5b84]) by EXCAH-B3.intra.cea.fr ([fe80::947a:e02d:e083:3de0%10]) with mapi id 14.03.0487.000; Fri, 5 Mar 2021 13:27:54 +0100 To: Philippe Proulx CC: "lttng-dev@lists.lttng.org" Thread-Topic: [lttng-dev] [barectf] How to ensure that last events before a crash get recorded Thread-Index: AQHXEQfH8OO3fMfK7k2UMsDwYOrjfqp1PpcAgAAUZGc= Date: Fri, 5 Mar 2021 12:27:53 +0000 Message-ID: <386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2E34@EXDAG0-B1.intra.cea.fr> References: <386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2B92@EXDAG0-B1.intra.cea.fr>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [132.166.88.225] X-TM-AS-Product-Ver: SMEX-14.0.0.3080-8.6.1012-26010.007 X-TM-AS-Result: No-10--9.522100-8.000000 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No MIME-Version: 1.0 X-TMASE-MatchedRID: nI1cAR4k0HY6yy6RAAEPc461Z+HJnvsO82SgwNf6SK69P3995H/RpcX9 rqqdIj82c4NUrxbHjuJVjdEnKZ0vVi2l8grHOIQzlVHM/F6YkvRLqa9X75MqaeD0a1g8E91LqhX sUcL2MQRF6Jq8ne3VAI913mjfQ3KIIS4aUVryC8GTCCj1265aF0N+63YtzViHdjTiy6QtbPqF/D Brpeo+OXikEB4ENdrglZ0L7mYPE31Kzl0OLwrWWLSlePUaQB97QR7lWMXPA1vDqO6/8R69QNOiG FjeqLkCe1mK/cNFuML6+5es6gbvTgaDi8wMH7Dz1ilQ4KKAwrfGSb7RikwvVzLZyQk29Rf4tLSU 4gcykWhWK5U/rCSFf3gHxXvVq0IS2wrN6ugrbs5yMswwR1sr65LQR37yyvyaStFk/81wIJIoIhl +v+yCGcJToVJxC6y00AAj4Lcjr8WZEKhZJ6HsIWK3N9p/OFh6Jd2n2XoSRFntjfny5P3G5TBBYV 82eTWFohccjf+m6IIMPBva3w6jnSNgyw3swYMYvMr1EZWBgiEZ8RJ4fqmXhoVMrooKmT4Mw86bk UZoMU0AJxdQeYKU9svPy4osyYDXj2hRzH1UwuATNCcUsR4xSYDH9tzzuv1v/nnwJ52QYi+A6TP5 7EUvvtsqsOw1SacbEZAWvTB+BsUU4yb51oAD+7CmHvLKHJZI2Zpwkui8XlIPYriGB6nAXXlwK2K DjeFOxghBl1d9Q1MvlAH6OIXaLJRMZUCEHkRt X-TMASE-Result: 10--9.522100-8.000000 X-TMASE-Version: SMEX-14.0.0.3080-8.6.1012-26010.007 X-TM-SNTS-SMTP: 1BBE7680DEBA2DE7D7378F4409AB6FAE6028E7B5FC6FBAD1201612EC6D3C29A82000:8 Subject: Re: [lttng-dev] [barectf] How to ensure that last events before a crash get recorded X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: RADERMACHER Ansgar via lttng-dev Reply-To: RADERMACHER Ansgar Content-Type: multipart/mixed; boundary="===============2643424569929170582==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============2643424569929170582== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2E34EXDAG0B1intrace_" --_000_386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2E34EXDAG0B1intrace_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Philippe, thanks for your response. The reason not to use LTTng is simple: while I de= velop on Linux, our client is chiefly using Windows with the mingw environm= ent. Best regards Ansgar ________________________________ From: P hilippe Proulx [eeppeliteloop@gmail.com] Sent: Friday, March 05, 2021 13:11 To: RADERMACHER Ansgar Cc: lttng-dev@lists.lttng.org Subject: Re: [lttng-dev] [barectf] How to ensure that last events before a = crash get recorded On Thu, Mar 4, 2021 at 10:28 RADERMACHER Ansgar via lttng-dev > wrote: Hi, when doing tracing with barectf, the trace elements are written into a buff= er first and only written when the buffer is full - or if the function bare= ctf_platform_fs_fini gets called. In case of a crash, it's therefore possible to loose some events. What is t= he best option to prevent this issue? I've used signal handlers that call t= he function barectf_platform_fs_fini. This seems to work well with Linux, b= ut is not portable. When using the provided sample platform, there is also = the option to reduce the buffer size, but this is not ideal, as trace event= s that are too big for the buffer are not written. First question: why are you using barectf on Linux vs LTTng? LTTng supports writing the sub-buffers to NVRAM and, if the system crashes,= convert those sub-buffers to a CTF trace with the lttng-crash utility. See= < https://lttng.org/docs/v2.12/#doc-persistent-memory-file-systems>. With NVRAM, you could do this with barectf with a corresponding platform us= ing it. It's always up to the platform author to decide where buffers are a= nd where complete packets go; it's not a feature of barectf as such. Hope it helps, Phil Best regards Ansgar _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Philippe Proulx --_000_386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2E34EXDAG0B1intrace_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Philippe,

thanks for your response. The reason not to use LTTng is simple: while= I develop on Linux, our client is chiefly using Windows with the mingw env= ironment.

Best regards

Ansgar

From: P
hilippe Proulx [eeppeliteloop@gmail.com]
Sent: Friday, March 05, 2021 13:11
To: RADERMACHER Ansgar
Cc: lttng-dev@lists.lttng.org
Subject: Re: [lttng-dev] [barectf] How to ensure that last events be= fore a crash get recorded

On Thu, Mar 4, 2021 at 10:28 RADERMACHER Ansgar via lttng-dev <lttng-dev@lists.lttng.org> wrote:
Hi,

when doing tracing with barectf, the trac= e elements are written into a buffer first and only written when the buffer= is full - or if the function barectf_platform_fs_fini gets called.
In case of a crash, it's therefore possib= le to loose some events. What is the best option to prevent this issue? I'v= e used signal handlers that call the function barectf_platform_fs_fini. Thi= s seems to work well with Linux, but is not portable. When using the provided sample platform, there is also th= e option to reduce the buffer size, but this is not ideal, as trace events = that are too big for the buffer are not written.

First question: why are you using barectf on Linux vs LTT= ng?

LTTng supports writing the sub-buffers to NVRAM and, if t= he system crashes, convert those sub-buffers to a CTF trace with the lttng-= crash utility. See <

With NVRAM, you could do this with barectf with a corresp= onding platform using it. It's always up to the platform author to decide w= here buffers are and where complete packets go; it's not a feature of barec= tf as such.

Hope it helps,

Phil


Best regards

Ansgar


_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/l= istinfo/lttng-dev
--
Philippe Proulx
--_000_386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2E34EXDAG0B1intrace_-- --===============2643424569929170582== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev --===============2643424569929170582==--