summaryrefslogtreecommitdiff
path: root/erts/doc/src/erlang.xml
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2022-01-11 23:14:21 +0100
committerSverker Eriksson <sverker@erlang.org>2022-01-11 23:14:21 +0100
commit70a36dc442feda69eef375a7ffb15d4a7fb98269 (patch)
tree430e816276ba7b266c377da10a7f1a8d4c6560e0 /erts/doc/src/erlang.xml
parentf518b5d3a9bde82ebcd16697f01ed2fd1fcfd0cb (diff)
parentd33bb24ef66be325282fc75bee00dec066e6c11c (diff)
downloaderlang-70a36dc442feda69eef375a7ffb15d4a7fb98269.tar.gz
Merge branch 'maint'
Diffstat (limited to 'erts/doc/src/erlang.xml')
-rw-r--r--erts/doc/src/erlang.xml34
1 files changed, 30 insertions, 4 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index bc79442c3a..8a2ecd0cb9 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -9432,10 +9432,36 @@ ok
<fsummary>Set system flag scheduler_wall_time.</fsummary>
<desc>
<p>
- Turns on or off scheduler wall time measurements.</p>
- <p>For more information, see
- <seeerl marker="#statistics_scheduler_wall_time">
- <c>statistics(scheduler_wall_time)</c></seeerl>.</p>
+ Try enable or disable scheduler wall time measurements by passing
+ <c><anno>Boolean</anno></c> as either <c>true</c> or <c>false</c>.
+ </p>
+ <p>
+ For more information about how to use scheduler wall time
+ measurements, see <seeerl marker="#statistics_scheduler_wall_time">
+ <c>statistics(scheduler_wall_time)</c></seeerl>.
+ </p>
+ <p>
+ Scheduler wall time measurements has a node global state. It is either
+ enabled for all processes on the node or disabled for all
+ processes. Each process has a logical counter initialized as zero. A
+ call with <c><anno>Boolean</anno></c> as <c>true</c> will increase
+ that counter one step for the calling process. A call with
+ <c>false</c> will decrease it one step unless it already is
+ zero. The node global state for <c>scheduler_wall_time</c> will be
+ enabled as long as there is at least one process alive with a counter
+ value larger than zero. When a process terminates, its counter will
+ also disappear. To ensure <c>scheduler_wall_time</c> is kept enabled,
+ the process that enabled it must therefore be kept alive.
+ </p>
+ <p>
+ Returns the old value of the node global state, <c>true</c> if
+ scheduler wall time measurements were enabled, <c>false</c>
+ if it were disabled.
+ </p>
+ <p>
+ Scheduler wall time measurements do consume some cpu overhead and
+ should not be left turned on unless used.
+ </p>
</desc>
</func>