<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hi Philippe,</div>
<div><br>
</div>
<div>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 environment.</div>
<div><br>
</div>
<div>Best regards</div>
<div><br>
</div>
<div>Ansgar<br>
</div>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF148139" style="direction: ltr;"><font size="2" face="Tahoma" color="#000000"><b>From:</b> P</font></div>
<div style="direction: ltr;"><font size="2" face="Tahoma" color="#000000">hilippe Proulx [eeppeliteloop@gmail.com]<br>
<b>Sent:</b> Friday, March 05, 2021 13:11<br>
<b>To:</b> RADERMACHER Ansgar<br>
<b>Cc:</b> lttng-dev@lists.lttng.org<br>
<b>Subject:</b> Re: [lttng-dev] [barectf] How to ensure that last events before a crash get recorded<br>
</font><br>
</div>
<div></div>
<div>
<div>On Thu, Mar 4, 2021 at 10:28 RADERMACHER Ansgar via lttng-dev <<a href="mailto:lttng-dev@lists.lttng.org" target="_blank" rel="noopener noreferrer">lttng-dev@lists.lttng.org</a>> wrote:<br>
</div>
<div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; padding-left:1ex; border-left-color:rgb(204,204,204)">
<div>
<div style="direction:ltr; font-family:Tahoma; font-size:10pt; color:rgb(0,0,0)">
<div style="font-family:Tahoma">Hi,</div>
<div style="font-family:Tahoma"><br>
</div>
<div style="font-family:Tahoma">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.</div>
<div style="font-family:Tahoma">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.</div>
</div>
</div>
</blockquote>
<div dir="auto"><br>
</div>
<div dir="auto">First question: why are you using barectf on Linux vs LTTng?</div>
<div dir="auto"><br>
</div>
<div dir="auto">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 <
<div dir="auto"><a href="https://lttng.org/docs/v2.12/#doc-persistent-memory-file-systems" target="_blank" rel="noopener noreferrer">https://lttng.org/docs/v2.12/#doc-persistent-memory-file-systems</a>>.</div>
<div dir="auto"><br>
</div>
<div dir="auto">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.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Hope it helps,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Phil</div>
</div>
<div dir="auto"><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; padding-left:1ex; border-left-color:rgb(204,204,204)">
<div>
<div style="direction:ltr; font-family:Tahoma; font-size:10pt; color:rgb(0,0,0)">
<div dir="auto" style="font-family:Tahoma"></div>
<div style="font-family:Tahoma"><br>
</div>
<div style="font-family:Tahoma">Best regards</div>
<div style="font-family:Tahoma"><br>
</div>
<div style="font-family:Tahoma">Ansgar<br>
</div>
<div style="font-family:Tahoma"><br>
</div>
<div style="font-family:Tahoma"><br>
</div>
</div>
</div>
_______________________________________________<br>
lttng-dev mailing list<br>
<a href="mailto:lttng-dev@lists.lttng.org" target="_blank" rel="noopener noreferrer">lttng-dev@lists.lttng.org</a><br>
<a href="https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" rel="noreferrer" target="_blank">https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><br>
</blockquote>
</div>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">Philippe Proulx</div>
</div>
</div>
</div>
</body>
</html>