Skip to content
This repository was archived by the owner on Feb 22, 2025. It is now read-only.

Commit 4b66a57

Browse files
committed
docs: Sync with upstream
1 parent 3da0bcf commit 4b66a57

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

docs/master.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ <h3 id="_f_format"><strong>-f</strong> <em>FORMAT</em></h3>
226226
</dl>
227227
</div>
228228
<div class="paragraph">
229-
<p>Note: the json output is ndjson, meaning each line of the streamed output is a single blob of valid json.</p>
229+
<p>The JSON output is compatible with NDJSON and JSON Lines, meaning each line of the streamed output is a single blob of valid JSON.</p>
230230
</div>
231231
</div>
232232
<div class="sect2">
@@ -1490,6 +1490,26 @@ <h4 id="_per_thread_variables">Per-Thread Variables</h4>
14901490
*/</pre>
14911491
</div>
14921492
</div>
1493+
<div class="paragraph">
1494+
<p>This style of map may also be useful for capturing output parameters, or other context, between two different probes. For example:</p>
1495+
</div>
1496+
<div class="listingblock">
1497+
<div class="content">
1498+
<pre>tracepoint:syscalls:sys_enter_wait4
1499+
{
1500+
@out[tid] = args.ru;
1501+
}
1502+
1503+
tracepoint:syscalls:sys_exit_wait4
1504+
{
1505+
$ru = @out[tid];
1506+
delete(@out, tid);
1507+
if ($ru != 0) {
1508+
printf("got usage ...", ...);
1509+
}
1510+
}</pre>
1511+
</div>
1512+
</div>
14931513
</div>
14941514
</div>
14951515
</div>

src/docs/master.adoc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Valid values are::
9797
*json* +
9898
*text*
9999

100-
Note: the json output is ndjson, meaning each line of the streamed output is a single blob of valid json.
100+
The JSON output is compatible with NDJSON and JSON Lines, meaning each line of the streamed output is a single blob of valid JSON.
101101

102102
=== *-h, --help*
103103

@@ -1044,6 +1044,24 @@ kretprobe:do_nanosleep /has_key(@start, tid)/ {
10441044
*/
10451045
----
10461046

1047+
This style of map may also be useful for capturing output parameters, or other context, between two different probes. For example:
1048+
1049+
----
1050+
tracepoint:syscalls:sys_enter_wait4
1051+
{
1052+
@out[tid] = args.ru;
1053+
}
1054+
1055+
tracepoint:syscalls:sys_exit_wait4
1056+
{
1057+
$ru = @out[tid];
1058+
delete(@out, tid);
1059+
if ($ru != 0) {
1060+
printf("got usage ...", ...);
1061+
}
1062+
}
1063+
----
1064+
10471065
== Builtins
10481066

10491067
Builtins are special variables built into the language.

0 commit comments

Comments
 (0)