From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UFeSAw4gQmAoDgAAWB0awg (envelope-from ) for ; Fri, 05 Mar 2021 07:11:58 -0500 Received: by simark.ca (Postfix, from userid 112) id F3F751EF78; Fri, 5 Mar 2021 07:11:57 -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 44F6B1E54D for ; Fri, 5 Mar 2021 07:11:57 -0500 (EST) Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4DsRRw5C56zByX; Fri, 5 Mar 2021 07:11:56 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1614946317; bh=lM++dEQ3npTdIFJvu3TyTeCbXmdgd697ZSmusFHMcWo=; 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=LmeN3zO8qPu2WB7bY7/CJElqo+zG5bt4+2Mhf6xkIGAKd7LsjjbiyRzQuPvADTuSm YtfRZOke64JBUMC8LI6+YT56Td92WT8lXEHLot24V4ryTnQXyFEpVG0AUfrxmOykwo kBU5XL6kGHurus9EORm+9G31jPcya8JJ7hKvLb+4S7JK4D5YR7r82U8GlQks8U3Jyp c9u7JIFrJxBZGJw0qOSGOplfjORk+VL8NV36hAaceCeDk65F5T3tYYEYBPTDj/dHBf RSRSlODW6Cml2W2JzKusuMvtey6N0GUnkFTq69VVsUT1BfghAeHPdQYOkiIsbARX8n sFcL9MfGH0q4w== Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lists.lttng.org (Postfix) with ESMTPS id 4DsRRv6ntKzByW for ; Fri, 5 Mar 2021 07:11:55 -0500 (EST) Received: by mail-yb1-xb30.google.com with SMTP id f4so1664621ybk.11 for ; Fri, 05 Mar 2021 04:11:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IwCNqqthPI1OdveJALabWCw5UKAsGVNjOHo3Zhm5OUc=; b=ZykJepntfSzv8fhMR1o3tdsmN4LBfkMqkWBS7tt86WQfirg12DPhBREb3RlXzsQ+QW kmkswSAHLRSFNj3Yufkj7U86l+VexS+oCT90auajLhWcaczIvwPByEKhZA7XbKP1GWhD uq383Ka2YerJ6AHFa1lCfnLxiOOaLpUJKmgZTCAr65qrIc6Ategbi/OEs7nZxSpcov5p J2oZCF+VrDW6bSUwYLA0yR1wyQX+WI4pNLRzdyRxauVIXlqnyLm4LfPgjV2WL6C8SAcZ 9T9PHMFhn9Zyoby2aVPxx0b2G3NWhw8NnVYYNozhSOmrz3YsrTxRKaBMX6opbGygyJEa O+zQ== X-Gm-Message-State: AOAM530vaIwzFapaViDITMs4OX1H0+BVhIM0N7kscmR7DfKsYhtgnYr4 Yw8qdfMwN0g5a/vs5MBf2RXAKbX2Z+kgw5Rk578= X-Google-Smtp-Source: ABdhPJzPWcnOKpX5qh0luDgebZwjgWdPbGOwgQ2AeB7MkfAdS8dtT6jBm7tPinS2iqHxf8NF8kCzHv/giaT+zaTZhbw= X-Received: by 2002:a25:344f:: with SMTP id b76mr13324480yba.398.1614946315320; Fri, 05 Mar 2021 04:11:55 -0800 (PST) MIME-Version: 1.0 References: <386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2B92@EXDAG0-B1.intra.cea.fr> In-Reply-To: <386C5D4D5C53C24CBC2C60CAAFD2136A5B4B2B92@EXDAG0-B1.intra.cea.fr> Date: Fri, 5 Mar 2021 07:11:44 -0500 Message-ID: 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 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: Philippe Proulx via lttng-dev Reply-To: Philippe Proulx Content-Type: multipart/mixed; boundary="===============2518550462175213452==" Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" --===============2518550462175213452== Content-Type: multipart/alternative; boundary="00000000000074c02b05bcc8fd8e" --00000000000074c02b05bcc8fd8e Content-Type: text/plain; charset="UTF-8" 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 trace 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 possible to loose some events. What is > the best option to prevent this issue? I've used signal handlers that call > the function barectf_platform_fs_fini. This seems to work well with Linux, > but 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 > events 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 using it. It's always up to the platform author to decide where buffers are and 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 --00000000000074c02b05bcc8fd8e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 po= ssible to loose some events. What is the best option to prevent this issue?= I've used signal handlers that call the function barectf_platform_fs_f= ini. This seems to work well with Linux, but is not portable. When using the provided sample platform, there is also the option to reduce the buffe= r size, but this is not ideal, as trace events that are too big for the buf= fer are not written.
--
Philippe Proulx
--00000000000074c02b05bcc8fd8e-- --===============2518550462175213452== 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 --===============2518550462175213452==--