File 0831-erts-Clarify-system_flag-scheduler_wall_time-_-docs.patch of Package erlang

From 0e3db5dd1eb310519a5b5cd0d2da4acd1dab8177 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Mon, 22 Nov 2021 23:08:08 +0100
Subject: [PATCH 1/3] erts: Clarify system_flag(scheduler_wall_time,_) docs

---
 erts/doc/src/erlang.xml | 34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 26f3f768f6..39c2095dc8 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -9350,10 +9350,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>
 
-- 
2.31.1

openSUSE Build Service is sponsored by