aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erlang.xml
diff options
context:
space:
mode:
Diffstat (limited to 'erts/doc/src/erlang.xml')
-rw-r--r--erts/doc/src/erlang.xml2229
1 files changed, 1381 insertions, 848 deletions
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 3ed0f59b7d..8e014c3010 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2017</year>
+ <year>1996</year><year>2018</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -36,8 +36,8 @@
in this module. Some of the BIFs are viewed more
or less as part of the Erlang programming language and are
<em>auto-imported</em>. Thus, it is not necessary to specify the
- module name. For example, the calls <c>atom_to_list(Erlang)</c>
- and <c>erlang:atom_to_list(Erlang)</c> are identical.</p>
+ module name. For example, the calls <c>atom_to_list(erlang)</c>
+ and <c>erlang:atom_to_list(erlang)</c> are identical.</p>
<p>Auto-imported BIFs are listed without module prefix.
BIFs listed with module prefix are not auto-imported.</p>
@@ -53,14 +53,14 @@
<datatypes>
<datatype>
- <name>ext_binary()</name>
+ <name name="ext_binary"/>
<desc>
<p>A binary data object, structured according to
the Erlang external term format.</p>
</desc>
</datatype>
<datatype>
- <name>iovec()</name>
+ <name name="iovec"/>
<desc>
<p>A list of binaries. This datatype is useful to use
together with <seealso marker="erl_nif#enif_inspect_iovec">
@@ -189,6 +189,23 @@
</taglist>
</desc>
</datatype>
+
+ <datatype>
+ <name name="dist_handle"></name>
+ <desc>
+ <p>An opaque handle identifing a distribution channel.</p>
+ </desc>
+ </datatype>
+
+ <datatype>
+ <name name="nif_resource"></name>
+ <desc>
+ <p>An opaque handle identifing a
+ <seealso marker="erl_nif#resource_objects">NIF resource object
+ </seealso>.</p>
+ </desc>
+ </datatype>
+
</datatypes>
<funcs>
@@ -196,10 +213,6 @@
<name name="abs" arity="1" clause_i="1"/>
<name name="abs" arity="1" clause_i="2"/>
<fsummary>Arithmetical absolute value.</fsummary>
- <type>
- <v>Float = float()</v>
- <v>Int = integer()</v>
- </type>
<desc>
<p>Returns an integer or float that is the arithmetical
absolute value of <c><anno>Float</anno></c> or
@@ -549,9 +562,7 @@ hello
<name name="binary_to_term" arity="2"/>
<fsummary>Decode an Erlang external term format binary.</fsummary>
<desc>
- <p>As <c>binary_to_term/1</c>, but takes options that affect decoding
- of the binary.</p>
- <p>Option:</p>
+ <p>As <c>binary_to_term/1</c>, but takes these options:</p>
<taglist>
<tag><c>safe</c></tag>
<item>
@@ -567,18 +578,31 @@ hello
creation of new external function references.
None of those resources are garbage collected, so unchecked
creation of them can exhaust available memory.</p>
- </item>
- </taglist>
- <p>Failure: <c>badarg</c> if <c>safe</c> is specified and unsafe
- data is decoded.</p>
<pre>
-> <input>binary_to_term(&lt;&lt;131,100,0,5,104,101,108,108,111>>, [safe]).</input>
+> <input>binary_to_term(&lt;&lt;131,100,0,5,"hello">>, [safe]).</input>
** exception error: bad argument
> <input>hello.</input>
hello
-> <input>binary_to_term(&lt;&lt;131,100,0,5,104,101,108,108,111>>, [safe]).</input>
+> <input>binary_to_term(&lt;&lt;131,100,0,5,"hello">>, [safe]).</input>
hello
</pre>
+ </item>
+ <tag><c>used</c></tag>
+ <item>
+ <p>Changes the return value to <c>{Term, Used}</c> where <c>Used</c>
+ is the number of bytes actually read from <c>Binary</c>.</p>
+ <pre>
+> <input>Input = &lt;&lt;131,100,0,5,"hello","world">>.</input>
+&lt;&lt;131,100,0,5,104,101,108,108,111,119,111,114,108,100>>
+> <input>{Term, Used} = binary_to_term(Input, [used]).</input>
+{hello, 9}
+> <input>split_binary(Input, Used).</input>
+{&lt;&lt;131,100,0,5,104,101,108,108,111>>, &lt;&lt;"world">>}
+</pre>
+ </item>
+ </taglist>
+ <p>Failure: <c>badarg</c> if <c>safe</c> is specified and unsafe
+ data is decoded.</p>
<p>See also
<seealso marker="#term_to_binary/1"><c>term_to_binary/1</c></seealso>,
<seealso marker="#binary_to_term/1">
@@ -1233,6 +1257,141 @@ end</code>
</func>
<func>
+ <name name="dist_ctrl_get_data" arity="1"/>
+ <fsummary>Get distribution channel data to pass to another node.</fsummary>
+ <desc>
+ <p>
+ Get distribution channel data from the local node that is
+ to be passed to the remote node. The distribution channel
+ is identified by <c><anno>DHandle</anno></c>. If no data
+ is available, the atom <c>none</c> is returned. One
+ can request to be informed by a message when more
+ data is available by calling
+ <seealso marker="erlang#dist_ctrl_get_data_notification/1"><c>erlang:dist_ctrl_get_data_notification(DHandle)</c></seealso>.
+ </p>
+ <note><p>
+ Only the process registered as distribution
+ controller for the distribution channel identified by
+ <c><anno>DHandle</anno></c> is allowed to call this
+ function.
+ </p></note>
+ <p>
+ This function is used when implementing an alternative
+ distribution carrier using processes as distribution
+ controllers. <c><anno>DHandle</anno></c> is retrived
+ via the callback
+ <seealso marker="erts:alt_dist#hs_data_f_handshake_complete"><c>f_handshake_complete</c></seealso>.
+ More information can be found in the documentation of
+ <seealso marker="erts:alt_dist#distribution_module">ERTS
+ User's Guide ➜ How to implement an Alternative Carrier
+ for the Erlang Distribution ➜ Distribution Module</seealso>.
+ </p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="dist_ctrl_get_data_notification" arity="1"/>
+ <fsummary>Request notification about available outgoing distribution channel data.</fsummary>
+ <desc>
+ <p>
+ Request notification when more data is available to
+ fetch using
+ <seealso marker="erlang#dist_ctrl_get_data/1"><c>erlang:dist_ctrl_get_data(DHandle)</c></seealso>
+ for the distribution channel identified by
+ <c><anno>DHandle</anno></c>. When more data is present,
+ the caller will be sent the message <c>dist_data</c>.
+ Once a <c>dist_data</c> messages has been sent, no
+ more <c>dist_data</c> messages will be sent until
+ the <c>dist_ctrl_get_data_notification/1</c> function has been called
+ again.
+ </p>
+ <note><p>
+ Only the process registered as distribution
+ controller for the distribution channel identified by
+ <c><anno>DHandle</anno></c> is allowed to call this
+ function.
+ </p></note>
+ <p>
+ This function is used when implementing an alternative
+ distribution carrier using processes as distribution
+ controllers. <c><anno>DHandle</anno></c> is retrived
+ via the callback
+ <seealso marker="erts:alt_dist#hs_data_f_handshake_complete"><c>f_handshake_complete</c></seealso>.
+ More information can be found in the documentation of
+ <seealso marker="erts:alt_dist#distribution_module">ERTS
+ User's Guide ➜ How to implement an Alternative Carrier
+ for the Erlang Distribution ➜ Distribution Module</seealso>.
+ </p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="dist_ctrl_input_handler" arity="2"/>
+ <fsummary>Register distribution channel input handler process.</fsummary>
+ <desc>
+ <p>
+ Register an alternate input handler process for the
+ distribution channel identified by <c><anno>DHandle</anno></c>.
+ Once this function has been called, <c><anno>InputHandler</anno></c>
+ is the only process allowed to call
+ <seealso marker="erlang#dist_ctrl_put_data/2"><c>erlang:dist_ctrl_put_data(DHandle, Data)</c></seealso>
+ with the <c><anno>DHandle</anno></c> identifing this distribution
+ channel.
+ </p>
+ <note><p>
+ Only the process registered as distribution
+ controller for the distribution channel identified by
+ <c><anno>DHandle</anno></c> is allowed to call this
+ function.
+ </p></note>
+ <p>
+ This function is used when implementing an alternative
+ distribution carrier using processes as distribution
+ controllers. <c><anno>DHandle</anno></c> is retrived
+ via the callback
+ <seealso marker="erts:alt_dist#hs_data_f_handshake_complete"><c>f_handshake_complete</c></seealso>.
+ More information can be found in the documentation of
+ <seealso marker="erts:alt_dist#distribution_module">ERTS
+ User's Guide ➜ How to implement an Alternative Carrier
+ for the Erlang Distribution ➜ Distribution Module</seealso>.
+ </p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="dist_ctrl_put_data" arity="2"/>
+ <fsummary>Pass data into the VM from a distribution channel.</fsummary>
+ <desc>
+ <p>
+ Deliver distribution channel data from a remote node to the
+ local node.
+ </p>
+ <note><p>
+ Only the process registered as distribution
+ controller for the distribution channel identified by
+ <c><anno>DHandle</anno></c> is allowed to call this
+ function unless an alternate input handler process
+ has been registered using
+ <seealso marker="erlang#dist_ctrl_input_handler/2"><c>erlang:dist_ctrl_input_handler(DHandle, InputHandler)</c></seealso>.
+ If an alternate input handler has been registered, only
+ the registered input handler process is allowed to call
+ this function.
+ </p></note>
+ <p>
+ This function is used when implementing an alternative
+ distribution carrier using processes as distribution
+ controllers. <c><anno>DHandle</anno></c> is retrived
+ via the callback
+ <seealso marker="erts:alt_dist#hs_data_f_handshake_complete"><c>f_handshake_complete</c></seealso>.
+ More information can be found in the documentation of
+ <seealso marker="erts:alt_dist#distribution_module">ERTS
+ User's Guide ➜ How to implement an Alternative Carrier
+ for the Erlang Distribution ➜ Distribution Module</seealso>.
+ </p>
+ </desc>
+ </func>
+
+ <func>
<name name="element" arity="2"/>
<fsummary>Return the Nth element of a tuple.</fsummary>
<type_desc variable="N">1..tuple_size(<anno>Tuple</anno>)</type_desc>
@@ -1290,11 +1449,14 @@ b</pre>
the process to terminate, it has no return value. Example:</p>
<pre>
> <input>catch error(foobar).</input>
-{'EXIT',{foobar,[{erl_eval,do_apply,5},
- {erl_eval,expr,5},
- {shell,exprs,6},
- {shell,eval_exprs,6},
- {shell,eval_loop,3}]}}</pre>
+{'EXIT',{foobar,[{shell,apply_fun,3,
+ [{file,"shell.erl"},{line,906}]},
+ {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,677}]},
+ {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,430}]},
+ {shell,exprs,7,[{file,"shell.erl"},{line,687}]},
+ {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
+ {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}}
+</pre>
</desc>
</func>
@@ -1831,39 +1993,26 @@ true</pre>
<fsummary>Get the call stack back-trace of the last exception.</fsummary>
<type name="stack_item"/>
<desc>
- <p>Gets the call stack back-trace (<em>stacktrace</em>) for an
- exception that has just been caught
- in the calling process as a list of
- <c>{<anno>Module</anno>,<anno>Function</anno>,<anno>Arity</anno>,<anno>Location</anno>}</c>
- tuples. Field <c><anno>Arity</anno></c> in the first tuple can be the
- argument list of that function call instead of an arity integer,
- depending on the exception.</p>
- <p>If there has not been any exceptions in a process, the
- stacktrace is <c>[]</c>. After a code change for the process,
- the stacktrace can also be reset to <c>[]</c>.</p>
- <p><c>erlang:get_stacktrace/0</c> is only guaranteed to return
- a stacktrace if called (directly or indirectly) from within the
- scope of a <c>try</c> expression. That is, the following call works:</p>
+ <warning><p><c>erlang:get_stacktrace/0</c> is deprecated and will stop working
+ in a future release.</p></warning>
+ <p>Instead of using <c>erlang:get_stacktrace/0</c> to retrieve
+ the call stack back-trace, use the following syntax:</p>
<pre>
try Expr
catch
- C:R ->
- {C,R,erlang:get_stacktrace()}
+ Class:Reason:Stacktrace ->
+ {Class,Reason,Stacktrace}
end</pre>
- <p>As does this call:</p>
-<pre>
-try Expr
-catch
- C:R ->
- {C,R,helper()}
-end
-
-helper() ->
- erlang:get_stacktrace().</pre>
-
- <warning><p>In a future release,
- <c>erlang:get_stacktrace/0</c> will return <c>[]</c> if called
- from outside a <c>try</c> expression.</p></warning>
+ <p><c>erlang:get_stacktrace/0</c> retrieves the call stack back-trace
+ (<em>stacktrace</em>) for an exception that has just been
+ caught in the calling process as a list of
+ <c>{<anno>Module</anno>,<anno>Function</anno>,<anno>Arity</anno>,<anno>Location</anno>}</c>
+ tuples. Field <c><anno>Arity</anno></c> in the first tuple can
+ be the argument list of that function call instead of an arity
+ integer, depending on the exception.</p>
+ <p>If there has not been any exceptions in a process, the
+ stacktrace is <c>[]</c>. After a code change for the process,
+ the stacktrace can also be reset to <c>[]</c>.</p>
<p>The stacktrace is the same data as operator <c>catch</c>
returns, for example:</p>
<pre>
@@ -1886,6 +2035,18 @@ helper() ->
where the exception occurred or the function was called.
</item>
</taglist>
+ <warning><p>Developers should rely on stacktrace entries only for
+ debugging purposes.</p>
+ <p>The VM performs tail call optimization, which
+ does not add new entries to the stacktrace, and also limits stacktraces
+ to a certain depth. Furthermore, compiler options, optimizations and
+ future changes may add or remove stacktrace entries, causing any code
+ that expects the stacktrace to be in a certain order or contain specific
+ items to fail.</p>
+ <p>The only exception to this rule is <c>error:undef</c> which
+ guarantees to include the <anno>Module</anno>, <anno>Function</anno> and <anno>Arity</anno>
+ of the attempted function as the first stacktrace entry.</p>
+ </warning>
<p>See also
<seealso marker="#error/1"><c>error/1</c></seealso> and
<seealso marker="#error/2"><c>error/2</c></seealso>.</p>
@@ -1916,8 +2077,15 @@ helper() ->
Typically, this is used when a process started from a
certain shell is to have another group leader than
<c>init</c>.</p>
+ <p>The group leader should be rarely changed in
+ applications with a supervision tree, because OTP
+ assumes the group leader of their processes is
+ their application master.</p>
<p>See also
- <seealso marker="#group_leader/0"><c>group_leader/0</c></seealso>.</p>
+ <seealso marker="#group_leader/0"><c>group_leader/0</c></seealso>
+ and <seealso marker="doc/design_principles:applications#stopping">OTP
+ design principles</seealso> related to starting and stopping
+ applications.</p>
</desc>
</func>
@@ -2280,6 +2448,26 @@ os_prompt%</pre>
</func>
<func>
+ <name name="is_map_key" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>Returns <c>true</c> if map <c><anno>Map</anno></c> contains
+ <c><anno>Key</anno></c> and returns <c>false</c> if it does not
+ contain the <c><anno>Key</anno></c>.</p>
+ <p>The call fails with a <c>{badmap,Map}</c> exception if
+ <c><anno>Map</anno></c> is not a map.</p>
+ <p><em>Example:</em></p>
+ <code type="none">
+> Map = #{"42" => value}.
+#{"42" => value}
+> is_map_key("42",Map).
+true
+> is_map_key(value,Map).
+false</code>
+ </desc>
+ </func>
+
+ <func>
<name name="is_number" arity="1"/>
<fsummary>Check whether a term is a number.</fsummary>
<desc>
@@ -2813,6 +3001,25 @@ os_prompt%</pre>
</func>
<func>
+ <name name="map_get" arity="2" />
+ <fsummary>Extract a value from a map</fsummary>
+ <desc>
+ <p>Returns value <c><anno>Value</anno></c> associated with
+ <c><anno>Key</anno></c> if <c><anno>Map</anno></c> contains
+ <c><anno>Key</anno></c>.</p>
+ <p>The call fails with a <c>{badmap,Map}</c> exception if
+ <c><anno>Map</anno></c> is not a map, or with a <c>{badkey,Key}</c>
+ exception if no value is associated with <c><anno>Key</anno></c>.</p>
+ <p><em>Example:</em></p>
+ <code type="none">
+> Key = 1337,
+ Map = #{42 => value_two,1337 => "value one","a" => 1},
+ map_get(Key,Map).
+"value one"</code>
+ </desc>
+ </func>
+
+ <func>
<name name="map_size" arity="1"/>
<fsummary>Return the size of a map.</fsummary>
<desc>
@@ -3195,25 +3402,6 @@ RealSystem = system + MissedSystem</code>
monitored process resides). </p></item>
</taglist>
- <p>If an attempt is made to monitor a process on an older node
- (where remote process monitoring is not implemented or
- where remote process monitoring by registered name is not
- implemented), the call fails with <c>badarg</c>.</p>
- <note>
- <p>The format of the <c>'DOWN'</c> message changed in ERTS
- 5.2 (Erlang/OTP R9B) for monitoring
- <em>by registered name</em>. Element <c>Object</c> of
- the <c>'DOWN'</c> message could in earlier versions
- sometimes be the process identifier of the monitored process and sometimes
- be the registered name. Now element <c>Object</c> is
- always a tuple consisting of the registered name and
- the node name. Processes on new nodes (ERTS 5.2
- or higher versions) always get <c>'DOWN'</c> messages on
- the new format even if they are monitoring processes on old
- nodes. Processes on old nodes always get <c>'DOWN'</c>
- messages on the old format.</p>
- </note>
-
<taglist>
<tag>Monitoring a <marker id="monitor_process"/><c>process</c></tag>
<item>
@@ -3221,7 +3409,19 @@ RealSystem = system + MissedSystem</code>
process identified by <c><anno>Item</anno></c>, which can be a
<c>pid()</c> (local or remote), an atom <c>RegisteredName</c> or
a tuple <c>{RegisteredName, Node}</c> for a registered process,
- located elsewhere.</p>
+ located elsewhere.</p>
+
+ <note><p>Before ERTS 10.0 (OTP 21.0), monitoring a process could fail with
+ <c>badarg</c> if the monitored process resided on a primitive node
+ (such as erl_interface or jinterface), where remote process monitoring
+ is not implemented.</p>
+ <p>Now, such a call to <c>monitor</c> will instead succeed and a
+ monitor is created. But the monitor will only supervise the
+ connection. That is, a <c>{'DOWN', _, process, _, noconnection}</c> is
+ the only message that may be received, as the primitive node have no
+ way of reporting the status of the monitored process.</p>
+ </note>
+
</item>
<tag>Monitoring a <marker id="monitor_port"/><c>port</c></tag>
@@ -3581,13 +3781,6 @@ RealSystem = system + MissedSystem</code>
If found, that driver is started. A driver runs in the Erlang
work space, which means that it is linked with the Erlang
runtime system.</p>
- <p>When starting external programs on Solaris, the system
- call <c>vfork</c> is used in preference to <c>fork</c>
- for performance reasons, although it has a history of
- being less robust. If there are problems using
- <c>vfork</c>, setting environment variable
- <c>ERL_NO_VFORK</c> to any value causes <c>fork</c>
- to be used instead.</p>
<p>For external programs, <c>PATH</c> is searched
(or an equivalent method is used to find programs,
depending on the OS). This is done by invoking
@@ -3686,6 +3879,12 @@ RealSystem = system + MissedSystem</code>
</item>
<tag><c>{env, <anno>Env</anno>}</c></tag>
<item>
+ <p>
+ Types:<br/>
+ &nbsp;&nbsp;<c><anno>Name</anno> = </c><seealso marker="kernel:os#type-env_var_name"><c>os:env_var_name()</c></seealso><br/>
+ &nbsp;&nbsp;<c><anno>Val</anno> = </c><seealso marker="kernel:os#type-env_var_value"><c>os:env_var_value()</c></seealso><c> | false</c><br/>
+ &nbsp;&nbsp;<c>Env = [{<anno>Name</anno>, <anno>Val</anno>}]</c>
+ </p>
<p>Only valid for <c>{spawn, <anno>Command</anno>}</c>, and
<c>{spawn_executable, <anno>FileName</anno>}</c>.
The environment of the started process is extended using
@@ -3700,7 +3899,13 @@ RealSystem = system + MissedSystem</code>
exception is <c><anno>Val</anno></c> being the atom
<c>false</c> (in analogy with
<seealso marker="kernel:os#getenv/1"><c>os:getenv/1</c></seealso>,
- which removes the environment variable.</p>
+ which removes the environment variable.
+ </p>
+ <p>
+ For information about encoding requirements, see documentation
+ of the types for <c><anno>Name</anno></c> and
+ <c><anno>Val</anno></c>.
+ </p>
</item>
<tag><c>{args, [ string() | binary() ]}</c></tag>
<item>
@@ -4326,7 +4531,6 @@ RealSystem = system + MissedSystem</code>
<desc>
<p><c><anno>Locking</anno></c> is one of the following:</p>
<list type="bulleted">
- <item><c>false</c> (emulator without SMP support)</item>
<item><c>port_level</c> (port-specific locking)</item>
<item><c>driver_level</c> (driver-specific locking)</item>
</list>
@@ -4567,11 +4771,11 @@ RealSystem = system + MissedSystem</code>
</func>
<func>
- <name name="process_flag" arity="2" clause_i="3"/>
+ <name name="process_flag" arity="2" clause_i="3"
+ anchor="process_flag_min_heap_size"/>
<fsummary>Set process flag min_heap_size for the calling process.
</fsummary>
<desc>
- <marker id="process_flag_min_heap_size"/>
<p>Changes the minimum heap size for the calling process.</p>
<p>Returns the old value of the flag.</p>
</desc>
@@ -4589,12 +4793,12 @@ RealSystem = system + MissedSystem</code>
</func>
<func>
- <name name="process_flag" arity="2" clause_i="5"/>
+ <name name="process_flag" arity="2" clause_i="5"
+ anchor="process_flag_max_heap_size"/>
<fsummary>Set process flag max_heap_size for the calling process.
</fsummary>
<type name="max_heap_size"/>
<desc>
- <marker id="process_flag_max_heap_size"/>
<p>This flag sets the maximum heap size for the calling process.
If <c><anno>MaxHeapSize</anno></c> is an integer, the system default
values for <c>kill</c> and <c>error_logger</c> are used.
@@ -4637,11 +4841,11 @@ RealSystem = system + MissedSystem</code>
</item>
<tag><c>error_logger</c></tag>
<item>
- <p>When set to <c>true</c>, the runtime system sends a
- message to the current <seealso marker="kernel:error_logger">
- <c>error_logger</c></seealso>
+ <p>When set to <c>true</c>, the runtime system logs an
+ error event via <seealso marker="kernel:logger">
+ <c>logger</c></seealso>,
containing details about the process when the maximum
- heap size is reached. One <c>error_logger</c> report is sent
+ heap size is reached. One log event is sent
each time the limit is reached.</p>
<p>If <c>error_logger</c> is not defined in the map, the system
default is used. The default system default is <c>true</c>.
@@ -4655,7 +4859,7 @@ RealSystem = system + MissedSystem</code>
amount of memory that is used during the garbage collection. When
contemplating using this option, it is recommended to first run
it in production with <c>kill</c> set to <c>false</c> and inspect
- the <c>error_logger</c> reports to see what the normal peak sizes
+ the log events to see what the normal peak sizes
of the processes in the system is and then tune the value
accordingly.
</p>
@@ -4663,12 +4867,12 @@ RealSystem = system + MissedSystem</code>
</func>
<func>
- <name name="process_flag" arity="2" clause_i="6"/>
+ <name name="process_flag" arity="2" clause_i="6"
+ anchor="process_flag_message_queue_data"/>
<fsummary>Set process flag message_queue_data for the calling process.
</fsummary>
<type name="message_queue_data"/>
<desc>
- <marker id="process_flag_message_queue_data"/>
<p>This flag determines how messages in the message queue
are stored, as follows:</p>
<taglist>
@@ -4705,11 +4909,12 @@ RealSystem = system + MissedSystem</code>
</func>
<func>
- <name name="process_flag" arity="2" clause_i="7"/>
+ <name name="process_flag" arity="2" clause_i="7"
+ anchor="process_flag_priority"/>
<fsummary>Set process flag priority for the calling process.</fsummary>
<type name="priority_level"/>
<desc>
- <p><marker id="process_flag_priority"></marker>
+ <p>
Sets the process priority. <c><anno>Level</anno></c> is an atom.
Four priority levels exist: <c>low</c>,
<c>normal</c>, <c>high</c>, and <c>max</c>. Default
@@ -4730,8 +4935,8 @@ RealSystem = system + MissedSystem</code>
selected for execution. Notice however that this does
<em>not</em> mean that no processes on priority <c>low</c>
or <c>normal</c> can run when processes
- are running on priority <c>high</c>. On the runtime
- system with SMP support, more processes can be running
+ are running on priority <c>high</c>. When using multiple
+ schedulers, more processes can be running
in parallel than processes on priority <c>high</c>. That is,
a <c>low</c> and a <c>high</c> priority process can
execute at the same time.</p>
@@ -4746,10 +4951,8 @@ RealSystem = system + MissedSystem</code>
execution.</p>
<note>
<p>Do not depend on the scheduling
- to remain exactly as it is today. Scheduling, at least on
- the runtime system with SMP support, is likely to be
- changed in a future release to use available
- processor cores better.</p>
+ to remain exactly as it is today. Scheduling is likely to be
+ changed in a future release to use available processor cores better.</p>
</note>
<p>There is <em>no</em> automatic mechanism for
avoiding priority inversion, such as priority inheritance
@@ -4881,7 +5084,6 @@ RealSystem = system + MissedSystem</code>
<item><c>initial_call</c></item>
<item><c>status</c></item>
<item><c>message_queue_len</c></item>
- <item><c>messages</c></item>
<item><c>links</c></item>
<item><c>dictionary</c></item>
<item><c>trap_exit</c></item>
@@ -5095,10 +5297,10 @@ RealSystem = system + MissedSystem</code>
<p><c><anno>MinBinVHeapSize</anno></c> is the minimum binary virtual
heap size for the process.</p>
</item>
- <tag><c>{monitored_by, <anno>Pids</anno>}</c></tag>
+ <tag><c>{monitored_by, <anno>MonitoredBy</anno>}</c></tag>
<item>
- <p>A list of process identifiers monitoring the process (with
- <c>monitor/2</c>).</p>
+ <p>A list of identifiers for all the processes, ports and NIF
+ resources, that are monitoring the process.</p>
</item>
<tag><c>{monitors, <anno>Monitors</anno>}</c></tag>
<item>
@@ -5541,11 +5743,17 @@ true</pre>
<type name="dst"/>
<desc>
<p>Sends a message and returns <c><anno>Msg</anno></c>. This
- is the same as <c><anno>Dest</anno> ! <anno>Msg</anno></c>.</p>
+ is the same as using the <seealso marker="doc/reference_manual:expressions#send">
+ send operator</seealso>:
+ <c><anno>Dest</anno> ! <anno>Msg</anno></c>.</p>
<p><c><anno>Dest</anno></c> can be a remote or local process identifier,
a (local) port, a locally registered name, or a tuple
<c>{<anno>RegName</anno>, <anno>Node</anno>}</c>
- for a registered name at another node.</p>
+ for a registered name at another node.</p>
+ <p>The function fails with a <c>badarg</c> run-time error if
+ <c><anno>Dest</anno></c> is an atom name, but this name is not
+ registered. This is the only case when <c>send</c> fails for an
+ unreachable destination <c><anno>Dest</anno></c> (of correct type).</p>
</desc>
</func>
@@ -5964,7 +6172,7 @@ true</pre>
<p>Monitors the new process (like
<seealso marker="#monitor/2"><c>monitor/2</c></seealso> does).</p>
</item>
- <tag><c>{priority, <anno>Level</anno></c></tag>
+ <tag><c>{priority, <anno>Level</anno>}</c></tag>
<item>
<p>Sets the priority of the new process. Equivalent to
executing <seealso marker="#process_flag_priority">
@@ -6190,10 +6398,10 @@ true</pre>
</func>
<func>
- <name name="statistics" arity="1" clause_i="1"/>
+ <name name="statistics" arity="1" clause_i="1"
+ anchor="statistics_active_tasks"/>
<fsummary>Information about active processes and ports.</fsummary>
<desc>
- <marker id="statistics_active_tasks"></marker>
<p>Returns the same as
<seealso marker="#statistics_active_tasks_all">
<c>statistics(active_tasks_all)</c></seealso>
@@ -6205,10 +6413,10 @@ true</pre>
</func>
<func>
- <name name="statistics" arity="1" clause_i="2"/>
+ <name name="statistics" arity="1" clause_i="2"
+ anchor="statistics_active_tasks_all"/>
<fsummary>Information about active processes and ports.</fsummary>
<desc>
- <marker id="statistics_active_tasks_all"></marker>
<p>Returns a list where each element represents the amount
of active processes and ports on each run queue and its
associated schedulers. That is, the number of processes and
@@ -6256,17 +6464,16 @@ true</pre>
</func>
<func>
- <name name="statistics" arity="1" clause_i="4"/>
+ <name name="statistics" arity="1" clause_i="4"
+ anchor="statistics_exact_reductions"/>
<fsummary>Information about exact reductions.</fsummary>
<desc>
- <marker id="statistics_exact_reductions"></marker>
<p>Returns the number of exact reductions.</p>
<note>
<p><c>statistics(exact_reductions)</c> is
a more expensive operation than
<seealso marker="#statistics_reductions">
- statistics(reductions)</seealso>,
- especially on an Erlang machine with SMP support.</p>
+ statistics(reductions)</seealso>.</p>
</note>
</desc>
</func>
@@ -6295,10 +6502,10 @@ true</pre>
</func>
<func>
- <name name="statistics" arity="1" clause_i="7"/>
+ <name name="statistics" arity="1" clause_i="7"
+ anchor="statistics_microstate_accounting"/>
<fsummary>Information about microstate accounting.</fsummary>
<desc>
- <marker id="statistics_microstate_accounting"></marker>
<p>Microstate accounting can be used to measure how much time the Erlang
runtime system spends doing various tasks. It is designed to be as
lightweight as possible, but some overhead exists when this
@@ -6343,17 +6550,24 @@ lists:map(
<p><c><anno>MSAcc_Thread_Type</anno></c>s:</p>
<taglist>
<tag><c>scheduler</c></tag>
- <item>The main execution threads that do most of the work.</item>
+ <item>The main execution threads that do most of the work. See
+ <seealso marker="erts:erl#+S">erl +S</seealso> for more details.</item>
<tag><c>dirty_cpu_scheduler</c></tag>
- <item>The threads for long running cpu intensive work.</item>
+ <item>The threads for long running cpu intensive work. See
+ <seealso marker="erts:erl#+SDcpu">erl +SDcpu</seealso> for more details.</item>
<tag><c>dirty_io_scheduler</c></tag>
- <item>The threads for long running I/O work.</item>
+ <item>The threads for long running I/O work. See
+ <seealso marker="erts:erl#+SDio">erl +SDio</seealso> for more details.</item>
<tag><c>async</c></tag>
<item>Async threads are used by various linked-in drivers (mainly the
- file drivers) do offload non-CPU intensive work.</item>
+ file drivers) do offload non-CPU intensive work. See
+ <seealso marker="erts:erl#+async_thread_pool_size">erl +A</seealso> for more details.</item>
<tag><c>aux</c></tag>
<item>Takes care of any work that is not
specifically assigned to a scheduler.</item>
+ <tag><c>poll</c></tag>
+ <item>Does the IO polling for the emulator. See
+ <seealso marker="erts:erl#+IOt">erl +IOt</seealso> for more details.</item>
</taglist>
<p>The following <c><anno>MSAcc_Thread_State</anno></c>s are available.
All states are exclusive, meaning that a thread cannot be in two
@@ -6431,10 +6645,10 @@ lists:map(
</func>
<func>
- <name name="statistics" arity="1" clause_i="8"/>
+ <name name="statistics" arity="1" clause_i="8"
+ anchor="statistics_reductions"/>
<fsummary>Information about reductions.</fsummary>
<desc>
- <marker id="statistics_reductions"></marker>
<p>Returns information about reductions, for example:</p>
<pre>
> <input>statistics(reductions).</input>
@@ -6450,9 +6664,10 @@ lists:map(
</func>
<func>
- <name name="statistics" arity="1" clause_i="9"/>
+ <name name="statistics" arity="1" clause_i="9"
+ anchor="statistics_run_queue"/>
<fsummary>Information about the run-queues.</fsummary>
- <desc><marker id="statistics_run_queue"></marker>
+ <desc>
<p>Returns the total length of all normal run-queues. That is, the number
of processes and ports that are ready to run on all available
normal run-queues. Dirty run queues are not part of the
@@ -6466,9 +6681,10 @@ lists:map(
</func>
<func>
- <name name="statistics" arity="1" clause_i="10"/>
+ <name name="statistics" arity="1" clause_i="10"
+ anchor="statistics_run_queue_lengths"/>
<fsummary>Information about the run-queue lengths.</fsummary>
- <desc><marker id="statistics_run_queue_lengths"></marker>
+ <desc>
<p>Returns the same as
<seealso marker="#statistics_run_queue_lengths_all">
<c>statistics(run_queue_lengths_all)</c></seealso>
@@ -6480,9 +6696,10 @@ lists:map(
</func>
<func>
- <name name="statistics" arity="1" clause_i="11"/>
+ <name name="statistics" arity="1" clause_i="11"
+ anchor="statistics_run_queue_lengths_all"/>
<fsummary>Information about the run-queue lengths.</fsummary>
- <desc><marker id="statistics_run_queue_lengths_all"></marker>
+ <desc>
<p>Returns a list where each element represents the amount
of processes and ports ready to run for each run queue.
Values for normal run queues are located first in the
@@ -6540,10 +6757,10 @@ lists:map(
</func>
<func>
- <name name="statistics" arity="1" clause_i="13"/>
+ <name name="statistics" arity="1" clause_i="13"
+ anchor="statistics_scheduler_wall_time"/>
<fsummary>Information about each schedulers work time.</fsummary>
<desc>
- <marker id="statistics_scheduler_wall_time"></marker>
<p>Returns a list of tuples with
<c>{<anno>SchedulerId</anno>, <anno>ActiveTime</anno>,
<anno>TotalTime</anno>}</c>, where
@@ -6585,17 +6802,20 @@ lists:map(
be included in the result. That is, all scheduler threads
that are expected to handle CPU bound work. If you also
want information about dirty I/O schedulers, use
- <seealso marker="#statistics_scheduler_wall_time_all"><c>statistics(scheduler_wall_time_all)</c></seealso>
+ <seealso marker="#statistics_scheduler_wall_time_all">
+ <c>statistics(scheduler_wall_time_all)</c></seealso>
instead.</p>
<p>Normal schedulers will have scheduler identifiers in
the range <c>1 =&lt; <anno>SchedulerId</anno> =&lt;
- </c><seealso marker="#system_info_schedulers"><c>erlang:system_info(schedulers)</c></seealso>.
+ </c><seealso marker="#system_info_schedulers">
+ <c>erlang:system_info(schedulers)</c></seealso>.
Dirty CPU schedulers will have scheduler identifiers in
the range <c>erlang:system_info(schedulers) &lt;
<anno>SchedulerId</anno> =&lt; erlang:system_info(schedulers)
+
- </c><seealso marker="#system_info_dirty_cpu_schedulers"><c>erlang:system_info(dirty_cpu_schedulers)</c></seealso>.
+ </c><seealso marker="#system_info_dirty_cpu_schedulers">
+ <c>erlang:system_info(dirty_cpu_schedulers)</c></seealso>.
</p>
<note><p>The different types of schedulers handle
specific types of jobs. Every job is assigned to a specific
@@ -6650,8 +6870,8 @@ ok
than available logical processors, this value may
be greater than <c>1.0</c>.</p>
<p>As of ERTS version 9.0, the Erlang runtime system
- with SMP support will as default have more schedulers
- than logical processors. This due to the dirty schedulers.</p>
+ will as default have more schedulers than logical processors.
+ This due to the dirty schedulers.</p>
<note>
<p><c>scheduler_wall_time</c> is by default disabled. To
enable it, use
@@ -6661,23 +6881,26 @@ ok
</func>
<func>
- <name name="statistics" arity="1" clause_i="14"/>
+ <name name="statistics" arity="1" clause_i="14"
+ anchor="statistics_scheduler_wall_time_all"/>
<fsummary>Information about each schedulers work time.</fsummary>
<desc>
- <marker id="statistics_scheduler_wall_time_all"></marker>
<p>The same as
<seealso marker="#statistics_scheduler_wall_time"><c>statistics(scheduler_wall_time)</c></seealso>,
except that it also include information about all dirty I/O
schedulers.</p>
<p>Dirty IO schedulers will have scheduler identifiers in
the range
- <seealso marker="#system_info_schedulers"><c>erlang:system_info(schedulers)</c></seealso><c>
+ <seealso marker="#system_info_schedulers">
+ <c>erlang:system_info(schedulers)</c></seealso><c>
+
- </c><seealso marker="#system_info_dirty_cpu_schedulers"><c>erlang:system_info(dirty_cpu_schedulers)</c></seealso><c> &lt;
+ </c><seealso marker="#system_info_dirty_cpu_schedulers">
+ <c>erlang:system_info(dirty_cpu_schedulers)</c></seealso><c> &lt;
<anno>SchedulerId</anno> =&lt; erlang:system_info(schedulers)
+ erlang:system_info(dirty_cpu_schedulers)
+
- </c><seealso marker="#system_info_dirty_io_schedulers"><c>erlang:system_info(dirty_io_schedulers)</c></seealso>.</p>
+ </c><seealso marker="#system_info_dirty_io_schedulers">
+ <c>erlang:system_info(dirty_io_schedulers)</c></seealso>.</p>
<note><p>Note that work executing on dirty I/O schedulers
are expected to mainly wait for I/O. That is, when you
get high scheduler utilization on dirty I/O schedulers,
@@ -6686,9 +6909,10 @@ ok
</desc>
</func>
<func>
- <name name="statistics" arity="1" clause_i="15"/>
+ <name name="statistics" arity="1" clause_i="15"
+ anchor="statistics_total_active_tasks"/>
<fsummary>Information about active processes and ports.</fsummary>
- <desc><marker id="statistics_total_active_tasks"></marker>
+ <desc>
<p>The same as calling
<c>lists:sum(</c><seealso marker="#statistics_active_tasks"><c>statistics(active_tasks)</c></seealso><c>)</c>,
but more efficient.</p>
@@ -6696,9 +6920,10 @@ ok
</func>
<func>
- <name name="statistics" arity="1" clause_i="16"/>
+ <name name="statistics" arity="1" clause_i="16"
+ anchor="statistics_total_active_tasks_all"/>
<fsummary>Information about active processes and ports.</fsummary>
- <desc><marker id="statistics_total_active_tasks_all"></marker>
+ <desc>
<p>The same as calling
<c>lists:sum(</c><seealso marker="#statistics_active_tasks_all"><c>statistics(active_tasks_all)</c></seealso><c>)</c>,
but more efficient.</p>
@@ -6706,9 +6931,10 @@ ok
</func>
<func>
- <name name="statistics" arity="1" clause_i="17"/>
+ <name name="statistics" arity="1" clause_i="17"
+ anchor="statistics_total_run_queue_lengths"/>
<fsummary>Information about the run-queue lengths.</fsummary>
- <desc><marker id="statistics_total_run_queue_lengths"></marker>
+ <desc>
<p>The same as calling
<c>lists:sum(</c><seealso marker="#statistics_run_queue_lengths"><c>statistics(run_queue_lengths)</c></seealso><c>)</c>,
but more efficient.</p>
@@ -6716,9 +6942,10 @@ ok
</func>
<func>
- <name name="statistics" arity="1" clause_i="18"/>
+ <name name="statistics" arity="1" clause_i="18"
+ anchor="statistics_total_run_queue_lengths_all"/>
<fsummary>Information about the run-queue lengths.</fsummary>
- <desc><marker id="statistics_total_run_queue_lengths_all"></marker>
+ <desc>
<p>The same as calling
<c>lists:sum(</c><seealso marker="#statistics_run_queue_lengths_all"><c>statistics(run_queue_lengths_all)</c></seealso><c>)</c>,
but more efficient.</p>
@@ -6787,10 +7014,47 @@ ok
from other events in the system. It is only guaranteed that
<c><anno>Suspendee</anno></c> <em>eventually</em> suspends
(unless it
- is resumed). If option <c>asynchronous</c> has <em>not</em>
+ is resumed). If no <c>asynchronous</c> options has
been passed, the caller of <c>erlang:suspend_process/2</c> is
blocked until <c><anno>Suspendee</anno></c> has suspended.</p>
</item>
+ <tag><c>{asynchronous, ReplyTag}</c></tag>
+ <item>
+ <p>A suspend request is sent to the process identified by
+ <c><anno>Suspendee</anno></c>. When the suspend request
+ has been processed, a reply message is sent to the caller
+ of this function. The reply is on the form <c>{ReplyTag,
+ State}</c> where <c>State</c> is either:</p>
+ <taglist>
+ <tag><c>exited</c></tag>
+ <item>
+ <p>
+ <c><anno>Suspendee</anno></c> has exited.
+ </p>
+ </item>
+ <tag><c>suspended</c></tag>
+ <item>
+ <p>
+ <c><anno>Suspendee</anno></c> is now suspended.
+ </p>
+ </item>
+ <tag><c>not_suspended</c></tag>
+ <item>
+ <p>
+ <c><anno>Suspendee</anno></c> is not suspended.
+ This can only happen when the process that
+ issued this request, have called
+ <c>resume_process(<anno>Suspendee</anno>)</c>
+ before getting the reply.
+ </p>
+ </item>
+ </taglist>
+ <p>
+ Appart from the reply message, the <c>{asynchronous,
+ ReplyTag}</c> option behaves exactly the same as the
+ <c>asynchronous</c> option without reply tag.
+ </p>
+ </item>
<tag><c>unless_suspending</c></tag>
<item>
<p>The process identified by <c><anno>Suspendee</anno></c> is
@@ -6814,6 +7078,13 @@ ok
<warning>
<p>This BIF is intended for debugging only.</p>
</warning>
+ <warning>
+ <p>You can easily create deadlocks if processes suspends
+ each other (directly or in circles). In ERTS versions prior
+ to ERTS version 10.0, the runtime system prevented such
+ deadlocks, but this prevention has now been removed due
+ to performance reasons.</p>
+ </warning>
<p>Failures:</p>
<taglist>
<tag><c>badarg</c></tag>
@@ -6866,7 +7137,8 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="2"/>
+ <name name="system_flag" arity="2" clause_i="2"
+ anchor="system_flag_cpu_topology"/>
<fsummary>Set system flag <c>cpu_topology</c>.</fsummary>
<type name="cpu_topology"/>
<type name="level_entry"/>
@@ -6875,7 +7147,7 @@ ok
<type name="info_list"/>
<desc>
<warning>
- <p><marker id="system_flag_cpu_topology"></marker>
+ <p>
<em>This argument is deprecated.</em>
Instead of using this argument, use command-line argument
<seealso marker="erts:erl#+sct"><c>+sct</c></seealso> in
@@ -6913,10 +7185,11 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="3"/>
+ <name name="system_flag" arity="2" clause_i="3"
+ anchor="system_flag_dirty_cpu_schedulers_online"/>
<fsummary>Set system_flag_dirty_cpu_schedulers_online.</fsummary>
<desc>
- <p><marker id="system_flag_dirty_cpu_schedulers_online"></marker>
+ <p>
Sets the number of dirty CPU schedulers online. Range is
<c><![CDATA[1 <= DirtyCPUSchedulersOnline <= N]]></c>, where <c>N</c>
is the smallest of the return values of
@@ -6977,10 +7250,11 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="6"/>
+ <name name="system_flag" arity="2" clause_i="6"
+ anchor="system_flag_microstate_accounting"/>
<fsummary>Set system flag microstate_accounting.</fsummary>
<desc>
- <p><marker id="system_flag_microstate_accounting"></marker>
+ <p>
Turns on/off microstate accounting measurements. When passing reset,
all counters are reset to 0.</p>
<p>For more information see
@@ -7022,28 +7296,29 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="9"/>
+ <name name="system_flag" arity="2" clause_i="9"
+ anchor="system_flag_max_heap_size"/>
<fsummary>Set system flag max_heap_size.</fsummary>
<type name="max_heap_size"/>
<desc>
- <marker id="system_flag_max_heap_size"></marker>
<p>
Sets the default maximum heap size settings for processes.
The size is specified in words. The new <c>max_heap_size</c>
effects only processes spawned efter the change has been made.
<c>max_heap_size</c> can be set for individual processes using
<seealso marker="#spawn_opt/4"><c>spawn_opt/2,3,4</c></seealso> or
- <seealso marker="#process_flag_message_queue_data">
+ <seealso marker="#process_flag_max_heap_size">
<c>process_flag/2</c></seealso>.</p>
<p>Returns the old value of the flag.</p>
</desc>
</func>
<func>
- <name name="system_flag" arity="2" clause_i="10"/>
+ <name name="system_flag" arity="2" clause_i="10"
+ anchor="system_flag_multi_scheduling"/>
<fsummary>Set system flag multi_scheduling.</fsummary>
<desc>
- <p><marker id="system_flag_multi_scheduling"></marker>
+ <p>
If multi-scheduling is enabled, more than one scheduler
thread is used by the emulator. Multi-scheduling can be
blocked in two different ways. Either all schedulers but
@@ -7095,12 +7370,13 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="11"/>
+ <name name="system_flag" arity="2" clause_i="11"
+ anchor="system_flag_scheduler_bind_type"/>
<fsummary>Set system flag scheduler_bind_type.</fsummary>
<type name="scheduler_bind_type"/>
<desc>
<warning>
- <p><marker id="system_flag_scheduler_bind_type"></marker>
+ <p>
<em>This argument is deprecated.</em>
Instead of using this argument, use command-line argument
<seealso marker="erts:erl#+sbt"><c>+sbt</c></seealso> in
@@ -7115,7 +7391,7 @@ ok
<note><p>If a scheduler fails to bind, this is often silently
ignored, as it is not always possible to verify valid
logical processor identifiers. If an error is reported,
- it is reported to <c>error_logger</c>. To verify that the
+ an error event is logged. To verify that the
schedulers have bound as requested, call
<seealso marker="#system_info_scheduler_bindings">
<c>erlang:system_info(scheduler_bindings)</c></seealso>.</p>
@@ -7221,10 +7497,11 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="12"/>
+ <name name="system_flag" arity="2" clause_i="12"
+ anchor="system_flag_scheduler_wall_time"/>
<fsummary>Set system flag scheduler_wall_time.</fsummary>
<desc>
- <p><marker id="system_flag_scheduler_wall_time"></marker>
+ <p>
Turns on or off scheduler wall time measurements.</p>
<p>For more information, see
<seealso marker="#statistics_scheduler_wall_time">
@@ -7233,10 +7510,11 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="13"/>
+ <name name="system_flag" arity="2" clause_i="13"
+ anchor="system_flag_schedulers_online"/>
<fsummary>Set system flag schedulers_online.</fsummary>
<desc>
- <p><marker id="system_flag_schedulers_online"></marker>
+ <p>
Sets the number of schedulers online. Range is
<c><![CDATA[1 <= SchedulersOnline <=
erlang:system_info(schedulers)]]></c>.</p>
@@ -7275,10 +7553,11 @@ ok
</func>
<func>
- <name name="system_flag" arity="2" clause_i="15"/>
+ <name name="system_flag" arity="2" clause_i="15"
+ anchor="system_flag_time_offset"/>
<fsummary>Finalize the time offset.</fsummary>
<desc>
- <p><marker id="system_flag_time_offset"></marker>
+ <p>
Finalizes the <seealso marker="#time_offset/0">time offset</seealso>
when <seealso marker="time_correction#Single_Time_Warp_Mode">single
time warp mode</seealso> is used. If another time warp mode
@@ -7304,11 +7583,145 @@ ok
</func>
<func>
- <name name="system_info" arity="1" clause_i="1"/>
- <name name="system_info" arity="1" clause_i="2"/>
- <name name="system_info" arity="1" clause_i="3"/>
- <name name="system_info" arity="1" clause_i="4"/>
- <name name="system_info" arity="1" clause_i="5"/>
+ <name name="system_info" arity="1" clause_i="76"/>
+ <fsummary>System info overview.</fsummary>
+ <desc>
+ <p>Returns information about the current system.
+ The documentation of this function is broken into the following
+ sections in order to make it easier to navigate.</p>
+ <taglist>
+ <tag><seealso marker="#system_info_allocator">
+ <c>Memory Allocation</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_allocated_areas"><c>allocated_areas</c></seealso>,
+ <seealso marker="#system_info_allocator"><c>allocator</c></seealso>,
+ <seealso marker="#system_info_alloc_util_allocators"><c>alloc_util_allocators</c></seealso>,
+ <seealso marker="#system_info_allocator_sizes"><c>allocator_sizes</c></seealso>,
+ <seealso marker="#system_info_elib_malloc"><c>elib_malloc</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_cpu_topology">
+ <c>CPU Topology</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_cpu_topology"><c>cpu_topology</c></seealso>,
+ <seealso marker="#system_info_logical_processors"><c>logical_processors</c></seealso>,
+ <seealso marker="#system_info_update_cpu_info"><c>update_cpu_info</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_process">
+ <c>Process Information</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_fullsweep_after"><c>fullsweep_after</c></seealso>,
+ <seealso marker="#system_info_garbage_collection"><c>garbage_collection</c></seealso>,
+ <seealso marker="#system_info_heap_sizes"><c>heap_sizes</c></seealso>,
+ <seealso marker="#system_info_heap_type"><c>heap_type</c></seealso>,
+ <seealso marker="#system_info_max_heap_size"><c>max_heap_size</c></seealso>,
+ <seealso marker="#system_info_message_queue_data"><c>message_queue_data</c></seealso>,
+ <seealso marker="#system_info_min_heap_size"><c>min_heap_size</c></seealso>,
+ <seealso marker="#system_info_min_bin_vheap_size"><c>min_bin_vheap_size</c></seealso>,
+ <seealso marker="#system_info_procs"><c>procs</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_limits">
+ <c>System Limits</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_atom_count"><c>atom_count</c></seealso>,
+ <seealso marker="#system_info_atom_limit"><c>atom_limit</c></seealso>,
+ <seealso marker="#system_info_ets_count"><c>ets_count</c></seealso>,
+ <seealso marker="#system_info_ets_limit"><c>ets_limit</c></seealso>,
+ <seealso marker="#system_info_port_count"><c>port_count</c></seealso>,
+ <seealso marker="#system_info_port_limit"><c>port_limit</c></seealso>,
+ <seealso marker="#system_info_process_count"><c>process_count</c></seealso>,
+ <seealso marker="#system_info_process_limit"><c>process_limit</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_time">
+ <c>System Time</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_end_time"><c>end_time</c></seealso>,
+ <seealso marker="#system_info_os_monotonic_time_source"><c>os_monotonic_time_source</c></seealso>,
+ <seealso marker="#system_info_os_system_time_source"><c>os_system_time_source</c></seealso>,
+ <seealso marker="#system_info_start_time"><c>start_time</c></seealso>,
+ <seealso marker="#system_info_time_correction"><c>time_correction</c></seealso>,
+ <seealso marker="#system_info_time_offset"><c>time_offset</c></seealso>,
+ <seealso marker="#system_info_time_warp_mode"><c>time_warp_mode</c></seealso>,
+ <seealso marker="#system_info_tolerant_timeofday"><c>tolerant_timeofday</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_scheduler">
+ <c>Scheduler Information</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_dirty_cpu_schedulers"><c>dirty_cpu_schedulers</c></seealso>,
+ <seealso marker="#system_info_dirty_cpu_schedulers_online"><c>dirty_cpu_schedulers_online</c></seealso>,
+ <seealso marker="#system_info_dirty_io_schedulers"><c>dirty_io_schedulers</c></seealso>,
+ <seealso marker="#system_info_multi_scheduling"><c>multi_scheduling</c></seealso>,
+ <seealso marker="#system_info_multi_scheduling_blockers"><c>multi_scheduling_blockers</c></seealso>,
+ <seealso marker="#system_info_normal_multi_scheduling_blockers"><c>normal_multi_scheduling_blockers</c></seealso>,
+ <seealso marker="#system_info_scheduler_bind_type"><c>scheduler_bind_type</c></seealso>,
+ <seealso marker="#system_info_scheduler_bindings"><c>scheduler_bindings</c></seealso>,
+ <seealso marker="#system_info_scheduler_id"><c>scheduler_id</c></seealso>,
+ <seealso marker="#system_info_schedulers"><c>schedulers</c></seealso>,
+ <seealso marker="#system_info_smp_support"><c>smp_support</c></seealso>,
+ <seealso marker="#system_info_threads"><c>threads</c></seealso>,
+ <seealso marker="#system_info_thread_pool_size"><c>thread_pool_size</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_dist">
+ <c>Distribution Information</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_creation"><c>creation</c></seealso>,
+ <seealso marker="#system_info_delayed_node_table_gc"><c>delayed_node_table_gc</c></seealso>,
+ <seealso marker="#system_info_dist"><c>dist</c></seealso>,
+ <seealso marker="#system_info_dist_buf_busy_limit"><c>dist_buf_busy_limit</c></seealso>,
+ <seealso marker="#system_info_dist_ctrl"><c>dist_ctrl</c></seealso>
+ </p>
+ </item>
+ <tag><seealso marker="#system_info_misc">
+ <c>System Information</c></seealso></tag>
+ <item>
+ <p>
+ <seealso marker="#system_info_build_type"><c>build_type</c></seealso>,
+ <seealso marker="#system_info_c_compiler_used"><c>c_compiler_used</c></seealso>,
+ <seealso marker="#system_info_check_io"><c>check_io</c></seealso>,
+ <seealso marker="#system_info_compat_rel"><c>compat_rel</c></seealso>,
+ <seealso marker="#system_info_debug_compiled"><c>debug_compiled</c></seealso>,
+ <seealso marker="#system_info_driver_version"><c>driver_version</c></seealso>,
+ <seealso marker="#system_info_dynamic_trace"><c>dynamic_trace</c></seealso>,
+ <seealso marker="#system_info_dynamic_trace_probes"><c>dynamic_trace_probes</c></seealso>,
+ <seealso marker="#system_info_info"><c>info</c></seealso>,
+ <seealso marker="#system_info_kernel_poll"><c>kernel_poll</c></seealso>,
+ <seealso marker="#system_info_loaded"><c>loaded</c></seealso>,
+ <seealso marker="#system_info_machine"><c>machine</c></seealso>,
+ <seealso marker="#system_info_modified_timing_level"><c>modified_timing_level</c></seealso>,
+ <seealso marker="#system_info_nif_version"><c>nif_version</c></seealso>,
+ <seealso marker="#system_info_otp_release"><c>otp_release</c></seealso>,
+ <seealso marker="#system_info_port_parallelism"><c>port_parallelism</c></seealso>,
+ <seealso marker="#system_info_system_version"><c>system_version</c></seealso>,
+ <seealso marker="#system_info_system_architecture"><c>system_architecture</c></seealso>,
+ <seealso marker="#system_info_trace_control_word"><c>trace_control_word</c></seealso>,
+ <seealso marker="#system_info_version"><c>version</c></seealso>,
+ <seealso marker="#system_info_wordsize"><c>wordsize</c></seealso>
+ </p>
+ </item>
+ </taglist>
+ </desc>
+ </func>
+
+ <func>
+ <name name="system_info" arity="1" clause_i="1"
+ anchor="system_info_allocator"/> <!-- allocated_areas -->
+ <name name="system_info" arity="1" clause_i="2"/> <!-- allocator -->
+ <name name="system_info" arity="1" clause_i="3"/> <!-- {allocator, _} -->
+ <name name="system_info" arity="1" clause_i="4"/> <!-- alloc_util_allocators -->
+ <name name="system_info" arity="1" clause_i="5"/> <!-- {allocator_sizes, _} -->
+ <name name="system_info" arity="1" clause_i="27"/> <!-- elib_malloc -->
<fsummary>Information about the system allocators.</fsummary>
<type variable="Allocator" name_i="2"/>
<type variable="Version" name_i="2"/>
@@ -7317,12 +7730,13 @@ ok
<type variable="Alloc" name_i="3"/>
<desc>
<marker id="system_info_allocator_tags"></marker>
- <p>Returns various information about the allocators of the
- current system (emulator) as specified by
+ <p>Returns various information about the memory allocators
+ of the current system (emulator) as specified by
<c><anno>Item</anno></c>:</p>
<marker id="system_info_allocated_areas"></marker>
<taglist>
- <tag><c>allocated_areas</c></tag>
+ <tag><marker id="system_info_allocated_areas"/>
+ <c>allocated_areas</c></tag>
<item>
<p>Returns a list of tuples with information about
miscellaneous allocated memory areas.</p>
@@ -7344,9 +7758,9 @@ ok
<seealso marker="#memory/0">
<c>erlang:memory/0,1</c></seealso>.</p>
</item>
- <tag><c>allocator</c></tag>
+ <tag><marker id="system_info_allocator"/>
+ <c>allocator</c></tag>
<item>
- <marker id="system_info_allocator"></marker>
<p>Returns <c>{<anno>Allocator</anno>, <anno>Version</anno>,
<anno>Features</anno>, <anno>Settings</anno></c>, where:</p>
<list type="bulleted">
@@ -7379,19 +7793,9 @@ ok
<seealso marker="erts:erts_alloc#flags">
<c>erts_alloc(3)</c></seealso>.</p>
</item>
- <tag><c>alloc_util_allocators</c></tag>
- <item>
- <marker id="system_info_alloc_util_allocators"></marker>
- <p>Returns a list of the names of all allocators using
- the ERTS internal <c>alloc_util</c> framework
- as atoms. For more information, see section
- <seealso marker="erts:erts_alloc#alloc_util">The
- alloc_util framework</seealso>
- in <c>erts_alloc(3)</c>.</p>
- </item>
- <tag><c>{allocator, <anno>Alloc</anno>}</c></tag>
+ <tag><marker id="system_info_allocator_tuple"></marker>
+ <c>{allocator, <anno>Alloc</anno>}</c></tag>
<item>
- <marker id="system_info_allocator_tuple"></marker>
<p>Returns information about the specified allocator.
As from ERTS 5.6.1, the return value is a list
of <c>{instance, InstanceNo, InstanceInfo}</c> tuples,
@@ -7436,9 +7840,19 @@ ok
values. The first value is the memory pool size and
the second value is the used memory size.</p>
</item>
- <tag><c>{allocator_sizes, <anno>Alloc</anno>}</c></tag>
+ <tag><marker id="system_info_alloc_util_allocators"/>
+ <c>alloc_util_allocators</c></tag>
+ <item>
+ <p>Returns a list of the names of all allocators using
+ the ERTS internal <c>alloc_util</c> framework
+ as atoms. For more information, see section
+ <seealso marker="erts:erts_alloc#alloc_util">The
+ alloc_util framework</seealso>
+ in <c>erts_alloc(3)</c>.</p>
+ </item>
+ <tag><marker id="system_info_allocator_sizes"/>
+ <c>{allocator_sizes, <anno>Alloc</anno>}</c></tag>
<item>
- <marker id="system_info_allocator_sizes"></marker>
<p>Returns various size information for the specified
allocator. The information returned is a subset of the
information returned by
@@ -7446,13 +7860,23 @@ ok
<c>erlang:system_info({allocator,
<anno>Alloc</anno>})</c></seealso>.</p>
</item>
+ <tag><marker id="system_info_elib_malloc"/>
+ <c>elib_malloc</c></tag>
+ <item>
+ <p>This option will be removed in a future release.
+ The return value will always be <c>false</c>, as the
+ <c>elib_malloc</c> allocator has been removed.</p>
+ </item>
</taglist>
</desc>
</func>
<func>
- <name name="system_info" arity="1" clause_i="12"/>
- <name name="system_info" arity="1" clause_i="13"/>
+ <name name="system_info" arity="1" clause_i="12"
+ anchor="system_info_cpu_topology"/> <!-- cpu_topology -->
+ <name name="system_info" arity="1" clause_i="13"/> <!-- {cpu_topology, _} -->
+ <name name="system_info" arity="1" clause_i="38"/> <!-- logical_processors -->
+ <name name="system_info" arity="1" clause_i="73"/> <!-- update_cpu_info -->
<fsummary>Information about the CPU topology of the system.</fsummary>
<type name="cpu_topology"/>
<type name="level_entry"/>
@@ -7479,12 +7903,12 @@ ok
</type_desc>
<desc>
<marker id="system_info_cpu_topology_tags"></marker>
- <marker id="system_info_cpu_topology"></marker>
<p>Returns various information about the CPU topology of
the current system (emulator) as specified by
<c><anno>Item</anno></c>:</p>
<taglist>
- <tag><c>cpu_topology</c></tag>
+ <tag><marker id="system_info_cpu_topology"/>
+ <c>cpu_topology</c></tag>
<item>
<p>Returns the <c><anno>CpuTopology</anno></c> currently used by
the emulator. The CPU topology is used when binding schedulers
@@ -7547,31 +7971,89 @@ ok
<seealso marker="#system_info_cpu_topology">
<c>cpu_topology</c></seealso>.</p>
</item>
+ <tag><marker id="system_info_logical_processors"/>
+ <c>logical_processors</c></tag>
+ <item>
+ <p>Returns the detected number of logical processors configured
+ in the system. The return value is either an integer, or
+ the atom <c>unknown</c> if the emulator cannot
+ detect the configured logical processors.</p>
+ </item>
+ <tag><marker id="system_info_logical_processors_available"/>
+ <c>logical_processors_available</c></tag>
+ <item>
+ <p>Returns the detected number of logical processors available
+ to the Erlang runtime system. The return value is either an
+ integer, or the atom <c>unknown</c> if the emulator
+ cannot detect the available logical processors. The number
+ of available logical processors is less than or equal to
+ the number of <seealso marker="#system_info_logical_processors_online">
+ logical processors online</seealso>.</p>
+ </item>
+ <tag><marker id="system_info_logical_processors_online"/>
+ <c>logical_processors_online</c></tag>
+ <item>
+ <p>Returns the detected number of logical processors online on
+ the system. The return value is either an integer,
+ or the atom <c>unknown</c> if the emulator cannot
+ detect logical processors online. The number of logical
+ processors online is less than or equal to the number of
+ <seealso marker="#system_info_logical_processors">logical processors
+ configured</seealso>.</p>
+ </item>
+ <tag><marker id="system_info_update_cpu_info"/>
+ <c>update_cpu_info</c></tag>
+ <item>
+ <p>The runtime system rereads the CPU information available
+ and updates its internally stored information about the
+ <seealso marker="#system_info_cpu_topology_detected">detected
+ CPU topology</seealso> and the number of logical processors
+ <seealso marker="#system_info_logical_processors">configured</seealso>,
+ <seealso marker="#system_info_logical_processors_online">online</seealso>,
+ and <seealso marker="#system_info_logical_processors_available">
+ available</seealso>.</p>
+ <p>If the CPU information has changed since the last time
+ it was read, the atom <c>changed</c> is returned, otherwise
+ the atom <c>unchanged</c>. If the CPU information has changed,
+ you probably want to
+ <seealso marker="#system_flag_schedulers_online">adjust the
+ number of schedulers online</seealso>. You typically want
+ to have as many schedulers online as
+ <seealso marker="#system_info_logical_processors_available">logical
+ processors available</seealso>.</p>
+ </item>
</taglist>
</desc>
</func>
<func>
- <name name="system_info" arity="1" clause_i="29"/>
- <name name="system_info" arity="1" clause_i="30"/>
- <name name="system_info" arity="1" clause_i="38"/>
- <name name="system_info" arity="1" clause_i="39"/>
- <name name="system_info" arity="1" clause_i="40"/>
- <name name="system_info" arity="1" clause_i="41"/>
+ <name name="system_info" arity="1" clause_i="31"
+ anchor="system_info_process"/> <!-- fullsweep_after -->
+ <name name="system_info" arity="1" clause_i="32"/> <!-- garbage_collection -->
+ <name name="system_info" arity="1" clause_i="33"/> <!-- heap_sizes -->
+ <name name="system_info" arity="1" clause_i="34"/> <!-- heap_type -->
+ <name name="system_info" arity="1" clause_i="40"/> <!-- max_heap_size -->
+ <name name="system_info" arity="1" clause_i="41"/> <!-- message_queue_data -->
+ <name name="system_info" arity="1" clause_i="42"/> <!-- min_heap_size -->
+ <name name="system_info" arity="1" clause_i="43"/> <!-- min_bin_vheap_size -->
+ <name name="system_info" arity="1" clause_i="57"/> <!-- procs -->
<fsummary>Information about the default process heap settings.</fsummary>
<type name="message_queue_data"/>
<type name="max_heap_size"/>
<desc>
+ <marker id="system_info_process_tags"/>
<p>Returns information about the default process heap settings:</p>
<taglist>
- <tag><c>fullsweep_after</c></tag>
+ <tag><marker id="system_info_fullsweep_after"/>
+ <c>fullsweep_after</c></tag>
<item>
<p>Returns <c>{fullsweep_after, integer() >= 0}</c>, which is
the <c>fullsweep_after</c> garbage collection setting used
by default. For more information, see
<c>garbage_collection</c> described below.</p>
</item>
- <tag><c>garbage_collection</c></tag>
+ <tag><marker id="system_info_garbage_collection"/>
+ <c>garbage_collection</c></tag>
<item>
<p>Returns a list describing the default garbage collection
settings. A process spawned on the local node by a
@@ -7584,7 +8066,30 @@ ok
can spawn a process that does not use the default
settings.</p>
</item>
- <tag><c>max_heap_size</c></tag>
+ <tag><marker id="system_info_heap_sizes"/>
+ <c>heap_sizes</c></tag>
+ <item>
+ <p>Returns a list of integers representing valid heap sizes
+ in words. All Erlang heaps are sized from sizes in this
+ list.</p>
+ </item>
+ <tag><marker id="system_info_heap_type"/>
+ <c>heap_type</c></tag>
+ <item>
+ <p>Returns the heap type used by the current emulator. One
+ heap type exists:</p>
+ <taglist>
+ <tag><c>private</c></tag>
+ <item>
+ Each process has a heap reserved for its use and no
+ references between heaps of different processes are
+ allowed. Messages passed between processes are copied
+ between heaps.
+ </item>
+ </taglist>
+ </item>
+ <tag><marker id="system_info_max_heap_size"/>
+ <c>max_heap_size</c></tag>
<item>
<p>Returns <c>{max_heap_size, <anno>MaxHeapSize</anno>}</c>,
where <c><anno>MaxHeapSize</anno></c> is the current
@@ -7612,173 +8117,366 @@ ok
<seealso marker="#process_flag_message_queue_data">
<c>process_flag(message_queue_data, MQD)</c></seealso>.</p>
</item>
- <tag><c>min_heap_size</c></tag>
+ <tag><marker id="system_info_min_heap_size"/>
+ <c>min_heap_size</c></tag>
<item>
<p>Returns <c>{min_heap_size, <anno>MinHeapSize</anno>}</c>,
where <c><anno>MinHeapSize</anno></c> is the current
system-wide minimum heap size for spawned processes.</p>
</item>
- <tag><c>min_bin_vheap_size</c></tag>
+ <tag><marker id="system_info_min_bin_vheap_size"/>
+ <c>min_bin_vheap_size</c></tag>
<item>
<p>Returns <c>{min_bin_vheap_size,
<anno>MinBinVHeapSize</anno>}</c>, where
<c><anno>MinBinVHeapSize</anno></c> is the current system-wide
minimum binary virtual heap size for spawned processes.</p>
</item>
+ <tag><marker id="system_info_procs"/>
+ <c>procs</c></tag>
+ <item>
+ <p>Returns a binary containing a string of process and port
+ information formatted as in Erlang crash dumps. For more
+ information, see section <seealso marker="erts:crash_dump">
+ How to interpret the Erlang crash dumps</seealso>
+ in the User's Guide.</p>
+ </item>
</taglist>
</desc>
</func>
<func>
- <name name="system_info" arity="1" clause_i="6"/>
- <name name="system_info" arity="1" clause_i="7"/>
- <name name="system_info" arity="1" clause_i="8"/>
- <name name="system_info" arity="1" clause_i="9"/>
- <name name="system_info" arity="1" clause_i="10"/>
- <name name="system_info" arity="1" clause_i="11"/>
- <name name="system_info" arity="1" clause_i="14"/>
- <name name="system_info" arity="1" clause_i="15"/>
- <name name="system_info" arity="1" clause_i="16"/>
- <name name="system_info" arity="1" clause_i="17"/>
- <name name="system_info" arity="1" clause_i="18"/>
- <name name="system_info" arity="1" clause_i="19"/>
- <name name="system_info" arity="1" clause_i="20"/>
- <name name="system_info" arity="1" clause_i="21"/>
- <name name="system_info" arity="1" clause_i="22"/>
- <name name="system_info" arity="1" clause_i="23"/>
- <name name="system_info" arity="1" clause_i="24"/>
- <name name="system_info" arity="1" clause_i="25"/>
- <name name="system_info" arity="1" clause_i="26"/>
- <name name="system_info" arity="1" clause_i="27"/>
- <name name="system_info" arity="1" clause_i="28"/>
- <name name="system_info" arity="1" clause_i="31"/>
- <name name="system_info" arity="1" clause_i="32"/>
- <name name="system_info" arity="1" clause_i="33"/>
- <name name="system_info" arity="1" clause_i="34"/>
- <name name="system_info" arity="1" clause_i="35"/>
- <name name="system_info" arity="1" clause_i="36"/>
- <name name="system_info" arity="1" clause_i="37"/>
- <name name="system_info" arity="1" clause_i="42"/>
- <name name="system_info" arity="1" clause_i="43"/>
- <name name="system_info" arity="1" clause_i="44"/>
- <name name="system_info" arity="1" clause_i="45"/>
- <name name="system_info" arity="1" clause_i="46"/>
- <name name="system_info" arity="1" clause_i="47"/>
- <name name="system_info" arity="1" clause_i="48"/>
- <name name="system_info" arity="1" clause_i="49"/>
- <name name="system_info" arity="1" clause_i="50"/>
- <name name="system_info" arity="1" clause_i="51"/>
- <name name="system_info" arity="1" clause_i="52"/>
- <name name="system_info" arity="1" clause_i="53"/>
- <name name="system_info" arity="1" clause_i="54"/>
- <name name="system_info" arity="1" clause_i="55"/>
- <name name="system_info" arity="1" clause_i="56"/>
- <name name="system_info" arity="1" clause_i="57"/>
- <name name="system_info" arity="1" clause_i="58"/>
- <name name="system_info" arity="1" clause_i="59"/>
- <name name="system_info" arity="1" clause_i="60"/>
- <name name="system_info" arity="1" clause_i="61"/>
- <name name="system_info" arity="1" clause_i="62"/>
- <name name="system_info" arity="1" clause_i="63"/>
- <name name="system_info" arity="1" clause_i="64"/>
- <name name="system_info" arity="1" clause_i="65"/>
- <name name="system_info" arity="1" clause_i="66"/>
- <name name="system_info" arity="1" clause_i="67"/>
- <name name="system_info" arity="1" clause_i="68"/>
- <name name="system_info" arity="1" clause_i="69"/>
- <name name="system_info" arity="1" clause_i="70"/>
- <name name="system_info" arity="1" clause_i="71"/>
- <fsummary>Information about the system.</fsummary>
+ <name name="system_info" arity="1" clause_i="6" anchor="system_info_limits"/> <!-- atom_count -->
+ <name name="system_info" arity="1" clause_i="7"/> <!-- atom_limit -->
+ <name name="system_info" arity="1" clause_i="29"/> <!-- ets_count -->
+ <name name="system_info" arity="1" clause_i="30"/> <!-- ets_limit -->
+ <name name="system_info" arity="1" clause_i="53"/> <!-- port_count -->
+ <name name="system_info" arity="1" clause_i="54"/> <!-- port_limit -->
+ <name name="system_info" arity="1" clause_i="55"/> <!-- process_count -->
+ <name name="system_info" arity="1" clause_i="56"/> <!-- process_limit -->
+ <fsummary>Information about various system limits.</fsummary>
<desc>
- <p>Returns various information about the current system
- (emulator) as specified by <c><anno>Item</anno></c>:</p>
+ <marker id="system_info_limits"/>
+ <p>Returns information about the current system
+ (emulator) limits as specified by <c><anno>Item</anno></c>:</p>
<taglist>
- <tag><c>atom_count</c></tag>
+ <tag><marker id="system_info_atom_count"/>
+ <c>atom_count</c></tag>
<item>
- <marker id="system_info_atom_count"></marker>
<p>Returns the number of atoms currently existing at the
- local node. The value is given as an integer.</p>
+ local node. The value is given as an integer.</p>
</item>
- <tag><c>atom_limit</c></tag>
+ <tag><marker id="system_info_atom_limit"/>
+ <c>atom_limit</c></tag>
<item>
- <marker id="system_info_atom_limit"></marker>
<p>Returns the maximum number of atoms allowed.
- This limit can be increased at startup by passing
- command-line flag
- <seealso marker="erts:erl#+t"><c>+t</c></seealso> to
- <c>erl(1)</c>.
+ This limit can be increased at startup by passing
+ command-line flag
+ <seealso marker="erts:erl#+t"><c>+t</c></seealso> to
+ <c>erl(1)</c>.
</p>
</item>
- <tag><c>build_type</c></tag>
+ <tag><marker id="system_info_ets_count"/>
+ <c>ets_count</c></tag>
<item>
- <p>Returns an atom describing the build type of the runtime
- system. This is normally the atom <c>opt</c> for optimized.
- Other possible return values are <c>debug</c>, <c>purify</c>,
- <c>quantify</c>, <c>purecov</c>, <c>gcov</c>, <c>valgrind</c>,
- <c>gprof</c>, and <c>lcnt</c>. Possible return values
- can be added or removed at any time without prior notice.</p>
+ <p>Returns the number of ETS tables currently existing at the
+ local node.</p>
</item>
- <tag><c>c_compiler_used</c></tag>
+ <tag><marker id="system_info_ets_limit"/>
+ <c>ets_limit</c></tag>
<item>
- <p>Returns a two-tuple describing the C compiler used when
- compiling the runtime system. The first element is an
- atom describing the name of the compiler, or <c>undefined</c>
- if unknown. The second element is a term describing the
- version of the compiler, or <c>undefined</c> if unknown.</p>
+ <p>Returns the limit for number of ETS tables. This limit is
+ <seealso marker="stdlib:ets#max_ets_tables">partially obsolete</seealso>
+ and number of tables are only limited by available memory.</p>
</item>
- <tag><c>check_io</c></tag>
+ <tag><marker id="system_info_port_count"/><c>port_count</c></tag>
<item>
- <p>Returns a list containing miscellaneous information
- about the emulators internal I/O checking. Notice that
- the content of the returned list can vary between
- platforms and over time. It is only guaranteed
- that a list is returned.</p>
+ <p>Returns the number of ports currently existing at the
+ local node. The value is given as an integer. This is
+ the same value as returned by
+ <c>length(erlang:ports())</c>, but more efficient.</p>
</item>
- <tag><c>compat_rel</c></tag>
+ <tag><marker id="system_info_port_limit"/>
+ <c>port_limit</c></tag>
<item>
- <p>Returns the compatibility mode of the local node as
- an integer. The integer returned represents the
- Erlang/OTP release that the current emulator has been
- set to be backward compatible with. The compatibility
- mode can be configured at startup by using command-line flag
- <seealso marker="erts:erl#compat_rel"><c>+R</c></seealso> in
- <c>erl(1)</c>.</p>
+ <p>Returns the maximum number of simultaneously existing
+ ports at the local node as an integer. This limit can be
+ configured at startup by using command-line flag
+ <seealso marker="erl#+Q"><c>+Q</c></seealso> in <c>erl(1)</c>.</p>
</item>
- <tag><c>cpu_topology</c></tag>
+ <tag><marker id="system_info_process_count"/>
+ <c>process_count</c></tag>
<item>
- <p>See <seealso
- marker="#system_info_cpu_topology_tags">above</seealso>.</p>
+ <p>Returns the number of processes currently existing at the
+ local node. The value is given as an integer. This is
+ the same value as returned by
+ <c>length(processes())</c>, but more efficient.</p>
</item>
- <tag><c>creation</c></tag>
+ <tag><marker id="system_info_process_limit"/>
+ <c>process_limit</c></tag>
<item>
- <p>Returns the creation of the local node as an integer.
- The creation is changed when a node is restarted. The
- creation of a node is stored in process identifiers, port
- identifiers, and references. This makes it (to some
- extent) possible to distinguish between identifiers from
- different incarnations of a node. The valid
- creations are integers in the range 1..3, but this will
- probably change in a future release. If the node is not
- alive, <c>0</c> is returned.</p>
+ <p>Returns the maximum number of simultaneously existing
+ processes at the local node. The value is given as an
+ integer. This limit can be configured at startup by using
+ command-line flag <seealso marker="erl#+P"><c>+P</c></seealso>
+ in <c>erl(1)</c>.</p>
+ </item>
+ </taglist>
+ </desc>
+ </func>
+
+ <func>
+ <name name="system_info" arity="1" clause_i="26"
+ anchor="system_info_time"/> <!-- end_time -->
+ <name name="system_info" arity="1" clause_i="50"/> <!-- os_monotonic_time_source -->
+ <name name="system_info" arity="1" clause_i="51"/> <!-- os_system_time_source -->
+ <name name="system_info" arity="1" clause_i="63"/> <!-- start_time -->
+ <name name="system_info" arity="1" clause_i="68"/> <!-- time_correction -->
+ <name name="system_info" arity="1" clause_i="69"/> <!-- time_offset -->
+ <name name="system_info" arity="1" clause_i="70"/> <!-- time_warp_mode -->
+ <name name="system_info" arity="1" clause_i="71"/> <!-- tolerant_timeofday -->
+ <fsummary>Information about system time.</fsummary>
+ <desc>
+ <marker id="system_info_time_tags"/>
+ <p>Returns information about the current system
+ (emulator) time as specified by <c><anno>Item</anno></c>:</p>
+ <taglist>
+ <tag><marker id="system_info_end_time"/><c>end_time</c></tag>
+ <item>
+ <p>The last <seealso marker="#monotonic_time/0">Erlang monotonic
+ time</seealso> in <c>native</c>
+ <seealso marker="#type_time_unit">time unit</seealso> that
+ can be represented internally in the current Erlang runtime system
+ instance. The time between the
+ <seealso marker="#system_info_start_time">start time</seealso> and
+ the end time is at least a quarter of a millennium.</p>
</item>
- <tag><c>debug_compiled</c></tag>
+ <tag><marker id="system_info_os_monotonic_time_source"/>
+ <c>os_monotonic_time_source</c></tag>
<item>
- <p>Returns <c>true</c> if the emulator has been
- debug-compiled, otherwise <c>false</c>.</p>
+ <p>Returns a list containing information about the source of
+ <seealso marker="erts:time_correction#OS_Monotonic_Time">OS
+ monotonic time</seealso> that is used by the runtime system.</p>
+ <p>If <c>[]</c> is returned, no OS monotonic time is
+ available. The list contains two-tuples with <c>Key</c>s
+ as first element, and <c>Value</c>s as second element. The
+ order of these tuples is undefined. The following
+ tuples can be part of the list, but more tuples can be
+ introduced in the future:</p>
+ <taglist>
+ <tag><c>{function, Function}</c></tag>
+ <item><p><c>Function</c> is the name of the function
+ used. This tuple always exists if OS monotonic time is
+ available to the runtime system.</p>
+ </item>
+ <tag><c>{clock_id, ClockId}</c></tag>
+ <item><p>This tuple only exists if <c>Function</c>
+ can be used with different clocks. <c>ClockId</c>
+ corresponds to the clock identifier used when calling
+ <c>Function</c>.</p>
+ </item>
+ <tag><c>{resolution, OsMonotonicTimeResolution}</c></tag>
+ <item><p>Highest possible
+ <seealso marker="time_correction#Time_Resolution">
+ resolution</seealso>
+ of current OS monotonic time source as parts per
+ second. If no resolution information can be retrieved
+ from the OS, <c>OsMonotonicTimeResolution</c> is
+ set to the resolution of the time unit of
+ <c>Function</c>s return value. That is, the actual
+ resolution can be lower than
+ <c>OsMonotonicTimeResolution</c>. Notice that
+ the resolution does not say anything about the
+ <seealso marker="time_correction#Time_Accuracy">
+ accuracy</seealso> or whether the
+ <seealso marker="time_correction#Time_Precision">
+ precision</seealso> aligns with the resolution. You do,
+ however, know that the precision is not better than
+ <c>OsMonotonicTimeResolution</c>.</p>
+ </item>
+ <tag><c>{extended, Extended}</c></tag>
+ <item><p><c>Extended</c> equals <c>yes</c> if
+ the range of time values has been extended;
+ otherwise <c>Extended</c> equals <c>no</c>. The
+ range must be extended if <c>Function</c>
+ returns values that wrap fast. This typically
+ is the case when the return value is a 32-bit value.</p>
+ </item>
+ <tag><c>{parallel, Parallel}</c></tag>
+ <item><p><c>Parallel</c> equals <c>yes</c> if
+ <c>Function</c> is called in parallel from multiple
+ threads. If it is not called in parallel, because
+ calls must be serialized, <c>Parallel</c> equals
+ <c>no</c>.</p>
+ </item>
+ <tag><c>{time, OsMonotonicTime}</c></tag>
+ <item><p><c>OsMonotonicTime</c> equals current OS
+ monotonic time in <c>native</c>
+ <seealso marker="#type_time_unit">time unit</seealso>.</p>
+ </item>
+ </taglist>
</item>
- <tag><c>delayed_node_table_gc</c></tag>
+ <tag><marker id="system_info_os_system_time_source"/>
+ <c>os_system_time_source</c></tag>
<item>
- <marker id="system_info_delayed_node_table_gc"></marker>
- <p>Returns the amount of time in seconds garbage collection
- of an entry in a node table is delayed. This limit can be set
- on startup by passing command-line flag
- <seealso marker="erts:erl#+zdntgc"><c>+zdntgc</c></seealso>
- to <c>erl(1)</c>. For more information, see the documentation of
- the command-line flag.</p>
+ <p>Returns a list containing information about the source of
+ <seealso marker="erts:time_correction#OS_System_Time">OS
+ system time</seealso> that is used by the runtime system.</p>
+ <p>The list contains two-tuples with <c>Key</c>s
+ as first element, and <c>Value</c>s as second element. The
+ order if these tuples is undefined. The following
+ tuples can be part of the list, but more tuples can be
+ introduced in the future:</p>
+ <taglist>
+ <tag><c>{function, Function}</c></tag>
+ <item><p><c>Function</c> is the name of the funcion used.</p>
+ </item>
+ <tag><c>{clock_id, ClockId}</c></tag>
+ <item><p>Exists only if <c>Function</c>
+ can be used with different clocks. <c>ClockId</c>
+ corresponds to the clock identifier used when calling
+ <c>Function</c>.</p>
+ </item>
+ <tag><c>{resolution, OsSystemTimeResolution}</c></tag>
+ <item><p>Highest possible
+ <seealso marker="time_correction#Time_Resolution">
+ resolution</seealso>
+ of current OS system time source as parts per
+ second. If no resolution information can be retrieved
+ from the OS, <c>OsSystemTimeResolution</c> is
+ set to the resolution of the time unit of
+ <c>Function</c>s return value. That is, the actual
+ resolution can be lower than
+ <c>OsSystemTimeResolution</c>. Notice that
+ the resolution does not say anything about the
+ <seealso marker="time_correction#Time_Accuracy">
+ accuracy</seealso> or whether the
+ <seealso marker="time_correction#Time_Precision">
+ precision</seealso> do align with the resolution. You do,
+ however, know that the precision is not better than
+ <c>OsSystemTimeResolution</c>.</p>
+ </item>
+ <tag><c>{parallel, Parallel}</c></tag>
+ <item><p><c>Parallel</c> equals <c>yes</c> if
+ <c>Function</c> is called in parallel from multiple
+ threads. If it is not called in parallel, because
+ calls needs to be serialized, <c>Parallel</c> equals
+ <c>no</c>.</p>
+ </item>
+ <tag><c>{time, OsSystemTime}</c></tag>
+ <item><p><c>OsSystemTime</c> equals current OS
+ system time in <c>native</c>
+ <seealso marker="#type_time_unit">time unit</seealso>.</p>
+ </item>
+ </taglist>
+ </item>
+ <tag><marker id="system_info_start_time"/><c>start_time</c></tag>
+ <item>
+ <p>The <seealso marker="#monotonic_time/0">Erlang monotonic
+ time</seealso> in <c>native</c>
+ <seealso marker="#type_time_unit">time unit</seealso> at the
+ time when current Erlang runtime system instance started.</p>
+ <p>See also <seealso marker="#system_info_end_time">
+ <c>erlang:system_info(end_time)</c></seealso>.</p>
+ </item>
+ <tag><marker id="system_info_time_correction"/>
+ <c>time_correction</c></tag>
+ <item>
+ <p>Returns a boolean value indicating whether
+ <seealso marker="time_correction#Time_Correction">
+ time correction</seealso> is enabled or not.</p>
+ </item>
+ <tag><marker id="system_info_time_offset"/>
+ <c>time_offset</c></tag>
+ <item>
+ <p>Returns the state of the time offset:</p>
+ <taglist>
+ <tag><c>preliminary</c></tag>
+ <item>
+ <p>The time offset is preliminary, and will be changed
+ and finalized later. The preliminary time offset
+ is used during the preliminary phase of the
+ <seealso marker="time_correction#Single_Time_Warp_Mode">
+ single time warp mode</seealso>.</p>
+ </item>
+ <tag><c>final</c></tag>
+ <item>
+ <p>The time offset is final. This either because
+ <seealso marker="time_correction#No_Time_Warp_Mode">
+ no time warp mode</seealso> is used, or because the time
+ offset have been finalized when
+ <seealso marker="time_correction#Single_Time_Warp_Mode">
+ single time warp mode</seealso> is used.</p>
+ </item>
+ <tag><c>volatile</c></tag>
+ <item>
+ <p>The time offset is volatile. That is, it can
+ change at any time. This is because
+ <seealso marker="time_correction#Multi_Time_Warp_Mode">
+ multi-time warp mode</seealso> is used.</p>
+ </item>
+ </taglist>
+ </item>
+ <tag><marker id="system_info_time_warp_mode"/>
+ <c>time_warp_mode</c></tag>
+ <item>
+ <p>Returns a value identifying the
+ <seealso marker="time_correction#Time_Warp_Modes">
+ time warp mode</seealso> that is used:</p>
+ <taglist>
+ <tag><c>no_time_warp</c></tag>
+ <item>The <seealso marker="time_correction#No_Time_Warp_Mode">
+ no time warp mode</seealso> is used.
+ </item>
+ <tag><c>single_time_warp</c></tag>
+ <item>The <seealso marker="time_correction#Single_Time_Warp_Mode">
+ single time warp mode</seealso> is used.
+ </item>
+ <tag><c>multi_time_warp</c></tag>
+ <item>The <seealso marker="time_correction#Multi_Time_Warp_Mode">
+ multi-time warp mode</seealso> is used.
+ </item>
+ </taglist>
+ </item>
+ <tag><marker id="system_info_tolerant_timeofday"/>
+ <c>tolerant_timeofday</c></tag>
+ <item>
+ <p>Returns whether a pre ERTS 7.0 backwards compatible
+ compensation for sudden changes of system time is <c>enabled</c>
+ or <c>disabled</c>. Such compensation is <c>enabled</c> when the
+ <seealso marker="#system_info_time_offset">time offset</seealso>
+ is <c>final</c>, and
+ <seealso marker="#system_info_time_correction">
+ time correction</seealso> is enabled.</p>
</item>
- <tag><c>dirty_cpu_schedulers</c></tag>
+ </taglist>
+ </desc>
+ </func>
+
+ <func>
+ <name name="system_info" arity="1" clause_i="17"
+ anchor="system_info_scheduler"/> <!-- dirty_cpu_schedulers -->
+ <name name="system_info" arity="1" clause_i="18"/> <!-- dirty_cpu_schedulers_online -->
+ <name name="system_info" arity="1" clause_i="19"/> <!-- dirty_io_schedulers -->
+ <name name="system_info" arity="1" clause_i="45"/> <!-- multi_scheduling -->
+ <name name="system_info" arity="1" clause_i="46"/> <!-- multi_scheduling_blockers -->
+ <name name="system_info" arity="1" clause_i="49"/> <!-- normal_multi_scheduling_blockers -->
+ <name name="system_info" arity="1" clause_i="58"/> <!-- scheduler_bind_type -->
+ <name name="system_info" arity="1" clause_i="59"/> <!-- scheduler_bindings -->
+ <name name="system_info" arity="1" clause_i="60"/> <!-- scheduler_id -->
+ <name name="system_info" arity="1" clause_i="61"/> <!-- schedulers -->
+ <name name="system_info" arity="1" clause_i="62"/> <!-- smp_support -->
+ <name name="system_info" arity="1" clause_i="66"/> <!-- threads -->
+ <name name="system_info" arity="1" clause_i="67"/> <!-- thread_pool_size -->
+ <fsummary>Information about system schedulers.</fsummary>
+ <desc>
+ <marker id="system_info_scheduler_tags"/>
+ <p>Returns information about schedulers, scheduling and threads in the
+ current system as specified by <c><anno>Item</anno></c>:</p>
+ <taglist>
+ <tag><marker id="system_info_dirty_cpu_schedulers"/>
+ <c>dirty_cpu_schedulers</c></tag>
<item>
- <marker id="system_info_dirty_cpu_schedulers"></marker>
<p>Returns the number of dirty CPU scheduler threads used by
the emulator. Dirty CPU schedulers execute CPU-bound
native functions, such as NIFs, linked-in driver code,
@@ -7809,9 +8507,9 @@ ok
<c>erlang:system_flag(schedulers_online,
SchedulersOnline)</c></seealso>.</p>
</item>
- <tag><c>dirty_cpu_schedulers_online</c></tag>
+ <tag><marker id="system_info_dirty_cpu_schedulers_online"/>
+ <c>dirty_cpu_schedulers_online</c></tag>
<item>
- <marker id="system_info_dirty_cpu_schedulers_online"></marker>
<p>Returns the number of dirty CPU schedulers online.
The return value satisfies
<c><![CDATA[1 <= DirtyCPUSchedulersOnline <= N]]></c>,
@@ -7833,9 +8531,9 @@ ok
<c>erlang:system_flag(dirty_cpu_schedulers_online,
DirtyCPUSchedulersOnline)</c></seealso>.</p>
</item>
- <tag><c>dirty_io_schedulers</c></tag>
+ <tag><marker id="system_info_dirty_io_schedulers"/>
+ <c>dirty_io_schedulers</c></tag>
<item>
- <marker id="system_info_dirty_io_schedulers"></marker>
<p>Returns the number of dirty I/O schedulers as an integer.
Dirty I/O schedulers execute I/O-bound native functions,
such as NIFs and linked-in driver code, which cannot be
@@ -7852,195 +8550,14 @@ ok
<c>erlang:system_flag(dirty_cpu_schedulers_online,
DirtyCPUSchedulersOnline)</c></seealso>.</p>
</item>
- <tag><c>dist</c></tag>
- <item>
- <p>Returns a binary containing a string of distribution
- information formatted as in Erlang crash dumps. For more
- information, see section <seealso marker="erts:crash_dump">
- How to interpret the Erlang crash dumps</seealso>
- in the User's Guide.</p>
- </item>
- <tag><c>dist_buf_busy_limit</c></tag>
- <item>
- <marker id="system_info_dist_buf_busy_limit"></marker>
- <p>Returns the value of the distribution buffer busy limit
- in bytes. This limit can be set at startup by passing
- command-line flag
- <seealso marker="erts:erl#+zdbbl"><c>+zdbbl</c></seealso>
- to <c>erl(1)</c>.</p>
- </item>
- <tag><c>dist_ctrl</c></tag>
- <item>
- <p>Returns a list of tuples
- <c>{<anno>Node</anno>, <anno>ControllingEntity</anno>}</c>,
- one entry for each connected remote node.
- <c><anno>Node</anno></c> is the node name
- and <c><anno>ControllingEntity</anno></c> is the port or process
- identifier responsible for the communication to that node.
- More specifically, <c><anno>ControllingEntity</anno></c> for
- nodes connected through TCP/IP (the normal case) is the socket
- used in communication with the specific node.</p>
- </item>
- <tag><c>driver_version</c></tag>
- <item>
- <p>Returns a string containing the Erlang driver version
- used by the runtime system. It has the form
- <seealso marker="erts:erl_driver#version_management">
- "&lt;major ver&gt;.&lt;minor ver&gt;"</seealso>.</p>
- </item>
- <tag><c>dynamic_trace</c></tag>
- <item>
- <p>Returns an atom describing the dynamic trace framework
- compiled into the virtual machine. It can be
- <c>dtrace</c>, <c>systemtap</c>, or <c>none</c>. For a
- commercial or standard build, it is always <c>none</c>.
- The other return values indicate a custom configuration
- (for example, <c>./configure --with-dynamic-trace=dtrace</c>).
- For more information about dynamic tracing, see
- <seealso marker="runtime_tools:dyntrace">
- <c>dyntrace(3)</c></seealso> manual page and the
- <c>README.dtrace</c>/<c>README.systemtap</c> files in the
- Erlang source code top directory.</p>
- </item>
- <tag><c>dynamic_trace_probes</c></tag>
- <item>
- <p>Returns a <c>boolean()</c> indicating if dynamic trace
- probes (<c>dtrace</c> or <c>systemtap</c>) are built into
- the emulator. This can only be <c>true</c> if the virtual
- machine was built for dynamic tracing (that is,
- <c>system_info(dynamic_trace)</c> returns
- <c>dtrace</c> or <c>systemtap</c>).</p>
- </item>
- <tag><marker id="system_info_end_time"/><c>end_time</c></tag>
- <item>
- <p>The last <seealso marker="#monotonic_time/0">Erlang monotonic
- time</seealso> in <c>native</c>
- <seealso marker="#type_time_unit">time unit</seealso> that
- can be represented internally in the current Erlang runtime system
- instance. The time between the
- <seealso marker="#system_info_start_time">start time</seealso> and
- the end time is at least a quarter of a millennium.</p>
- </item>
- <tag><c>elib_malloc</c></tag>
- <item>
- <p>This option will be removed in a future release.
- The return value will always be <c>false</c>, as the
- <c>elib_malloc</c> allocator has been removed.</p>
- </item>
- <tag><marker id="system_info_eager_check_io"/>
- <c>eager_check_io</c></tag>
- <item>
- <p>Returns the value of command-line flag
- <seealso marker="erl#+secio"><c>+secio</c></seealso> in
- <c>erl(1)</c>, which is either <c>true</c> or <c>false</c>.
- For information about the different values, see the
- documentation of the command-line flag.</p>
- </item>
- <tag><c>ets_limit</c></tag>
- <item>
- <p>Returns the maximum number of ETS tables allowed. This
- limit can be increased at startup by passing
- command-line flag
- <seealso marker="erts:erl#+e"><c>+e</c></seealso> to
- <c>erl(1)</c> or by setting environment variable
- <c>ERL_MAX_ETS_TABLES</c> before starting the Erlang
- runtime system.</p>
- </item>
- <tag><c>heap_sizes</c></tag>
- <item>
- <p>Returns a list of integers representing valid heap sizes
- in words. All Erlang heaps are sized from sizes in this
- list.</p>
- </item>
- <tag><c>heap_type</c></tag>
- <item>
- <p>Returns the heap type used by the current emulator. One
- heap type exists:</p>
- <taglist>
- <tag><c>private</c></tag>
- <item>
- Each process has a heap reserved for its use and no
- references between heaps of different processes are
- allowed. Messages passed between processes are copied
- between heaps.
- </item>
- </taglist>
- </item>
- <tag><c>info</c></tag>
- <item>
- <p>Returns a binary containing a string of miscellaneous
- system information formatted as in Erlang crash dumps.
- For more information, see section
- <seealso marker="erts:crash_dump">
- How to interpret the Erlang crash dumps</seealso>
- in the User's Guide.</p>
- </item>
- <tag><c>kernel_poll</c></tag>
- <item>
- <p>Returns <c>true</c> if the emulator uses some kind of
- kernel-poll implementation, otherwise <c>false</c>.</p>
- </item>
- <tag><c>loaded</c></tag>
- <item>
- <p>Returns a binary containing a string of loaded module
- information formatted as in Erlang crash dumps. For more
- information, see section
- <seealso marker="erts:crash_dump">How to interpret the Erlang
- crash dumps</seealso> in the User's Guide.</p>
- </item>
- <tag><c>logical_processors</c></tag>
- <item>
- <marker id="logical_processors"></marker>
- <p>Returns the detected number of logical processors configured
- in the system. The return value is either an integer, or
- the atom <c>unknown</c> if the emulator cannot
- detect the configured logical processors.</p>
- </item>
- <tag><c>logical_processors_available</c></tag>
- <item>
- <marker id="logical_processors_available"></marker>
- <p>Returns the detected number of logical processors available
- to the Erlang runtime system. The return value is either an
- integer, or the atom <c>unknown</c> if the emulator
- cannot detect the available logical processors. The number
- of available logical processors is less than or equal to
- the number of <seealso marker="#logical_processors_online">
- logical processors online</seealso>.</p>
- </item>
- <tag><c>logical_processors_online</c></tag>
- <item>
- <marker id="logical_processors_online"></marker>
- <p>Returns the detected number of logical processors online on
- the system. The return value is either an integer,
- or the atom <c>unknown</c> if the emulator cannot
- detect logical processors online. The number of logical
- processors online is less than or equal to the number of
- <seealso marker="#logical_processors">logical processors
- configured</seealso>.</p>
- </item>
- <tag><c>machine</c></tag>
+ <tag><marker id="system_info_multi_scheduling"/>
+ <c>multi_scheduling</c></tag>
<item>
- <p>Returns a string containing the Erlang machine name.</p>
- </item>
- <tag><c>modified_timing_level</c></tag>
- <item>
- <p>Returns the modified timing-level (an integer) if
- modified timing is enabled, otherwise <c>undefined</c>.
- For more information about modified timing, see
- command-line flag
- <seealso marker="erts:erl#+T"><c>+T</c></seealso>
- in <c>erl(1)</c></p>
- </item>
- <tag><c>multi_scheduling</c></tag>
- <item>
- <marker id="system_info_multi_scheduling"></marker>
<p>Returns one of the following:</p>
<taglist>
<tag><c>disabled</c></tag>
<item>
- <p>The emulator has only one scheduler thread. The
- emulator does not have SMP support, or have been
- started with only one scheduler thread.</p>
+ <p>The emulator has been started with only one scheduler thread.</p>
</item>
<tag><c>blocked</c></tag>
<item>
@@ -8075,9 +8592,9 @@ ok
and <seealso marker="#system_info_schedulers">
<c>erlang:system_info(schedulers)</c></seealso>.</p>
</item>
- <tag><c>multi_scheduling_blockers</c></tag>
+ <tag><marker id="system_info_multi_scheduling_blockers"/>
+ <c>multi_scheduling_blockers</c></tag>
<item>
- <marker id="system_info_multi_scheduling_blockers"></marker>
<p>Returns a list of <c><anno>Pid</anno></c>s when
multi-scheduling is blocked, otherwise the empty list is
returned. The <c><anno>Pid</anno></c>s in the list
@@ -8095,15 +8612,9 @@ ok
and <seealso marker="#system_info_schedulers">
<c>erlang:system_info(schedulers)</c></seealso>.</p>
</item>
- <tag><c>nif_version</c></tag>
- <item>
- <p>Returns a string containing the version of the Erlang NIF
- interface used by the runtime system. It is on the form
- "&lt;major ver&gt;.&lt;minor ver&gt;".</p>
- </item>
- <tag><c>normal_multi_scheduling_blockers</c></tag>
+ <tag><marker id="system_info_normal_multi_scheduling_blockers"/>
+ <c>normal_multi_scheduling_blockers</c></tag>
<item>
- <marker id="system_info_normal_multi_scheduling_blockers"></marker>
<p>Returns a list of <c><anno>Pid</anno></c>s when
normal multi-scheduling is blocked (that is, all normal schedulers
but one is blocked), otherwise the empty list is returned.
@@ -8121,192 +8632,9 @@ ok
and <seealso marker="#system_info_schedulers">
<c>erlang:system_info(schedulers)</c></seealso>.</p>
</item>
- <tag><marker id="system_info_otp_release"/>
- <c>otp_release</c></tag>
- <item>
- <marker id="system_info_otp_release"></marker>
- <p>Returns a string containing the OTP release number of the
- OTP release that the currently executing ERTS application
- is part of.</p>
- <p>As from Erlang/OTP 17, the OTP release number corresponds to
- the major OTP version number. No
- <c>erlang:system_info()</c> argument gives the exact OTP
- version. This is because the exact OTP version in the general case
- is difficult to determine. For more information, see the
- description of versions in
- <seealso marker="doc/system_principles:versions">
- System principles</seealso> in System Documentation.</p>
- </item>
- <tag><marker id="system_info_os_monotonic_time_source"/>
- <c>os_monotonic_time_source</c></tag>
- <item>
- <p>Returns a list containing information about the source of
- <seealso marker="erts:time_correction#OS_Monotonic_Time">OS
- monotonic time</seealso> that is used by the runtime system.</p>
- <p>If <c>[]</c> is returned, no OS monotonic time is
- available. The list contains two-tuples with <c>Key</c>s
- as first element, and <c>Value</c>s as second element. The
- order of these tuples is undefined. The following
- tuples can be part of the list, but more tuples can be
- introduced in the future:</p>
- <taglist>
- <tag><c>{function, Function}</c></tag>
- <item><p><c>Function</c> is the name of the function
- used. This tuple always exists if OS monotonic time is
- available to the runtime system.</p>
- </item>
- <tag><c>{clock_id, ClockId}</c></tag>
- <item><p>This tuple only exists if <c>Function</c>
- can be used with different clocks. <c>ClockId</c>
- corresponds to the clock identifier used when calling
- <c>Function</c>.</p>
- </item>
- <tag><c>{resolution, OsMonotonicTimeResolution}</c></tag>
- <item><p>Highest possible
- <seealso marker="time_correction#Time_Resolution">
- resolution</seealso>
- of current OS monotonic time source as parts per
- second. If no resolution information can be retrieved
- from the OS, <c>OsMonotonicTimeResolution</c> is
- set to the resolution of the time unit of
- <c>Function</c>s return value. That is, the actual
- resolution can be lower than
- <c>OsMonotonicTimeResolution</c>. Notice that
- the resolution does not say anything about the
- <seealso marker="time_correction#Time_Accuracy">
- accuracy</seealso> or whether the
- <seealso marker="time_correction#Time_Precision">
- precision</seealso> aligns with the resolution. You do,
- however, know that the precision is not better than
- <c>OsMonotonicTimeResolution</c>.</p>
- </item>
- <tag><c>{extended, Extended}</c></tag>
- <item><p><c>Extended</c> equals <c>yes</c> if
- the range of time values has been extended;
- otherwise <c>Extended</c> equals <c>no</c>. The
- range must be extended if <c>Function</c>
- returns values that wrap fast. This typically
- is the case when the return value is a 32-bit value.</p>
- </item>
- <tag><c>{parallel, Parallel}</c></tag>
- <item><p><c>Parallel</c> equals <c>yes</c> if
- <c>Function</c> is called in parallel from multiple
- threads. If it is not called in parallel, because
- calls must be serialized, <c>Parallel</c> equals
- <c>no</c>.</p>
- </item>
- <tag><c>{time, OsMonotonicTime}</c></tag>
- <item><p><c>OsMonotonicTime</c> equals current OS
- monotonic time in <c>native</c>
- <seealso marker="#type_time_unit">time unit</seealso>.</p>
- </item>
- </taglist>
- </item>
- <tag><marker id="system_info_os_system_time_source"/>
- <c>os_system_time_source</c></tag>
- <item>
- <p>Returns a list containing information about the source of
- <seealso marker="erts:time_correction#OS_System_Time">OS
- system time</seealso> that is used by the runtime system.</p>
- <p>The list contains two-tuples with <c>Key</c>s
- as first element, and <c>Value</c>s as second element. The
- order if these tuples is undefined. The following
- tuples can be part of the list, but more tuples can be
- introduced in the future:</p>
- <taglist>
- <tag><c>{function, Function}</c></tag>
- <item><p><c>Function</c> is the name of the funcion used.</p>
- </item>
- <tag><c>{clock_id, ClockId}</c></tag>
- <item><p>Exists only if <c>Function</c>
- can be used with different clocks. <c>ClockId</c>
- corresponds to the clock identifier used when calling
- <c>Function</c>.</p>
- </item>
- <tag><c>{resolution, OsSystemTimeResolution}</c></tag>
- <item><p>Highest possible
- <seealso marker="time_correction#Time_Resolution">
- resolution</seealso>
- of current OS system time source as parts per
- second. If no resolution information can be retrieved
- from the OS, <c>OsSystemTimeResolution</c> is
- set to the resolution of the time unit of
- <c>Function</c>s return value. That is, the actual
- resolution can be lower than
- <c>OsSystemTimeResolution</c>. Notice that
- the resolution does not say anything about the
- <seealso marker="time_correction#Time_Accuracy">
- accuracy</seealso> or whether the
- <seealso marker="time_correction#Time_Precision">
- precision</seealso> do align with the resolution. You do,
- however, know that the precision is not better than
- <c>OsSystemTimeResolution</c>.</p>
- </item>
- <tag><c>{parallel, Parallel}</c></tag>
- <item><p><c>Parallel</c> equals <c>yes</c> if
- <c>Function</c> is called in parallel from multiple
- threads. If it is not called in parallel, because
- calls needs to be serialized, <c>Parallel</c> equals
- <c>no</c>.</p>
- </item>
- <tag><c>{time, OsSystemTime}</c></tag>
- <item><p><c>OsSystemTime</c> equals current OS
- system time in <c>native</c>
- <seealso marker="#type_time_unit">time unit</seealso>.</p>
- </item>
- </taglist>
- </item>
- <tag><c>port_parallelism</c></tag>
- <item>
- <marker id="system_info_port_parallelism"></marker>
- <p>Returns the default port parallelism scheduling hint used.
- For more information, see command-line argument
- <seealso marker="erl#+spp"><c>+spp</c></seealso>
- in <c>erl(1)</c>.</p>
- </item>
- <tag><marker id="system_info_port_count"/><c>port_count</c></tag>
- <item>
- <p>Returns the number of ports currently existing at the
- local node. The value is given as an integer. This is
- the same value as returned by
- <c>length(erlang:ports())</c>, but more efficient.</p>
- </item>
- <tag><c>port_limit</c></tag>
- <item>
- <marker id="system_info_port_limit"></marker>
- <p>Returns the maximum number of simultaneously existing
- ports at the local node as an integer. This limit can be
- configured at startup by using command-line flag
- <seealso marker="erl#+Q"><c>+Q</c></seealso> in <c>erl(1)</c>.</p>
- </item>
- <tag><marker id="system_info_process_count"/>
- <c>process_count</c></tag>
+ <tag><marker id="system_info_scheduler_bind_type"/>
+ <c>scheduler_bind_type</c></tag>
<item>
- <p>Returns the number of processes currently existing at the
- local node. The value is given as an integer. This is
- the same value as returned by
- <c>length(processes())</c>, but more efficient.</p>
- </item>
- <tag><c>process_limit</c></tag>
- <item>
- <marker id="system_info_process_limit"></marker>
- <p>Returns the maximum number of simultaneously existing
- processes at the local node. The value is given as an
- integer. This limit can be configured at startup by using
- command-line flag <seealso marker="erl#+P"><c>+P</c></seealso>
- in <c>erl(1)</c>.</p>
- </item>
- <tag><c>procs</c></tag>
- <item>
- <p>Returns a binary containing a string of process and port
- information formatted as in Erlang crash dumps. For more
- information, see section <seealso marker="erts:crash_dump">
- How to interpret the Erlang crash dumps</seealso>
- in the User's Guide.</p>
- </item>
- <tag><c>scheduler_bind_type</c></tag>
- <item>
- <marker id="system_info_scheduler_bind_type"></marker>
<p>Returns information about how the user has requested
schedulers to be bound or not bound.</p>
<p>Notice that although a user has requested
@@ -8320,9 +8648,9 @@ ok
<seealso marker="#system_info_scheduler_bindings">
<c>erlang:system_info(scheduler_bindings)</c></seealso>.</p>
</item>
- <tag><c>scheduler_bindings</c></tag>
+ <tag><marker id="system_info_scheduler_bindings"/>
+ <c>scheduler_bindings</c></tag>
<item>
- <marker id="system_info_scheduler_bindings"></marker>
<p>Returns information about the currently used scheduler
bindings.</p>
<p>A tuple of a size equal to
@@ -8346,9 +8674,9 @@ ok
<seealso marker="#system_info_schedulers_online">
<c>erlang:system_info(schedulers_online)</c></seealso>.</p>
</item>
- <tag><c>scheduler_id</c></tag>
+ <tag><marker id="system_info_scheduler_id"/>
+ <c>scheduler_id</c></tag>
<item>
- <marker id="system_info_scheduler_id"></marker>
<p>Returns the scheduler ID (<c>SchedulerId</c>) of the
scheduler thread that the calling process is executing
on. <c><anno>SchedulerId</anno></c> is a positive integer,
@@ -8358,9 +8686,9 @@ ok
<seealso marker="#system_info_schedulers">
<c>erlang:system_info(schedulers)</c></seealso>.</p>
</item>
- <tag><c>schedulers</c></tag>
+ <tag><marker id="system_info_schedulers"/>
+ <c>schedulers</c></tag>
<item>
- <marker id="system_info_schedulers"></marker>
<p>Returns the number of scheduler threads used by
the emulator. Scheduler threads online schedules Erlang
processes and Erlang ports, and execute Erlang code
@@ -8387,9 +8715,9 @@ ok
<c>erlang:system_info(multi_scheduling_blockers)</c></seealso>.
</p>
</item>
- <tag><c>schedulers_online</c></tag>
+ <tag><marker id="system_info_schedulers_online"/>
+ <c>schedulers_online</c></tag>
<item>
- <marker id="system_info_schedulers_online"></marker>
<p>Returns the number of schedulers online. The scheduler
identifiers of schedulers online satisfy the relationship
<c><![CDATA[1 <= SchedulerId <=
@@ -8401,36 +8729,18 @@ ok
<c>erlang:system_flag(schedulers_online,
SchedulersOnline)</c></seealso>.</p>
</item>
- <tag><c>smp_support</c></tag>
- <item>
- <p>Returns <c>true</c> if the emulator has been compiled
- with SMP support, otherwise <c>false</c> is returned.</p>
- </item>
- <tag><marker id="system_info_start_time"/><c>start_time</c></tag>
- <item>
- <p>The <seealso marker="#monotonic_time/0">Erlang monotonic
- time</seealso> in <c>native</c>
- <seealso marker="#type_time_unit">time unit</seealso> at the
- time when current Erlang runtime system instance started.</p>
- <p>See also <seealso marker="#system_info_end_time">
- <c>erlang:system_info(end_time)</c></seealso>.</p>
- </item>
- <tag><c>system_version</c></tag>
+ <tag><marker id="system_info_smp_support"/>
+ <c>smp_support</c></tag>
<item>
- <p>Returns a string containing version number and
- some important properties, such as the number of schedulers.</p>
+ <p>Returns <c>true</c>.</p>
</item>
- <tag><c>system_architecture</c></tag>
+ <tag><marker id="system_info_threads"/>
+ <c>threads</c></tag>
<item>
- <p>Returns a string containing the processor and OS
- architecture the emulator is built for.</p>
+ <p>Returns <c>true</c>.</p>
</item>
- <tag><c>threads</c></tag>
- <item>
- <p>Returns <c>true</c> if the emulator has been compiled
- with thread support, otherwise <c>false</c> is returned.</p>
- </item>
- <tag><c>thread_pool_size</c></tag>
+ <tag><marker id="system_info_thread_pool_size"/>
+ <c>thread_pool_size</c></tag>
<item>
<marker id="system_info_thread_pool_size"></marker>
<p>Returns the number of async threads in the async thread
@@ -8439,111 +8749,342 @@ ok
<c>erl_driver:driver_async()</c></seealso>).
The value is given as an integer.</p>
</item>
- <tag><c>time_correction</c></tag>
+ </taglist>
+ </desc>
+ </func>
+
+ <func>
+ <name name="system_info" arity="1" clause_i="14"
+ anchor="system_info_dist"/> <!-- creation -->
+ <name name="system_info" arity="1" clause_i="16"/> <!-- delayed_node_table_gc -->
+ <name name="system_info" arity="1" clause_i="20"/> <!-- dist -->
+ <name name="system_info" arity="1" clause_i="21"/> <!-- dist_buf_busy_limit -->
+ <name name="system_info" arity="1" clause_i="22"/> <!-- dist_ctrl -->
+ <fsummary>Information about erlang distribution.</fsummary>
+ <desc>
+ <marker id="system_info_dist_tags"/>
+ <p>Returns information about Erlang Distribution in the
+ current system as specified by <c><anno>Item</anno></c>:</p>
+ <taglist>
+ <tag><marker id="system_info_creation"/>
+ <c>creation</c></tag>
<item>
- <marker id="system_info_time_correction"></marker>
- <p>Returns a boolean value indicating whether
- <seealso marker="time_correction#Time_Correction">
- time correction</seealso> is enabled or not.</p>
+ <p>Returns the creation of the local node as an integer.
+ The creation is changed when a node is restarted. The
+ creation of a node is stored in process identifiers, port
+ identifiers, and references. This makes it (to some
+ extent) possible to distinguish between identifiers from
+ different incarnations of a node. The valid
+ creations are integers in the range 1..3, but this will
+ probably change in a future release. If the node is not
+ alive, <c>0</c> is returned.</p>
</item>
- <tag><c>time_offset</c></tag>
+ <tag><marker id="system_info_delayed_node_table_gc"/>
+ <c>delayed_node_table_gc</c></tag>
<item>
- <marker id="system_info_time_offset"></marker>
- <p>Returns the state of the time offset:</p>
- <taglist>
- <tag><c>preliminary</c></tag>
- <item>
- <p>The time offset is preliminary, and will be changed
- and finalized later. The preliminary time offset
- is used during the preliminary phase of the
- <seealso marker="time_correction#Single_Time_Warp_Mode">
- single time warp mode</seealso>.</p>
- </item>
- <tag><c>final</c></tag>
- <item>
- <p>The time offset is final. This either because
- <seealso marker="time_correction#No_Time_Warp_Mode">
- no time warp mode</seealso> is used, or because the time
- offset have been finalized when
- <seealso marker="time_correction#Single_Time_Warp_Mode">
- single time warp mode</seealso> is used.</p>
- </item>
- <tag><c>volatile</c></tag>
- <item>
- <p>The time offset is volatile. That is, it can
- change at any time. This is because
- <seealso marker="time_correction#Multi_Time_Warp_Mode">
- multi-time warp mode</seealso> is used.</p>
- </item>
- </taglist>
+ <p>Returns the amount of time in seconds garbage collection
+ of an entry in a node table is delayed. This limit can be set
+ on startup by passing command-line flag
+ <seealso marker="erts:erl#+zdntgc"><c>+zdntgc</c></seealso>
+ to <c>erl(1)</c>. For more information, see the documentation of
+ the command-line flag.</p>
</item>
- <tag><marker id="system_info_time_warp_mode"/>
- <c>time_warp_mode</c></tag>
+ <tag><marker id="system_info_dist"/>
+ <c>dist</c></tag>
<item>
- <p>Returns a value identifying the
- <seealso marker="time_correction#Time_Warp_Modes">
- time warp mode</seealso> that is used:</p>
- <taglist>
- <tag><c>no_time_warp</c></tag>
- <item>The <seealso marker="time_correction#No_Time_Warp_Mode">
- no time warp mode</seealso> is used.
- </item>
- <tag><c>single_time_warp</c></tag>
- <item>The <seealso marker="time_correction#Single_Time_Warp_Mode">
- single time warp mode</seealso> is used.
- </item>
- <tag><c>multi_time_warp</c></tag>
- <item>The <seealso marker="time_correction#Multi_Time_Warp_Mode">
- multi-time warp mode</seealso> is used.
- </item>
- </taglist>
+ <p>Returns a binary containing a string of distribution
+ information formatted as in Erlang crash dumps. For more
+ information, see section <seealso marker="erts:crash_dump">
+ How to interpret the Erlang crash dumps</seealso>
+ in the User's Guide.</p>
</item>
- <tag><c>tolerant_timeofday</c></tag>
+ <tag><marker id="system_info_dist_buf_busy_limit"/>
+ <c>dist_buf_busy_limit</c></tag>
<item>
- <marker id="system_info_tolerant_timeofday"></marker>
- <p>Returns whether a pre ERTS 7.0 backwards compatible
- compensation for sudden changes of system time is <c>enabled</c>
- or <c>disabled</c>. Such compensation is <c>enabled</c> when the
- <seealso marker="#system_info_time_offset">time offset</seealso>
- is <c>final</c>, and
- <seealso marker="#system_info_time_correction">
- time correction</seealso> is enabled.</p>
+ <p>Returns the value of the distribution buffer busy limit
+ in bytes. This limit can be set at startup by passing
+ command-line flag
+ <seealso marker="erts:erl#+zdbbl"><c>+zdbbl</c></seealso>
+ to <c>erl(1)</c>.</p>
+ </item>
+ <tag><marker id="system_info_dist_ctrl"/>
+ <c>dist_ctrl</c></tag>
+ <item>
+ <p>Returns a list of tuples
+ <c>{<anno>Node</anno>, <anno>ControllingEntity</anno>}</c>,
+ one entry for each connected remote node.
+ <c><anno>Node</anno></c> is the node name
+ and <c><anno>ControllingEntity</anno></c> is the port or process
+ identifier responsible for the communication to that node.
+ More specifically, <c><anno>ControllingEntity</anno></c> for
+ nodes connected through TCP/IP (the normal case) is the socket
+ used in communication with the specific node.</p>
+ </item>
+ </taglist>
+ </desc>
+ </func>
+
+ <func>
+ <!-- <name name="system_info" arity="1" clause_i="1"/> allocated_areas -->
+ <!-- <name name="system_info" arity="1" clause_i="2"/> allocated -->
+ <!-- <name name="system_info" arity="1" clause_i="3"/> {allocator, _} -->
+ <!-- <name name="system_info" arity="1" clause_i="4"/> alloc_util_allocators -->
+ <!-- <name name="system_info" arity="1" clause_i="5"/> {allocator_sizes, _} -->
+ <!-- <name name="system_info" arity="1" clause_i="6"/> atom_count -->
+ <!-- <name name="system_info" arity="1" clause_i="7"/> atom_limit -->
+ <name name="system_info" arity="1" clause_i="8"
+ anchor="system_info_misc"/> <!-- build_type -->
+ <name name="system_info" arity="1" clause_i="9"/> <!-- c_compiler_used -->
+ <name name="system_info" arity="1" clause_i="10"/> <!-- check_io -->
+ <name name="system_info" arity="1" clause_i="11"/> <!-- compat_rel -->
+ <!-- <name name="system_info" arity="1" clause_i="12"/> cpu_topology -->
+ <!-- <name name="system_info" arity="1" clause_i="13"/> {cpu_topology, _} -->
+ <!-- <name name="system_info" arity="1" clause_i="14"/> creation -->
+ <name name="system_info" arity="1" clause_i="15"/> <!-- debug_compiled -->
+ <!-- <name name="system_info" arity="1" clause_i="16"/> delayed_node_table_gc -->
+ <!-- <name name="system_info" arity="1" clause_i="17"/> dirty_cpu_schedulers -->
+ <!-- <name name="system_info" arity="1" clause_i="18"/> dirty_cpu_schedulers_online -->
+ <!-- <name name="system_info" arity="1" clause_i="19"/> dirty_io_schedulers -->
+ <!-- <name name="system_info" arity="1" clause_i="20"/> dist -->
+ <!-- <name name="system_info" arity="1" clause_i="21"/> dist_buf_busy_limit -->
+ <!-- <name name="system_info" arity="1" clause_i="22"/> dist_ctrl -->
+ <name name="system_info" arity="1" clause_i="23"/> <!-- driver_version -->
+ <name name="system_info" arity="1" clause_i="24"/> <!-- dynamic_trace -->
+ <name name="system_info" arity="1" clause_i="25"/> <!-- dynamic_trace_probes -->
+ <!-- <name name="system_info" arity="1" clause_i="26"/> end_time -->
+ <!-- <name name="system_info" arity="1" clause_i="27"/> elib_malloc -->
+ <!-- <name name="system_info" arity="1" clause_i="28"/> eager_check_io, removed -->
+ <!-- <name name="system_info" arity="1" clause_i="29"/> ets_count -->
+ <!-- <name name="system_info" arity="1" clause_i="30"/> ets_limit -->
+ <!-- <name name="system_info" arity="1" clause_i="31"/> fullsweep_after -->
+ <!-- <name name="system_info" arity="1" clause_i="32"/> garbage_collection -->
+ <!-- <name name="system_info" arity="1" clause_i="33"/> heap_sizes -->
+ <!-- <name name="system_info" arity="1" clause_i="34"/> heap_type -->
+ <name name="system_info" arity="1" clause_i="35"/> <!-- info -->
+ <name name="system_info" arity="1" clause_i="36"/> <!-- kernel_poll -->
+ <name name="system_info" arity="1" clause_i="37"/> <!-- loaded -->
+ <!-- <name name="system_info" arity="1" clause_i="38"/> logical_processors -->
+ <name name="system_info" arity="1" clause_i="39"/> <!-- machine -->
+ <!-- <name name="system_info" arity="1" clause_i="40"/> max_heap_size -->
+ <!-- <name name="system_info" arity="1" clause_i="41"/> message_queue_data -->
+ <!-- <name name="system_info" arity="1" clause_i="42"/> min_heap_size -->
+ <!-- <name name="system_info" arity="1" clause_i="43"/> min_bin_vheap_size -->
+ <name name="system_info" arity="1" clause_i="44"/> <!-- modified_timing_level -->
+ <!-- <name name="system_info" arity="1" clause_i="45"/> multi_scheduling -->
+ <!-- <name name="system_info" arity="1" clause_i="46"/> multi_scheduling_blockers -->
+ <name name="system_info" arity="1" clause_i="47"/> <!-- nif_version -->
+ <!-- n<name name="system_info" arity="1" clause_i="48"/> ormal_multi_scheduling_blockers -->
+ <name name="system_info" arity="1" clause_i="49"/> <!-- otp_release -->
+ <!-- <name name="system_info" arity="1" clause_i="50"/> os_monotonic_time_source -->
+ <!-- <name name="system_info" arity="1" clause_i="51"/> os_system_time_source -->
+ <name name="system_info" arity="1" clause_i="52"/> <!-- port_parallelism -->
+ <!-- <name name="system_info" arity="1" clause_i="53"/> port_count -->
+ <!-- <name name="system_info" arity="1" clause_i="54"/> port_limit -->
+ <!-- <name name="system_info" arity="1" clause_i="55"/> process_count -->
+ <!-- <name name="system_info" arity="1" clause_i="56"/> process_limit -->
+ <!-- <name name="system_info" arity="1" clause_i="57"/> procs -->
+ <!-- <name name="system_info" arity="1" clause_i="58"/> scheduler_bind_type -->
+ <!-- <name name="system_info" arity="1" clause_i="59"/> scheduler_bindings -->
+ <!-- <name name="system_info" arity="1" clause_i="60"/> scheduler_id -->
+ <!-- <name name="system_info" arity="1" clause_i="61"/> schedulers -->
+ <!-- <name name="system_info" arity="1" clause_i="62"/> smp_support -->
+ <!-- <name name="system_info" arity="1" clause_i="63"/> start_time -->
+ <name name="system_info" arity="1" clause_i="64"/> <!-- system_version -->
+ <name name="system_info" arity="1" clause_i="65"/> <!-- system_architecture -->
+ <!-- <name name="system_info" arity="1" clause_i="66"/> threads -->
+ <!-- <name name="system_info" arity="1" clause_i="67"/> thread_pool_size -->
+ <!-- <name name="system_info" arity="1" clause_i="68"/> time_correction -->
+ <!-- <name name="system_info" arity="1" clause_i="69"/> time_offset -->
+ <!-- <name name="system_info" arity="1" clause_i="70"/> time_warp_mode -->
+ <!-- <name name="system_info" arity="1" clause_i="71"/> tolerant_timeofday -->
+ <name name="system_info" arity="1" clause_i="72"/> <!-- trace_control_word -->
+ <!-- <name name="system_info" arity="1" clause_i="73"/> update_cpu_info -->
+ <name name="system_info" arity="1" clause_i="74"/> <!-- version -->
+ <name name="system_info" arity="1" clause_i="75"/> <!-- wordsize -->
+ <!-- <name name="system_info" arity="1" clause_i="76"/> overview -->
+ <fsummary>Information about the system.</fsummary>
+ <desc>
+ <marker id="system_info_misc_tags"/>
+ <p>Returns various information about the current system
+ (emulator) as specified by <c><anno>Item</anno></c>:</p>
+ <taglist>
+ <tag><marker id="system_info_build_type"/>
+ <c>build_type</c></tag>
+ <item>
+ <p>Returns an atom describing the build type of the runtime
+ system. This is normally the atom <c>opt</c> for optimized.
+ Other possible return values are <c>debug</c>, <c>purify</c>,
+ <c>quantify</c>, <c>purecov</c>, <c>gcov</c>, <c>valgrind</c>,
+ <c>gprof</c>, and <c>lcnt</c>. Possible return values
+ can be added or removed at any time without prior notice.</p>
+ </item>
+ <tag><marker id="system_info_c_compiler_used"/>
+ <c>c_compiler_used</c></tag>
+ <item>
+ <p>Returns a two-tuple describing the C compiler used when
+ compiling the runtime system. The first element is an
+ atom describing the name of the compiler, or <c>undefined</c>
+ if unknown. The second element is a term describing the
+ version of the compiler, or <c>undefined</c> if unknown.</p>
+ </item>
+ <tag><marker id="system_info_check_io"/>
+ <c>check_io</c></tag>
+ <item>
+ <p>Returns a list containing miscellaneous information
+ about the emulators internal I/O checking. Notice that
+ the content of the returned list can vary between
+ platforms and over time. It is only guaranteed
+ that a list is returned.</p>
+ </item>
+ <tag><marker id="system_info_compat_rel"/>
+ <c>compat_rel</c></tag>
+ <item>
+ <p>Returns the compatibility mode of the local node as
+ an integer. The integer returned represents the
+ Erlang/OTP release that the current emulator has been
+ set to be backward compatible with. The compatibility
+ mode can be configured at startup by using command-line flag
+ <seealso marker="erts:erl#compat_rel"><c>+R</c></seealso> in
+ <c>erl(1)</c>.</p>
+ </item>
+ <tag><marker id="system_info_debug_compiled"/>
+ <c>debug_compiled</c></tag>
+ <item>
+ <p>Returns <c>true</c> if the emulator has been
+ debug-compiled, otherwise <c>false</c>.</p>
+ </item>
+ <tag><marker id="system_info_driver_version"/>
+ <c>driver_version</c></tag>
+ <item>
+ <p>Returns a string containing the Erlang driver version
+ used by the runtime system. It has the form
+ <seealso marker="erts:erl_driver#version_management">
+ "&lt;major ver&gt;.&lt;minor ver&gt;"</seealso>.</p>
+ </item>
+ <tag><marker id="system_info_dynamic_trace"/>
+ <c>dynamic_trace</c></tag>
+ <item>
+ <p>Returns an atom describing the dynamic trace framework
+ compiled into the virtual machine. It can be
+ <c>dtrace</c>, <c>systemtap</c>, or <c>none</c>. For a
+ commercial or standard build, it is always <c>none</c>.
+ The other return values indicate a custom configuration
+ (for example, <c>./configure --with-dynamic-trace=dtrace</c>).
+ For more information about dynamic tracing, see
+ <seealso marker="runtime_tools:dyntrace">
+ <c>dyntrace(3)</c></seealso> manual page and the
+ <c>README.dtrace</c>/<c>README.systemtap</c> files in the
+ Erlang source code top directory.</p>
+ </item>
+ <tag><marker id="system_info_dynamic_trace_probes"/>
+ <c>dynamic_trace_probes</c></tag>
+ <item>
+ <p>Returns a <c>boolean()</c> indicating if dynamic trace
+ probes (<c>dtrace</c> or <c>systemtap</c>) are built into
+ the emulator. This can only be <c>true</c> if the virtual
+ machine was built for dynamic tracing (that is,
+ <c>system_info(dynamic_trace)</c> returns
+ <c>dtrace</c> or <c>systemtap</c>).</p>
+ </item>
+ <tag><marker id="system_info_info"/>
+ <c>info</c></tag>
+ <item>
+ <p>Returns a binary containing a string of miscellaneous
+ system information formatted as in Erlang crash dumps.
+ For more information, see section
+ <seealso marker="erts:crash_dump">
+ How to interpret the Erlang crash dumps</seealso>
+ in the User's Guide.</p>
+ </item>
+ <tag><marker id="system_info_kernel_poll"/>
+ <c>kernel_poll</c></tag>
+ <item>
+ <p>Returns <c>true</c> if the emulator uses some kind of
+ kernel-poll implementation, otherwise <c>false</c>.</p>
+ </item>
+ <tag><marker id="system_info_loaded"/>
+ <c>loaded</c></tag>
+ <item>
+ <p>Returns a binary containing a string of loaded module
+ information formatted as in Erlang crash dumps. For more
+ information, see section
+ <seealso marker="erts:crash_dump">How to interpret the Erlang
+ crash dumps</seealso> in the User's Guide.</p>
+ </item>
+ <tag><marker id="system_info_machine"/>
+ <c>machine</c></tag>
+ <item>
+ <p>Returns a string containing the Erlang machine name.</p>
+ </item>
+ <tag><marker id="system_info_modified_timing_level"/>
+ <c>modified_timing_level</c></tag>
+ <item>
+ <p>Returns the modified timing-level (an integer) if
+ modified timing is enabled, otherwise <c>undefined</c>.
+ For more information about modified timing, see
+ command-line flag
+ <seealso marker="erts:erl#+T"><c>+T</c></seealso>
+ in <c>erl(1)</c></p>
+ </item>
+ <tag><marker id="system_info_nif_version"/>
+ <c>nif_version</c></tag>
+ <item>
+ <p>Returns a string containing the version of the Erlang NIF
+ interface used by the runtime system. It is on the form
+ "&lt;major ver&gt;.&lt;minor ver&gt;".</p>
+ </item>
+ <tag><marker id="system_info_otp_release"/>
+ <c>otp_release</c></tag>
+ <item>
+ <marker id="system_info_otp_release"></marker>
+ <p>Returns a string containing the OTP release number of the
+ OTP release that the currently executing ERTS application
+ is part of.</p>
+ <p>As from Erlang/OTP 17, the OTP release number corresponds to
+ the major OTP version number. No
+ <c>erlang:system_info()</c> argument gives the exact OTP
+ version. This is because the exact OTP version in the general case
+ is difficult to determine. For more information, see the
+ description of versions in
+ <seealso marker="doc/system_principles:versions">
+ System principles</seealso> in System Documentation.</p>
</item>
- <tag><c>trace_control_word</c></tag>
+ <tag><marker id="system_info_port_parallelism"/>
+ <c>port_parallelism</c></tag>
+ <item>
+ <p>Returns the default port parallelism scheduling hint used.
+ For more information, see command-line argument
+ <seealso marker="erl#+spp"><c>+spp</c></seealso>
+ in <c>erl(1)</c>.</p>
+ </item>
+ <tag><marker id="system_info_system_version"/>
+ <c>system_version</c></tag>
+ <item>
+ <p>Returns a string containing version number and
+ some important properties, such as the number of schedulers.</p>
+ </item>
+ <tag><marker id="system_info_system_architecture"/>
+ <c>system_architecture</c></tag>
+ <item>
+ <p>Returns a string containing the processor and OS
+ architecture the emulator is built for.</p>
+ </item>
+ <tag><marker id="system_info_trace_control_word"/>
+ <c>trace_control_word</c></tag>
<item>
<p>Returns the value of the node trace control word. For
more information, see function <c>get_tcw</c> in section
<seealso marker="erts:match_spec#get_tcw">
Match Specifications in Erlang</seealso> in the User's Guide.</p>
</item>
- <tag><c>update_cpu_info</c></tag>
+ <tag><marker id="system_info_version"/>
+ <c>version</c></tag>
<item>
- <marker id="update_cpu_info"></marker>
- <p>The runtime system rereads the CPU information available
- and updates its internally stored information about the
- <seealso marker="#system_info_cpu_topology_detected">detected
- CPU topology</seealso> and the number of logical processors
- <seealso marker="#logical_processors">configured</seealso>,
- <seealso marker="#logical_processors_online">online</seealso>,
- and <seealso marker="#logical_processors_available">
- available</seealso>.</p>
- <p>If the CPU information has changed since the last time
- it was read, the atom <c>changed</c> is returned, otherwise
- the atom <c>unchanged</c>. If the CPU information has changed,
- you probably want to
- <seealso marker="#system_flag_schedulers_online">adjust the
- number of schedulers online</seealso>. You typically want
- to have as many schedulers online as
- <seealso marker="#logical_processors_available">logical
- processors available</seealso>.</p>
- </item>
- <tag><c>version</c></tag>
- <item>
- <marker id="system_info_version"></marker>
<p>Returns a string containing the version number of the
emulator.</p>
</item>
- <tag><c>wordsize</c></tag>
+ <tag><marker id="system_info_wordsize"/>
+ <c>wordsize</c></tag>
<item>
<p>Same as <c>{wordsize, internal}</c>.</p>
</item>
@@ -8565,13 +9106,6 @@ ok
64-bit architecture, 8 is returned.</p>
</item>
</taglist>
- <note>
- <p>Argument <c>scheduler</c> has changed name to
- <c>scheduler_id</c> to avoid mix up with argument
- <c>schedulers</c>. Argument <c>scheduler</c> was
- introduced in ERTS 5.5 and renamed in
- ERTS 5.5.1.</p>
- </note>
</desc>
</func>
@@ -10551,9 +11085,9 @@ true</pre>
<c>receive after 1 -> ok end</c>, except that <c>yield()</c>
is faster.</p>
<warning>
- <p>There is seldom or never any need to use this BIF,
- especially in the SMP emulator, as other processes have a
- chance to run in another scheduler thread anyway.
+ <p>There is seldom or never any need to use this BIF
+ as other processes have a chance to run in another scheduler
+ thread anyway.
Using this BIF without a thorough grasp of how the scheduler
works can cause performance degradation.</p>
</warning>
@@ -10561,4 +11095,3 @@ true</pre>
</func>
</funcs>
</erlref>
-