<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi everyone <br>
<br>
I am experimenting with enabling trace for a specific iteration of a loop in my application.
<br>
I created 2 trace points at the start and end of the loop which log the iteration number.<br>
the loop itself creates thousands of trace points. It runs for ~5ms. <br>
<br>
on lttng side I created 2 triggers to start and stop my session in case the loop tracepoint registers a specific iteration number.<br>
the triggers seem to work since there is another session entry created under the session folder but there are very few tracepoints.<br>
<br>
is it possible that the delay between the event happening and the session trace starting causes loss of events ?
<br>
If yes, is there a way around this ? <br>
<br>
here is my setup :<br>
<br>
#lttng-status<br>
Recording session session: [inactive]<o:p></o:p></p>
<p class="MsoNormal"> Trace output: /home/user/lttng-traces/session-20230523-113537<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">=== Domain: User space ===<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Buffering scheme: per-user<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Tracked process attributes<o:p></o:p></p>
<p class="MsoNormal"> Virtual process IDs: all<o:p></o:p></p>
<p class="MsoNormal"> Virtual user IDs: all<o:p></o:p></p>
<p class="MsoNormal"> Virtual group IDs: all<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Channels:<o:p></o:p></p>
<p class="MsoNormal">-------------<o:p></o:p></p>
<p class="MsoNormal">- user-channel: [enabled]<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Attributes:<o:p></o:p></p>
<p class="MsoNormal"> Event-loss mode: discard<o:p></o:p></p>
<p class="MsoNormal"> Sub-buffer size: 16777216 bytes<o:p></o:p></p>
<p class="MsoNormal"> Sub-buffer count: 128<o:p></o:p></p>
<p class="MsoNormal"> Switch timer: inactive<o:p></o:p></p>
<p class="MsoNormal"> Read timer: inactive<o:p></o:p></p>
<p class="MsoNormal"> Monitor timer: 1000000 us<o:p></o:p></p>
<p class="MsoNormal"> Blocking timeout: 0 us<o:p></o:p></p>
<p class="MsoNormal"> Trace file count: 1 per stream<o:p></o:p></p>
<p class="MsoNormal"> Trace file size: unlimited<o:p></o:p></p>
<p class="MsoNormal"> Output mode: mmap<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Statistics:<o:p></o:p></p>
<p class="MsoNormal"> Discarded events: 0<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> Recording event rules:<o:p></o:p></p>
<p class="MsoNormal"> trace_events* (type: tracepoint) [enabled]<o:p></o:p></p>
<p class="MsoNormal"> loop* (type: tracepoint) [enabled]<o:p></o:p></p>
<p class="MsoNormal"><br>
#lttng list-triggers<br>
<br>
- name: iter-start<o:p></o:p></p>
<p class="MsoNormal"> owner uid: 1000<o:p></o:p></p>
<p class="MsoNormal"> condition: event rule matches<o:p></o:p></p>
<p class="MsoNormal"> rule: loop:iteration (type: user tracepoint, filter: iter==2 && start == 1)<o:p></o:p></p>
<p class="MsoNormal"> errors: none<o:p></o:p></p>
<p class="MsoNormal"> actions:<o:p></o:p></p>
<p class="MsoNormal"> start session `session`<o:p></o:p></p>
<p class="MsoNormal"> errors: none<o:p></o:p></p>
<p class="MsoNormal"> errors: none<o:p></o:p></p>
<p class="MsoNormal">- name: iter-stop<o:p></o:p></p>
<p class="MsoNormal"> owner uid: 1000<o:p></o:p></p>
<p class="MsoNormal"> condition: event rule matches<o:p></o:p></p>
<p class="MsoNormal"> rule: loop:iteration (type: user tracepoint, filter: iter==2 && start == 0)<o:p></o:p></p>
<p class="MsoNormal"> errors: none<o:p></o:p></p>
<p class="MsoNormal"> actions:<o:p></o:p></p>
<p class="MsoNormal"> stop session `session`<o:p></o:p></p>
<p class="MsoNormal"> errors: none<o:p></o:p></p>
<p class="MsoNormal"> errors: none<br>
<br>
<br>
Thanks <br>
<br>
Yehuda <o:p></o:p></p>
</div>
</body>
</html>