This repository was archived by the owner on Feb 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Expand file tree Collapse file tree 2 files changed +40
-2
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ <h3 id="_f_format"><strong>-f</strong> <em>FORMAT</em></h3>
226
226
</ dl >
227
227
</ div >
228
228
< 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 >
230
230
</ div >
231
231
</ div >
232
232
< div class ="sect2 ">
@@ -1490,6 +1490,26 @@ <h4 id="_per_thread_variables">Per-Thread Variables</h4>
1490
1490
*/</ pre >
1491
1491
</ div >
1492
1492
</ 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 >
1493
1513
</ div >
1494
1514
</ div >
1495
1515
</ div >
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ Valid values are::
97
97
*json* +
98
98
*text*
99
99
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 .
101
101
102
102
=== *-h, --help*
103
103
@@ -1044,6 +1044,24 @@ kretprobe:do_nanosleep /has_key(@start, tid)/ {
1044
1044
*/
1045
1045
----
1046
1046
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
+
1047
1065
== Builtins
1048
1066
1049
1067
Builtins are special variables built into the language.
You can’t perform that action at this time.
0 commit comments