Skip to content

Commit

Permalink
docs: Sync with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
danobi committed Nov 28, 2024
1 parent 5becefa commit c4c7129
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
15 changes: 2 additions & 13 deletions docs/master.html
Original file line number Diff line number Diff line change
Expand Up @@ -5857,10 +5857,10 @@ <h3 id="_invocation_mode">Invocation Mode</h3>
<h3 id="_map_printing">Map Printing</h3>
<div class="paragraph">
<p>By default when a bpftrace program exits it will print all maps to stdout.
If you don&#8217;t want this, you can either override the <code>print_maps_on_exit</code> configuration option or you can specify an <code>END</code> probe and <code>clear</code> the maps you don&#8217;t want printed (this second method doesn&#8217;t work for scalar maps).</p>
If you don&#8217;t want this, you can either override the <code>print_maps_on_exit</code> configuration option or you can specify an <code>END</code> probe and <code>clear</code> the maps you don&#8217;t want printed.</p>
</div>
<div class="paragraph">
<p>For example, this script:</p>
<p>For example, these two scripts are equivalent and will print nothing on exit:</p>
</div>
<div class="listingblock">
<div class="content">
Expand All @@ -5874,9 +5874,6 @@ <h3 id="_map_printing">Map Printing</h3>
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>would print nothing on exit, while this script:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>BEGIN {
Expand All @@ -5890,14 +5887,6 @@ <h3 id="_map_printing">Map Printing</h3>
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>will print this on exit:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code>@a: 0</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_systemd_support">Systemd support</h3>
Expand Down
10 changes: 2 additions & 8 deletions src/docs/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4145,9 +4145,9 @@ Therefore, when you need precise event statistics, it is recommended to use sync
=== Map Printing

By default when a bpftrace program exits it will print all maps to stdout.
If you don't want this, you can either override the `print_maps_on_exit` configuration option or you can specify an `END` probe and `clear` the maps you don't want printed (this second method doesn't work for scalar maps).
If you don't want this, you can either override the `print_maps_on_exit` configuration option or you can specify an `END` probe and `clear` the maps you don't want printed.

For example, this script:
For example, these two scripts are equivalent and will print nothing on exit:
```
config = {
print_maps_on_exit=0
Expand All @@ -4159,7 +4159,6 @@ BEGIN {
}
```

would print nothing on exit, while this script:
```
BEGIN {
@a = 1;
Expand All @@ -4172,11 +4171,6 @@ END {
}
```

will print this on exit:
```
@a: 0
```

=== Systemd support

To run bpftrace in the background using systemd::
Expand Down

0 comments on commit c4c7129

Please sign in to comment.