From 69b8d1ab13473f851f8957e2bb6f5486f64612ad Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 23 Jul 2016 19:10:10 +0100 Subject: zlib: support extraction of inflation dictionary --- erts/doc/src/zlib.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 138414a880..1a7c2d2b6f 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -575,6 +575,17 @@ unpack(Z, Compressed, Dict) -> + + + Return the decompression dictionary. + +

Returns the decompression dictionary currently in use + by the stream. This function must be called between + inflateInit/1,2 + and inflateEnd.

+
+
+ Open a stream and return a stream reference. -- cgit v1.2.3 From 58d8a3ac4d491c8cd962ac0839a56cd1a0e339f9 Mon Sep 17 00:00:00 2001 From: Dmytro Lytovchenko Date: Mon, 13 Jun 2016 12:05:55 +0200 Subject: Option to erlang:garbage_collect to request minor (generational) GC Note: Minor GC option is a hint, and GC may still decide to run fullsweep. Test case for major and minor gc on self Test case for major and minor gs on some other process + async gc test check docs fix --- erts/doc/src/erlang.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 2b7a3b85e5..90f2de594b 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1604,6 +1604,12 @@ true the form {garbage_collect, RequestId, GCResult}. + + {type, 'major' | 'minor'} + Triggers garbage collection of requested type. Default value is + 'major', which would trigger a fullsweep GC. + The option 'minor' is considered a hint and may lead to + either minor or major GC run.

If Pid equals self(), and no async option has been passed, the garbage -- cgit v1.2.3 From 2d67526de71b6b22a9b08779bcebcfde8f13afef Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 20 Aug 2016 23:27:56 +0100 Subject: Specify min zlib ver on inflateGetDictionary doc --- erts/doc/src/zlib.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 1a7c2d2b6f..e1924fffee 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -583,6 +583,7 @@ unpack(Z, Compressed, Dict) -> by the stream. This function must be called between inflateInit/1,2 and inflateEnd.

+

Only supported if ERTS was compiled with zlib >= 1.2.8.

-- cgit v1.2.3 From 986d32a62b20c32338dac4dfd27c141c8f9be0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 20 Jun 2016 13:25:04 +0200 Subject: Implement the new ceil/1 and floor/1 guard BIFs Implement as ceil/1 and floor/1 as new guard BIFs (essentially part of Erlang language). They are guard BIFs because trunc/1 is a guard BIF. It would be strange to have trunc/1 as a part of the language, but not ceil/1 and floor/1. --- erts/doc/src/erlang.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d0a3a77e43..18a7a5b777 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -717,6 +717,19 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)). + + + Returns the smallest integer not less than the argument + +

Returns the smallest integer not less than + Number. + For example:

+
+> ceil(5.5).
+6
+

Allowed in guard tests.

+
+
Check if a module has old code. @@ -1464,6 +1477,20 @@ true + + + Returns the largest integer not greater than the argument + +

Returns the largest integer not greater than + Number. + For example:

+
+> floor(-10.5).
+-11
+

Allowed in guard tests.

+
+
+ Information about a fun. -- cgit v1.2.3 From 4f8071d81aa0690caa3adc734d73a1cb004ad808 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 19 Sep 2016 14:34:57 +0200 Subject: erts: Remove deprecated nif 'reload' feature and instead let erlang:load_nif/2 return {error, {reload, _}} before even trying to load the library if a NIF library has already been successfully loaded for the calling module instance. --- erts/doc/src/erl_nif.xml | 46 +++++++++++++--------------------------------- erts/doc/src/erlang.xml | 6 +++++- 2 files changed, 18 insertions(+), 34 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index b5dc9037c4..5d55cc9121 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -296,8 +296,8 @@ return term; synchronization. This includes terms in process-independent environments that are shared between threads. Resource objects also require synchronization if you treat them as mutable.

-

The library initialization callbacks load, reload, and - upgrade are all thread-safe even for shared state data.

+

The library initialization callbacks load and + upgrade are thread-safe even for shared state data.

Version Management @@ -498,7 +498,7 @@ return term; Initialization ERL_NIF_INIT(MODULE, - ErlNifFunc funcs[], load, reload, upgrade, unload) + ErlNifFunc funcs[], load, NULL, upgrade, unload)

This is the magic macro to initialize a NIF library. It is to be evaluated in global file scope.

@@ -507,11 +507,14 @@ return term; the macro.

funcs is a static array of function descriptors for all the implemented NIFs in this library.

-

load, reload, upgrade and unload - are pointers to functions. One of load, reload, or +

load, upgrade and unload + are pointers to functions. One of load or upgrade is called to initialize the library. unload is called to release the library. All are described individually below.

+

The fourth argument NULL is ignored. It + was earlier used for the deprectated reload callback + which is no longer supported since OTP 20.

If compiling a NIF for static inclusion through --enable-static-nifs, you must define STATIC_ERLANG_NIF before the ERL_NIF_INIT declaration.

@@ -539,7 +542,7 @@ return term; and there is old code of this module with a loaded NIF library.

Works as load, except that *old_priv_data already contains the value set by the last call to load or - reload for the old module code. *priv_data is + upgrade for the old module code. *priv_data is initialized to NULL when upgrade is called. It is allowed to write to both *priv_data and *old_priv_data.

@@ -551,27 +554,7 @@ return term;

unload is called when the module code that the NIF library belongs to is purged as old. New code of the same - module may or may not exist. Notice that unload is not - called for a replaced library as a consequence of reload.

-
- int (*reload)(ErlNifEnv* env, void** - priv_data, ERL_NIF_TERM load_info) - - -

The reload mechanism is deprecated. It was only intended - as a development feature. Do not use it as an upgrade method for - live production systems. It can be removed in future releases. - Ensure to pass reload as NULL to - ERL_NIF_INIT - to disable it when not used.

-
-

reload is called when the NIF library is loaded and a - previously loaded library already exists for this module code.

-

Works as load, except that - *priv_data already contains the value set by the - previous call to load or reload.

-

The library fails to load if reload returns - anything other than 0 or if reload is NULL.

+ module may or may not exist.

@@ -2249,9 +2232,8 @@ enif_map_iterator_destroy(env, &iter); returns NULL and sets *tried to flags. It is allowed to set tried to NULL.

Notice that enif_open_resource_type is only allowed to be - called in the three callbacks - load, - reload, and + called in the two callbacks + load and upgrade.

@@ -2305,10 +2287,8 @@ enif_map_iterator_destroy(env, &iter); Get the private data of a NIF library.

Returns the pointer to the private data that was set by - load, - reload, or + load or upgrade.

-

Was previously named enif_get_data.

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index f42c39db5f..d22d40ba8a 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2598,9 +2598,13 @@ os_prompt% The library did not fulfill the requirements as a NIF library of the calling module. - load | reload | upgrade + load | upgrade The corresponding library callback was unsuccessful. + reload + A NIF library is already loaded for this module instance. + The previously deprecated reload feature was removed in OTP 20. + old_code The call to load_nif/2 was made from the old code of a module that has been upgraded; this is not -- cgit v1.2.3 From 48314b2f6bedee39cb20c38599b9b1c2611e9b51 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 19 Sep 2016 14:37:24 +0200 Subject: erts: Remove old doc note for erlang:load_nif --- erts/doc/src/erlang.xml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d22d40ba8a..f318f28b6d 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2562,13 +2562,6 @@ os_prompt% Load NIF library. - -

Before Erlang/OTP R14B, NIFs were an - experimental feature. Versions before Erlang/OTP R14B can - have different and possibly incompatible NIF semantics and - interfaces. For example, in Erlang/OTP R13B03 the return value on - failure was {error,Reason,Text}.

-

Loads and links a dynamic library containing native implemented functions (NIFs) for a module. Path is a file path to the shareable object/dynamic library file minus -- cgit v1.2.3 From 3489b9b689073f428a23f7fc7a67774b7dda07be Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Sun, 18 Sep 2016 12:33:08 +0200 Subject: Use more correct delimiters for erl_nif.h include Anywhere but the beam sources we shouldn't #include "erl_nif.h", because what "erl_nif.h" does is: (1) fail to find it outside of -I dirs, (2) then treat it as if it was written like . Using skips (1). More information can be found in 6.10.2 of the C standard. Because the examples use "erl_nif.h", NIF projects in the Erlang ecosystem copy this verbatim and make the same mistake. --- erts/doc/src/erl_nif.xml | 2 +- erts/doc/src/erl_tracer.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index b5dc9037c4..b149d72637 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -80,7 +80,7 @@ /* niftest.c */ -#include "erl_nif.h" +#include <erl_nif.h> static ERL_NIF_TERM hello(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { diff --git a/erts/doc/src/erl_tracer.xml b/erts/doc/src/erl_tracer.xml index 83eef374ca..43613c31b1 100644 --- a/erts/doc/src/erl_tracer.xml +++ b/erts/doc/src/erl_tracer.xml @@ -684,7 +684,7 @@ trace(_, _, _, _, _) ->

erl_msg_tracer.c:

-#include "erl_nif.h"
+#include <erl_nif.h>
 
 /* NIF interface declarations */
 static int load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info);
-- 
cgit v1.2.3


From 6c7160b1105f7f258898e7ba406289bef33fd756 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson 
Date: Wed, 21 Sep 2016 17:46:11 +0200
Subject: erts: Clearify run_erl docs

ERL-258
---
 erts/doc/src/run_erl.xml | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'erts/doc')

diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml
index ad7b2c5b85..a9b6a7e2c6 100644
--- a/erts/doc/src/run_erl.xml
+++ b/erts/doc/src/run_erl.xml
@@ -49,7 +49,7 @@
   
     
       run_erl [-daemon] pipe_dir/ log_dir "exec command
-        [command_arguments]"
+        arg1 arg2 ..."
       Start the Erlang emulator without attached terminal.
       
         

Arguments:

@@ -92,11 +92,10 @@ - "exec command [command_arguments]" + "exec command arg1 arg2 ..." -

In the third argument, is the - executable to execute where everything written to stdin - and stdout is logged to .

+

A space-separated string specifying the program to be executed. + The second field is typically a command name such as erl.

@@ -105,7 +104,7 @@
Notes concerning the Log Files -

While running, run_erl (as stated earlier) sends all output, +

While running, run_erl sends all output, uninterpreted, to a log file. The file is named , where N is an integer. When the log is "full" (default log size is 100 KB), run_erl starts to log -- cgit v1.2.3 From c875f46fe83381d5917b3a7a8453e2ae58d233a8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 26 Sep 2016 22:46:06 +0200 Subject: erts: Add examples to binary_to_term and term_to_binary --- erts/doc/src/erlang.xml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 950a5fe189..b0d25389fd 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -516,7 +516,14 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).

Returns an Erlang term that is the result of decoding binary object Binary, which must be encoded - according to the Erlang external term format.

+ according to the + Erlang external term format.

+
+> Bin = term_to_binary(hello).
+<<131,100,0,5,104,101,108,108,111>>
+> hello = binary_to_term(Bin).
+hello
+

When decoding binaries from untrusted sources, consider using binary_to_term/2 to prevent Denial @@ -555,6 +562,14 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).

Failure: badarg if safe is specified and unsafe data is decoded.

+
+> binary_to_term(<<131,100,0,5,104,101,108,108,111>>, [safe]).
+** exception error: bad argument
+> hello.
+hello
+> binary_to_term(<<131,100,0,5,104,101,108,108,111>>, [safe]).
+hello
+

See also term_to_binary/1, @@ -8599,12 +8614,19 @@ ok

Returns a binary data object that is the result of encoding - Term according to the Erlang external - term format.

+ Term according to the + Erlang external + term format.

This can be used for various purposes, for example, writing a term to a file in an efficient way, or sending an Erlang term to some type of communications channel not supported by distributed Erlang.

+
+> Bin = term_to_binary(hello).
+<<131,100,0,5,104,101,108,108,111>>
+> hello = binary_to_term(Bin).
+hello
+

See also binary_to_term/1.

-- cgit v1.2.3 From 714570912d678c10f4aa4b6a6692d958e0fc7fe7 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 28 Sep 2016 16:40:19 +0200 Subject: Document the order of directories added with code:add_pathsa/1 code:add_pathsa/1 reverts the list of directories when adding it at the beginning of the code path. The command line option '-pa' behaves in the same way. This is now documented. --- erts/doc/src/erl.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index f62d3fb170..eb1d24cf12 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -393,9 +393,11 @@

Adds the specified directories to the beginning of the code - path, similar to ; see - code(3). - As an alternative to -pa, if several directories are + path, similar to + . Note that the + order of the given directories will be reversed in the + resulting path.

+

As an alternative to -pa, if several directories are to be prepended to the code path and the directories have a common parent directory, that parent directory can be specified in environment variable ERL_LIBS; see -- cgit v1.2.3 From 2dfca60a24c2c6728a4b8431f37aeee05212a4ac Mon Sep 17 00:00:00 2001 From: Gabriele Santomaggio Date: Thu, 13 Oct 2016 21:17:10 +0200 Subject: Add system_info(atom_limit) Add system_info(atom_limit) to provide a way to retrieve the maximum number of atoms allowed. Add tests and documentation for it too. Also split system_info_SUITE:start_node/2 to start_node_ets/2 and start_node_atm/2 to avoid code duplication. --- erts/doc/src/erlang.xml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b0d25389fd..43a3481351 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -7185,13 +7185,14 @@ ok erlang:system_info({allocator, Alloc}).

+ - + Information about the CPU topology of the system. @@ -7291,12 +7292,12 @@ ok - - + + Information about the default process heap settings. @@ -7373,7 +7374,7 @@ ok - + @@ -7388,14 +7389,14 @@ ok - + - + @@ -7425,6 +7426,7 @@ ok + Information about the system.

Returns various information about the current system @@ -7436,6 +7438,16 @@ ok

See above.

+ atom_limit + + +

Returns the maximum number of atoms allowed. + This limit can be increased at startup by passing + command-line flag + +t to + erl(1). +

+
build_type

Returns an atom describing the build type of the runtime -- cgit v1.2.3 From 37384d3e68b3558e7cd48646a8acf4b74e6bc1c3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Oct 2016 15:33:21 +0200 Subject: erts: Fix some system_info docs inconsistencies --- erts/doc/src/erlang.xml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 43a3481351..c76a30947c 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -7185,7 +7185,6 @@ ok erlang:system_info({allocator, Alloc}).

-
@@ -7340,12 +7339,6 @@ ok see process_flag(max_heap_size, MaxHeapSize).

- min_heap_size - -

Returns {min_heap_size, MinHeapSize}, - where MinHeapSize is the current - system-wide minimum heap size for spawned processes.

-
message_queue_data @@ -7358,6 +7351,12 @@ ok process_flag(message_queue_data, MQD).

+ min_heap_size + +

Returns {min_heap_size, MinHeapSize}, + where MinHeapSize is the current + system-wide minimum heap size for spawned processes.

+
min_bin_vheap_size

Returns {min_bin_vheap_size, @@ -7432,12 +7431,6 @@ ok

Returns various information about the current system (emulator) as specified by Item:

- allocated_areas, allocator, - alloc_util_allocators, allocator_sizes - -

See - above.

-
atom_limit @@ -7445,7 +7438,7 @@ ok This limit can be increased at startup by passing command-line flag +t to - erl(1). + erl(1).

build_type -- cgit v1.2.3 From 95dd51d198c05ee8e93afd4984a0b306bc1fcdc3 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 25 Oct 2016 15:58:24 +0200 Subject: erts: Correct docs for driver_select --- erts/doc/src/erl_driver.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 836a58a676..5191742bc9 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -1916,9 +1916,9 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]> returned. Another thread can still be using the event object internally. To safely close an event object, call driver_select with ERL_DRV_USE and on==0, which - clears all events. Then call - - stop_select when it is safe to close the event + clears all events and then either calls + stop_select + or schedules it to be called when it is safe to close the event object. ERL_DRV_USE is to be set together with the first event for an event object. It is harmless to set ERL_DRV_USE even if it already has been done. Clearing all events but keeping -- cgit v1.2.3 From c2ef711586be55142d0a62825026ad9c0a1d73fa Mon Sep 17 00:00:00 2001 From: Tom Richards Date: Thu, 27 Oct 2016 23:46:21 -0400 Subject: Fix typos in erl_driver.xml --- erts/doc/src/erl_driver.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 5191742bc9..d8bf45c523 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -2039,7 +2039,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]> Set and get limits for busy port message queue. -

Sets and gets limits that will be used for controling the +

Sets and gets limits that will be used for controlling the busy state of the port message queue.

The port message queue is set into a busy state when the amount of command data queued on the @@ -2112,7 +2112,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]> It is used to identify the condition variable in planned future debug functionality.

Returns NULL on failure. The driver - creating the condition variable is responsibile for + creating the condition variable is responsible for destroying it before the driver is unloaded.

This function is thread-safe.

-- cgit v1.2.3 From 1f997eba43ed79c3fe2055446c791c1e6314adf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 26 Oct 2016 18:42:04 +0200 Subject: Document the -epmd_module switch in erl --- erts/doc/src/erl.xml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index eb1d24cf12..f39b640c7e 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -250,6 +250,11 @@ environment variable set to .

+ (init flag) + +

Configures the module responsible to communicate to + epmd. Defaults to erl_epmd.

+
(init flag)

Makes evaluate the expression -- cgit v1.2.3 From cc2503f49e9fa445290740ebd11f1222431f5bd9 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 26 Oct 2016 13:46:06 +0200 Subject: erts: Correct type declaration of match specification head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug reported by Peti Gömöri . --- erts/doc/src/erlang.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b0d25389fd..9646953518 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -9529,6 +9529,10 @@ timestamp() -> + + + Approximation of '$1' | '$2' | '$3' | ... +

Returns trace information about a port, process, function, or event.

@@ -9660,6 +9664,10 @@ timestamp() -> + + Approximation of '$1' | '$2' | '$3' | ... + +

The same as @@ -9672,6 +9680,10 @@ timestamp() -> Set trace pattern for message sending. + + + Approximation of '$1' | '$2' | '$3' | ... +

Sets trace pattern for message sending. Must be combined with @@ -9739,6 +9751,10 @@ timestamp() -> Set trace pattern for tracing of message receiving. + + + Approximation of '$1' | '$2' | '$3' | ... +

Sets trace pattern for message receiving. Must be combined with @@ -9809,6 +9825,10 @@ timestamp() -> + + + Approximation of '$1' | '$2' | '$3' | ... +

Enables or disables call tracing for one or more functions. Must be combined with -- cgit v1.2.3 From 24485c421f15b00d0b5c97633d701373b53897a5 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 1 Nov 2016 11:40:48 +0100 Subject: erts: Add notsup error for load_nif/2 from hipe code --- erts/doc/src/erlang.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3d1775e973..a7ac77d00b 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2618,6 +2618,10 @@ os_prompt%

code of a module that has been upgraded; this is not allowed.
+ notsup + Lack of support. Such as loading NIF library for a + HiPE compiled module. + -- cgit v1.2.3 From c31c70b34fb7ee2b6a579856a296758f2b27a721 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 8 Nov 2016 10:17:58 +0100 Subject: Update release notes --- erts/doc/src/notes.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 412675fd2b..dd260f2d1f 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,50 @@

This document describes the changes made to the ERTS application.

+
Erts 8.1.1 + +
Fixed Bugs and Malfunctions + + +

+ The emulator got a dynamic library dependency towards + libsctp, which on Linux was not intended since the + emulator there loads and resolves the needed sctp + functions in runtime. This has been fixed and a configure + switch --enable-sctp=lib has been added for those who + want such a library dependency.

+

+ Own Id: OTP-13956 Aux Id: ERL-262, ERL-133

+
+ +

+ Fix SIGUSR1 crashdump generation

+

+ Do not generate a core when a crashdump is asked for.

+

+ Own Id: OTP-13997

+
+ +

The new functions in code that allows loading + of many modules at once had a performance problem. While + executing a helper function in the erl_prim_loader + process, garbage messages were produced. The garbages + messages were ignored and ultimately discarded, but there + would be a negative impact on performance and memory + usage. The number of garbage message depended on both the + number of modules to be loaded and the length of the code + path.

+

The functions affected of this problem were: + atomic_load/1, ensure_modules_loaded/1, and + prepare_loading/1.

+

+ Own Id: OTP-14009

+
+
+
+ +
+
Erts 8.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 491cd4c0c0a534ab89c3ebb4c413301c91c7167d Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 22 Nov 2016 14:37:31 +0100 Subject: erts: Add env variable ERL_CRASH_DUMP_BYTES to limit crash dump size --- erts/doc/src/erl.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index f62d3fb170..bd88016ff0 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1533,6 +1533,15 @@ + + +

This variable sets the maximum size of a crash dump file in bytes. + The crash dump will be truncated if this limit is exceeded. If the + variable is not set, no size limit is enforced by default. If the + variable is set to 0, the runtime system does not even attempt + to write a crash dump file.

+

Introduced in ERTS 8.1.2 (Erlang/OTP 19.2).

+

The content of this variable is added to the beginning of the -- cgit v1.2.3 From 0763a36867a702e3075b682973a079e0390144ce Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 23 Nov 2016 15:58:15 +0100 Subject: erts: Add enif_select & enif_open_resource_type_x --- erts/doc/src/erl_nif.xml | 84 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 906c1be17b..e7073a962f 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -699,12 +699,30 @@ typedef struct { Each resource type has a unique name and a destructor function that is called when objects of its type are released.

+ ErlNifResourceTypeInit + + +typedef struct { + ErlNifResourceDtor* dtor; + ErlNifResourceStop* stop; +} ErlNifResourceTypeInit; +

Initialization structure read by + enif_open_resource_type_x.

+
ErlNifResourceDtor typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj);

The function prototype of a resource destructor function.

+ ErlNifResourceStop + + +typedef void ErlNifResourceStop(ErlNifEnv* env, void* obj); +

The function prototype of a resource stop function, + called on the behalf of + enif_select.

+
ErlNifCharEncoding @@ -2238,6 +2256,24 @@ enif_map_iterator_destroy(env, &iter); + + ErlNifResourceType * + enif_open_resource_type_x(ErlNifEnv* env, const char* name, + ErlNifResourceTypeInit* init, + ErlNifResourceFlags flags, ErlNifResourceFlags* tried) + + Create or takeover a resource type. + +

Same as enif_open_resource_type + except is also accept a stop callback for resource types that are + used together with enif_select.

+

Argument init is a pointer to an + ErlNifResourceTypeInit + structure that contains the function pointers for the destructor and the stop callback + of the resource type.

+
+
+ intenif_port_command(ErlNifEnv* env, const ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg) @@ -2345,7 +2381,7 @@ enif_map_iterator_destroy(env, &iter); enif_release_resource(void* obj) Release a resource object. -

Removes a reference to resource object objobtained from +

Removes a reference to resource object obj obtained from enif_alloc_resource. The resource object is destructed when the last reference is removed. @@ -2487,6 +2523,52 @@ enif_map_iterator_destroy(env, &iter); + + int + enif_select(ErlNifEnv* env, ErlNifEvent event, + enum ErlNifSelectFlags mode, void* obj, Eterm ref) + + Manage subscription on IO event. + +

This function can be used to receive asynchronous notifications + when OS-specific event objects become ready for either read or write operations.

+

Argument event identifies the event object. On Unix + systems, the functions select/poll are used. The event + object must be a socket, pipe or other file descriptor object that + select/poll can use.

+

Argument mode describes the type of events to wait for. It can be + ERL_NIF_SELECT_READ, ERL_NIF_SELECT_WRITE or a bitwise + OR combination to wait for both. It can also be ERL_NIF_SELECT_STOP + which is described further below. When a read or write event is triggerred, + a notification message like this is sent to the Erlang process that called + enif_select:

+ {select, Obj, Ref, ready_input | ready_output} +

ready_input or ready_output indicates if the event object + is ready for reading or writing.

+

Argument obj is a resource object obtained from + enif_alloc_resource. + The purpose of the resource objects is as a container of the event object + to manage its state and lifetime. A handle to the resource is received + in the notification message as Obj.

+

Argument ref must be either a reference obtained from + erlang:make_ref/0 + or the atom undefined. It will be passed as Ref in the notifications. + If a selective receive statement is used to wait for the notification + then a reference created just before the receive will exploit a runtime + optimization that bypasses all earlier received messages in the queue.

+

The notifications are one-shot only. To receive further notifications of the same + type (read or write), repeated calls to enif_select must be made.

+

Use ERL_NIF_SELECT_STOP as mode in order to safely + close an event object that has been passed to enif_select. The + stop callback + of the resource obj will be called when it is safe to close + the event object. This safe way of closing event objects must be used + even if all notifications have been received and no further calls to + enif_select have been made.

+

Returns 0 on success, or -1 if invalid arguments.

+
+
+ ErlNifPid * enif_self(ErlNifEnv* caller_env, ErlNifPid* pid) -- cgit v1.2.3 From 91048957f0681dba853f5720d3618aa1c5d0255e Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 29 Nov 2016 09:37:21 +0100 Subject: stdilb: Check for bad type constraints in function types The parser recognizes the 'is_subtype(V, T)' syntax for constraints, and of course the new 'V :: T' syntax, but other variants result in an error message. Up to now, the parser and linter have let badly formed constraints through, and relied upon Dialyzer to emit warnings. is_subtype/2 cannot easily be taken out from the parser. Not only would we need find a way to emit a (linter) warning, but there also needs to be an option for suppressing the linter warning as compilation with +warnings_as_errors has to work. (Notice that the abstract format representation for 'V :: T' is the same as for 'is_subtype(V, T)'.) This correction was triggered by an email from Robert, and Kostis created pull request 1214 to provide a fix. However, Kostis' fix disallowed is_subtype() altogether, which breaks backward compatibility. As of Erlang/OTP 19.0 (ticket OTP-11879), the 'is_subtype(V, T)' is no longer documented. --- erts/doc/src/absform.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index ab00d47425..fe8e3b30e7 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -886,7 +886,7 @@ Rep(Fc) = [Rep(C_1), ..., Rep(C_k)].

- If C is a constraint is_subtype(V, T) or V :: T, + If C is a constraint V :: T, where V is a type variable and T is a type, then Rep(C) = {type,LINE,constraint,[{atom,LINE,is_subtype},[Rep(V),Rep(T)]]}. -- cgit v1.2.3 From fc0427be6d482182ec70f3cd87c73027cfb17ea9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Dec 2016 11:45:22 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 160 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index dd260f2d1f..da6190b685 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,166 @@

This document describes the changes made to the ERTS application.

+
Erts 8.2 + +
Fixed Bugs and Malfunctions + + +

+ Fixed configure failures on MacOSX. Most important + clock_gettime() was detected when building for + MacOSX - El Capitan using XCode 8 despite it is not + available until MacOSX - Sierra.

+

+ Own Id: OTP-13904 Aux Id: ERL-256

+
+ +

+ code:add_pathsa/1 and command line option + -pa both revert the given list of directories when + adding it at the beginning of the code path. This is now + documented.

+

+ Own Id: OTP-13920 Aux Id: ERL-267

+
+ +

+ Fix a compilation error of erts in OpenBSD related to the + usage of the __errno variable.

+

+ Own Id: OTP-13927

+
+ +

+ Fixed so that when enabling tracing on a process that had + an invalid tracer associated with it, the new tracer + overwrites the old tracer. Before this fix, calling + erlang:trace/3 would behave as if the tracer was still + alive and not apply the new trace.

+

+ This fault was introduced in ERTS 8.0.

+

+ Own Id: OTP-13928

+
+ +

+ Fix parsing of -profile_boot 'true' | 'false'

+

+ Own Id: OTP-13955 Aux Id: ERL-280

+
+ +

+ A slight improvement of erlang:get_stacktrace/0 + for exceptions raised in hipe compiled code. Beam + compiled functions in such stack trace was earlier + replaced by some unrelated function. They are now instead + omitted. This is an attempt to reduce the confusion in + the absence of a complete and correct stack trace for + mixed beam and hipe functions.

+

+ Own Id: OTP-13992

+
+ +

Correct type declaration of match specification head. +

+

+ Own Id: OTP-13996

+
+ +

+ HiPE code loading failed for x86_64 if gcc was configured + with --enable-default-pie. Fixed by disabling PIE, + if needed for HiPE, when building the VM.

+

+ Own Id: OTP-14031 Aux Id: ERL-294, PR-1239

+
+ +

+ Faulty arguments could be presented on exception from a + NIF that had rescheduled itself using + enif_schedule_nif().

+

+ Own Id: OTP-14048

+
+ +

+ The runtime system could crash if a garbage collection on + a process was performed immediately after a NIF had been + rescheduled using enif_schedule_nif().

+

+ Own Id: OTP-14049

+
+ +

+ A reference to purged code could be left undetected by + the purge operation if a process just had rescheduled a + NIF call using enif_schedule_nif() when the + process was checked. This could cause a runtime system + crash.

+

+ Own Id: OTP-14050

+
+ +

Fixed a number of dirty scheduler related bugs:

+

Process priority was not handled correct + when scheduling on a dirty scheduler.

+

The runtime system could crash when an exit + signal with a compound exit reason was sent to a process + executing on a dirty scheduler.

The + runtime system crashed when call tracing a process + executing on a dirty scheduler.

A + code purge operation could end up hanging forever when a + process executed on a dirty scheduler

+

+ Own Id: OTP-14051

+
+ +

+ Fixed a number of bugs that caused faulty stack-traces to + be created on exception when a process was traced.

+

+ Own Id: OTP-14055

+
+
+
+ + +
Improvements and New Features + + +

+ Fix minor soft purge race bug that could incorrectly + trigger code_server to load new code for the module if + the soft purge failed and no current version of the + module existed.

+

+ Own Id: OTP-13925

+
+ +

+ To ease troubleshooting, erlang:load_nif/2 now + includes the return value from a failed call to + load/reload/upgrade in the text part of the error tuple. + The crypto NIF makes use of this feature by + returning the source line where/if the initialization + fails.

+

+ Own Id: OTP-13951

+
+ +

+ New environment variable ERL_CRASH_DUMP_BYTES can + be used to limit the size of crash dumps. If the limit is + reached, crash dump generation is aborted and the + generated file will be truncated.

+

+ Own Id: OTP-14046

+
+
+
+ +
+
Erts 8.1.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 2f8d59aa9e8a96d094172db339fd94aae45a90b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Mattsson?= Date: Wed, 2 Nov 2016 12:56:39 +0100 Subject: erts: Make depth of current_stacktrace configurable The BIF process_info(Pid, current_stacktrace) truncates the stacktrace. The old behavior was to truncate long stacktraces to max 8 items. And this was hard coded. Now it is truncated to the value of system_flag(backtrace_depth) instead. The backtrace_depth defaults to 8, but is configurable. --- erts/doc/src/erlang.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 9646953518..112682d713 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4899,7 +4899,9 @@ RealSystem = system + MissedSystem

Returns the current call stack back-trace (stacktrace) of the process. The stack has the same format as returned by - erlang:get_stacktrace/0.

+ erlang:get_stacktrace/0. The depth of the + stacktrace is truncated according to the backtrace_depth + system flag setting.

{dictionary, Dictionary} @@ -6611,7 +6613,9 @@ ok Set system flag backtrace_depth.

Sets the maximum depth of call stack back-traces in the - exit reason element of 'EXIT' tuples.

+ exit reason element of 'EXIT' tuples. The flag + also limits the stacktrace depth returned by process_info + item current_stacktrace.

Returns the old value of the flag.

-- cgit v1.2.3 From c643ad3897587660ebd06afcef5e3dfc7f6c1180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 15 Dec 2016 15:14:50 +0100 Subject: erts: Document SIGTERM handler --- erts/doc/src/erl.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index f39b640c7e..00f7766368 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1585,6 +1585,25 @@
+
+ + Signals +

On Unix systems, the Erlang runtime will interpret two types of signals.

+ + SIGUSR1 + +

A SIGUSR1 signal forces a crash dump.

+
+ SIGTERM + +

A SIGTERM will produce a stop message to the init process. + This is equivalent to a init:stop/0 call.

+

Introduced in ERTS 8.3 (Erlang/OTP 19.3)

+
+
+

The signal SIGUSR2 is reserved for internal usage. No other signals are handled.

+
+
Configuration -- cgit v1.2.3 From 7d475a83abee8a79f8be564e2772dd434780e15f Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 19 Dec 2016 14:24:37 +0100 Subject: Remove faulty release note for these fixes --- erts/doc/src/notes.xml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index da6190b685..11777f0014 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -145,13 +145,6 @@

Own Id: OTP-14051

- -

- Fixed a number of bugs that caused faulty stack-traces to - be created on exception when a process was traced.

-

- Own Id: OTP-14055

-
-- cgit v1.2.3 From c1eebebee04d7a9585d47583f15bf56b25e96a17 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 16 Dec 2016 20:03:28 +0100 Subject: erts: Add some improvements to erl_nif docs --- erts/doc/src/erl_nif.xml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 906c1be17b..185ecd9ed9 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -123,7 +123,7 @@ ok "Hello world!"

A better solution for a real module is to take advantage of the new - directive on load (see section + directive on_load (see section Running a Function When a Module is Loaded in the Erlang Reference Manual) to load the NIF library automatically when the module is @@ -135,27 +135,14 @@ ok away by the compiler, causing loading of the NIF library to fail.

-

A loaded NIF library is tied to the Erlang module code version - that loaded it. If the module is upgraded with a new version, the - new Erlang code need to load its own NIF library (or maybe choose not - to). The new code version can, however, choose to load the - same NIF library as the old code if it wants to. Sharing the - dynamic library means that static data defined by the library - is shared as well. To avoid unintentionally shared static - data, each Erlang module code can keep its own private data. This - private data can be set when the NIF library is loaded and - then retrieved by calling - enif_priv_data.

- -

A NIF library cannot be loaded explicitly. A library is - automatically unloaded when the module code that it belongs to is purged - by the code server.

+

Once loaded, a NIF library is persistent. It will not be unloaded + until the module code version that it belongs to is purged.

Functionality -

All functions that a NIF library needs to do with Erlang are - performed through the NIF API functions. Functions exist +

All interaction between NIF code and the Erlang runtime system is + performed by calling NIF API functions. Functions exist for the following functionality:

@@ -286,6 +273,19 @@ return term; library is postponed as long as there exist resource objects with a destructor function in the library.

+ Module upgrade and static data + +

A loaded NIF library is tied to the Erlang module instance + that loaded it. If the module is upgraded, the new module instance + needs to load its own NIF library (or maybe choose not to). The new + module instance can, however, choose to load the exact same NIF library + as the old code if it wants to. Sharing the dynamic library means that + static data defined by the library is shared as well. To avoid + unintentionally shared static data between module instances, each Erlang + module version can keep its own private data. This private data can be + set when the NIF library is loaded and later retrieved by calling + enif_priv_data.

+
Threads and concurrency

A NIF is thread-safe without any explicit synchronization as @@ -525,7 +525,7 @@ return term;

load is called when the NIF library is loaded and no previously loaded library exists for this module.

*priv_data can be set to point to some private data - that the library needs to keep a state between NIF + if the library needs to keep a state between NIF calls. enif_priv_data returns this pointer. *priv_data is initialized to NULL when load is called.

-- cgit v1.2.3 From 387ff8e3347d21e9ca5ad3d8c3a694bc79d38bca Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 8 Dec 2016 19:26:14 +0100 Subject: Add stop arguments: fd and is_direct_call --- erts/doc/src/erl_nif.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index e7073a962f..94aff7c67b 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -718,10 +718,12 @@ typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj); ErlNifResourceStop -typedef void ErlNifResourceStop(ErlNifEnv* env, void* obj); +typedef void ErlNifResourceStop(ErlNifEnv* env, void* obj, ErlNifEvent event, int is_direct_call);

The function prototype of a resource stop function, called on the behalf of - enif_select.

+ enif_select. obj is the resource, event is OS event, + is_direct_call is true if the call is made directly from enif_select + or false if it is a scheduled call (potentially from another thread).

ErlNifCharEncoding -- cgit v1.2.3 From 4c5d33114edea787833d6aa1b0d51ea9d98b3321 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 16 Dec 2016 19:30:22 +0100 Subject: Add ErlNifSelectReturn --- erts/doc/src/erl_nif.xml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 94aff7c67b..13b72863f3 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2526,7 +2526,7 @@ enif_map_iterator_destroy(env, &iter); - int + enum ErlNifSelectReturn enif_select(ErlNifEnv* env, ErlNifEvent event, enum ErlNifSelectFlags mode, void* obj, Eterm ref) @@ -2567,7 +2567,38 @@ enif_map_iterator_destroy(env, &iter); the event object. This safe way of closing event objects must be used even if all notifications have been received and no further calls to enif_select have been made.

-

Returns 0 on success, or -1 if invalid arguments.

+

Returns an integer where different bits indicate the outcome of the call:

+ + ERL_NIF_SELECT_ERROR + The master error bit. It will always be set if the call failed for + any reason. + ERL_NIF_SELECT_STOP_CALLED + The stop callback was called directly by enif_select. + ERL_NIF_SELECT_STOP_SCHEDULED + The stop callback was scheduled to run on some other thread + or later by this thread. + ERL_NIF_SELECT_INVALID_EVENT + Argument event is not a valid OS event object. + ERL_NIF_SELECT_FAILED + The system call failed to add the event object to the poll set. + +

The return value from a successful call with mode as ERL_NIF_SELECT_STOP, + will contain either bit ERL_NIF_SELECT_STOP_CALLED or + ERL_NIF_SELECT_STOP_SCHEDULED.

+ +

Always use bitwise AND to test the return value. New significant bits + may be added in future releases to give more detailed information for both + failed and successful calls. Do NOT use equallity tests like ==, as + that may cause your application to stop working.

+

Example:

+ +retval = enif_select(env, fd, ERL_NIF_SELECT_READ, resource, ref); +if (retval & ERL_NIF_SELECT_ERROR) { + /* handle error */ +} +/* Success! */ + +
-- cgit v1.2.3 From ca7e946af9c2fdc86c1c74259ee7b6881c5aec1e Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Mon, 19 Dec 2016 11:17:05 +0100 Subject: erts: add erlang:system_info(atom_count) --- erts/doc/src/erlang.xml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3dad09365e..40ddcb8545 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -7224,8 +7224,8 @@ ok - + Information about the CPU topology of the system. @@ -7325,12 +7325,12 @@ ok - - + + Information about the default process heap settings. @@ -7408,7 +7408,7 @@ ok - + @@ -7423,14 +7423,14 @@ ok - + - + @@ -7460,11 +7460,18 @@ ok + Information about the system.

Returns various information about the current system (emulator) as specified by Item:

+ atom_count + + +

Returns the number of atoms currently existing at the + local node. The value is given as an integer.

+
atom_limit -- cgit v1.2.3 From 68e3e3cecd1122bbeb2a86ebfce9bdb7d18929e6 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 12 Jan 2017 15:16:09 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index da6190b685..d4bc819120 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,26 @@

This document describes the changes made to the ERTS application.

+
Erts 8.2.1 + +
Fixed Bugs and Malfunctions + + +

+ Fix a quite rare bug causing VM crash during code loading + and the use of export funs (fun M:F/A) of not yet loaded + modules. Requires a very specfic timing of concurrent + scheduler threads. Has been seen on ARM but can probably + also occure on other architectures. Bug has existed since + OTP R16.

+

+ Own Id: OTP-14144 Aux Id: seq13242

+
+
+
+ +
+
Erts 8.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From f9459092940943876dff040ee997515b96fd5d50 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 4 Jan 2017 18:10:26 +0100 Subject: Scheduler wall time support for dirty schedulers --- erts/doc/src/erlang.xml | 97 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 85 insertions(+), 12 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b3fab3874b..1f64d7be86 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6415,12 +6415,17 @@ lists:map( TotalTime is the total time duration since scheduler_wall_time - activation. The time unit is undefined and can be subject - to change between releases, OSs, and system restarts. - scheduler_wall_time is only to be used to - calculate relative values for scheduler-utilization. - ActiveTime can never exceed - TotalTime.

+ activation for the specific scheduler. Note that + activation time can differ significantly between + schedulers. Currently dirty schedulers are activated + at system start while normal schedulers are activated + some time after the scheduler_wall_time + functionality is enabled. The time unit is undefined + and can be subject to change between releases, OSs, + and system restarts. scheduler_wall_time is only + to be used to calculate relative values for scheduler + utilization. ActiveTime can never + exceed TotalTime.

The definition of a busy scheduler is when it is not idle and is not scheduling (selecting) a process or port, that is:

@@ -6438,15 +6443,37 @@ lists:map( scheduler_wall_time is turned off.

The list of scheduler information is unsorted and can appear in different order between calls.

+

As of ERTS version 9.0, also dirty CPU schedulers will + 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 + statistics(scheduler_wall_time_all) + instead.

+ +

Normal schedulers will have scheduler identifiers in + the range 1 =< SchedulerId =< + erlang:system_info(schedulers). + Dirty CPU schedulers will have scheduler identifiers in + the range erlang:system_info(schedulers) < + SchedulerId =< erlang:system_info(schedulers) + + + erlang:system_info(dirty_cpu_schedulers). +

+

The different types of schedulers handle + specific types of jobs. Every job is assigned to a specific + scheduler type. Jobs can migrate between different schedulers + of the same type, but never between schedulers of different + types. This fact has to be taken under consideration when + evaluating the result returned.

Using scheduler_wall_time to calculate - scheduler-utilization:

+ scheduler utilization:

 > erlang:system_flag(scheduler_wall_time, true).
 false
 > Ts0 = lists:sort(erlang:statistics(scheduler_wall_time)), ok.
 ok

Some time later the user takes another snapshot and calculates - scheduler-utilization per scheduler, for example:

+ scheduler utilization per scheduler, for example:

 > Ts1 = lists:sort(erlang:statistics(scheduler_wall_time)), ok.
 ok
@@ -6461,11 +6488,32 @@ ok
  {7,0.973237033077876},
  {8,0.9741297293248656}]

Using the same snapshots to calculate a total - scheduler-utilization:

+ scheduler utilization:

 > {A, T} = lists:foldl(fun({{_, A0, T0}, {_, A1, T1}}, {Ai,Ti}) ->
-	{Ai + (A1 - A0), Ti + (T1 - T0)} end, {0, 0}, lists:zip(Ts0,Ts1)), A/T.
+	{Ai + (A1 - A0), Ti + (T1 - T0)} end, {0, 0}, lists:zip(Ts0,Ts1)),
+	TotalSchedulerUtilization = A/T.
+0.9769136803764825
+

Total scheduler utilization will equal 1.0 when + all schedulers have been active all the time between the + two measurements.

+

Another (probably more) useful value is to calculate + total scheduler utilization weighted against maximum amount + of available CPU time:

+
+> WeightedSchedulerUtilization = (TotalSchedulerUtilization
+                                  * (erlang:system_info(schedulers)
+                                     + erlang:system_info(dirty_cpu_schedulers)))
+                                 / erlang:system_info(logical_processors_available).
 0.9769136803764825
+

This weighted scheduler utilization will reach 1.0 + when schedulers are active the same amount of time as + maximum available CPU time. If more schedulers exist + than available logical processors, this value may + be greater than 1.0.

+

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.

scheduler_wall_time is by default disabled. To enable it, use @@ -6476,6 +6524,31 @@ ok + Information about each schedulers work time. + + +

The same as + statistics(scheduler_wall_time), + except that it also include information about all dirty I/O + schedulers.

+

Dirty IO schedulers will have scheduler identifiers in + the range + erlang:system_info(schedulers) + + + erlang:system_info(dirty_cpu_schedulers) < + SchedulerId =< erlang:system_info(schedulers) + + erlang:system_info(dirty_cpu_schedulers) + + + erlang:system_info(dirty_io_schedulers).

+

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, + CPU utilization is not expected to be high due to + this work.

+ + + + Information about active processes and ports.

Returns the total amount of active processes and ports in @@ -6495,7 +6568,7 @@ ok - + Information about the run-queue lengths.

Returns the total length of the run queues. That is, the number @@ -6515,7 +6588,7 @@ ok - + Information about wall clock.

Returns information about wall clock. wall_clock can -- cgit v1.2.3 From 0d20adbfbb0918c8d6bfc629e9e4ff89d2ef1a64 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 12 Jan 2017 14:55:53 +0100 Subject: Remove experimental disclaimer on dirty schedulers --- erts/doc/src/erl.xml | 12 +++--------- erts/doc/src/erl_nif.xml | 24 +++++++++--------------- erts/doc/src/erlang.xml | 14 -------------- 3 files changed, 12 insertions(+), 38 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 8da832ac37..4e32118405 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -946,9 +946,7 @@ schedulers was allowed to be unlimited, dirty CPU bound jobs would potentially starve normal jobs.

This option is ignored if the emulator does not have threading - support enabled. This option is experimental and - is supported only if the emulator was configured and built with - support for dirty schedulers enabled (it is disabled by default).

+ support enabled.

@@ -974,9 +972,7 @@ either order) results in 2 dirty CPU scheduler threads (50% of 4) and 1 dirty CPU scheduler thread online (25% of 4).

This option is ignored if the emulator does not have threading - support enabled. This option is experimental and - is supported only if the emulator was configured and built with - support for dirty schedulers enabled (it is disabled by default).

+ support enabled.

@@ -992,9 +988,7 @@ bound jobs on dirty I/O schedulers, these jobs might starve ordinary jobs executing on ordinary schedulers.

This option is ignored if the emulator does not have threading - support enabled. This option is experimental and - is supported only if the emulator was configured and built with - support for dirty schedulers enabled (it is disabled by default).

+ support enabled.

diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 185ecd9ed9..51b095e6ef 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -402,14 +402,14 @@ return term; Dirty NIF -

The dirty NIF functionality described here - is experimental. Dirty NIF support is available only when - the emulator is configured with dirty schedulers enabled. This - feature is disabled by default. The Erlang runtime - without SMP support does not support dirty schedulers even when - the dirty scheduler support is enabled. To check at runtime for - the presence of dirty scheduler threads, code can use the - +

Dirty NIF support is available only when the emulator is + configured with dirty scheduler support. As of ERTS version + 9.0, dirty scheduler support is enabled by default on the + runtime system with SMP support. The Erlang runtime without + SMP support does not support dirty schedulers even + when the dirty scheduler support is explicitly enabled. To + check at runtime for the presence of dirty scheduler threads, + code can use the enif_system_info() API function.

A NIF that cannot be split and cannot execute in a millisecond @@ -642,9 +642,6 @@ typedef struct {

flags can be used to indicate that the NIF is a dirty NIF that is to be executed on a dirty scheduler thread.

-

The dirty NIF functionality described here is - experimental. You have to enable support for dirty - schedulers when building OTP to try out the functionality.

If the dirty NIF is expected to be CPU-bound, its flags field is to be set to ERL_NIF_DIRTY_JOB_CPU_BOUND or ERL_NIF_DIRTY_JOB_IO_BOUND.

@@ -2450,9 +2447,6 @@ enif_map_iterator_destroy(env, &iter); application to break up long-running work into multiple regular NIF calls or to schedule a dirty NIF to execute on a dirty scheduler thread.

-

The dirty NIF functionality described here is - experimental. You have to enable support for dirty - schedulers when building OTP to try out the functionality.

fun_name @@ -2463,7 +2457,7 @@ enif_map_iterator_destroy(env, &iter); flags

Must be set to 0 for a regular NIF. If the emulator was - built with the experimental dirty scheduler support enabled, + built with dirty scheduler support enabled, flags can be set to either ERL_NIF_DIRTY_JOB_CPU_BOUND if the job is expected to be CPU-bound, or ERL_NIF_DIRTY_JOB_IO_BOUND for diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 1f64d7be86..7815bfa510 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6794,11 +6794,6 @@ ok down to 3. Similarly, the number of dirty CPU schedulers online increases proportionally to increases in the number of schedulers online.

- -

The dirty schedulers functionality is experimental. - Enable support for dirty schedulers when building OTP to - try out the functionality.

-

For more information, see erlang:system_info(dirty_cpu_schedulers) and @@ -7643,9 +7638,6 @@ ok +SDcpu or +SDPcpu in erl(1).

-

Notice that the dirty schedulers functionality is - experimental. Enable support for dirty schedulers when - building OTP to try out the functionality.

See also erlang:system_flag(dirty_cpu_schedulers_online, @@ -7675,9 +7667,6 @@ ok startup by passing command-line flag +SDcpu in erl(1).

-

Notice that the dirty schedulers functionality is - experimental. Enable support for dirty schedulers when - building OTP to try out the functionality.

For more information, see erlang:system_info(dirty_cpu_schedulers), @@ -7699,9 +7688,6 @@ ok

This value can be set at startup by passing command-line argument +SDio in erl(1).

-

Notice that the dirty schedulers functionality is - experimental. Enable support for dirty schedulers when - building OTP to try out the functionality.

For more information, see erlang:system_info(dirty_cpu_schedulers), -- cgit v1.2.3 From bfcf88311828b93a833ce96ad1a518b8eca08552 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 18 Jan 2017 14:40:25 +0100 Subject: Change exception for enif_schedule_nif() with dirty flags --- erts/doc/src/erl_nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 51b095e6ef..74a551d60b 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2463,7 +2463,7 @@ enif_map_iterator_destroy(env, &iter); CPU-bound, or ERL_NIF_DIRTY_JOB_IO_BOUND for jobs that will be I/O-bound. If dirty scheduler threads are not available in the emulator, an attempt to schedule such a job - results in a badarg exception.

+ results in a notsup exception.

argc and argv -- cgit v1.2.3 From a198f78edcae91366cbd75df7539116ccb85adec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Mon, 1 Aug 2016 14:39:33 +0200 Subject: erts: Remove erlang:hash/2 from documentation --- erts/doc/src/erlang.xml | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 7815bfa510..2859f22bf4 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1954,26 +1954,6 @@ os_prompt%
- - - Hash function (deprecated). - -

Returns a hash value for Term within the range - 1..Range. The maximum range is 1..2^27-1.

- -

This BIF is deprecated, as the hash value can differ on - different architectures. The hash values for integer - terms > 2^27 and large binaries are - poor. The BIF is retained for backward compatibility - reasons (it can have been used to hash records into a file), - but all new code is to use one of the BIFs - erlang:phash/2 or - erlang:phash2/1,2 - instead.

-
-
-
- Head of a list. @@ -3818,9 +3798,6 @@ RealSystem = system + MissedSystem Term within the range 1..Range. The maximum value for Range is 2^32.

-

This BIF can be used instead of the old deprecated BIF - erlang:hash/2, as it calculates better hashes for - all data types, but consider using phash2/1,2 instead.

-- cgit v1.2.3 From 433918a391238187a61532f13b504a97e6cb4a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Mon, 30 Jan 2017 11:09:28 +0100 Subject: erts: Remove unnecessary warnings --- erts/doc/src/erlang.xml | 8 -------- 1 file changed, 8 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 2859f22bf4..8865f8abdc 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3832,10 +3832,6 @@ RealSystem = system + MissedSystem

Returns a string corresponding to the text representation of Pid.

- -

This BIF is intended for debugging and is not to be used - in application programs.

-
@@ -4408,10 +4404,6 @@ RealSystem = system + MissedSystem

Returns a string corresponding to the text representation of the port identifier Port.

- -

This BIF is intended for debugging. It is not to be used - in application programs.

-
-- cgit v1.2.3 From 26b59dfe67ef551cd94765557cdd8c79794bcc38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 31 May 2016 14:28:54 +0200 Subject: Add new AtU8 beam chunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new chunk stores atoms encoded in UTF-8. beam_lib has also been modified to handle the new 'utf8_atoms' attribute while the 'atoms' attribute may be a missing chunk from now on. The binary_to_atom/2 BIF can now encode any utf8 binary with up to 255 characters. The list_to_atom/1 BIF can now accept codepoints higher than 255 with up to 255 characters (thanks to Björn Gustavsson). --- erts/doc/src/erl_ext_dist.xml | 15 +++++---------- erts/doc/src/erlang.xml | 35 +++++++++++++---------------------- 2 files changed, 18 insertions(+), 32 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_ext_dist.xml b/erts/doc/src/erl_ext_dist.xml index 4f799f8f34..a436a9ca74 100644 --- a/erts/doc/src/erl_ext_dist.xml +++ b/erts/doc/src/erl_ext_dist.xml @@ -119,16 +119,11 @@ Compressed Data Format when Expanded -

As from ERTS 5.10 (OTP R16) support - for UTF-8 encoded atoms has been introduced in the external format. - However, only characters that can be encoded using Latin-1 (ISO-8859-1) - are currently supported in atoms. The support for UTF-8 encoded atoms - in the external format has been implemented to be able to support - all Unicode characters in atoms in some future release. - Until full Unicode support for atoms has been introduced, - it is an error to pass atoms containing - characters that cannot be encoded in Latin-1, and the behavior is - undefined.

+

As from ERTS 9.0 (OTP 20), UTF-8 encoded atoms may contain any Unicode + character. Although the support for UTF-8 encoded atoms in the external + format is available since ERTS 5.10 (OTP R16), passing atoms that cannot + be encoded in Latin-1 is an error in versions earlier than + Erlang/OTP 20, and the behavior is undefined.

When distribution flag DFLAG_UTF8_ATOMS has been exchanged between both nodes in the diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b3fab3874b..cf038c49f0 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -325,16 +325,11 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)). is latin1, one byte exists for each character in the text representation. If Encoding is utf8 or - unicode, the characters are encoded using UTF-8 - (that is, characters from 128 through 255 are - encoded in two bytes).

+ unicode, the characters are encoded using UTF-8 where + characters may require multiple bytes.

-

atom_to_binary(Atom, latin1) never - fails, as the text representation of an atom can only - contain characters from 0 through 255. In a future release, - the text representation - of atoms can be allowed to contain any Unicode character and - atom_to_binary(Atom, latin1) then fails if the +

As from Erlang/OTP 20, atoms can contain any Unicode character + and atom_to_binary(Atom, latin1) may fail if the text representation for Atom contains a Unicode character > 255.

@@ -402,13 +397,11 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)). translation of bytes in the binary is done. If Encoding is utf8 or unicode, the binary must contain - valid UTF-8 sequences. Only Unicode characters up - to 255 are allowed.

+ valid UTF-8 sequences.

-

binary_to_atom(Binary, utf8) fails if - the binary contains Unicode characters > 255. - In a future release, such Unicode characters can be allowed and - binary_to_atom(Binary, utf8) does then not fail. +

As from Erlang/OTP 20, binary_to_atom(Binary, utf8) + is capable of encoding any Unicode character. Earlier versions would + fail if the binary contained Unicode characters > 255. For more information about Unicode support in atoms, see the note on UTF-8 encoded atoms @@ -419,9 +412,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)). > binary_to_atom(<<"Erlang">>, latin1). 'Erlang' > binary_to_atom(<<1024/utf8>>, utf8). -** exception error: bad argument - in function binary_to_atom/2 - called as binary_to_atom(<<208,128>>,utf8) +'Ѐ' @@ -2401,10 +2392,10 @@ os_prompt%

Returns the atom whose text representation is String.

-

String can only contain ISO-latin-1 - characters (that is, numbers < 256) as the implementation does not - allow Unicode characters equal to or above 256 in atoms. - For more information on Unicode support in atoms, see +

As from Erlang/OTP 20, String may contain + any Unicode character. Earlier versions allowed only ISO-latin-1 + characters as the implementation did not allow Unicode characters + above 255. For more information on Unicode support in atoms, see note on UTF-8 encoded atoms in section "External Term Format" in the User's Guide.

-- cgit v1.2.3 From 4751ac228fc09c6421f521b9e5a1a0f2b2eebade Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 1 Feb 2017 18:32:57 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index f816cdf3a8..09f190aa8d 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,56 @@

This document describes the changes made to the ERTS application.

+
Erts 7.3.1.3 + +
Fixed Bugs and Malfunctions + + +

+ A bug has been fixed where if erlang was started +B on a + unix platform it would be killed by a SIGUSR2 signal when + creating a crash dump.

+

+ Own Id: OTP-13425 Aux Id: ERL-94

+
+ +

+ Calls to erl_drv_send_term() or + erl_drv_output_term() from a non-scheduler thread + while the corresponding port was invalid caused the + emulator to enter an inconsistent state which eventually + caused an emulator crash.

+

+ Own Id: OTP-13866

+
+ +

Driver and NIF operations accessing processes or ports + could cause an emulator crash when used from + non-scheduler threads. Those operations are:

+ erl_drv_send_term() + driver_send_term() + erl_drv_output_term() + driver_output_term() + enif_send() + enif_port_command() +

+ Own Id: OTP-13869

+
+ +

+ Fix bug in binary_to_term for binaries created by + term_to_binary with option compressed. The + bug can cause badarg exception for a valid binary + when Erlang VM is linked against a zlib library of + version 1.2.9 or newer. Bug exists since OTP 17.0.

+

+ Own Id: OTP-14159 Aux Id: ERL-340

+
+
+
+ +
+
Erts 7.3.1.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From fc0477a67641b9ba344de595b7fec2431208f8e6 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 24 Jan 2017 19:50:25 +0100 Subject: Atomic reference count of binaries also in non-SMP NIF resources was not handled in a thread-safe manner in the runtime system without SMP support. As a consequence of this fix, the following driver functions are now thread-safe also in the runtime system without SMP support: - driver_free_binary() - driver_realloc_binary() - driver_binary_get_refc() - driver_binary_inc_refc() - driver_binary_dec_refc() --- erts/doc/src/erl_driver.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index d8bf45c523..7fbe97bc0b 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -1103,8 +1103,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Decrements the reference count on bin and returns the reference count reached after the decrement.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

The reference count of driver binary is normally to be decremented by calling @@ -1124,8 +1123,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Returns the current reference count on bin.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

@@ -1137,8 +1135,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Increments the reference count on bin and returns the reference count reached after the increment.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

@@ -1434,8 +1431,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]> driver_alloc_binary. As binaries in Erlang are reference counted, the binary can still be around.

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

@@ -1872,8 +1868,7 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]>

Resizes a driver binary, while keeping the data.

Returns the resized driver binary on success. Returns NULL on failure (out of memory).

-

This function is only thread-safe when the emulator with SMP - support is used.

+

This function is thread-safe.

-- cgit v1.2.3 From 6474bd146ba11a84ed3805f4b158bf752fd5ce8b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 7 Feb 2017 09:46:31 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index d4bc819120..1d3b198f1b 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,34 @@

This document describes the changes made to the ERTS application.

+
Erts 8.2.2 + +
Fixed Bugs and Malfunctions + + +

+ Fix bug in binary_to_term for binaries created by + term_to_binary with option compressed. The + bug can cause badarg exception for a valid binary + when Erlang VM is linked against a zlib library of + version 1.2.9 or newer. Bug exists since OTP 17.0.

+

+ Own Id: OTP-14159 Aux Id: ERL-340

+
+ +

+ The driver efile_drv when opening a file now use fstat() + on the open file instead of stat() before opening, if + fstat() exists. This avoids a race when the file happens + to change between stat() and open().

+

+ Own Id: OTP-14184 Aux Id: seq-13266

+
+
+
+ +
+
Erts 8.2.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 75fdce43ef567668bb89508b9b8ce0df7efaa569 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 6 Feb 2017 17:15:52 +0100 Subject: erts: Add enif_monitor_process and enif_demonitor_process --- erts/doc/src/erl_nif.xml | 67 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 8cdfc80879..bd72bdb691 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -711,6 +711,21 @@ typedef struct { typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj);

The function prototype of a resource destructor function.

+

The obj argument is a pointer to the resource. The only + allowed use for the resource in the destructor is to access its + user data one final time. The destructor is guaranteed to be the + last callback before the resource is deallocated.

+ + ErlNifResourceDown + + +typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, const ErlNifPid* pid, const ErlNifMonitor* mon); +

The function prototype of a resource down function, + called on the behalf of + enif_monitor_process. obj is the resource, pid + is the identity of the monitored process that is exiting, and mon + is the identity of the monitor. +

ErlNifResourceStop @@ -1021,6 +1036,29 @@ typedef enum { + + intenif_demonitor_process(ErlNifEnv* env, void* obj, + const ErlNifMonitor* mon) + Cancel a process monitor. + + +

Cancels a monitor created earlier with + enif_monitor_process. Argument obj is a pointer + to the resource holding the monitor and *mon identifies the monitor.

+

Returns 0 if the monitor was successfully identified and removed. + Returns a non-zero value if the monitor could not be identified, which means + it was either

+ + never created for this resource + already triggered + just about to be triggered by a concurrent thread + +

This function is only thread-safe when the emulator with SMP support + is used. It can only be used in a non-SMP emulator from a NIF-calling + thread.

+
+
+ int enif_equal_tids(ErlNifTid tid1, ErlNifTid tid2) @@ -2136,6 +2174,31 @@ enif_map_iterator_destroy(env, &iter); + + intenif_monitor_process(ErlNifEnv* env, void* obj, + const ErlNifPid* target_pid, ErlNifMonitor* mon) + Monitor a process from a resource. + + +

Starts monitoring a process from a resource. When a process is + monitored, a process exit results in a call to the provided + + down callback associated with the resource type.

+

Argument obj is pointer to the resource to hold the monitor and + *target_pid identifies the local process to be monitored.

+

If mon is not NULL, a successful call stores the + identity of the monitor in the struct pointed to by mon. + This identifier is used to refer to the monitor for later removal or + compare. A monitor is automatically removed when it triggers or when + the resource is deallocated.

+

Returns 0 on success, < 0 if no down callback is + provided, and > 0 if the process is no longer alive.

+

This function is only thread-safe when the emulator with SMP support + is used. It can only be used in a non-SMP emulator from a NIF-calling + thread.

+
+
+ ErlNifTime enif_monotonic_time(ErlNifTimeUnit time_unit) @@ -2268,8 +2331,8 @@ enif_map_iterator_destroy(env, &iter); used together with enif_select.

Argument init is a pointer to an ErlNifResourceTypeInit - structure that contains the function pointers for the destructor and the stop callback - of the resource type.

+ structure that contains the function pointers for destructor, down and stop callbacks + for the resource type.

-- cgit v1.2.3 From d85e74e0c0e4bc66c875e2fd5f54d89255df0047 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 9 Feb 2017 15:23:11 +0100 Subject: erts: Add pid argument to enif_select --- erts/doc/src/erl_nif.xml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index bd72bdb691..9800a530f2 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2584,8 +2584,8 @@ enif_map_iterator_destroy(env, &iter); enum ErlNifSelectReturn - enif_select(ErlNifEnv* env, ErlNifEvent event, - enum ErlNifSelectFlags mode, void* obj, Eterm ref) + enif_select(ErlNifEnv* env, ErlNifEvent event, enum ErlNifSelectFlags mode, + void* obj, const ErlNifPid* pid, ERL_NIF_TERM ref) Manage subscription on IO event. @@ -2599,11 +2599,12 @@ enif_map_iterator_destroy(env, &iter); ERL_NIF_SELECT_READ, ERL_NIF_SELECT_WRITE or a bitwise OR combination to wait for both. It can also be ERL_NIF_SELECT_STOP which is described further below. When a read or write event is triggerred, - a notification message like this is sent to the Erlang process that called - enif_select:

+ a notification message like this is sent to the process identified by + pid:

{select, Obj, Ref, ready_input | ready_output}

ready_input or ready_output indicates if the event object is ready for reading or writing.

+

Argument pid may be NULL to indicate the calling process.

Argument obj is a resource object obtained from enif_alloc_resource. The purpose of the resource objects is as a container of the event object @@ -2616,7 +2617,8 @@ enif_map_iterator_destroy(env, &iter); then a reference created just before the receive will exploit a runtime optimization that bypasses all earlier received messages in the queue.

The notifications are one-shot only. To receive further notifications of the same - type (read or write), repeated calls to enif_select must be made.

+ type (read or write), repeated calls to enif_select must be made + after receiving each notification.

Use ERL_NIF_SELECT_STOP as mode in order to safely close an event object that has been passed to enif_select. The stop callback -- cgit v1.2.3 From a8d5234c77634df9522727ff200cef4fcab49c22 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 9 Feb 2017 17:30:30 +0100 Subject: erts: Change return value for enif_select to negative int as error and positive as success. --- erts/doc/src/erl_nif.xml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 9800a530f2..e8e7bd4a80 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2583,7 +2583,7 @@ enif_map_iterator_destroy(env, &iter); - enum ErlNifSelectReturn + int enif_select(ErlNifEnv* env, ErlNifEvent event, enum ErlNifSelectFlags mode, void* obj, const ErlNifPid* pid, ERL_NIF_TERM ref) @@ -2626,36 +2626,36 @@ enif_map_iterator_destroy(env, &iter); the event object. This safe way of closing event objects must be used even if all notifications have been received and no further calls to enif_select have been made.

-

Returns an integer where different bits indicate the outcome of the call:

+

Returns a non-negative value on success where the following bits can be set:

- ERL_NIF_SELECT_ERROR - The master error bit. It will always be set if the call failed for - any reason. ERL_NIF_SELECT_STOP_CALLED The stop callback was called directly by enif_select. ERL_NIF_SELECT_STOP_SCHEDULED The stop callback was scheduled to run on some other thread or later by this thread. + +

Returns a negative value if the call failed where the follwing bits can be set:

+ ERL_NIF_SELECT_INVALID_EVENT Argument event is not a valid OS event object. ERL_NIF_SELECT_FAILED The system call failed to add the event object to the poll set. -

The return value from a successful call with mode as ERL_NIF_SELECT_STOP, - will contain either bit ERL_NIF_SELECT_STOP_CALLED or - ERL_NIF_SELECT_STOP_SCHEDULED.

-

Always use bitwise AND to test the return value. New significant bits - may be added in future releases to give more detailed information for both - failed and successful calls. Do NOT use equallity tests like ==, as - that may cause your application to stop working.

+

Use bitwise AND to test for specific bits in the return vaue. + New significant bits may be added in future releases to give more detailed + information for both failed and successful calls. Do NOT use equallity tests + like ==, as that may cause your application to stop working.

Example:

-retval = enif_select(env, fd, ERL_NIF_SELECT_READ, resource, ref); -if (retval & ERL_NIF_SELECT_ERROR) { +retval = enif_select(env, fd, ERL_NIF_SELECT_STOP, resource, ref); +if (retval < 0) { /* handle error */ } /* Success! */ +if (retval & ERL_NIF_SELECT_STOP_CALLED) { + /* ... */ +}
-- cgit v1.2.3 From 7c06ca6231b812965305522284dd9f2653ced98d Mon Sep 17 00:00:00 2001 From: Andrew Dryga Date: Tue, 14 Feb 2017 11:30:41 +0200 Subject: Fixed typos in erts --- erts/doc/src/erl.xml | 6 +++--- erts/doc/src/erl_tracer.xml | 2 +- erts/doc/src/erlang.xml | 2 +- erts/doc/src/erts_alloc.xml | 2 +- erts/doc/src/notes.xml | 14 +++++++------- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 4e32118405..29fef7348b 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -638,7 +638,7 @@ this value also applies to command-line parameters and environment variables (see section - Unicode in Enviroment and Parameters in the STDLIB + Unicode in Environment and Parameters in the STDLIB User's Guide).

@@ -674,7 +674,7 @@ this value also applies to command-line parameters and environment variables (see section - Unicode in Enviroment and Parameters in the STDLIB + Unicode in Environment and Parameters in the STDLIB User's Guide).

@@ -695,7 +695,7 @@ this value also applies to command-line parameters and environment variables (see section - Unicode in Enviroment and Parameters in the STDLIB + Unicode in Environment and Parameters in the STDLIB User's Guide).

diff --git a/erts/doc/src/erl_tracer.xml b/erts/doc/src/erl_tracer.xml index 43613c31b1..2681a19da0 100644 --- a/erts/doc/src/erl_tracer.xml +++ b/erts/doc/src/erl_tracer.xml @@ -103,7 +103,7 @@ If set the tracer has been requested to include a time stamp. extra - If set the tracepoint has included additonal data about + If set the tracepoint has included additional data about the trace event. What the additional data is depends on which TraceTag has been triggered. The extra trace data corresponds to the fifth element in the trace tuples described in diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 8d340a15f5..352d30f3b4 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4591,7 +4591,7 @@ RealSystem = system + MissedSystem

If the process potentially can get many messages, you are advised to set the flag to off_heap. This because a garbage collection with many messages placed on - the heap can become extremly expensive and the process can + the heap can become extremely expensive and the process can consume large amounts of memory. Performance of the actual message passing is however generally better when not using flag off_heap.

diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 8ab35851c1..49dadfb42c 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -452,7 +452,7 @@ utilization value > 0 is used, allocator instances are allowed to abandon multiblock carriers. If de (default enabled) is passed instead of a ]]>, - a recomended non-zero utilization value is used. The value + a recommended non-zero utilization value is used. The value chosen depends on the allocator type and can be changed between ERTS versions. Defaults to de, but this can be changed in the future.

diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index ae1d2b1d93..05142c9338 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -564,7 +564,7 @@

- Fixed a VM crash that occured in a garbage collection of + Fixed a VM crash that occurred in a garbage collection of a process when it had received binaries. This bug was introduced in ERTS version 8.0 (OTP 19.0).

@@ -581,7 +581,7 @@

- Fixed a VM crash that occured in garbage collection of a + Fixed a VM crash that occurred in garbage collection of a process when it had received maps over the distribution. This bug was introduced in ERTS version 8.0 (OTP 19.0).

@@ -5682,7 +5682,7 @@ dependent, so applications aiming to be portable should consider using {ipv6_v6only,true} when creating an inet6 listening/destination socket, and if - neccesary also create an inet socket on the same + necessary also create an inet socket on the same port for IPv4 traffic. See the documentation.

Own Id: OTP-8928 Aux Id: kunagi-193 [104]

@@ -6063,7 +6063,7 @@ This change of default value will reduce lock contention on ETS tables using the read_concurrency option at the expense of memory consumption when the amount of - schedulers and logical processors are beween 8 and 64. + schedulers and logical processors are between 8 and 64. For more information, see documentation of the +rg command line argument of erl(1).

@@ -7040,7 +7040,7 @@

For the subsection about process_flag(save_calls, N) there's an unrelated paragraph about process priorities - which was copied from the preceeding subsection regarding + which was copied from the preceding subsection regarding process_flag(priority, Level). (Thanks to Filipe David Manana)

@@ -8255,7 +8255,7 @@

Wx on MacOS X generated complains on stderr about certain - cocoa functions not beeing called from the "Main thread". + cocoa functions not being called from the "Main thread". This is now corrected.

Own Id: OTP-9081

@@ -9246,7 +9246,7 @@

The empd program could loop and consume 100% - CPU time if an unexpected error ocurred in + CPU time if an unexpected error occurred in listen() or accept(). Now epmd will terminate if a non-recoverable error occurs. (Thanks to Michael Santos.)

-- cgit v1.2.3 From b0f0c476dc6738ddebc6d1f189a4d5c4f8ecf8de Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 14 Feb 2017 14:04:03 +0100 Subject: Fix erl_nif doc --- erts/doc/src/erl_nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index a55092332e..b31052287d 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2649,7 +2649,7 @@ enif_map_iterator_destroy(env, &iter);

Example:

retval = enif_select(env, fd, ERL_NIF_SELECT_STOP, resource, ref); -if (retval < 0) { +if (retval < 0) { /* handle error */ } /* Success! */ -- cgit v1.2.3 From 9c0ab3723c4cfb7f2d9061b661ae6a0331e72c8d Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 22 Feb 2017 12:01:37 +0100 Subject: Add docs for enif_compare_monitors and ErlNifMonitor --- erts/doc/src/erl_nif.xml | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index b31052287d..b0a632d2d6 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -675,6 +675,18 @@ typedef struct {

When receiving data from untrusted sources, use option ERL_NIF_BIN2TERM_SAFE.

+ ErlNifMonitor + +

This is an opaque data type that identifies a monitor.

+

The nif writer is to provide the memory for storing the + monitor when calling + enif_monitor_process. The + address of the data is not stored by the runtime system, so + ErlNifMonitor can be used as any other data, it + can be copied, moved in memory, forgotten, and so on. + To compare two monitors, + enif_compare_monitors must be used.

+
ErlNifPid

A process identifier (pid). In contrast to pid terms (instances of @@ -909,6 +921,21 @@ typedef enum { + + intenif_compare_monitors(const ErlNifMonitor + *monitor1, const ErlNifMonitor *monitor2) + Compare two monitors. + + +

Compares two ErlNifMonitors. + Can also be used to imply some artificial order on monitors, + for whatever reason.

+

Returns 0 if monitor1 and monitor2 are equal, + < 0 if monitor1 < monitor2, and + > 0 if monitor1 > monitor2.

+ + + void enif_cond_broadcast(ErlNifCond *cnd) @@ -1042,7 +1069,7 @@ typedef enum { Cancel a process monitor. -

Cancels a monitor created earlier with +

Cancels a monitor created earlier with enif_monitor_process. Argument obj is a pointer to the resource holding the monitor and *mon identifies the monitor.

Returns 0 if the monitor was successfully identified and removed. @@ -1050,6 +1077,7 @@ typedef enum { it was either

never created for this resource + already cancelled already triggered just about to be triggered by a concurrent thread @@ -2182,14 +2210,19 @@ enif_map_iterator_destroy(env, &iter);

Starts monitoring a process from a resource. When a process is monitored, a process exit results in a call to the provided - + down callback associated with the resource type.

Argument obj is pointer to the resource to hold the monitor and *target_pid identifies the local process to be monitored.

If mon is not NULL, a successful call stores the - identity of the monitor in the struct pointed to by mon. - This identifier is used to refer to the monitor for later removal or - compare. A monitor is automatically removed when it triggers or when + identity of the monitor in the + ErlNifMonitor + struct pointed to by mon. This identifier is used to refer to the + monitor for later removal with + enif_demonitor_process + or compare with + enif_compare_monitors. + A monitor is automatically removed when it triggers or when the resource is deallocated.

Returns 0 on success, < 0 if no down callback is provided, and > 0 if the process is no longer alive.

-- cgit v1.2.3 From 1b3b07e78580435477eec4d8558e91167b7c03aa Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 28 Feb 2017 14:52:08 +0100 Subject: zlib: Add warning for option WindowBits values 8 and -8. --- erts/doc/src/zlib.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 138414a880..583d21ad7b 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -315,6 +315,15 @@ list_to_binary([B1,B2]) WindowBits value suppresses the zlib header (and checksum) from the stream. Notice that the zlib source mentions this only as a undocumented feature.

+ +

Due to a known bug in zlib, WindowsBits values 8 and -8 + do not work as expected. In zlib versions before 1.2.9 values + 8 and -8 are automatically changed to 9 and -9. From zlib version 1.2.9 + value -8 is rejected causing zlib:deflateInit/6 to fail + (8 is still changed to 9). It also seem possible that future versions + of zlib may fix this bug and start accepting 8 and -8 as is.

+

Conclusion: Avoid values 8 and -8 unless you know your zlib version supports them.

+
MemLevel -- cgit v1.2.3 From 0989edec06b050fd480da1144f1e314514d4bf54 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 3 Mar 2017 10:00:48 +0100 Subject: erts: Clarify process_info(pid(), binary) docs Correct id for 7b419c0a38bd4db: OTP-14234 --- erts/doc/src/erlang.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 112682d713..cf5f3fc99b 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4869,7 +4869,9 @@ RealSystem = system + MissedSystem

BinInfo is a list containing miscellaneous information about binaries currently referred to by this process. This InfoTuple can be changed or - removed without prior notice.

+ removed without prior notice. In the current implementation + BinInfo is a list of tuples. The tuples + contain; BinaryId, BinarySize, BinaryRefcCount.

{catchlevel, CatchLevel} -- cgit v1.2.3 From 358d3f1b72a8b18909d18d0d85fe240856bdd8d5 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 6 Mar 2017 16:17:37 +0100 Subject: erts: Fix typo and clearify warning in zlib docs --- erts/doc/src/zlib.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 583d21ad7b..7ae507b8f6 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -316,7 +316,7 @@ list_to_binary([B1,B2]) (and checksum) from the stream. Notice that the zlib source mentions this only as a undocumented feature.

-

Due to a known bug in zlib, WindowsBits values 8 and -8 +

Due to a known bug in the underlying zlib library, WindowBits values 8 and -8 do not work as expected. In zlib versions before 1.2.9 values 8 and -8 are automatically changed to 9 and -9. From zlib version 1.2.9 value -8 is rejected causing zlib:deflateInit/6 to fail -- cgit v1.2.3 From a52c18365acb5ed55793351ff3b3776a2a848503 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 7 Mar 2017 16:50:43 +0100 Subject: erts: Fix xml lint warning for erl_nif --- erts/doc/src/erl_nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index b0a632d2d6..6bb1109415 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2634,7 +2634,7 @@ enif_map_iterator_destroy(env, &iter); which is described further below. When a read or write event is triggerred, a notification message like this is sent to the process identified by pid:

- {select, Obj, Ref, ready_input | ready_output} + {select, Obj, Ref, ready_input | ready_output}

ready_input or ready_output indicates if the event object is ready for reading or writing.

Argument pid may be NULL to indicate the calling process.

-- cgit v1.2.3 From 5a2c12d6b26bd5f2c7e0ab75b44749acf1b788e0 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 13 Feb 2017 10:33:13 +0100 Subject: erts: Correct the documentation of abstract end-of-file The L in {eof, L} is not an annotation (LINE), but a location. --- erts/doc/src/absform.xml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index fe8e3b30e7..ec00955ccd 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -4,7 +4,7 @@
- 20012016 + 20012017 Ericsson AB. All Rights Reserved. @@ -182,10 +182,18 @@ can contain the following:

- Tuples {error,E} and {warning,W}, denoting - syntactically incorrect forms and warnings - {eof,LINE}, denoting an end-of-stream - encountered before a complete form had been parsed + +

Tuples {error,E} and {warning,W}, denoting + syntactically incorrect forms and warnings. +

+
+ +

{eof,LOCATION}, denoting an end-of-stream + encountered before a complete form had been parsed. + The word LOCATION represents an integer, and denotes the + number of the last line in the source file. +

+
-- cgit v1.2.3 From 1b7b4f7398765188815f697444e42029454dcd3d Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 8 Mar 2017 20:34:55 +0100 Subject: erts: Mark latin1 atom encoding as deprecated which means tags ATOM_EXT and SMALL_ATOM_EXT. --- erts/doc/src/erl_ext_dist.xml | 156 ++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 80 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_ext_dist.xml b/erts/doc/src/erl_ext_dist.xml index a436a9ca74..da2dc94e5b 100644 --- a/erts/doc/src/erl_ext_dist.xml +++ b/erts/doc/src/erl_ext_dist.xml @@ -51,7 +51,7 @@ term into the external format. To convert binary data encoding to a term, the BIF - erlang:binary_to_term/1c> is used. + erlang:binary_to_term/1 is used.

The distribution does this implicitly when sending messages across @@ -119,22 +119,18 @@ Compressed Data Format when Expanded -

As from ERTS 9.0 (OTP 20), UTF-8 encoded atoms may contain any Unicode - character. Although the support for UTF-8 encoded atoms in the external - format is available since ERTS 5.10 (OTP R16), passing atoms that cannot - be encoded in Latin-1 is an error in versions earlier than - Erlang/OTP 20, and the behavior is undefined.

-

When distribution flag - DFLAG_UTF8_ATOMS has been exchanged between both nodes - in the - distribution handshake, all atoms in the distribution header - are encoded in UTF-8, otherwise in Latin-1. The two - new tags ATOM_UTF8_EXT - and - SMALL_ATOM_UTF8_EXT - are only used if the distribution flag DFLAG_UTF8_ATOMS has - been exchanged between nodes, or if an atom containing characters - that cannot be encoded in Latin-1 is encountered.

+

As from ERTS 9.0 (OTP 20), atoms may contain any Unicode + characters and are always encoded using the UTF-8 external formats + ATOM_UTF8_EXT + or SMALL_ATOM_UTF8_EXT. + The old Latin-1 formats ATOM_EXT + and SMALL_ATOM_EXT + are deprecated and are only kept for backward + compatibility when decoding terms encoded by older nodes.

+

Support for UTF-8 encoded atoms in the external format has been + available since ERTS 5.10 (OTP R16). This abillity allows such old nodes + to decode, store and encode any Unicode atoms received from a new OTP 20 + node.

The maximum number of allowed characters in an atom is 255. In the UTF-8 case, each character can need 4 bytes to be encoded.

@@ -389,28 +385,6 @@

-
- - ATOM_EXT - - - 1 - 2 - Len - - - 100 - Len - AtomName - - ATOM_EXT
-

- An atom is stored with a 2 byte unsigned length in big-endian order, - followed by Len numbers of 8-bit Latin-1 characters that forms - the AtomName. The maximum allowed value for Len is 255. -

-
-
REFERENCE_EXT @@ -432,8 +406,8 @@ Encodes a reference object (an object generated with erlang:make_ref/0). The Node term is an encoded atom, that is, - ATOM_EXT, - SMALL_ATOM_EXT, or + ATOM_UTF8_EXT, + SMALL_ATOM_UTF8_EXT, or ATOM_CACHE_REF. The ID field contains a big-endian unsigned integer, but is to be regarded as uninterpreted data, @@ -771,39 +745,6 @@

-
- - SMALL_ATOM_EXT - - - 1 - 1 - Len - - - 115 - Len - AtomName - - SMALL_ATOM_EXT
-

- An atom is stored with a 1 byte unsigned length, - followed by Len numbers of 8-bit Latin-1 characters that - forms the AtomName. Longer atoms can be represented - by ATOM_EXT. -

- -

- SMALL_ATOM_EXT was introduced in ERTS 5.7.2 and - require an exchange of distribution flag - - DFLAG_SMALL_ATOM_TAGS in the - - distribution handshake. -

-
-
-
FUN_EXT @@ -838,8 +779,8 @@ Module

Encoded as an atom, using - ATOM_EXT, - SMALL_ATOM_EXT, + ATOM_UTF8_EXT, + SMALL_ATOM_UTF8_EXT, or ATOM_CACHE_REF. This is the module that the fun is implemented in. @@ -933,8 +874,8 @@ Module

Encoded as an atom, using - ATOM_EXT, - SMALL_ATOM_EXT, + ATOM_UTF8_EXT, + SMALL_ATOM_UTF8_EXT, or ATOM_CACHE_REF. Is the module that the fun is implemented in. @@ -996,8 +937,8 @@

Module and Function are atoms - (encoded using ATOM_EXT, - SMALL_ATOM_EXT, or + (encoded using ATOM_UTF8_EXT, + SMALL_ATOM_UTF8_EXT, or ATOM_CACHE_REF).

@@ -1109,6 +1050,61 @@ in the beginning of this section.

+ +
+ + ATOM_EXT (deprecated) + + + 1 + 2 + Len + + + 100 + Len + AtomName + + ATOM_EXT
+

+ An atom is stored with a 2 byte unsigned length in big-endian order, + followed by Len numbers of 8-bit Latin-1 characters that forms + the AtomName. The maximum allowed value for Len is 255. +

+
+ +
+ + SMALL_ATOM_EXT (deprecated) + + + 1 + 1 + Len + + + 115 + Len + AtomName + + SMALL_ATOM_EXT
+

+ An atom is stored with a 1 byte unsigned length, + followed by Len numbers of 8-bit Latin-1 characters that + forms the AtomName. +

+ +

+ SMALL_ATOM_EXT was introduced in ERTS 5.7.2 and + require an exchange of distribution flag + + DFLAG_SMALL_ATOM_TAGS in the + + distribution handshake. +

+
+
+ -- cgit v1.2.3 From 26c3cd82529836cb5b6eefbf7f92f318fd91f847 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 10 Mar 2017 15:00:46 +0100 Subject: Update copyright year --- erts/doc/src/erl_driver.xml | 2 +- erts/doc/src/erlang.xml | 2 +- erts/doc/src/notes.xml | 2 +- erts/doc/src/zlib.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 7fbe97bc0b..5705100ab2 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -4,7 +4,7 @@
- 20012016 + 20012017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index cf5f3fc99b..c3b0bc0d74 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4,7 +4,7 @@
- 19962016 + 19962017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index ae1d2b1d93..abe41c6ef4 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20042016 + 20042017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 7ae507b8f6..f8140544b7 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -4,7 +4,7 @@
- 20052016 + 20052017 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From 86def04bc26eb2f78911fd9ec831a115cdfef964 Mon Sep 17 00:00:00 2001 From: Luis Rascao Date: Tue, 14 Mar 2017 11:24:24 +0000 Subject: Fix sbct documentation The unit should be explicitly documented as kilobytes to avoid ambiguity. --- erts/doc/src/erts_alloc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 49dadfb42c..b11328c3a8 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -595,7 +595,7 @@ sbct ]]> -

Singleblock carrier threshold. Blocks larger than this +

Singleblock carrier threshold (in kilobytes). Blocks larger than this threshold are placed in singleblock carriers. Blocks smaller than this threshold are placed in multiblock carriers. On 32-bit Unix style OS this threshold cannot be set -- cgit v1.2.3 From 4d658008be5a08ddadbe75ebadb9ef124436b76e Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 14 Mar 2017 15:59:23 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 213 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index abe41c6ef4..470491a193 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,219 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3 + +
Fixed Bugs and Malfunctions + + +

Fixed a number of bugs that caused faulty stack-traces + to be generated. The faulty stack traces were generated + either when applying the following functions or tracing + the following functions:

+ erlang:error/1 + erlang:error/2 + erlang:exit/1 + erlang:throw/1 +

+ Own Id: OTP-14055

+
+ +

+ Corrected documentation about memory footprint for maps.

+

+ Own Id: OTP-14118

+
+ +

+ Fix process_info(Pid, current_stacktrace) to use + stack depth limit set by + system_flag(backtrace_depth). The old behavior was + a hard coded depth limit of 8.

+

+ Own Id: OTP-14119 Aux Id: PR-1263

+
+ +

+ A process calling erlang:system_flag(multi_scheduling, + block) could end up hanging forever in the + call.

+

+ Own Id: OTP-14121

+
+ +

Dirty scheduler bug fixes:

Fixed + call time tracing of process being scheduled on dirty + scheduler.

GC info from dirty + schedulers.

Multi scheduling block + with dirty schedulers could crash the runtime + system.

Process structures could be + removed prematurely.

GC on dirty + scheduler could crash the runtime system.

+

Termination of a process executing on a dirty + scheduler could cause a runtime system crash.

+
+

+ Own Id: OTP-14122

+
+ +

+ Fixed crash that occurred when writing timer data to a + crash dump.

+

+ Own Id: OTP-14133

+
+ +

+ A literal area could be removed while still referred from + processes.

+

+ Own Id: OTP-14134

+
+ +

+ Fixed a bug in the garbage collector that could crash the + runtime system.

+

+ Own Id: OTP-14135

+
+ +

+ Fixed a bug in call-time trace for NIFs which caused + tracing to erroneously be started multiple times for one + call.

+

+ Own Id: OTP-14136

+
+ +

+ Remove a debug printout and an unnecessary garbage + collection when handling exceptions in hipe compiled + code.

+

+ Own Id: OTP-14153

+
+ +

+ Fix bug in tracing of garbage collection that could cause + VM crash. Bug exists since OTP 19.0.

+

+ Own Id: OTP-14154

+
+ +

+ Fix bug in binary_to_term for binaries created by + term_to_binary with option compressed. The + bug can cause badarg exception for a valid binary + when Erlang VM is linked against a zlib library of + version 1.2.9 or newer. Bug exists since OTP 17.0.

+

+ Own Id: OTP-14159 Aux Id: ERL-340

+
+ +

+ Fix suspension of schedulers when generating a crashdump.

+

+ Own Id: OTP-14164

+
+ +

NIF resources was not handled in a thread-safe manner + in the runtime system without SMP support.

+

As a consequence of this fix, the following driver + functions are now thread-safe also in the runtime system + without SMP support:

+

driver_free_binary()

+

driver_realloc_binary()

+

driver_binary_get_refc()

+

driver_binary_inc_refc()

+

driver_binary_dec_refc()

+
+

+ Own Id: OTP-14202

+
+ +

+ Fix erlang:round/1 for large floating point + numbers with an odd absolute value between (1 bsl + 52) and (1 bsl 53). The result was falsely + calculated as the next higher even number even though all + integer values up to (1 bsl 53) can be represented + as floats with full precision.

+

+ Own Id: OTP-14227

+
+ +

+ Add size of literals to module code size in crash dump + and (l)oaded command in break menu like it used to + be before OTP-19.0.

+

+ Own Id: OTP-14228

+
+ +

+ Fix potential bug in enif_send when called without + a process context and with argument msg_env as + NULL.

+

+ Own Id: OTP-14229

+
+ +

+ Fix bug where passing an appendable binary to + erlang:port_control() could crash the emulator.

+

+ Own Id: OTP-14231

+
+ +

+ Receive expressions with timeout in the Erlang shell + could cause a VM crash.

+

+ Own Id: OTP-14241 Aux Id: ERL-365

+
+
+
+ + +
Improvements and New Features + + +

+ A received SIGTERM signal to beam will generate a + 'stop' message to the init process and + terminate the Erlang VM nicely. This is equivalent to + calling init:stop/0.

+

+ Own Id: OTP-14085

+
+ +

+ Workaround for buggy Android implementation of + PTHREAD_STACK_MIN causing build of runtime system + to crash on undeclared PAGE_SIZE.

+

+ Own Id: OTP-14165 Aux Id: ERL-319

+
+ +

+ Add configure option --without-thread-names that removes + the naming of individual emulator threads.

+

+ Own Id: OTP-14234

+
+ +

+ Add warning in documentation of zlib:deflateInit/6 + about option WindowsBits values 8 and -8.

+

+ Own Id: OTP-14254 Aux Id: ERL-362

+
+
+
+ +
+
Erts 8.2.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 19427107ca9305a931dcaea8c2134017aa385fbd Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 31 Mar 2017 12:59:07 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 470491a193..d9c5f47a3a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,37 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.1 + +
Fixed Bugs and Malfunctions + + +

+ Trying to open a directory with file:read_file/1 on Unix + leaked a file descriptor. This bug has now been fixed.

+

+ Own Id: OTP-14308 Aux Id: ERL-383

+
+
+
+ + +
Known Bugs and Problems + + +

+ Invoking init:stop/0 via the SIGTERM signal, in a + non-SMP BEAM, could cause BEAM to terminate with fatal + error. This has now been fixed and the BEAM will + terminate normally when SIGTERM is received.

+

+ Own Id: OTP-14290

+
+
+
+ +
+
Erts 8.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From f0c4d095e0d9be054181785f5c9ca34b52aa2995 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 11 Apr 2017 19:15:05 +0200 Subject: Suggested stack size options for dirty schedulers --- erts/doc/src/erl.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 29fef7348b..b2d7762dd9 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1318,8 +1318,22 @@

Suggested stack size, in kilowords, for scheduler threads. - Valid range is 4-8192 kilowords. The default stack size is - OS-dependent.

+ Valid range is 20-8192 kilowords. The default suggested + stack size is 128 kilowords.

+
+ + + +

Suggested stack size, in kilowords, for dirty CPU scheduler + threads. Valid range is 20-8192 kilowords. The default + suggested stack size is 40 kilowords.

+
+ + + +

Suggested stack size, in kilowords, for dirty IO scheduler + threads. Valid range is 20-8192 kilowords. The default + suggested stack size is 40 kilowords.

+stbt BindType -- cgit v1.2.3 From 878327d7b7cfb0679907bd84631bb96bc523764a Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 16 Apr 2017 12:10:45 +0200 Subject: Removes spurious ">" --- erts/doc/src/absform.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index ec00955ccd..e49c8c32e9 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -365,7 +365,7 @@ {cons,LINE,Rep(E_h),Rep(E_t)}.

-

>If E is a fun expression fun Name/Arity, then Rep(E) = +

If E is a fun expression fun Name/Arity, then Rep(E) = {'fun',LINE,{function,Name,Arity}}.

-- cgit v1.2.3 From 0835f40ae25f97360dc393928796387d3cd6b16e Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Wed, 19 Apr 2017 00:43:37 +0100 Subject: erts: Add enif_phash2 and enif_phash2_ranged These allow one to hash VM terms from NIF code. --- erts/doc/src/erl_nif.xml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 6bb1109415..34dae418ef 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2369,6 +2369,36 @@ enif_map_iterator_destroy(env, &iter); + + + unsigned long + enif_phash2(ERL_NIF_TERM term) + + Portable hash function. + +

Portable hash function that gives the same hash for the same Erlang term + regardless of machine architecture and ERTS version. Corresponds to + erlang:phash2/1.

+

Returns an unsigned integer within 0..2^27-1.

+
+
+ + + + unsigned long + enif_phash2_ranged(ERL_NIF_TERM term, unsigned long range) + + Portable hash function. + +

Similar to enif_phash2 + but hash range can be specified. Corresponds to + erlang:phash2/2.

+

Returns an unsigned integer within 0..range-1 + if 0 < range < 2^32, and within 0..2^32-1 otherwise. +

+
+
+ intenif_port_command(ErlNifEnv* env, const ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg) -- cgit v1.2.3 From 1b37d0b010ea31b04b9d0a15d0bec9c75a013dc9 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Thu, 20 Apr 2017 21:35:54 +0100 Subject: erts: Remove enif_phash2_ranged --- erts/doc/src/erl_nif.xml | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 34dae418ef..35c42ac517 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2383,22 +2383,6 @@ enif_map_iterator_destroy(env, &iter); - - - unsigned long - enif_phash2_ranged(ERL_NIF_TERM term, unsigned long range) - - Portable hash function. - -

Similar to enif_phash2 - but hash range can be specified. Corresponds to - erlang:phash2/2.

-

Returns an unsigned integer within 0..range-1 - if 0 < range < 2^32, and within 0..2^32-1 otherwise. -

-
-
- intenif_port_command(ErlNifEnv* env, const ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg) -- cgit v1.2.3 From d8756f8665a42effa2f3515369058cff4441abeb Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Thu, 20 Apr 2017 22:44:04 +0100 Subject: erts: Refactor enif_phash2 into enif_hash A more generic hashing function which can also hash terms based on `make_internal_hash'. --- erts/doc/src/erl_nif.xml | 49 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 35c42ac517..53b6fdeaa1 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -813,6 +813,28 @@ typedef enum {
+ ErlNifHash + +

An enumeration of the supported hash types that can be generated + using enif_hash. +

+ + ERL_NIF_INTERNAL_HASH + +

Non-portable hash function that gives different hashes for the same Erlang + term depending on machine architecture and ERTS version.

+

Generated hash values within 0..2^32-1.

+
+ ERL_NIF_PHASH2 + +

Portable hash function that gives the same hash for the same Erlang term + regardless of machine architecture and ERTS version. Corresponds to + erlang:phash2/1.

+

Slower than ERL_NIF_INTERNAL_HASH.

+

Generated hash values within 0..2^27-1.

+
+
+
@@ -1386,6 +1408,19 @@ typedef enum { + + + unsigned long + enif_hash(ErlNifHash type, ERL_NIF_TERM term) + + Hash terms. + +

Hash terms according to the specified + ErlNifHash type.

+

Range of returned value depends on the hash type.

+
+
+ intenif_inspect_binary(ErlNifEnv* env, ERL_NIF_TERM bin_term, ErlNifBinary* bin) @@ -2369,20 +2404,6 @@ enif_map_iterator_destroy(env, &iter); - - - unsigned long - enif_phash2(ERL_NIF_TERM term) - - Portable hash function. - -

Portable hash function that gives the same hash for the same Erlang term - regardless of machine architecture and ERTS version. Corresponds to - erlang:phash2/1.

-

Returns an unsigned integer within 0..2^27-1.

-
-
- intenif_port_command(ErlNifEnv* env, const ErlNifPort* to_port, ErlNifEnv *msg_env, ERL_NIF_TERM msg) -- cgit v1.2.3 From f30d131bd979e29b68fb7d9ff515c61a246201f4 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 21 Mar 2017 13:40:08 +0100 Subject: erts: Deprecate the non-smp emulators --- erts/doc/src/erl.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 29fef7348b..829acd1154 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -513,11 +513,11 @@ system with SMP support is available. -smp auto starts the Erlang runtime system with SMP support enabled if it is available and more than one logical processor is detected. - -smp disable starts a runtime system without SMP support.

+ -smp disable starts a runtime system without SMP support. + The runtime system without SMP support is deprecated and will + be removed in a future major release.

-

The runtime system with SMP support is not available on all - supported platforms. See also flag - +S.

+

See also flag+S.

(emulator flag) -- cgit v1.2.3 From eece23d7f6b225a6abc3807f9af44d1f742f7eee Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 21 Apr 2017 14:50:43 +0200 Subject: erts: Polish off erlang:list_to_ref/1 --- erts/doc/src/erlang.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index cb2cdec606..a8836d3cbb 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2498,6 +2498,24 @@ os_prompt%
+ + + Convert from text representation to a ref. + +

Returns a reference whose text representation is a + String, for example:

+
+> list_to_ref("#Ref<0.4192537678.4073193475.71181>").
+#Ref<0.4192537678.4073193475.71181>
+

Failure: badarg if String contains a bad + representation of a reference.

+ +

This BIF is intended for debugging and is not to be used + in application programs.

+
+
+
+ Convert a list to a tuple. -- cgit v1.2.3 From fb3746bba56a9cbc38e597e458237e923adb97f1 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 21 Apr 2017 17:46:27 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index d9c5f47a3a..5d21b8fda4 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,24 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.2 + +
Fixed Bugs and Malfunctions + + +

+ The +Bi command line argument of erl + erroneously caused SIGTERM to be ignored by the VM + as well as of all its child processes. This bug was + introduced in erts version 8.3.

+

+ Own Id: OTP-14358 Aux Id: OTP-14085

+
+
+
+ +
+
Erts 8.3.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 21e1d879faaae2278a68200fe1085d7e73791fa0 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 22 Apr 2017 17:22:32 +0100 Subject: erts: Support custom salt in enif_hash --- erts/doc/src/erl_nif.xml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 53b6fdeaa1..03c96dd3ca 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -827,11 +827,13 @@ typedef enum { ERL_NIF_PHASH2 -

Portable hash function that gives the same hash for the same Erlang term - regardless of machine architecture and ERTS version. Corresponds to - erlang:phash2/1.

-

Slower than ERL_NIF_INTERNAL_HASH.

+

Portable hash function that gives the same hash for the + same Erlang term regardless of machine architecture and ERTS version.

Generated hash values within 0..2^27-1.

+

Slower than ERL_NIF_INTERNAL_HASH. + When used with salt=0, + it corresponds to + erlang:phash2/1.

@@ -1411,12 +1413,15 @@ typedef enum { unsigned long - enif_hash(ErlNifHash type, ERL_NIF_TERM term) + + enif_hash(ErlNifHash type, ERL_NIF_TERM term, unsigned long salt) + Hash terms. -

Hash terms according to the specified - ErlNifHash type.

+

Hash term according to the specified + ErlNifHash type + and using the least significant 32 bits of salt.

Range of returned value depends on the hash type.

-- cgit v1.2.3 From d810cd2b1ce642703d4986ba26ba50fd7949fcab Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 22 Apr 2017 18:46:16 +0100 Subject: erts: Improve enif_hash documentation --- erts/doc/src/erl_nif.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 03c96dd3ca..5faf1a05fc 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -821,8 +821,8 @@ typedef enum { ERL_NIF_INTERNAL_HASH -

Non-portable hash function that gives different hashes for the same Erlang - term depending on machine architecture and ERTS version.

+

Non-portable hash function that only guarantees the same hash + for the same term within one Erlang VM instance.

Generated hash values within 0..2^32-1.

ERL_NIF_PHASH2 @@ -831,8 +831,7 @@ typedef enum { same Erlang term regardless of machine architecture and ERTS version.

Generated hash values within 0..2^27-1.

Slower than ERL_NIF_INTERNAL_HASH. - When used with salt=0, - it corresponds to + When used with salt=0, it corresponds to erlang:phash2/1.

-- cgit v1.2.3 From da9abd24a93ae8fe174cdd38fc9699bbc45fdf56 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Sat, 22 Apr 2017 20:00:28 +0100 Subject: erts: Allow for easier future enif_hash expansion Allow for expanding support to 64-bit hashes without breaking the interface. --- erts/doc/src/erl_nif.xml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 5faf1a05fc..534c90cbdc 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -823,13 +823,13 @@ typedef enum {

Non-portable hash function that only guarantees the same hash for the same term within one Erlang VM instance.

-

Generated hash values within 0..2^32-1.

+

It takes 32-bit salt values and generates hashes within 0..2^32-1.

ERL_NIF_PHASH2

Portable hash function that gives the same hash for the same Erlang term regardless of machine architecture and ERTS version.

-

Generated hash values within 0..2^27-1.

+

It takes 32-bit salt values and generates hashes within 0..2^27-1.

Slower than ERL_NIF_INTERNAL_HASH. When used with salt=0, it corresponds to erlang:phash2/1.

@@ -1411,17 +1411,14 @@ typedef enum { - unsigned long - - enif_hash(ErlNifHash type, ERL_NIF_TERM term, unsigned long salt) - + ErlNifUInt64 + enif_hash(ErlNifHash type, ERL_NIF_TERM term, ErlNifUInt64 salt) Hash terms. -

Hash term according to the specified - ErlNifHash type - and using the least significant 32 bits of salt.

-

Range of returned value depends on the hash type.

+

Hashes term according to the specified + ErlNifHash type.

+

Ranges of taken salt and returned value depend on the hash type.

-- cgit v1.2.3 From 3d6b8e7fb68543713f1620a45b8a590ef4ed88a5 Mon Sep 17 00:00:00 2001 From: Guilherme Andrade Date: Mon, 24 Apr 2017 22:51:49 +0100 Subject: erts: Discontinue salted use of enif_hash/phash2 --- erts/doc/src/erl_nif.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 534c90cbdc..05b519fe7d 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -829,10 +829,10 @@ typedef enum {

Portable hash function that gives the same hash for the same Erlang term regardless of machine architecture and ERTS version.

-

It takes 32-bit salt values and generates hashes within 0..2^27-1.

+

It ignores salt values and generates hashes within 0..2^27-1.

Slower than ERL_NIF_INTERNAL_HASH. - When used with salt=0, it corresponds to - erlang:phash2/1.

+ It corresponds to erlang:phash2/1. +

@@ -1418,7 +1418,7 @@ typedef enum {

Hashes term according to the specified ErlNifHash type.

-

Ranges of taken salt and returned value depend on the hash type.

+

Ranges of taken salt (if any) and returned value depend on the hash type.

-- cgit v1.2.3 From eec41eeed17682a4e1f8ca15d92a2b469f0c39b8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 21 Apr 2017 14:54:33 +0200 Subject: erts: Add erlang:list_to_port/1 debug bif --- erts/doc/src/erlang.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index a8836d3cbb..a26a695f2e 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2498,6 +2498,24 @@ os_prompt% + + + Convert from text representation to a port. + +

Returns a port identifier whose text representation is a + String, for example:

+
+> list_to_port("#Port<0.4>").
+#Port<0.4>
+

Failure: badarg if String contains a bad + representation of a port identifier.

+ +

This BIF is intended for debugging and is not to be used + in application programs.

+
+
+
+ Convert from text representation to a ref. -- cgit v1.2.3 From cc664a58fe3d901b2698f169df62511cf06ee745 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 25 Apr 2017 14:25:05 +0200 Subject: Fix release note for OTP-14290 --- erts/doc/src/notes.xml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5d21b8fda4..27a369660c 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -53,19 +53,6 @@
Erts 8.3.1
Fixed Bugs and Malfunctions - - -

- Trying to open a directory with file:read_file/1 on Unix - leaked a file descriptor. This bug has now been fixed.

-

- Own Id: OTP-14308 Aux Id: ERL-383

-
-
-
- - -
Known Bugs and Problems

@@ -76,6 +63,13 @@

Own Id: OTP-14290

+ +

+ Trying to open a directory with file:read_file/1 on Unix + leaked a file descriptor. This bug has now been fixed.

+

+ Own Id: OTP-14308 Aux Id: ERL-383

+
-- cgit v1.2.3 From 959cb1e4d3bdc1d28ccf5000941e7346315b0343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Mattsson?= Date: Fri, 28 Apr 2017 12:49:25 +0200 Subject: Improvements of escript documentation --- erts/doc/src/escript.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 1d5d280338..bbb00fd14a 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -35,6 +35,28 @@

escript provides support for running short Erlang programs without having to compile them first, and an easy way to retrieve the command-line arguments.

+ +

It is possible to bundle escript(s) with an Erlang + runtime system to make it self-sufficient and relocatable. In such + a standalone system, the escript(s) should be located in + the top bin directory of the standalone system and given + .escript as file extension. Further the (built-in) + escript program should be copied to the same directory and + given the scripts original name (without the .escript + extension). This will enable use of the bundled Erlang runtime + system.

+ +

The (built-in) escript program first determines which + Erlang runtime system to use and then starts it to execute your + script. Usually the runtime system is located in the same Erlang + installation as the escript program itself. But for + standalone systems with one or more escripts it may be the case + that the escript program in your path actually starts the + runtime system bundled with the escript. This is intentional, and + typically happens when the standalone system bin directory is not + in the execution path (as it may cause its erl program to + override the desired one) and the escript(s) are referred to via + symbolic links from a bin directory in the path.

-- cgit v1.2.3 From 304fef65a147b53234d8d8ad8889ffa79d7ef45b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 28 Apr 2017 15:11:53 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 27a369660c..11206d43e7 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,31 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.3 + +
Fixed Bugs and Malfunctions + + +

+ Fixed memory segment cache used for multiblock carriers. + Huge (> 2GB) memory segments could cause a VM crash. + Creation of such huge memory segments used for multiblock + carriers is however very uncommon.

+

+ Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

+
+ +

+ Fix release note for OTP-14290 in ERTS version 8.3.1. It + was erroneously placed under "Known Bugs and Problems".

+

+ Own Id: OTP-14363 Aux Id: OTP-14290

+
+
+
+ +
+
Erts 8.3.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 83e20c62057ebc1d8064bf57b01be560cd244e1d Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Thu, 4 May 2017 15:42:21 +0200 Subject: Update copyright year --- erts/doc/src/erl.xml | 2 +- erts/doc/src/erl_driver.xml | 2 +- erts/doc/src/erl_ext_dist.xml | 2 +- erts/doc/src/erl_nif.xml | 2 +- erts/doc/src/erl_tracer.xml | 2 +- erts/doc/src/erlang.xml | 2 +- erts/doc/src/erts_alloc.xml | 2 +- erts/doc/src/escript.xml | 2 +- erts/doc/src/notes.xml | 2 +- erts/doc/src/zlib.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index ef8126e86f..6046e94599 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -4,7 +4,7 @@
- 19962016 + 19962017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 7fbe97bc0b..5705100ab2 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -4,7 +4,7 @@
- 20012016 + 20012017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl_ext_dist.xml b/erts/doc/src/erl_ext_dist.xml index da2dc94e5b..b7090d0472 100644 --- a/erts/doc/src/erl_ext_dist.xml +++ b/erts/doc/src/erl_ext_dist.xml @@ -5,7 +5,7 @@
2007 - 2016 + 2017 Ericsson AB, All Rights Reserved diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 05b519fe7d..51ba70994a 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -4,7 +4,7 @@
- 20012016 + 20012017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl_tracer.xml b/erts/doc/src/erl_tracer.xml index 2681a19da0..63feebb0b5 100644 --- a/erts/doc/src/erl_tracer.xml +++ b/erts/doc/src/erl_tracer.xml @@ -4,7 +4,7 @@
- 20162016 + 20162017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index a26a695f2e..6f70ae4a52 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4,7 +4,7 @@
- 19962016 + 19962017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index b11328c3a8..d3f725ef99 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -4,7 +4,7 @@
- 20022016 + 20022017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index bbb00fd14a..9b0d42185e 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -4,7 +4,7 @@
- 20072016 + 20072017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 152d144234..acc19f250a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20042016 + 20042017 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 04fcc4285d..1d272c4c18 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -4,7 +4,7 @@
- 20052016 + 20052017 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From dc57404252c47520f352834ad9be45ad684f96c9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 4 May 2017 17:05:25 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 475 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 475 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index acc19f250a..628df1b9bd 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,481 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0 + +
Fixed Bugs and Malfunctions + + +

Fix various bugs regarding loading, upgrade and purge + of HiPE compiled code:

The native code + memory for a purged module was never deallocated. + Wrong functions could in some cases be called after + a module upgrade. + erlang:check_process_code did not check for + recursive calls made from native code. +

+ Own Id: OTP-13968

+
+ +

+ Hipe optional LLVM backend does require LLVM version 3.9 + or later as older versions forced strong dependencies on + erts internals structures.

+

+ Own Id: OTP-14238

+
+ +

+ Slogans in crash dumps have been extended to print more + complex terms.

+

+ Own Id: OTP-14303

+
+ +

+ Fixed bug when using enif_inspect_binary in + combination with enif_copy. In some circumstances + the inspected binary could be realloced by the + enif_copy call when it shouldn't have been.

+

+ Own Id: OTP-14304

+
+ +

+ Use -fno-PIE for Gentoo Hardened and others that + don't accept linker flag -no-pie.

+

+ Own Id: OTP-14307 Aux Id: PR-1379

+
+ +

+ Disable hipe for ppc64le architecture (little + endian) as it is not, and has never been, supported. It + was earlier equated with ppc64 (big endian) which + lead to broken build without --disable-hipe.

+

+ Own Id: OTP-14314 Aux Id: ERL-369, PR-1394

+
+ +

+ Fix 'epmd -kill' to return a failure exit status code if + epmd was not killed because of some error.

+

+ Own Id: OTP-14324

+
+ +

Fixed the following dirty scheduler related bugs:

+

the +SDPcpu command line argument + could cause the amount of dirty CPU schedulers to be set + to zero

+

erlang:system_flag(multi_scheduling, _) + failed when only one normal scheduler was used together + with dirty scheduler support

+

+ Own Id: OTP-14335

+
+ +

+ Fix erlexec to handle mismatch in sysconf and proc fs + when figuring out the cpu topology. This behaviour has + been seen when using docker together with + --cpuset-cpus.

+

+ Own Id: OTP-14352

+
+ +

+ Fixed memory segment cache used for multiblock carriers. + Huge (> 2GB) memory segments could cause a VM crash. + Creation of such huge memory segments used for multiblock + carriers is however very uncommon.

+

+ Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

+
+
+
+ + +
Improvements and New Features + + +

+ Added erlang:garbage_collect/2 that takes an + option list as the last argument that can be used to + control whether a minor or a major garbage collection is + to be done. Doing a minor collection only collects terms + that have recently died, but is cheaper than a mjor + collection.

+

+ Own Id: OTP-11695

+
+ +

+ Optimized test for tuples with an atom as first element.

+

+ Own Id: OTP-12148

+
+ +

+ Erlang literals are no longer copied during process to + process messaging.

+

+ Own Id: OTP-13529

+
+ +

Add support in the erl_nif API for asynchronous + message notifications when sockets or other file + descriptors are ready to accept read or write operations. + The following functions have been added:

+

enif_select

+

enif_monitor_process

+

enif_demonitor_process

+

enif_compare_monitors

+

enif_open_resource_type_x

+

+ Own Id: OTP-13684

+
+ +

There are two new guard BIFs 'floor/1' and + 'ceil/1'. They both return integers. In the + 'math' module, there are two new BIFs with the + same names that return floating point values.

+

+ Own Id: OTP-13692

+
+ +

+ Remove deprecated erlang:hash/2.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13827

+
+ +

Replaced usage of deprecated symbolic time + unit representations.

+

+ Own Id: OTP-13831 Aux Id: OTP-13735

+
+ +

+ Added support in zlib for extraction of the inflation + dictionary.

+

+ Own Id: OTP-13842

+
+ +

+ The previously used purge strategy has been removed. The + optional purge strategy introduced in ERTS version 8.1 is + now the only strategy available.

+

+ The new purge strategy is slightly incompatible with the + old strategy. Previously processes holding funs + that referred to the module being purged either failed a + soft purge, or was killed during a hard purge. The new + strategy completely ignores funs. If funs + referring to the code being purged exist, and are used + after a purge, an exception will be raised upon usage. + That is, the behavior will be exactly the same as the + case when a fun is received by a process after the + purge.

+

+ For more information see the documentation of erlang:check_process_code/3.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13844 Aux Id: OTP-13833

+
+ +

+ Dirty schedulers are now enabled by default when the + runtime system is built with SMP support.

+

+ Own Id: OTP-13860

+
+ +

+ Improved ETS lookup/insert/delete speed for large + set, bag and duplicate_bag by a + significant reduction of the hash load factor. This speed + improvement comes at the expense of less than one word + per table entry. Tables with less than 256 entries are + not affected at all.

+

+ Own Id: OTP-13903

+
+ +

+ The NIF library reload feature is not supported + anymore. It has been marked as deprecated since OTP R15B. + This means that you are only allowed to do one successful + call to erlang:load_nif/2 for each module + instance. A second call to erlang:load_nif/2 will + return {error, {reload, _}} even if the NIF + library imlements the reload callback.

+

+ Runtime upgrade of a NIF library is still supported by + using the Erlang module upgrade mechanics with a current + and an old module instance existing at the same time with + their corresponding NIF libraries.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13908

+
+ +

+ Add erlang:system_info(atom_count) and + erlang:system_info(atom_limit) to provide a way to + retrieve the current and maximum number of atoms.

+

+ Own Id: OTP-13976

+
+ +

The function fmod/2 has been added to the + math module.

+

+ Own Id: OTP-14000

+
+ +

+ erlang:load_nif/2 returns new error type + notsup when called for a HiPE compiled module, + which is not supported.

+

+ Own Id: OTP-14002

+
+ +

+ Add driver and nif lock instrumentation to lcnt

+

+ Own Id: OTP-14069

+
+ +

+ Reduce memory pressure by converting sub-binaries to + heap-binaries when possible. This is done during garbage + collection.

+

+ Own Id: OTP-14149

+
+ +

+ Dirty schedulers are now enabled and supported on Erlang + runtime systems with SMP support.

+

+ Besides support for dirty NIFs also support for dirty + BIFs and dirty garbage collection have been introduced. + All garbage collections that potentially will take a long + time to complete are now performed on dirty schedulers if + enabled.

+

+ erlang:statistics(scheduler_wall_time) + now also includes information about dirty CPU schedulers. + Code using erlang:statistics(scheduler_wall_time) + may have to be rewritten to take this incompatibility + into consideration.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14152

+
+ +

Atoms may now contain arbitrary Unicode + characters.

+

+ Own Id: OTP-14178

+
+ +

+ Introduce an event manager in Erlang to handle OS + signals. A subset of OS signals may be subscribed to and + those are described in the Kernel application.

+

+ Own Id: OTP-14186

+
+ +

+ The escript program now handles symbolic links to + escripts.

+

+ This is useful for standalone systems with + escripts residing on a bin directory not included + in the execution path (as it may cause their erl + program(s) to override the desired one). Instead the + escripts can be referred to via symbolic links + from a bin directory in the path.

+

+ Own Id: OTP-14201 Aux Id: PR-1293

+
+ +

+ All uses of the magic binary kludge has been replaced by + uses of erlang references.

+

+ A magic binary was presented as an empty binary, but + actually referred other data internally in the Erlang VM. + Since they were presented as empty binaries, different + magic binaries compared as equal, and also lost their + internal data when passed out of an erlang node.

+

+ The new usage of references has not got any of these + strange semantic issues, and the usage of these + references has been optimized to give the same + performance benefits as well as memory usage benefits as + magic binaries had.

+

+ A couple of examples of previous uses of magic binaries + are match specifications and NIF resources.

+

+ Own Id: OTP-14205

+
+ +

+ The non-smp emulators have been deprecated and are + scheduled for removal in OTP-21.

+

+ In preperations for this, the threaded non-smp emulator + is no longer built by default and has to be enabled using + the --enable-plain-emulator to configure.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14272

+
+ +

+ Allow HiPE to run on VM built with + --enable-m32-build.

+

+ Own Id: OTP-14330 Aux Id: PR-1397

+
+ +

+ Upgraded the OTP internal PCRE library from version 8.33 + to version 8.40. This library is used for implementation + of the re + regular expressions module.

+

+ Besides various bug fixes, the new version allows for + better stack protection. In order to utilize this + feature, the stack size of normal scheduler threads is + now by default set to 128 kilo words on all platforms. + The stack size of normal scheduler threads can be set + upon system start by passing the +sss + command line argument to the erl command.

+

+ See http://pcre.org/original/changelog.txt + for information about changes made to PCRE between the + versions 8.33 and 8.40.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14331 Aux Id: ERL-208

+
+ +

+ Remove generation of atoms in old latin1 external format. + The old latin1 format can still be decoded but is never + generated by term_to_binary or sent on a + distribution channel. The new utf8 format for atoms was + introduced in OTP R16. An OTP 20 node can therefore not + connect to nodes older than R16.

+

+ Own Id: OTP-14337

+
+ +

+ Added function re:version/0 which returns + information about the OTP internal PCRE version used for + implementation of the re module.

+

+ Own Id: OTP-14347 Aux Id: PR-1412

+
+ +

+ Added new debug bif erlang:list_to_port/1.

+

+ Own Id: OTP-14348

+
+ +

+ Various improvements of timer management internally in + the VM. These improvements both reduced memory + consumption of timer wheels as well as reduce the amount + of work that has to be performed in order to handle + timers.

+

+ Own Id: OTP-14356

+
+ +

Sockets can now be bound to device (SO_BINDTODEVICE) + on platforms where it is supported.

This has + been implemented e.g to support VRF-Lite under Linux; see + + VRF , and GitHub pull request #1326. +

+

+ Own Id: OTP-14357 Aux Id: PR-1326

+
+ +

Added the following erl command line arguments + with which you can set suggested stack for dirty + schedulers:

+sssdcpu +

for dirty CPU schedulers

+ +sssdio +

for dirty IO schedulers

+

The default suggested stack size for dirty schedulers + is 40 kilo words.

+

+ Own Id: OTP-14380

+
+ +

+ Changed erts startup program name, argv 0, to use the + environment variable ESCRIPT_NAME so that + erlc, dialyzer, typer, + ct_run, or the escript name can be seen with + external programs, such as ps and htop (depending on + options), on unix.

+

+ If environment variable ESCRIPT_NAME is not set, + argv 0 of the invoking program will be used, e.g. the + name will be erl, cerl, or the soft link + name.

+

+ Own Id: OTP-14381

+
+ +

+ Improvements of escript documentation.

+

+ Own Id: OTP-14384 Aux Id: OTP-14201

+
+ +

+ Add function enif_hash for NIFs to calculate hash + values of arbitrary terms.

+

+ Own Id: OTP-14385 Aux Id: PR-1413

+
+
+
+ +
+
Erts 8.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From eace29905be436d77245656b2511c9a9c2c67c90 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 5 May 2017 13:15:42 +0200 Subject: Revert "Prepare release" This reverts commit dc57404252c47520f352834ad9be45ad684f96c9. --- erts/doc/src/notes.xml | 475 ------------------------------------------------- 1 file changed, 475 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 628df1b9bd..acc19f250a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,481 +32,6 @@

This document describes the changes made to the ERTS application.

-
Erts 9.0 - -
Fixed Bugs and Malfunctions - - -

Fix various bugs regarding loading, upgrade and purge - of HiPE compiled code:

The native code - memory for a purged module was never deallocated. - Wrong functions could in some cases be called after - a module upgrade. - erlang:check_process_code did not check for - recursive calls made from native code. -

- Own Id: OTP-13968

-
- -

- Hipe optional LLVM backend does require LLVM version 3.9 - or later as older versions forced strong dependencies on - erts internals structures.

-

- Own Id: OTP-14238

-
- -

- Slogans in crash dumps have been extended to print more - complex terms.

-

- Own Id: OTP-14303

-
- -

- Fixed bug when using enif_inspect_binary in - combination with enif_copy. In some circumstances - the inspected binary could be realloced by the - enif_copy call when it shouldn't have been.

-

- Own Id: OTP-14304

-
- -

- Use -fno-PIE for Gentoo Hardened and others that - don't accept linker flag -no-pie.

-

- Own Id: OTP-14307 Aux Id: PR-1379

-
- -

- Disable hipe for ppc64le architecture (little - endian) as it is not, and has never been, supported. It - was earlier equated with ppc64 (big endian) which - lead to broken build without --disable-hipe.

-

- Own Id: OTP-14314 Aux Id: ERL-369, PR-1394

-
- -

- Fix 'epmd -kill' to return a failure exit status code if - epmd was not killed because of some error.

-

- Own Id: OTP-14324

-
- -

Fixed the following dirty scheduler related bugs:

-

the +SDPcpu command line argument - could cause the amount of dirty CPU schedulers to be set - to zero

-

erlang:system_flag(multi_scheduling, _) - failed when only one normal scheduler was used together - with dirty scheduler support

-

- Own Id: OTP-14335

-
- -

- Fix erlexec to handle mismatch in sysconf and proc fs - when figuring out the cpu topology. This behaviour has - been seen when using docker together with - --cpuset-cpus.

-

- Own Id: OTP-14352

-
- -

- Fixed memory segment cache used for multiblock carriers. - Huge (> 2GB) memory segments could cause a VM crash. - Creation of such huge memory segments used for multiblock - carriers is however very uncommon.

-

- Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

-
-
-
- - -
Improvements and New Features - - -

- Added erlang:garbage_collect/2 that takes an - option list as the last argument that can be used to - control whether a minor or a major garbage collection is - to be done. Doing a minor collection only collects terms - that have recently died, but is cheaper than a mjor - collection.

-

- Own Id: OTP-11695

-
- -

- Optimized test for tuples with an atom as first element.

-

- Own Id: OTP-12148

-
- -

- Erlang literals are no longer copied during process to - process messaging.

-

- Own Id: OTP-13529

-
- -

Add support in the erl_nif API for asynchronous - message notifications when sockets or other file - descriptors are ready to accept read or write operations. - The following functions have been added:

-

enif_select

-

enif_monitor_process

-

enif_demonitor_process

-

enif_compare_monitors

-

enif_open_resource_type_x

-

- Own Id: OTP-13684

-
- -

There are two new guard BIFs 'floor/1' and - 'ceil/1'. They both return integers. In the - 'math' module, there are two new BIFs with the - same names that return floating point values.

-

- Own Id: OTP-13692

-
- -

- Remove deprecated erlang:hash/2.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13827

-
- -

Replaced usage of deprecated symbolic time - unit representations.

-

- Own Id: OTP-13831 Aux Id: OTP-13735

-
- -

- Added support in zlib for extraction of the inflation - dictionary.

-

- Own Id: OTP-13842

-
- -

- The previously used purge strategy has been removed. The - optional purge strategy introduced in ERTS version 8.1 is - now the only strategy available.

-

- The new purge strategy is slightly incompatible with the - old strategy. Previously processes holding funs - that referred to the module being purged either failed a - soft purge, or was killed during a hard purge. The new - strategy completely ignores funs. If funs - referring to the code being purged exist, and are used - after a purge, an exception will be raised upon usage. - That is, the behavior will be exactly the same as the - case when a fun is received by a process after the - purge.

-

- For more information see the documentation of erlang:check_process_code/3.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13844 Aux Id: OTP-13833

-
- -

- Dirty schedulers are now enabled by default when the - runtime system is built with SMP support.

-

- Own Id: OTP-13860

-
- -

- Improved ETS lookup/insert/delete speed for large - set, bag and duplicate_bag by a - significant reduction of the hash load factor. This speed - improvement comes at the expense of less than one word - per table entry. Tables with less than 256 entries are - not affected at all.

-

- Own Id: OTP-13903

-
- -

- The NIF library reload feature is not supported - anymore. It has been marked as deprecated since OTP R15B. - This means that you are only allowed to do one successful - call to erlang:load_nif/2 for each module - instance. A second call to erlang:load_nif/2 will - return {error, {reload, _}} even if the NIF - library imlements the reload callback.

-

- Runtime upgrade of a NIF library is still supported by - using the Erlang module upgrade mechanics with a current - and an old module instance existing at the same time with - their corresponding NIF libraries.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13908

-
- -

- Add erlang:system_info(atom_count) and - erlang:system_info(atom_limit) to provide a way to - retrieve the current and maximum number of atoms.

-

- Own Id: OTP-13976

-
- -

The function fmod/2 has been added to the - math module.

-

- Own Id: OTP-14000

-
- -

- erlang:load_nif/2 returns new error type - notsup when called for a HiPE compiled module, - which is not supported.

-

- Own Id: OTP-14002

-
- -

- Add driver and nif lock instrumentation to lcnt

-

- Own Id: OTP-14069

-
- -

- Reduce memory pressure by converting sub-binaries to - heap-binaries when possible. This is done during garbage - collection.

-

- Own Id: OTP-14149

-
- -

- Dirty schedulers are now enabled and supported on Erlang - runtime systems with SMP support.

-

- Besides support for dirty NIFs also support for dirty - BIFs and dirty garbage collection have been introduced. - All garbage collections that potentially will take a long - time to complete are now performed on dirty schedulers if - enabled.

-

- erlang:statistics(scheduler_wall_time) - now also includes information about dirty CPU schedulers. - Code using erlang:statistics(scheduler_wall_time) - may have to be rewritten to take this incompatibility - into consideration.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14152

-
- -

Atoms may now contain arbitrary Unicode - characters.

-

- Own Id: OTP-14178

-
- -

- Introduce an event manager in Erlang to handle OS - signals. A subset of OS signals may be subscribed to and - those are described in the Kernel application.

-

- Own Id: OTP-14186

-
- -

- The escript program now handles symbolic links to - escripts.

-

- This is useful for standalone systems with - escripts residing on a bin directory not included - in the execution path (as it may cause their erl - program(s) to override the desired one). Instead the - escripts can be referred to via symbolic links - from a bin directory in the path.

-

- Own Id: OTP-14201 Aux Id: PR-1293

-
- -

- All uses of the magic binary kludge has been replaced by - uses of erlang references.

-

- A magic binary was presented as an empty binary, but - actually referred other data internally in the Erlang VM. - Since they were presented as empty binaries, different - magic binaries compared as equal, and also lost their - internal data when passed out of an erlang node.

-

- The new usage of references has not got any of these - strange semantic issues, and the usage of these - references has been optimized to give the same - performance benefits as well as memory usage benefits as - magic binaries had.

-

- A couple of examples of previous uses of magic binaries - are match specifications and NIF resources.

-

- Own Id: OTP-14205

-
- -

- The non-smp emulators have been deprecated and are - scheduled for removal in OTP-21.

-

- In preperations for this, the threaded non-smp emulator - is no longer built by default and has to be enabled using - the --enable-plain-emulator to configure.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14272

-
- -

- Allow HiPE to run on VM built with - --enable-m32-build.

-

- Own Id: OTP-14330 Aux Id: PR-1397

-
- -

- Upgraded the OTP internal PCRE library from version 8.33 - to version 8.40. This library is used for implementation - of the re - regular expressions module.

-

- Besides various bug fixes, the new version allows for - better stack protection. In order to utilize this - feature, the stack size of normal scheduler threads is - now by default set to 128 kilo words on all platforms. - The stack size of normal scheduler threads can be set - upon system start by passing the +sss - command line argument to the erl command.

-

- See http://pcre.org/original/changelog.txt - for information about changes made to PCRE between the - versions 8.33 and 8.40.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14331 Aux Id: ERL-208

-
- -

- Remove generation of atoms in old latin1 external format. - The old latin1 format can still be decoded but is never - generated by term_to_binary or sent on a - distribution channel. The new utf8 format for atoms was - introduced in OTP R16. An OTP 20 node can therefore not - connect to nodes older than R16.

-

- Own Id: OTP-14337

-
- -

- Added function re:version/0 which returns - information about the OTP internal PCRE version used for - implementation of the re module.

-

- Own Id: OTP-14347 Aux Id: PR-1412

-
- -

- Added new debug bif erlang:list_to_port/1.

-

- Own Id: OTP-14348

-
- -

- Various improvements of timer management internally in - the VM. These improvements both reduced memory - consumption of timer wheels as well as reduce the amount - of work that has to be performed in order to handle - timers.

-

- Own Id: OTP-14356

-
- -

Sockets can now be bound to device (SO_BINDTODEVICE) - on platforms where it is supported.

This has - been implemented e.g to support VRF-Lite under Linux; see - - VRF , and GitHub pull request #1326. -

-

- Own Id: OTP-14357 Aux Id: PR-1326

-
- -

Added the following erl command line arguments - with which you can set suggested stack for dirty - schedulers:

+sssdcpu -

for dirty CPU schedulers

- +sssdio -

for dirty IO schedulers

-

The default suggested stack size for dirty schedulers - is 40 kilo words.

-

- Own Id: OTP-14380

-
- -

- Changed erts startup program name, argv 0, to use the - environment variable ESCRIPT_NAME so that - erlc, dialyzer, typer, - ct_run, or the escript name can be seen with - external programs, such as ps and htop (depending on - options), on unix.

-

- If environment variable ESCRIPT_NAME is not set, - argv 0 of the invoking program will be used, e.g. the - name will be erl, cerl, or the soft link - name.

-

- Own Id: OTP-14381

-
- -

- Improvements of escript documentation.

-

- Own Id: OTP-14384 Aux Id: OTP-14201

-
- -

- Add function enif_hash for NIFs to calculate hash - values of arbitrary terms.

-

- Own Id: OTP-14385 Aux Id: PR-1413

-
-
-
- -
-
Erts 8.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 8222631bd1aa0e0fb8fea52bc984865d4433d182 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 9 May 2017 21:26:09 +0200 Subject: erts: Improve erl_nif docs --- erts/doc/src/erl_nif.xml | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 51ba70994a..3eb3e04f33 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -714,6 +714,7 @@ typedef struct { typedef struct { ErlNifResourceDtor* dtor; ErlNifResourceStop* stop; + ErlNifResourceDown* down; } ErlNifResourceTypeInit;

Initialization structure read by enif_open_resource_type_x.

@@ -1395,13 +1396,12 @@ typedef enum {

Returns true if a pending exception is associated with the environment env. If reason is a NULL pointer, ignore it. Otherwise, if a pending exception associated with - env exists, set ERL_NIF_TERM to which reason - points to the value of the exception's term. For example, if - + env exists, set *reason to the value of the exception + term. For example, if enif_make_badarg is called to set a pending badarg exception, a later call to enif_has_pending_exception(env, &reason) sets - reason to the atom badarg, then return true.

+ *reason to the atom badarg, then return true.

See also enif_make_badarg and @@ -2384,20 +2384,23 @@ enif_map_iterator_destroy(env, &iter); called in the two callbacks load and upgrade.

+

See also + enif_open_resource_type_x.

ErlNifResourceType * enif_open_resource_type_x(ErlNifEnv* env, const char* name, - ErlNifResourceTypeInit* init, + const ErlNifResourceTypeInit* init, ErlNifResourceFlags flags, ErlNifResourceFlags* tried) Create or takeover a resource type.

Same as enif_open_resource_type - except is also accept a stop callback for resource types that are - used together with enif_select.

+ except it accepts additional callback functions for resource types that are + used together with enif_select + and enif_monitor_process.

Argument init is a pointer to an ErlNifResourceTypeInit structure that contains the function pointers for destructor, down and stop callbacks @@ -2695,6 +2698,21 @@ enif_map_iterator_destroy(env, &iter); the event object. This safe way of closing event objects must be used even if all notifications have been received and no further calls to enif_select have been made.

+

The first call to enif_select for a specific OS event will establish + a relation between the event object and the containing resource. All subsequent calls + for an event must pass its containing resource as argument + obj. The relation is dissolved when enif_select has + been called with mode as ERL_NIF_SELECT_STOP and the + corresponding stop callback has returned. A resource can contain + several event objects but one event object can only be contained within + one resource. A resource will not be destructed until all its contained relations + have been dissolved.

+ +

Use enif_monitor_process + together with enif_select to detect failing Erlang + processes and prevent them from causing permanent leakage of resources + and their contained OS event objects.

+

Returns a non-negative value on success where the following bits can be set:

ERL_NIF_SELECT_STOP_CALLED -- cgit v1.2.3 From 8936183f86579acfbbcf061431d049755aa2ae54 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 10 May 2017 14:47:19 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index a726cc7b97..1b8fc59762 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,30 @@

This document describes the changes made to the ERTS application.

+
Erts 7.2.1.1 + +
Improvements and New Features + + +

Introduced new statistics functionality in order to + more efficiently retrieve information about run able and + active processes and ports. For more information see:

+ statistics(total_run_queue_lengths) + statistics(run_queue_lengths) + statistics(total_active_tasks) + statistics(active_tasks) + +

+ Own Id: OTP-13201

+
+
+
+ +
Erts 7.2.1 -- cgit v1.2.3 From 7b169140b2d37f43996b9d1a94877926a471d97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 2 May 2017 05:41:17 +0200 Subject: Warn for potentially unsafe use of get_stacktrace/0 erlang:get_stacktrace/0 returns the stacktrace for the latest exception. The problem is that the stacktrace is kept until the next exception occurs. If the last exception was a 'function_clause' or a 'badarg', the arguments for the call are also kept forever. The arguments can be terms of any size (potentially huge). In a future release, we would like to only allow erlang:get_stacktrace/0 from within a 'try' expression. That would make it possible to clear the stacktrace when the 'try' expression is exited. The 'catch' expression has no natural end where the stacktrace could be cleared. The stacktrace could be cleared at the end of the function that the 'catch' occurs in, but that would cause problems in the following scenario (from real life, but simplified): try ... catch _:_ -> io:format(...), io:format("~p\n", [erlang:get_stacktrace()]) end. %% In io.erl. format(Fmt, Args) -> Res = case ... of SomePattern -> catch... ...; SomeOtherPattern -> %% Output the formatted string here ... end, clear_stacktrace(), %% Inserted by compiler. Res. The call to io:format() would always clear the stacktrace before it could be retrieved. That problem could be solved by tightning the scope in which the stacktrace is kept, but the rules for how long erlang:get_stacktrace/0 would work would become complicated. Therefore, the solution we suggest for a future major release of OTP is that erlang:get_stacktrace/0 will return [] if it is called outside the 'catch' part of a 'try' expression. To help users prepare, introduce a warning when it is likely that erlang:get_stacktrace/0 will always return an empty list, for example in this code: catch error(foo), Stk = erlang:get_stacktrace() or in this code: try Expr catch _:_ -> ok end, Stk = erlang:get_stacktrace() --- erts/doc/src/erlang.xml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 6f70ae4a52..6d165e9eff 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1813,8 +1813,9 @@ true Get the call stack back-trace of the last exception. -

Gets the call stack back-trace (stacktrace) of the - last exception in the calling process as a list of +

Gets the call stack back-trace (stacktrace) for an + exception that has just been caught + in the calling process as a list of {Module,Function,Arity,Location} tuples. Field Arity in the first tuple can be the argument list of that function call instead of an arity integer, @@ -1822,6 +1823,29 @@ true

If there has not been any exceptions in a process, the stacktrace is []. After a code change for the process, the stacktrace can also be reset to [].

+

erlang:get_stacktrace/0 is only guaranteed to return + a stacktrace if called (directly or indirectly) from within the + scope of a try expression. That is, the following call works:

+
+try Expr
+catch
+  C:R ->
+   {C,R,erlang:get_stacktrace()}
+end
+

As does this call:

+
+try Expr
+catch
+  C:R ->
+   {C,R,helper()}
+end
+
+helper() ->
+  erlang:get_stacktrace().
+ +

In a future release, + erlang:get_stacktrace/0 will return [] if called + from outside a try expression.

The stacktrace is the same data as operator catch returns, for example:

-- 
cgit v1.2.3


From 4b216f70be3403bb7c102e7ac1a91b1ee4805c33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= 
Date: Fri, 12 May 2017 13:54:32 +0200
Subject: Let --enable-lock-counter build an additional emulator

"./configure --enable-lock-counter" would modify the behavior
of the default emulator (usually SMP).

To make lock counting more accessible, change --enable-lock-counter
to build an additional emulator in the same way as:

  (cd erts/emulator && make lcnt)

(The next commit will make it easier to start the built lock-counter
emulator.)
---
 erts/doc/src/erl.xml | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'erts/doc')

diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml
index 6046e94599..e1aa5ce76e 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl.xml
@@ -239,6 +239,13 @@
       
         

Useful for debugging. Prints the arguments sent to the emulator.

+ + +

Start an emulator of a different type. For example, to start + the lock-counter emualator, use -emu_type lcnt. (The emulator + must already be built. Use the configure option + --enable-lock-counter to build the lock-counter emulator.)

+

Sets the host OS environment variable to -- cgit v1.2.3 From 32ea8ba368c455afba07afd85bed6fb57879f56d Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 18 May 2017 20:42:04 +0200 Subject: Make statistics/1 aware of dirty run-queues and tasks --- erts/doc/src/erlang.xml | 189 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 128 insertions(+), 61 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 6f70ae4a52..e93e9a2658 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6124,28 +6124,60 @@ true

Information about active processes and ports. +

Returns the same as + + statistics(active_tasks_all) + with the exception that no information about the dirty + IO run queue and its associated schedulers is part of + the result. That is, only tasks that are expected to be + CPU bound are part of the result.

+
+ + + + + Information about active processes and ports. + +

Returns a list where each element represents the amount of active processes and ports on each run queue and its - associated scheduler. That is, the number of processes and - ports that are ready to run, or are currently running. The - element location in the list corresponds to the scheduler - and its run queue. The first element corresponds to scheduler - number 1 and so on. The information is not gathered - atomically. That is, the result is not necessarily a - consistent snapshot of the state, but instead quite - efficiently gathered.

+ associated schedulers. That is, the number of processes and + ports that are ready to run, or are currently running. + Values for normal run queues and their associated schedulers + are located first in the resulting list. The first element + corresponds to scheduler number 1 and so on. If support for + dirty schedulers exist, an element with the value for the + dirty CPU run queue and its associated dirty CPU schedulers + follow and then as last element the value for the the dirty + IO run queue and its associated dirty IO schedulers follow. + The information is not gathered atomically. That is, + the result is not necessarily a consistent snapshot of the + state, but instead quite efficiently gathered.

+

Each normal scheduler has one run queue that it + manages. If dirty schedulers schedulers are supported, all + dirty CPU schedulers share one run queue, and all dirty IO + schedulers share one run queue. That is, we have multiple + normal run queues, one dirty CPU run queue and one dirty + IO run queue. Work can not migrate between the + different types of run queues. Only work in normal run + queues can migrate to other normal run queues. This has + to be taken into account when evaluating the result.

See also statistics(total_active_tasks), - statistics(run_queue_lengths), and + statistics(run_queue_lengths), + + statistics(run_queue_lengths_all), - statistics(total_run_queue_lengths).

+ statistics(total_run_queue_lengths), and + + statistics(total_run_queue_lengths_all).

- + Information about context switches.

Returns the total number of context switches since the @@ -6154,7 +6186,7 @@ true - + Information about exact reductions. @@ -6170,7 +6202,7 @@ true - + Information about garbage collection.

Returns information about garbage collection, for example:

@@ -6182,7 +6214,7 @@ true
- + Information about I/O.

Returns Input, @@ -6193,7 +6225,7 @@ true - + Information about microstate accounting. @@ -6329,7 +6361,7 @@ lists:map( - + Information about reductions. @@ -6348,12 +6380,13 @@ lists:map( - + Information about the run-queues. -

Returns the total length of the run-queues. That is, the number +

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 - run-queues. The information is gathered atomically. That + normal run-queues. Dirty run queues are not part of the + result. The information is gathered atomically. That is, the result is a consistent snapshot of the state, but this operation is much more expensive compared to @@ -6363,29 +6396,63 @@ lists:map( - + Information about the run-queue lengths. +

Returns the same as + + statistics(run_queue_lengths_all) + with the exception that no information about the dirty + IO run queue is part of the result. That is, only + run queues with work that is expected to be CPU bound + is part of the result.

+
+
+ + + + Information about the run-queue lengths. +

Returns a list where each element represents the amount - of processes and ports ready to run for each run queue. The - element location in the list corresponds to the run queue - of a scheduler. The first element corresponds to the run - queue of scheduler number 1 and so on. The information is - not gathered atomically. That is, the result is - not necessarily a consistent snapshot of the state, but - instead quite efficiently gathered.

+ of processes and ports ready to run for each run queue. + Values for normal run queues are located first in the + resulting list. The first element corresponds to the + normal run queue of scheduler number 1 and so on. If + support for dirty schedulers exist, values for the dirty + CPU run queue and the dirty IO run queue follow (in that + order) at the end. The information is not + gathered atomically. That is, the result is not + necessarily a consistent snapshot of the state, but + instead quite efficiently gathered.

+

Each normal scheduler has one run queue that it + manages. If dirty schedulers schedulers are supported, all + dirty CPU schedulers share one run queue, and all dirty IO + schedulers share one run queue. That is, we have multiple + normal run queues, one dirty CPU run queue and one dirty + IO run queue. Work can not migrate between the + different types of run queues. Only work in normal run + queues can migrate to other normal run queues. This has + to be taken into account when evaluating the result.

See also + + statistics(run_queue_lengths), + + statistics(total_run_queue_lengths_all), statistics(total_run_queue_lengths), - statistics(active_tasks), and + statistics(active_tasks), + + statistics(active_tasks_all), and - statistics(total_active_tasks).

+ statistics(total_active_tasks), + + statistics(total_active_tasks_all).

- + Information about runtime.

Returns information about runtime, in milliseconds.

@@ -6400,7 +6467,7 @@ lists:map(
- + Information about each schedulers work time. @@ -6521,7 +6588,7 @@ ok - + Information about each schedulers work time. @@ -6546,47 +6613,47 @@ ok - + Information about active processes and ports. -

Returns the total amount of active processes and ports in - the system. That is, the number of processes and ports that - are ready to run, or are currently running. The information - is not gathered atomically. That is, the result - is not necessarily a consistent snapshot of the state, but - instead quite efficiently gathered.

-

See also - - statistics(active_tasks), - - statistics(run_queue_lengths), and - - statistics(total_run_queue_lengths).

+

The same as calling + lists:sum(statistics(active_tasks)), + but more efficient.

- + + Information about active processes and ports. + +

The same as calling + lists:sum(statistics(active_tasks_all)), + but more efficient.

+
+
+ + + Information about the run-queue lengths. -

Returns the total length of the run queues. That is, the number - of processes and ports that are ready to run on all available - run queues. The information is not gathered atomically. - That is, the result is not necessarily a consistent snapshot of - the state, but much more efficiently gathered compared to - - statistics(run_queue).

-

See also - statistics(run_queue_lengths), - - statistics(total_active_tasks), and - - statistics(active_tasks).

+

The same as calling + lists:sum(statistics(run_queue_lengths)), + but more efficient.

- + + Information about the run-queue lengths. + +

The same as calling + lists:sum(statistics(run_queue_lengths_all)), + but more efficient.

+
+
+ + + Information about wall clock.

Returns information about wall clock. wall_clock can -- cgit v1.2.3 From d3bbb08de56ee4d0093fd6a5da4e45b0b0a9741c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Sun, 21 May 2017 02:17:35 +0200 Subject: Update erl_msg_tracer example After "Move tracer SecondTraceTerm to Opts map" in commit 115f0ba7 getting the receipient has to be done on a bit different way. --- erts/doc/src/erl_tracer.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_tracer.xml b/erts/doc/src/erl_tracer.xml index 63feebb0b5..fd3c17f337 100644 --- a/erts/doc/src/erl_tracer.xml +++ b/erts/doc/src/erl_tracer.xml @@ -653,7 +653,7 @@ ok <0.37.0> 3> erlang:trace(new, true, [send,{tracer, erl_msg_tracer, Tracer}]). 0 -{<0.39.0>,<0.27.0>} +{trace,<0.39.0>,<0.27.0>} 4> {ok, D} = file:open("/tmp/tmp.data",[write]). {trace,#Port<0.486>,<0.40.0>} {trace,<0.40.0>,<0.21.0>} @@ -758,18 +758,21 @@ static ERL_NIF_TERM enabled(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) /* * argv[0]: TraceTag, should only be 'send' - * argv[1]: TracerState, process to send {argv[2], argv[4]} to + * argv[1]: TracerState, process to send {Tracee, Recipient} to * argv[2]: Tracee - * argv[3]: Recipient - * argv[4]: Options, ignored + * argv[3]: Message + * argv[4]: Options, map containing Recipient */ static ERL_NIF_TERM trace(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { ErlNifPid to_pid; + ERL_NIF_TERM recipient, msg; if (enif_get_local_pid(env, argv[1], &to_pid)) { - ERL_NIF_TERM msg = enif_make_tuple3(env, enif_make_atom(env, "trace"), argv[2], argv[4]); + if (enif_get_map_value(env, argv[4], enif_make_atom(env, "extra"), &recipient)) { + msg = enif_make_tuple3(env, enif_make_atom(env, "trace"), argv[2], recipient); enif_send(env, &to_pid, NULL, msg); + } } return enif_make_atom(env, "ok"); -- cgit v1.2.3 From e606eae1325a9f73140ab309d5dbbb7cdb589a04 Mon Sep 17 00:00:00 2001 From: Ted Burghart Date: Mon, 22 May 2017 15:36:09 -0400 Subject: Add enif_whereis_...() functions #### Why do we need this new feature? There are cases when a NIF needs to send a message, using `enif_send()`, to a long-lived process with a registered name. A common use-case is logging, where asynchronous fire-and-forget messages are the norm. There can also be cases where a yielding or dirty NIF or background thread may request a callback from a service with additional information it needs to complete its operation, yielding or waiting (with suitable timeouts, etc) until its state has been updated through the NIF module's API. NIFs can only send messages to pids, and the lack of name resolution leaves a complicated dance between separate monitoring processes and the NIF as the only way to keep a NIF informed of the whereabouts of such long-lived processes. Providing a reliable, built-in facility for NIFs to resolve process (or port) names simplifies these use cases considerably. #### Risks or uncertain artifacts? Testing has not exposed any significant risk. The implementation behaves as expected on regular and dirty scheduler threads as well as non-scheduler threads. By constraining the `enif_whereis_...()` functions to their minimal scopes and using patterns consistent with related functions, the implementation, testing, and maintenance burden is low. The API and behavior of existing functions is unchanged. #### How did you solve it? While extending `enif_send()` to operate on a pid or an atom (as `erlang:send/2` does) was attractive, it would have entailed changing the type of its `to_pid` parameter and thereby breaking backward compatibility. The same consideration applies to `enif_port_command()`. That leaves a choice between 1, 2, or 3 new functions: 1. `enif_whereis()` 2. `enif_whereis_pid()` and `enif_whereis_port()` 3. All of the above. While option (1), directly mimicking the behavior of `erlang:whereis/1`, is appealing, it poses potential problems if `pid()` or `port()` are subsequently implemented as non-integral types that must be bound to an owning `ErlNifEnv` instance. Therefore, option (2) has been chosen to use `ErlNifPid`/`ErlNifPort` structures in the API to maintain proper term ownership semantics. --- erts/doc/src/erl_nif.xml | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 3eb3e04f33..5a69bed34c 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -3002,6 +3002,63 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) { erl_drv_tsd_set.

+ + + int + enif_whereis_pid(ErlNifEnv *env, + ERL_NIF_TERM name, ErlNifPid *pid) + Looks up a process by its registered name. + +

Looks up a process by its registered name.

+ + env + The environment of the calling process. Must be NULL + only if calling from a created thread. + name + The name of a registered process, as an atom. + *pid + The ErlNifPid + in which the resolved process id is stored. + +

On success, sets *pid to the local process registered with + name and returns true. If name is not a + registered process, or is not an atom, false is returned and + *pid is unchanged.

+

Works as + erlang:whereis/1, but restricted to processes. See + enif_whereis_port + to resolve registered ports.

+
+
+ + + int + enif_whereis_port(ErlNifEnv *env, + ERL_NIF_TERM name, ErlNifPort *port) + Looks up a port by its registered name. + +

Looks up a port by its registered name.

+ + env + The environment of the calling process. Must be NULL + only if calling from a created thread. + name + The name of a registered port, as an atom. + *port + The ErlNifPort + in which the resolved port id is stored. + +

On success, sets *port to the port registered with + name and returns true. If name is not a + registered port, or is not an atom, false is returned and + *port is unchanged.

+

Works as + erlang:whereis/1, but restricted to ports. See + enif_whereis_pid + to resolve registered processes.

+
+
+
-- cgit v1.2.3 From 30f4fc6963e5793368713897f32afd2172dc1578 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 18 May 2017 16:11:11 +0200 Subject: otp: Extend secure distribution docs warnings Warnings have been added to the relevant documentation about not using un-secure distributed nodes in exposed environments. --- erts/doc/src/erl.xml | 27 ++++++++++++++++++++++++++- erts/doc/src/erl_dist_protocol.xml | 11 +++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index e1aa5ce76e..8b152b83f5 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -379,6 +379,16 @@ is the fully qualified host name of the current host. For short names, use flag instead.

+ +

+ Starting a distributed node without also specifying + -proto_dist inet_tls + will expose the node to attacks that may give the attacker + complete access to the node and in extension the cluster. + When using un-secure distributed nodes, make sure that the + network is configured to keep potential attackers out. +

+
@@ -428,12 +438,17 @@ +

Specifies a protocol for Erlang distribution:

inet_tcp TCP over IPv4 (the default) inet_tls - Distribution over TLS/SSL + Distribution over TLS/SSL, See the + + Using SSL for Erlang Distribution User's Guide + for details on how to setup a secure distributed node. + inet6_tcp TCP over IPv6 @@ -497,6 +512,16 @@ exist between nodes running with flag and those running with flag , as node names must be unique in distributed Erlang systems.

+ +

+ Starting a distributed node without also specifying + -proto_dist inet_tls + will expose the node to attacks that may give the attacker + complete access to the node and in extension the cluster. + When using un-secure distributed nodes, make sure that the + network is configured to keep potential attackers out. +

+
-start_epmd true | false diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml index ee74983730..8391408a2e 100644 --- a/erts/doc/src/erl_dist_protocol.xml +++ b/erts/doc/src/erl_dist_protocol.xml @@ -70,6 +70,17 @@

The integers in all multibyte fields are in big-endian order.

+ +

+ The Erlang Distribution protocol is not by itself secure and does not + aim to be so. In order to get secure distribution the distributed nodes + should be configured to use distribution over tls. + See the + Using SSL for Erlang Distribution User's Guide + for details on how to setup a secure distributed node. +

+
+
EPMD Protocol

The requests served by the EPMD are summarized in the following -- cgit v1.2.3 From f8dadb1c97e952e79e4df558c76f99664757441c Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 24 May 2017 15:30:42 +0200 Subject: erts: Clarify ERL_CRASH_DUMP_SECONDS docs especially default behavior without -heart, which is wait indefinitely for crash dump. --- erts/doc/src/erl.xml | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 8b152b83f5..638e88ca31 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1553,32 +1553,27 @@

Unix systems: This variable gives the number of seconds that the emulator is allowed to spend writing a crash dump. When the - given number of seconds have elapsed, the emulator is terminated by a - SIGALRM signal.

-

If the variable is not set or set to 0 seconds - (), the runtime system does - not even attempt to write the crash dump file. It only terminates.

-

If the variable is set to negative value, such as - , the runtime system - waits indefinitely for the crash dump file to be written.

-

This variable is used with - heart(3) if heart is running:

+ given number of seconds have elapsed, the emulator is terminated.

- Suppresses the writing a crash dump file entirely, thus - rebooting the runtime system immediately. This is the same as not - setting the environment variable. + If the variable is set to 0 seconds, the runtime system does + not even attempt to write the crash dump file. It only terminates. + This is the default if option -heart is passed to erl + and ERL_CRASH_DUMP_SECONDS is not set. + + + If the variable is set to a positive value S, + wait for S seconds to complete the crash dump file and + then terminates the runtime system with a SIGALRM signal. - Setting the environment variable to a negative value causes the - termination of the runtime system to wait until the crash dump file - has been completly written. - - - Waits for S seconds to complete the crash dump file and - then terminates the runtime system. + A negative value causes the termination of the runtime system + to wait indefinitely until the crash dump file has been completly + written. This is the default if option -heart is not + passed to erl and ERL_CRASH_DUMP_SECONDS is not set. +

See also heart(3).

-- cgit v1.2.3 From eaf8ca41dfa4850437ad270d3897399c9358ced0 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 30 May 2017 16:15:30 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 559 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 559 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 08f6732036..d0fa170e66 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,565 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0 + +
Fixed Bugs and Malfunctions + + +

Fix various bugs regarding loading, upgrade and purge + of HiPE compiled code:

The native code + memory for a purged module was never deallocated. + Wrong functions could in some cases be called after + a module upgrade. + erlang:check_process_code did not check for + recursive calls made from native code. +

+ Own Id: OTP-13968

+
+ +

+ Hipe optional LLVM backend does require LLVM version 3.9 + or later as older versions forced strong dependencies on + erts internals structures.

+

+ Own Id: OTP-14238

+
+ +

When an exception such as 'throw(HugeTerm)' was + caught, HugeTerm term would be kept in the process + until the next exception occurred, potentially increasing + the heap size for the process. That has been + corrected.

+

+ Own Id: OTP-14255 Aux Id: OTP-14400, OTP-14401

+
+ +

+ Slogans in crash dumps have been extended to print more + complex terms.

+

+ Own Id: OTP-14303

+
+ +

+ Fixed bug when using enif_inspect_binary in + combination with enif_copy. In some circumstances + the inspected binary could be realloced by the + enif_copy call when it shouldn't have been.

+

+ Own Id: OTP-14304

+
+ +

+ The address family local (AF_UNIX / AF_LOCAL) now + does not ensure zero termination of Linux Abstract + Addresses so they can use all bytes.

+

+ Own Id: OTP-14305

+
+ +

+ Use -fno-PIE for Gentoo Hardened and others that + don't accept linker flag -no-pie.

+

+ Own Id: OTP-14307 Aux Id: PR-1379

+
+ +

+ Disable hipe for ppc64le architecture (little + endian) as it is not, and has never been, supported. It + was earlier equated with ppc64 (big endian) which + lead to broken build without --disable-hipe.

+

+ Own Id: OTP-14314 Aux Id: ERL-369, PR-1394

+
+ +

+ Fix 'epmd -kill' to return a failure exit status code if + epmd was not killed because of some error.

+

+ Own Id: OTP-14324

+
+ +

Fixed the following dirty scheduler related bugs:

+

the +SDPcpu command line argument + could cause the amount of dirty CPU schedulers to be set + to zero

+

erlang:system_flag(multi_scheduling, _) + failed when only one normal scheduler was used together + with dirty scheduler support

+

+ Own Id: OTP-14335

+
+ +

+ Fix erlexec to handle mismatch in sysconf and proc fs + when figuring out the cpu topology. This behaviour has + been seen when using docker together with + --cpuset-cpus.

+

+ Own Id: OTP-14352

+
+ +

+ Fixed memory segment cache used for multiblock carriers. + Huge (> 2GB) memory segments could cause a VM crash. + Creation of such huge memory segments used for multiblock + carriers is however very uncommon.

+

+ Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

+
+ +

+ Fix bug causing code:is_module_native to falsely + return true when local call trace is enabled for + the module.

+

+ Own Id: OTP-14390

+
+ +

+ Fix emulator crash when receive tracing on a + trace_delivered message.

+

+ Own Id: OTP-14411

+
+ +

+ escript did not handle paths with spaces correct.

+

+ Own Id: OTP-14433

+
+ +

+ Fix erroneous lock check assertion when wx is run + on MacOS X.

+

+ Own Id: OTP-14437 Aux Id: ERL-360

+
+
+
+ + +
Improvements and New Features + + +

+ Added erlang:garbage_collect/2 that takes an + option list as the last argument that can be used to + control whether a minor or a major garbage collection is + to be done. Doing a minor collection only collects terms + that have recently died, but is cheaper than a mjor + collection.

+

+ Own Id: OTP-11695

+
+ +

+ Optimized test for tuples with an atom as first element.

+

+ Own Id: OTP-12148

+
+ +

+ Erlang literals are no longer copied during process to + process messaging.

+

+ Own Id: OTP-13529

+
+ +

Add support in the erl_nif API for asynchronous + message notifications when sockets or other file + descriptors are ready to accept read or write operations. + The following functions have been added:

+

enif_select

+

enif_monitor_process

+

enif_demonitor_process

+

enif_compare_monitors

+

enif_open_resource_type_x

+

+ Own Id: OTP-13684

+
+ +

There are two new guard BIFs 'floor/1' and + 'ceil/1'. They both return integers. In the + 'math' module, there are two new BIFs with the + same names that return floating point values.

+

+ Own Id: OTP-13692

+
+ +

+ Remove deprecated erlang:hash/2.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13827

+
+ +

Replaced usage of deprecated symbolic time + unit representations.

+

+ Own Id: OTP-13831 Aux Id: OTP-13735

+
+ +

+ Added support in zlib for extraction of the inflation + dictionary.

+

+ Own Id: OTP-13842

+
+ +

+ The previously used purge strategy has been removed. The + optional purge strategy introduced in ERTS version 8.1 is + now the only strategy available.

+

+ The new purge strategy is slightly incompatible with the + old strategy. Previously processes holding funs + that referred to the module being purged either failed a + soft purge, or was killed during a hard purge. The new + strategy completely ignores funs. If funs + referring to the code being purged exist, and are used + after a purge, an exception will be raised upon usage. + That is, the behavior will be exactly the same as the + case when a fun is received by a process after the + purge.

+

+ For more information see the documentation of erlang:check_process_code/3.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13844 Aux Id: OTP-13833

+
+ +

+ Dirty schedulers are now enabled by default when the + runtime system is built with SMP support.

+

+ Own Id: OTP-13860

+
+ +

+ Improved ETS lookup/insert/delete speed for large + set, bag and duplicate_bag by a + significant reduction of the hash load factor. This speed + improvement comes at the expense of less than one word + per table entry. Tables with less than 256 entries are + not affected at all.

+

+ Own Id: OTP-13903

+
+ +

+ The NIF library reload feature is not supported + anymore. It has been marked as deprecated since OTP R15B. + This means that you are only allowed to do one successful + call to erlang:load_nif/2 for each module + instance. A second call to erlang:load_nif/2 will + return {error, {reload, _}} even if the NIF + library imlements the reload callback.

+

+ Runtime upgrade of a NIF library is still supported by + using the Erlang module upgrade mechanics with a current + and an old module instance existing at the same time with + their corresponding NIF libraries.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13908

+
+ +

+ Add erlang:system_info(atom_count) and + erlang:system_info(atom_limit) to provide a way to + retrieve the current and maximum number of atoms.

+

+ Own Id: OTP-13976

+
+ +

The function fmod/2 has been added to the + math module.

+

+ Own Id: OTP-14000

+
+ +

+ erlang:load_nif/2 returns new error type + notsup when called for a HiPE compiled module, + which is not supported.

+

+ Own Id: OTP-14002

+
+ +

+ Add driver and nif lock instrumentation to lcnt

+

+ Own Id: OTP-14069

+
+ +

+ Reduce memory pressure by converting sub-binaries to + heap-binaries when possible. This is done during garbage + collection.

+

+ Own Id: OTP-14149

+
+ +

+ Dirty schedulers are now enabled and supported on Erlang + runtime systems with SMP support.

+

+ Besides support for dirty NIFs also support for dirty + BIFs and dirty garbage collection have been introduced. + All garbage collections that potentially will take a long + time to complete are now performed on dirty schedulers if + enabled.

+

+ erlang:statistics/1 + with arguments inspecting scheduler and run queue states + have been changed due to the dirty scheduler support. + Code using this functionality may have to be rewritten + taking these incompatibilities into consideration. + Examples of such uses are calls to erlang:statistics(scheduler_wall_time), + statistics(total_run_queue_lengths), + statistics(total_active_tasks), + etc.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14152

+
+ +

Atoms may now contain arbitrary Unicode + characters.

+

+ Own Id: OTP-14178

+
+ +

+ Introduce an event manager in Erlang to handle OS + signals. A subset of OS signals may be subscribed to and + those are described in the Kernel application.

+

+ Own Id: OTP-14186

+
+ +

+ The escript program now handles symbolic links to + escripts.

+

+ This is useful for standalone systems with + escripts residing on a bin directory not included + in the execution path (as it may cause their erl + program(s) to override the desired one). Instead the + escripts can be referred to via symbolic links + from a bin directory in the path.

+

+ Own Id: OTP-14201 Aux Id: PR-1293

+
+ +

+ All uses of the magic binary kludge has been replaced by + uses of erlang references.

+

+ A magic binary was presented as an empty binary, but + actually referred other data internally in the Erlang VM. + Since they were presented as empty binaries, different + magic binaries compared as equal, and also lost their + internal data when passed out of an erlang node.

+

+ The new usage of references has not got any of these + strange semantic issues, and the usage of these + references has been optimized to give the same + performance benefits as well as memory usage benefits as + magic binaries had.

+

+ A couple of examples of previous uses of magic binaries + are match specifications and NIF resources.

+

+ Own Id: OTP-14205

+
+ +

+ The non-smp emulators have been deprecated and are + scheduled for removal in OTP-21.

+

+ In preperations for this, the threaded non-smp emulator + is no longer built by default and has to be enabled using + the --enable-plain-emulator to configure.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14272

+
+ +

+ Allow HiPE to run on VM built with + --enable-m32-build.

+

+ Own Id: OTP-14330 Aux Id: PR-1397

+
+ +

+ Upgraded the OTP internal PCRE library from version 8.33 + to version 8.40. This library is used for implementation + of the re + regular expressions module.

+

+ Besides various bug fixes, the new version allows for + better stack protection. In order to utilize this + feature, the stack size of normal scheduler threads is + now by default set to 128 kilo words on all platforms. + The stack size of normal scheduler threads can be set + upon system start by passing the +sss + command line argument to the erl command.

+

+ See http://pcre.org/original/changelog.txt + for information about changes made to PCRE between the + versions 8.33 and 8.40.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14331 Aux Id: ERL-208

+
+ +

+ Remove generation of atoms in old latin1 external format. + The old latin1 format can still be decoded but is never + generated by term_to_binary or sent on a + distribution channel. The new utf8 format for atoms was + introduced in OTP R16. An OTP 20 node can therefore not + connect to nodes older than R16.

+

+ Own Id: OTP-14337

+
+ +

+ Added function re:version/0 which returns + information about the OTP internal PCRE version used for + implementation of the re module.

+

+ Own Id: OTP-14347 Aux Id: PR-1412

+
+ +

+ Added new debug bif erlang:list_to_port/1.

+

+ Own Id: OTP-14348

+
+ +

+ Various improvements of timer management internally in + the VM. These improvements both reduced memory + consumption of timer wheels as well as reduce the amount + of work that has to be performed in order to handle + timers.

+

+ Own Id: OTP-14356

+
+ +

Sockets can now be bound to device (SO_BINDTODEVICE) + on platforms where it is supported.

This has + been implemented e.g to support VRF-Lite under Linux; see + + VRF , and GitHub pull request #1326. +

+

+ Own Id: OTP-14357 Aux Id: PR-1326

+
+ +

Added the following erl command line arguments + with which you can set suggested stack for dirty + schedulers:

+sssdcpu +

for dirty CPU schedulers

+ +sssdio +

for dirty IO schedulers

+

The default suggested stack size for dirty schedulers + is 40 kilo words.

+

+ Own Id: OTP-14380

+
+ +

+ Changed erts startup program name, argv 0, to use the + environment variable ESCRIPT_NAME so that + erlc, dialyzer, typer, + ct_run, or the escript name can be seen with + external programs, such as ps and htop (depending on + options), on unix.

+

+ Own Id: OTP-14381

+
+ +

+ Improvements of escript documentation.

+

+ Own Id: OTP-14384 Aux Id: OTP-14201

+
+ +

+ Add function enif_hash for NIFs to calculate hash + values of arbitrary terms.

+

+ Own Id: OTP-14385 Aux Id: PR-1413

+
+ +

'./configure --enable-lock-counter' will + enabling building of an additional emulator that has + support for lock counting. (The option previously + existed, but would turn on lock counting in the default + emulator being built.) To start the lock-counting + emulator, use 'erl -emu_type lcnt'.

+

On Windows, erl recognized the undocumented + option -debug for starting a debug-compiled + emulator. That option has been removed. Use 'erl + -emu_type debug' instead.

+

+ Own Id: OTP-14407

+
+ +

+ Warnings have been added to the relevant documentation + about not using un-secure distributed nodes in exposed + environments.

+

+ Own Id: OTP-14425

+
+ +

+ Improvement of the documentation of the environment + variable ERL_CRASH_DUMP_SECONDS as well as the + default behavior when it is not set.

+

+ Own Id: OTP-14434

+
+ +

+ Enabled off-heap message queue for some system processes + that might receive large amounts of messages.

+

+ Own Id: OTP-14438

+
+
+
+ +
+
Erts 8.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 32275a2fc0b86d1f1b124706afc80f3ff92216eb Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 31 May 2017 16:21:00 +0200 Subject: Revert "Prepare release" This reverts commit eaf8ca41dfa4850437ad270d3897399c9358ced0. --- erts/doc/src/notes.xml | 559 ------------------------------------------------- 1 file changed, 559 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index d0fa170e66..08f6732036 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,565 +32,6 @@

This document describes the changes made to the ERTS application.

-
Erts 9.0 - -
Fixed Bugs and Malfunctions - - -

Fix various bugs regarding loading, upgrade and purge - of HiPE compiled code:

The native code - memory for a purged module was never deallocated. - Wrong functions could in some cases be called after - a module upgrade. - erlang:check_process_code did not check for - recursive calls made from native code. -

- Own Id: OTP-13968

-
- -

- Hipe optional LLVM backend does require LLVM version 3.9 - or later as older versions forced strong dependencies on - erts internals structures.

-

- Own Id: OTP-14238

-
- -

When an exception such as 'throw(HugeTerm)' was - caught, HugeTerm term would be kept in the process - until the next exception occurred, potentially increasing - the heap size for the process. That has been - corrected.

-

- Own Id: OTP-14255 Aux Id: OTP-14400, OTP-14401

-
- -

- Slogans in crash dumps have been extended to print more - complex terms.

-

- Own Id: OTP-14303

-
- -

- Fixed bug when using enif_inspect_binary in - combination with enif_copy. In some circumstances - the inspected binary could be realloced by the - enif_copy call when it shouldn't have been.

-

- Own Id: OTP-14304

-
- -

- The address family local (AF_UNIX / AF_LOCAL) now - does not ensure zero termination of Linux Abstract - Addresses so they can use all bytes.

-

- Own Id: OTP-14305

-
- -

- Use -fno-PIE for Gentoo Hardened and others that - don't accept linker flag -no-pie.

-

- Own Id: OTP-14307 Aux Id: PR-1379

-
- -

- Disable hipe for ppc64le architecture (little - endian) as it is not, and has never been, supported. It - was earlier equated with ppc64 (big endian) which - lead to broken build without --disable-hipe.

-

- Own Id: OTP-14314 Aux Id: ERL-369, PR-1394

-
- -

- Fix 'epmd -kill' to return a failure exit status code if - epmd was not killed because of some error.

-

- Own Id: OTP-14324

-
- -

Fixed the following dirty scheduler related bugs:

-

the +SDPcpu command line argument - could cause the amount of dirty CPU schedulers to be set - to zero

-

erlang:system_flag(multi_scheduling, _) - failed when only one normal scheduler was used together - with dirty scheduler support

-

- Own Id: OTP-14335

-
- -

- Fix erlexec to handle mismatch in sysconf and proc fs - when figuring out the cpu topology. This behaviour has - been seen when using docker together with - --cpuset-cpus.

-

- Own Id: OTP-14352

-
- -

- Fixed memory segment cache used for multiblock carriers. - Huge (> 2GB) memory segments could cause a VM crash. - Creation of such huge memory segments used for multiblock - carriers is however very uncommon.

-

- Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

-
- -

- Fix bug causing code:is_module_native to falsely - return true when local call trace is enabled for - the module.

-

- Own Id: OTP-14390

-
- -

- Fix emulator crash when receive tracing on a - trace_delivered message.

-

- Own Id: OTP-14411

-
- -

- escript did not handle paths with spaces correct.

-

- Own Id: OTP-14433

-
- -

- Fix erroneous lock check assertion when wx is run - on MacOS X.

-

- Own Id: OTP-14437 Aux Id: ERL-360

-
-
-
- - -
Improvements and New Features - - -

- Added erlang:garbage_collect/2 that takes an - option list as the last argument that can be used to - control whether a minor or a major garbage collection is - to be done. Doing a minor collection only collects terms - that have recently died, but is cheaper than a mjor - collection.

-

- Own Id: OTP-11695

-
- -

- Optimized test for tuples with an atom as first element.

-

- Own Id: OTP-12148

-
- -

- Erlang literals are no longer copied during process to - process messaging.

-

- Own Id: OTP-13529

-
- -

Add support in the erl_nif API for asynchronous - message notifications when sockets or other file - descriptors are ready to accept read or write operations. - The following functions have been added:

-

enif_select

-

enif_monitor_process

-

enif_demonitor_process

-

enif_compare_monitors

-

enif_open_resource_type_x

-

- Own Id: OTP-13684

-
- -

There are two new guard BIFs 'floor/1' and - 'ceil/1'. They both return integers. In the - 'math' module, there are two new BIFs with the - same names that return floating point values.

-

- Own Id: OTP-13692

-
- -

- Remove deprecated erlang:hash/2.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13827

-
- -

Replaced usage of deprecated symbolic time - unit representations.

-

- Own Id: OTP-13831 Aux Id: OTP-13735

-
- -

- Added support in zlib for extraction of the inflation - dictionary.

-

- Own Id: OTP-13842

-
- -

- The previously used purge strategy has been removed. The - optional purge strategy introduced in ERTS version 8.1 is - now the only strategy available.

-

- The new purge strategy is slightly incompatible with the - old strategy. Previously processes holding funs - that referred to the module being purged either failed a - soft purge, or was killed during a hard purge. The new - strategy completely ignores funs. If funs - referring to the code being purged exist, and are used - after a purge, an exception will be raised upon usage. - That is, the behavior will be exactly the same as the - case when a fun is received by a process after the - purge.

-

- For more information see the documentation of erlang:check_process_code/3.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13844 Aux Id: OTP-13833

-
- -

- Dirty schedulers are now enabled by default when the - runtime system is built with SMP support.

-

- Own Id: OTP-13860

-
- -

- Improved ETS lookup/insert/delete speed for large - set, bag and duplicate_bag by a - significant reduction of the hash load factor. This speed - improvement comes at the expense of less than one word - per table entry. Tables with less than 256 entries are - not affected at all.

-

- Own Id: OTP-13903

-
- -

- The NIF library reload feature is not supported - anymore. It has been marked as deprecated since OTP R15B. - This means that you are only allowed to do one successful - call to erlang:load_nif/2 for each module - instance. A second call to erlang:load_nif/2 will - return {error, {reload, _}} even if the NIF - library imlements the reload callback.

-

- Runtime upgrade of a NIF library is still supported by - using the Erlang module upgrade mechanics with a current - and an old module instance existing at the same time with - their corresponding NIF libraries.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13908

-
- -

- Add erlang:system_info(atom_count) and - erlang:system_info(atom_limit) to provide a way to - retrieve the current and maximum number of atoms.

-

- Own Id: OTP-13976

-
- -

The function fmod/2 has been added to the - math module.

-

- Own Id: OTP-14000

-
- -

- erlang:load_nif/2 returns new error type - notsup when called for a HiPE compiled module, - which is not supported.

-

- Own Id: OTP-14002

-
- -

- Add driver and nif lock instrumentation to lcnt

-

- Own Id: OTP-14069

-
- -

- Reduce memory pressure by converting sub-binaries to - heap-binaries when possible. This is done during garbage - collection.

-

- Own Id: OTP-14149

-
- -

- Dirty schedulers are now enabled and supported on Erlang - runtime systems with SMP support.

-

- Besides support for dirty NIFs also support for dirty - BIFs and dirty garbage collection have been introduced. - All garbage collections that potentially will take a long - time to complete are now performed on dirty schedulers if - enabled.

-

- erlang:statistics/1 - with arguments inspecting scheduler and run queue states - have been changed due to the dirty scheduler support. - Code using this functionality may have to be rewritten - taking these incompatibilities into consideration. - Examples of such uses are calls to erlang:statistics(scheduler_wall_time), - statistics(total_run_queue_lengths), - statistics(total_active_tasks), - etc.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14152

-
- -

Atoms may now contain arbitrary Unicode - characters.

-

- Own Id: OTP-14178

-
- -

- Introduce an event manager in Erlang to handle OS - signals. A subset of OS signals may be subscribed to and - those are described in the Kernel application.

-

- Own Id: OTP-14186

-
- -

- The escript program now handles symbolic links to - escripts.

-

- This is useful for standalone systems with - escripts residing on a bin directory not included - in the execution path (as it may cause their erl - program(s) to override the desired one). Instead the - escripts can be referred to via symbolic links - from a bin directory in the path.

-

- Own Id: OTP-14201 Aux Id: PR-1293

-
- -

- All uses of the magic binary kludge has been replaced by - uses of erlang references.

-

- A magic binary was presented as an empty binary, but - actually referred other data internally in the Erlang VM. - Since they were presented as empty binaries, different - magic binaries compared as equal, and also lost their - internal data when passed out of an erlang node.

-

- The new usage of references has not got any of these - strange semantic issues, and the usage of these - references has been optimized to give the same - performance benefits as well as memory usage benefits as - magic binaries had.

-

- A couple of examples of previous uses of magic binaries - are match specifications and NIF resources.

-

- Own Id: OTP-14205

-
- -

- The non-smp emulators have been deprecated and are - scheduled for removal in OTP-21.

-

- In preperations for this, the threaded non-smp emulator - is no longer built by default and has to be enabled using - the --enable-plain-emulator to configure.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14272

-
- -

- Allow HiPE to run on VM built with - --enable-m32-build.

-

- Own Id: OTP-14330 Aux Id: PR-1397

-
- -

- Upgraded the OTP internal PCRE library from version 8.33 - to version 8.40. This library is used for implementation - of the re - regular expressions module.

-

- Besides various bug fixes, the new version allows for - better stack protection. In order to utilize this - feature, the stack size of normal scheduler threads is - now by default set to 128 kilo words on all platforms. - The stack size of normal scheduler threads can be set - upon system start by passing the +sss - command line argument to the erl command.

-

- See http://pcre.org/original/changelog.txt - for information about changes made to PCRE between the - versions 8.33 and 8.40.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14331 Aux Id: ERL-208

-
- -

- Remove generation of atoms in old latin1 external format. - The old latin1 format can still be decoded but is never - generated by term_to_binary or sent on a - distribution channel. The new utf8 format for atoms was - introduced in OTP R16. An OTP 20 node can therefore not - connect to nodes older than R16.

-

- Own Id: OTP-14337

-
- -

- Added function re:version/0 which returns - information about the OTP internal PCRE version used for - implementation of the re module.

-

- Own Id: OTP-14347 Aux Id: PR-1412

-
- -

- Added new debug bif erlang:list_to_port/1.

-

- Own Id: OTP-14348

-
- -

- Various improvements of timer management internally in - the VM. These improvements both reduced memory - consumption of timer wheels as well as reduce the amount - of work that has to be performed in order to handle - timers.

-

- Own Id: OTP-14356

-
- -

Sockets can now be bound to device (SO_BINDTODEVICE) - on platforms where it is supported.

This has - been implemented e.g to support VRF-Lite under Linux; see - - VRF , and GitHub pull request #1326. -

-

- Own Id: OTP-14357 Aux Id: PR-1326

-
- -

Added the following erl command line arguments - with which you can set suggested stack for dirty - schedulers:

+sssdcpu -

for dirty CPU schedulers

- +sssdio -

for dirty IO schedulers

-

The default suggested stack size for dirty schedulers - is 40 kilo words.

-

- Own Id: OTP-14380

-
- -

- Changed erts startup program name, argv 0, to use the - environment variable ESCRIPT_NAME so that - erlc, dialyzer, typer, - ct_run, or the escript name can be seen with - external programs, such as ps and htop (depending on - options), on unix.

-

- Own Id: OTP-14381

-
- -

- Improvements of escript documentation.

-

- Own Id: OTP-14384 Aux Id: OTP-14201

-
- -

- Add function enif_hash for NIFs to calculate hash - values of arbitrary terms.

-

- Own Id: OTP-14385 Aux Id: PR-1413

-
- -

'./configure --enable-lock-counter' will - enabling building of an additional emulator that has - support for lock counting. (The option previously - existed, but would turn on lock counting in the default - emulator being built.) To start the lock-counting - emulator, use 'erl -emu_type lcnt'.

-

On Windows, erl recognized the undocumented - option -debug for starting a debug-compiled - emulator. That option has been removed. Use 'erl - -emu_type debug' instead.

-

- Own Id: OTP-14407

-
- -

- Warnings have been added to the relevant documentation - about not using un-secure distributed nodes in exposed - environments.

-

- Own Id: OTP-14425

-
- -

- Improvement of the documentation of the environment - variable ERL_CRASH_DUMP_SECONDS as well as the - default behavior when it is not set.

-

- Own Id: OTP-14434

-
- -

- Enabled off-heap message queue for some system processes - that might receive large amounts of messages.

-

- Own Id: OTP-14438

-
-
-
- -
-
Erts 8.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 984d9f66c0cdff91a599e8a1e332c85bbadb9b37 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 2 Jun 2017 10:38:30 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 11206d43e7..35d7381cf3 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,26 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.4 + +
Fixed Bugs and Malfunctions + + +

+ Add option to make SIGTERM trigger the OS default + behaviour instead of doing a gracefull shutdown. To + activate this bahviour the environment variable + ERL_ZZ_SIGTERM_KILL should be set to "true". This option + only works in OTP 19 as OTP 20 will have a different way + to deal with SIGTERM.

+

+ Own Id: OTP-14418 Aux Id: ERIERL-15

+
+
+
+ +
+
Erts 8.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From f6291051f83ec0f1ef2551d0989d9d4815fea47b Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 2 Jun 2017 14:14:28 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index dd260f2d1f..588d6eecab 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 8.1.1.1 + +
Fixed Bugs and Malfunctions + + +

+ A code purge operation could under certain circumstances + expand the size of hibernated processes.

+

+ Own Id: OTP-14444 Aux Id: ERIERL-24

+
+
+
+ +
Erts 8.1.1 -- cgit v1.2.3 From 52b2161b5e28d2a11031168634ab7f513cc6d842 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 7 Jun 2017 15:19:37 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 35d7381cf3..02b4de404e 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -32,6 +32,35 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.5 + +
Fixed Bugs and Malfunctions + + +

Active-mode TCP sockets are now cleaned up properly on + send/shutdown errors.

+

+ Own Id: OTP-14441 Aux Id: ERL-430

+
+ +

+ A code purge operation could under certain circumstances + expand the size of hibernated processes.

+

+ Own Id: OTP-14444 Aux Id: ERIERL-24

+
+ +

+ Fix so that the ERL_ZZ_SIGTERM_KILL introduced in + erts-8.3.4 works.

+

+ Own Id: OTP-14451

+
+
+
+ +
+
Erts 8.3.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From bdc0f3504fb13f777a7cc826caa5fd10dc6fc291 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 14 Jun 2017 13:23:34 +0200 Subject: Introduce minor vsn 2 in term_to_binary/2 --- erts/doc/src/erlang.xml | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d9cc5ef936..687ff38cbf 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -8860,18 +8860,36 @@ hello

Option {minor_version, Version} can be used to control some encoding details. This option was introduced in Erlang/OTP R11B-4. - The valid values for Version are - 0 and 1.

-

As from Erlang/OTP 17.0, {minor_version, 1} is the default. It - forces any floats in the term to be encoded in a more - space-efficient and exact way (namely in the 64-bit IEEE format, - rather than converted to a textual representation).

-

As from Erlang/OTP R11B-4, binary_to_term/1 can decode this - representation.

-

{minor_version, 0} means that floats are encoded - using a textual representation. This option is useful to - ensure that releases before Erlang/OTP R11B-4 can decode resulting - binary.

+ The valid values for Version are:

+ + 0 + +

Floats are encoded using a textual representation. + This option is useful to ensure that releases before Erlang/OTP + R11B-4 can decode resulting binary.

+

This version encode atoms that can be represented by a + latin1 string using latin1 encoding while only atoms that + cannot be represented by latin1 are encoded using utf8.

+
+ 1 + +

This is as of Erlang/OTP 17.0 the default. It forces any floats + in the term to be encoded in a more space-efficient and exact way + (namely in the 64-bit IEEE format, rather than converted to a + textual representation). As from Erlang/OTP R11B-4, + binary_to_term/1 can decode this representation.

+

This version encode atoms that can be represented by a + latin1 string using latin1 encoding while only atoms that + cannot be represented by latin1 are encoded using utf8.

+
+ 2 + +

Drops usage of the latin1 atom encoding and unconditionally + use utf8 encoding for all atoms. This will be changed to the + default in a future major release of Erlang/OTP. Erlang/OTP + systems as of R16B can decode this representation.

+
+

See also binary_to_term/1.

-- cgit v1.2.3 From 43718d3b81d7f3d08e25047e22d579801bbe5044 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 14 Jun 2017 15:36:21 +0200 Subject: Update copyright year --- erts/doc/src/erl_dist_protocol.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml index 8391408a2e..610351db6c 100644 --- a/erts/doc/src/erl_dist_protocol.xml +++ b/erts/doc/src/erl_dist_protocol.xml @@ -5,7 +5,7 @@
2007 - 2016 + 2017 Ericsson AB, All Rights Reserved -- cgit v1.2.3 From c18b13d4c8aa31b145703bbbf228fb07d6b2a0a5 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 21 Jun 2017 10:53:19 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 600 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 600 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index e61114c504..4d7e578738 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,606 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0 + +
Fixed Bugs and Malfunctions + + +

Fix various bugs regarding loading, upgrade and purge + of HiPE compiled code:

The native code + memory for a purged module was never deallocated. + Wrong functions could in some cases be called after + a module upgrade. + erlang:check_process_code did not check for + recursive calls made from native code. +

+ Own Id: OTP-13968

+
+ +

+ Hipe optional LLVM backend does require LLVM version 3.9 + or later as older versions forced strong dependencies on + erts internals structures.

+

+ Own Id: OTP-14238

+
+ +

When an exception such as 'throw(HugeTerm)' was + caught, HugeTerm term would be kept in the process + until the next exception occurred, potentially increasing + the heap size for the process. That has been + corrected.

+

+ Own Id: OTP-14255 Aux Id: OTP-14400, OTP-14401

+
+ +

+ Slogans in crash dumps have been extended to print more + complex terms.

+

+ Own Id: OTP-14303

+
+ +

+ Fixed bug when using enif_inspect_binary in + combination with enif_copy. In some circumstances + the inspected binary could be reallocated by the + enif_copy call when it shouldn't have been.

+

+ Own Id: OTP-14304

+
+ +

+ The address family local (AF_UNIX / AF_LOCAL) now + does not ensure zero termination of Linux Abstract + Addresses so they can use all bytes.

+

+ Own Id: OTP-14305

+
+ +

+ Use -fno-PIE for Gentoo Hardened and others that + don't accept linker flag -no-pie.

+

+ Own Id: OTP-14307 Aux Id: PR-1379

+
+ +

+ Disable hipe for ppc64le architecture (little + endian) as it is not, and has never been, supported. It + was earlier equated with ppc64 (big endian) which + lead to broken build without --disable-hipe.

+

+ Own Id: OTP-14314 Aux Id: ERL-369, PR-1394

+
+ +

+ Fix 'epmd -kill' to return a failure exit status code if + epmd was not killed because of some error.

+

+ Own Id: OTP-14324

+
+ +

Fixed the following dirty scheduler related bugs:

+

the +SDPcpu command line argument + could cause the amount of dirty CPU schedulers to be set + to zero

+

erlang:system_flag(multi_scheduling, _) + failed when only one normal scheduler was used together + with dirty scheduler support

+

+ Own Id: OTP-14335

+
+ +

+ Fix erlexec to handle mismatch in sysconf and proc fs + when figuring out the cpu topology. This behaviour has + been seen when using docker together with + --cpuset-cpus.

+

+ Own Id: OTP-14352

+
+ +

+ Fixed memory segment cache used for multiblock carriers. + Huge (> 2GB) memory segments could cause a VM crash. + Creation of such huge memory segments used for multiblock + carriers is however very uncommon.

+

+ Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

+
+ +

+ Fix bug causing code:is_module_native to falsely + return true when local call trace is enabled for + the module.

+

+ Own Id: OTP-14390

+
+ +

+ Fix emulator crash when receive tracing on a + trace_delivered message.

+

+ Own Id: OTP-14411

+
+ +

+ Fix file:sendfile error handling on SunOS when a + connection is closed during transmission.

+

+ Own Id: OTP-14424

+
+ +

+ escript did not handle paths with spaces correct.

+

+ Own Id: OTP-14433

+
+ +

+ Fix erroneous lock check assertion when wx is run + on MacOS X.

+

+ Own Id: OTP-14437 Aux Id: ERL-360

+
+ +

Active-mode TCP sockets are now cleaned up properly on + send/shutdown errors.

+

+ Own Id: OTP-14441 Aux Id: ERL-430

+
+ +

+ Fix compilation of hipe_mkliterals when the LIBS + configure variable had to be set.

+

+ Own Id: OTP-14447

+
+
+
+ + +
Improvements and New Features + + +

+ Added erlang:garbage_collect/2 that takes an + option list as the last argument that can be used to + control whether a minor or a major garbage collection is + to be done. Doing a minor collection only collects terms + that have recently died, but is cheaper than a major + collection.

+

+ Own Id: OTP-11695

+
+ +

+ Optimized test for tuples with an atom as first element.

+

+ Own Id: OTP-12148

+
+ +

+ Erlang literals are no longer copied during process to + process messaging.

+

+ Own Id: OTP-13529

+
+ +

Add support in the erl_nif API for asynchronous + message notifications when sockets or other file + descriptors are ready to accept read or write operations. + The following functions have been added:

+

enif_select

+

enif_monitor_process

+

enif_demonitor_process

+

enif_compare_monitors

+

enif_open_resource_type_x

+

+ Own Id: OTP-13684

+
+ +

There are two new guard BIFs 'floor/1' and + 'ceil/1'. They both return integers. In the + 'math' module, there are two new BIFs with the + same names that return floating point values.

+

+ Own Id: OTP-13692

+
+ +

+ Remove deprecated erlang:hash/2.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13827

+
+ +

Replaced usage of deprecated symbolic time + unit representations.

+

+ Own Id: OTP-13831 Aux Id: OTP-13735

+
+ +

+ Added support in zlib for extraction of the inflation + dictionary.

+

+ Own Id: OTP-13842

+
+ +

+ The previously used purge strategy has been removed. The + optional purge strategy introduced in ERTS version 8.1 is + now the only strategy available.

+

+ The new purge strategy is slightly incompatible with the + old strategy. Previously processes holding funs + that referred to the module being purged either failed a + soft purge, or was killed during a hard purge. The new + strategy completely ignores funs. If funs + referring to the code being purged exist, and are used + after a purge, an exception will be raised upon usage. + That is, the behavior will be exactly the same as the + case when a fun is received by a process after the + purge.

+

+ For more information see the documentation of erlang:check_process_code/3.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13844 Aux Id: OTP-13833

+
+ +

+ Dirty schedulers are now enabled by default when the + runtime system is built with SMP support.

+

+ Own Id: OTP-13860

+
+ +

+ Improved ETS lookup/insert/delete speed for large + set, bag and duplicate_bag by a + significant reduction of the hash load factor. This speed + improvement comes at the expense of less than one word + per table entry. Tables with less than 256 entries are + not affected at all.

+

+ Own Id: OTP-13903

+
+ +

+ The NIF library reload feature is not supported + anymore. It has been marked as deprecated since OTP R15B. + This means that you are only allowed to do one successful + call to erlang:load_nif/2 for each module + instance. A second call to erlang:load_nif/2 will + return {error, {reload, _}} even if the NIF + library implements the reload callback.

+

+ Runtime upgrade of a NIF library is still supported by + using the Erlang module upgrade mechanics with a current + and an old module instance existing at the same time with + their corresponding NIF libraries.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13908

+
+ +

+ Add erlang:system_info(atom_count) and + erlang:system_info(atom_limit) to provide a way to + retrieve the current and maximum number of atoms.

+

+ Own Id: OTP-13976

+
+ +

The function fmod/2 has been added to the + math module.

+

+ Own Id: OTP-14000

+
+ +

+ erlang:load_nif/2 returns new error type + notsup when called for a HiPE compiled module, + which is not supported.

+

+ Own Id: OTP-14002

+
+ +

+ Add driver and nif lock instrumentation to lcnt

+

+ Own Id: OTP-14069

+
+ +

+ Reduce memory pressure by converting sub-binaries to + heap-binaries when possible. This is done during garbage + collection.

+

+ Own Id: OTP-14149

+
+ +

+ Dirty schedulers are now enabled and supported on Erlang + runtime systems with SMP support.

+

+ Besides support for dirty NIFs also support for dirty + BIFs and dirty garbage collection have been introduced. + All garbage collections that potentially will take a long + time to complete are now performed on dirty schedulers if + enabled.

+

+ erlang:statistics/1 + with arguments inspecting scheduler and run queue states + have been changed due to the dirty scheduler support. + Code using this functionality may have to be rewritten + taking these incompatibilities into consideration. + Examples of such uses are calls to erlang:statistics(scheduler_wall_time), + statistics(total_run_queue_lengths), + statistics(total_active_tasks), + etc.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14152

+
+ +

Atoms may now contain arbitrary Unicode + characters.

+

+ Own Id: OTP-14178

+
+ +

+ Introduce an event manager in Erlang to handle OS + signals. A subset of OS signals may be subscribed to and + those are described in the Kernel application.

+

+ Own Id: OTP-14186

+
+ +

+ The escript program now handles symbolic links to + escripts.

+

+ This is useful for standalone systems with + escripts residing on a bin directory not included + in the execution path (as it may cause their erl + program(s) to override the desired one). Instead the + escripts can be referred to via symbolic links + from a bin directory in the path.

+

+ Own Id: OTP-14201 Aux Id: PR-1293

+
+ +

+ All uses of the magic binary kludge has been replaced by + uses of erlang references.

+

+ A magic binary was presented as an empty binary, but + actually referred other data internally in the Erlang VM. + Since they were presented as empty binaries, different + magic binaries compared as equal, and also lost their + internal data when passed out of an erlang node.

+

+ The new usage of references has not got any of these + strange semantic issues, and the usage of these + references has been optimized to give the same + performance benefits as well as memory usage benefits as + magic binaries had.

+

+ A couple of examples of previous uses of magic binaries + are match specifications and NIF resources.

+

+ Own Id: OTP-14205

+
+ +

+ The non-smp emulators have been deprecated and are + scheduled for removal in OTP-21.

+

+ In preparation for this, the threaded non-smp emulator is + no longer built by default and has to be enabled using + the --enable-plain-emulator to configure.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14272

+
+ +

+ Allow HiPE to run on VM built with + --enable-m32-build.

+

+ Own Id: OTP-14330 Aux Id: PR-1397

+
+ +

+ Upgraded the OTP internal PCRE library from version 8.33 + to version 8.40. This library is used for implementation + of the re + regular expressions module.

+

+ Besides various bug fixes, the new version allows for + better stack protection. In order to utilize this + feature, the stack size of normal scheduler threads is + now by default set to 128 kilo words on all platforms. + The stack size of normal scheduler threads can be set + upon system start by passing the +sss + command line argument to the erl command.

+

+ See http://pcre.org/original/changelog.txt + for information about changes made to PCRE between the + versions 8.33 and 8.40.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14331 Aux Id: ERL-208

+
+ +

+ Remove generation of atoms in old latin1 external format + in the distribution between erlang nodes, + erl_interface, and jinterface. The new utf8 + format for atoms was introduced in OTP R16. An OTP 20 + node can therefore not connect to nodes older than R16.

+

+ Atoms that can be encoded using latin1 are still encoded + by term_to_binary() using latin1 encoding. Note + that all atoms will by default be encoded using utf8 in a + future Erlang/OTP release. For more information see the + documentation of erlang:term_to_binary/2.

+

+ Own Id: OTP-14337

+
+ +

+ Added function re:version/0 which returns + information about the OTP internal PCRE version used for + implementation of the re module.

+

+ Own Id: OTP-14347 Aux Id: PR-1412

+
+ +

+ Added new debug bif erlang:list_to_port/1.

+

+ Own Id: OTP-14348

+
+ +

+ Various improvements of timer management internally in + the VM. These improvements both reduced memory + consumption of timer wheels as well as reduce the amount + of work that has to be performed in order to handle + timers.

+

+ Own Id: OTP-14356

+
+ +

Sockets can now be bound to device (SO_BINDTODEVICE) + on platforms where it is supported.

This has + been implemented e.g to support VRF-Lite under Linux; see + + VRF , and GitHub pull request #1326. +

+

+ Own Id: OTP-14357 Aux Id: PR-1326

+
+ +

Added the following erl command line arguments + with which you can set suggested stack for dirty + schedulers:

+sssdcpu +

for dirty CPU schedulers

+ +sssdio +

for dirty IO schedulers

+

The default suggested stack size for dirty schedulers + is 40 kilo words.

+

+ Own Id: OTP-14380

+
+ +

+ Changed erts startup program name, argv 0, to use the + environment variable ESCRIPT_NAME so that + erlc, dialyzer, typer, + ct_run, or the escript name can be seen with + external programs, such as ps and htop (depending on + options), on unix.

+

+ Own Id: OTP-14381

+
+ +

+ Improvements of escript documentation.

+

+ Own Id: OTP-14384 Aux Id: OTP-14201

+
+ +

+ Add function enif_hash for NIFs to calculate hash + values of arbitrary terms.

+

+ Own Id: OTP-14385 Aux Id: PR-1413

+
+ +

'./configure --enable-lock-counter' will + enabling building of an additional emulator that has + support for lock counting. (The option previously + existed, but would turn on lock counting in the default + emulator being built.) To start the lock-counting + emulator, use 'erl -emu_type lcnt'.

+

On Windows, erl recognized the undocumented + option -debug for starting a debug-compiled + emulator. That option has been removed. Use 'erl + -emu_type debug' instead.

+

+ Own Id: OTP-14407

+
+ +

+ Warnings have been added to the relevant documentation + about not using un-secure distributed nodes in exposed + environments.

+

+ Own Id: OTP-14425

+
+ +

+ Improvement of the documentation of the environment + variable ERL_CRASH_DUMP_SECONDS as well as the + default behavior when it is not set.

+

+ Own Id: OTP-14434

+
+ +

+ Enabled off-heap message queue for some system processes + that might receive large amounts of messages.

+

+ Own Id: OTP-14438

+
+ +

ETS lock indexes have been replaced with the table + name in LCNT results.

+

+ Own Id: OTP-14442 Aux Id: ERIERL-22

+
+ +

+ Introduced the new functions enif_whereis_pid() + and enif_whereis_port().

+

+ Own Id: OTP-14453 Aux Id: PR-1400

+
+
+
+ +
+
Erts 8.3.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 1f1c7a90ff5bacf19f0437e6f54cfe97e2d25e97 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 22 Jun 2017 16:11:52 +0200 Subject: Fix statistics(wall_clock) and statistics(runtime) implementation --- erts/doc/src/erlang.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index c3b0bc0d74..24a091073d 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6362,6 +6362,9 @@ lists:map(

This is the sum of the runtime for all threads in the Erlang runtime system and can therefore be greater than the wall clock time.

+

This value might wrap due to limitations in the + underlying functionality provided by the operating system + that is used.

Example:

 > statistics(runtime).
-- 
cgit v1.2.3


From fde4d57419fdf29d850b7cb82b5cac4f9ffa4a5f Mon Sep 17 00:00:00 2001
From: Erlang/OTP 
Date: Mon, 26 Jun 2017 16:03:21 +0200
Subject: Update release notes

---
 erts/doc/src/notes.xml | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

(limited to 'erts/doc')

diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index f0de301982..48475ae305 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -31,6 +31,43 @@
   

This document describes the changes made to the ERTS application.

+
Erts 8.3.5.1 + +
Fixed Bugs and Malfunctions + + +

+ Fixed a bug in gen_tcp:send where it never returned when + repeatedly called on a remotely closed TCP socket.

+

+ Own Id: OTP-13939 Aux Id: ERL-193

+
+ +

+ Fixed segfault that could happen during cleanup of + aborted erlang:port_command/3 calls. A port_command is + aborted if the port is closed at the same time as the + port_command was issued. This bug was introduced in + erts-8.0.

+

+ Own Id: OTP-14481

+
+ +

+ Fixed implementation of statistics(wall_clock) and + statistics(runtime) so that values do not + unnecessarily wrap due to the emulator. Note that the + values returned by statistics(runtime) may still + wrap due to limitations in the underlying functionality + provided by the operating system.

+

+ Own Id: OTP-14484

+
+
+
+ +
+
Erts 8.3.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 4597a6882a13bd3cd8e6194b30a140093b667606 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 30 Jun 2017 15:21:21 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 4d7e578738..7003564f95 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,43 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0.1 + +
Fixed Bugs and Malfunctions + + +

+ Fixed a bug in gen_tcp:send where it never returned when + repeatedly called on a remotely closed TCP socket.

+

+ Own Id: OTP-13939 Aux Id: ERL-193

+
+ +

+ Fixed segfault that could happen during cleanup of + aborted erlang:port_command/3 calls. A port_command is + aborted if the port is closed at the same time as the + port_command was issued. This bug was introduced in + erts-8.0.

+

+ Own Id: OTP-14481

+
+ +

+ Fixed implementation of statistics(wall_clock) and + statistics(runtime) so that values do not + unnecessarily wrap due to the emulator. Note that the + values returned by statistics(runtime) may still + wrap due to limitations in the underlying functionality + provided by the operating system.

+

+ Own Id: OTP-14484

+
+
+
+ +
+
Erts 9.0
Fixed Bugs and Malfunctions -- cgit v1.2.3 From bd9d3de8b4064de60e845fa5a28c0c60e84c858e Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 4 Jul 2017 14:42:37 +0200 Subject: erts: Add missing release note --- erts/doc/src/notes.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 7003564f95..143ca6b17f 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -63,6 +63,17 @@

Own Id: OTP-14484

+ +

+ Fix performance bug in pre-allocators that could cause + them to permanently fall back on normal more expensive memory + allocation. Pre-allocators are used for quick allocation + of short lived meta data used by messages and other + scheduled tasks. Bug exists since OTP_R15B02. + [this release note was missing in erts-9.0.1]

+

+ Own Id: OTP-14491

+
-- cgit v1.2.3 From a8b641fdefdb89103f19ca92dbf27bbcab6ea2ec Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 25 Jul 2017 09:47:09 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 48475ae305..99736c1641 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,42 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.5.2 + +
Fixed Bugs and Malfunctions + + +

+ Fix performance bug in pre-allocators that could cause + them to permanently fall back on normal more expensive + memory allocation. Pre-allocators are used for quick + allocation of short lived meta data used by messages and + other scheduled tasks. Bug exists since OTP_R15B02.

+

+ Own Id: OTP-14491

+
+ +

Fixed a bug that prevented TCP sockets from being + closed properly on send timeouts.

+

+ Own Id: OTP-14509

+
+ +

+ Fixed bug in operator bxor causing erroneuos + result when one operand is a big negative + integer with the lowest N*W bits as zero and the + other operand not larger than N*W bits. N + is an integer of 1 or larger and W is 32 or 64 + depending on word size.

+

+ Own Id: OTP-14514

+
+
+
+ +
+
Erts 8.3.5.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 4c73c0b0fa607c5f1e0befec2efc36b940a08106 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 26 Jul 2017 11:46:38 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 143ca6b17f..e134abb05d 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,40 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0.2 + +
Fixed Bugs and Malfunctions + + +

+ Added missing release notes for OTP-14491 ("performance + bug in pre-allocators") which was included in erts-9.0.1 + (OTP-20.0.1).

+

+ Own Id: OTP-14494

+
+ +

Fixed a bug that prevented TCP sockets from being + closed properly on send timeouts.

+

+ Own Id: OTP-14509

+
+ +

+ Fixed bug in operator bxor causing erroneuos + result when one operand is a big negative + integer with the lowest N*W bits as zero and the + other operand not larger than N*W bits. N + is an integer of 1 or larger and W is 32 or 64 + depending on word size.

+

+ Own Id: OTP-14514

+
+
+
+ +
+
Erts 9.0.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b69fd5aa4daf4f6d2e78dde48d38fc4e34b0278c Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 19 Jul 2017 11:13:58 +0200 Subject: erts: Cleanup erl and erlang docs after non-smp removal --- erts/doc/src/erl.xml | 42 +++++++++--------------------------------- erts/doc/src/erlang.xml | 34 +++++++++++++--------------------- erts/doc/src/notes.xml | 6 ++---- 3 files changed, 24 insertions(+), 58 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 638e88ca31..71fe08d4e6 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -538,20 +538,6 @@

Note that a distributed node will fail to start if epmd is not running.

- - -

-smp enable and -smp start the Erlang runtime - system with SMP support enabled. This can fail if no runtime - system with SMP support is available. -smp auto starts - the Erlang runtime system with SMP support enabled if it is - available and more than one logical processor is detected. - -smp disable starts a runtime system without SMP support. - The runtime system without SMP support is deprecated and will - be removed in a future major release.

- -

See also flag+S.

-
-
(emulator flag)

Makes the emulator print its version number. The same @@ -902,7 +888,7 @@

Sets the number of scheduler threads to create and scheduler threads - to set online when SMP support has been enabled. The maximum for both + to set online. The maximum for both values is 1024. If the Erlang runtime system is able to determine the number of logical processors configured and logical processors available, Schedulers defaults to logical processors @@ -920,8 +906,6 @@

Specifying value 0 for Schedulers or SchedulersOnline resets the number of scheduler threads or scheduler threads online, respectively, to its default value.

-

This option is ignored if the emulator does not have SMP support - enabled (see flag -smp).

@@ -929,8 +913,8 @@

Similar to +S but uses percentages to set the number of scheduler threads to create, based on logical processors configured, and scheduler threads to set online, - based on logical processors available, when SMP support has been - enabled. Specified values must be > 0. For example, + based on logical processors available. + Specified values must be > 0. For example, +SP 50:25 sets the number of scheduler threads to 50% of the logical processors configured, and the number of scheduler threads online to 25% of the logical processors available. @@ -945,15 +929,13 @@ and 8 logical cores available, the combination of the options +S 4:4 +SP 50:25 (in either order) results in 2 scheduler threads (50% of 4) and 1 scheduler thread online (25% of 4).

-

This option is ignored if the emulator does not have SMP support - enabled (see flag -smp).

Sets the number of dirty CPU scheduler threads to create and dirty - CPU scheduler threads to set online when threading support has been - enabled. The maximum for both values is 1024, and each value is + CPU scheduler threads to set online. + The maximum for both values is 1024, and each value is further limited by the settings for normal schedulers:

The number of dirty CPU scheduler threads created cannot exceed @@ -977,16 +959,14 @@ executing on ordinary schedulers. If the amount of dirty CPU schedulers was allowed to be unlimited, dirty CPU bound jobs would potentially starve normal jobs.

-

This option is ignored if the emulator does not have threading - support enabled.

Similar to +SDcpu but uses percentages to set the number of dirty CPU scheduler threads to - create and the number of dirty CPU scheduler threads to set online - when threading support has been enabled. Specified values must be + create and the number of dirty CPU scheduler threads to set online. + Specified values must be > 0. For example, +SDPcpu 50:25 sets the number of dirty CPU scheduler threads to 50% of the logical processors configured and the number of dirty CPU scheduler threads online to 25% of the @@ -1003,13 +983,11 @@ the combination of the options +SDcpu 4:4 +SDPcpu 50:25 (in either order) results in 2 dirty CPU scheduler threads (50% of 4) and 1 dirty CPU scheduler thread online (25% of 4).

-

This option is ignored if the emulator does not have threading - support enabled.

-

Sets the number of dirty I/O scheduler threads to create when - threading support has been enabled. Valid range is 0-1024. By +

Sets the number of dirty I/O scheduler threads to create. + Valid range is 0-1024. By default, the number of dirty I/O scheduler threads created is 10, same as the default number of threads in the async thread pool.

@@ -1019,8 +997,6 @@ expected to execute on dirty I/O schedulers. If the user should schedule CPU bound jobs on dirty I/O schedulers, these jobs might starve ordinary jobs executing on ordinary schedulers.

-

This option is ignored if the emulator does not have threading - support enabled.

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 105734d5b2..ba4e07b158 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4284,7 +4284,6 @@ RealSystem = system + MissedSystem

Locking is one of the following:

- false (emulator without SMP support) port_level (port-specific locking) driver_level (driver-specific locking) @@ -4688,8 +4687,8 @@ RealSystem = system + MissedSystem selected for execution. Notice however that this does not mean that no processes on priority low or normal can run when processes - are running on priority high. On the runtime - system with SMP support, more processes can be running + are running on priority high. When using multiple + schedulers, more processes can be running in parallel than processes on priority high. That is, a low and a high priority process can execute at the same time.

@@ -4704,10 +4703,8 @@ RealSystem = system + MissedSystem execution.

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.

+ to remain exactly as it is today. Scheduling is likely to be + changed in a future release to use available processor cores better.

There is no automatic mechanism for avoiding priority inversion, such as priority inheritance @@ -6219,8 +6216,7 @@ true

statistics(exact_reductions) is a more expensive operation than - statistics(reductions), - especially on an Erlang machine with SMP support.

+ statistics(reductions).

@@ -6604,8 +6600,8 @@ ok than available logical processors, this value may be greater than 1.0.

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.

+ will as default have more schedulers than logical processors. + This due to the dirty schedulers.

scheduler_wall_time is by default disabled. To enable it, use @@ -7975,9 +7971,7 @@ ok disabled -

The emulator has only one scheduler thread. The - emulator does not have SMP support, or have been - started with only one scheduler thread.

+

The emulator has been started with only one scheduler thread.

blocked @@ -8340,8 +8334,7 @@ ok smp_support -

Returns true if the emulator has been compiled - with SMP support, otherwise false is returned.

+

Returns true.

start_time @@ -8364,8 +8357,7 @@ ok threads -

Returns true if the emulator has been compiled - with thread support, otherwise false is returned.

+

Returns true.

thread_pool_size @@ -10484,9 +10476,9 @@ true receive after 1 -> ok end, except that yield() is faster.

-

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. +

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.

diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index ff7d593edb..985ea11b49 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -3493,8 +3493,7 @@

The previously introduced "eager check I/O" feature is now enabled by default.

Eager check I/O can be disabled using the erl - command line argument: +secio false

+ command line argument: +secio false

Characteristics impact compared to previous default:

Lower latency and smoother management of externally triggered I/O operations. @@ -4275,8 +4274,7 @@ prioritized to the same extent as when eager check I/O is disabled.

Eager check I/O can be enabled using the erl - command line argument: +secio true

+ command line argument: +secio true

Characteristics impact when enabled:

Lower latency and smoother management of externally triggered I/O operations. A slightly reduced -- cgit v1.2.3 From e769d2c06eddfca16b1d4b5f7a3a7d1ed0218777 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 23 Aug 2017 10:39:49 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index e134abb05d..008d43b51a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0.3 + +
Fixed Bugs and Malfunctions + + +

Binary append operations did not check for overflow, + resulting in nonsensical results when huge binaries were + appended.

+

+ Own Id: OTP-14524

+
+
+
+ +
+
Erts 9.0.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 7c9ea890cd2530bffeafa82abeeee876fd24a6ba Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 23 Aug 2017 12:29:50 +0200 Subject: erts: Allow any unicode string as crash dump slogan i.e the first argument to erlang:halt --- erts/doc/src/erlang.xml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 687ff38cbf..4a00d24cee 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1943,23 +1943,26 @@ os_prompt% The runtime system exits with integer value Status as status code to the calling environment (OS). + +

On many platforms, the OS supports only status + codes 0-255. A too large status code is truncated by clearing + the high bits.

+
string() An Erlang crash dump is produced with Status as slogan. Then the runtime system exits with status code 1. - Note that only code points in the range 0-255 may be used - and the string will be truncated if longer than 200 characters. + The string will be truncated if longer than 200 characters. + +

Before ERTS 9.1 (OTP-20.1) only code points in the range 0-255 + was accepted in the string. Now any unicode string is valid.

+
abort The runtime system aborts producing a core dump, if that is enabled in the OS. - -

On many platforms, the OS supports only status - codes 0-255. A too large status code is truncated by clearing - the high bits.

-

For integer Status, the Erlang runtime system closes all ports and allows async threads to finish their operations before exiting. To exit without such flushing, use -- cgit v1.2.3 From b335afff80c87a897b6200d30828e959a0216faf Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 25 Aug 2017 09:36:10 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 008d43b51a..367d6d4d0a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,38 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0.4 + +
Fixed Bugs and Malfunctions + + +

+ A timer internal bit-field used for storing scheduler id + was too small. As a result, VM internal timer data + structures could become inconsistent when using 1024 + schedulers on the system. Note that systems with less + than 1024 schedulers are not effected by this bug.

+

+ This bug was introduced in ERTS version 7.0 (OTP 18.0).

+

+ Own Id: OTP-14548 Aux Id: OTP-11997, ERL-468

+
+ +

+ Automatic cleanup of a BIF timer, when the owner process + terminated, could race with the timeout of the timer. + This could cause the VM internal data structures to + become inconsistent which very likely caused a VM crash.

+

+ This bug was introduced in ERTS version 9.0 (OTP 20.0).

+

+ Own Id: OTP-14554 Aux Id: OTP-14356, ERL-468

+
+
+
+ +
+
Erts 9.0.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 78fad16ef7c5477239bc0b51125fabfe6567039d Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 30 Jun 2017 16:32:42 +0200 Subject: Support for distribution controller processes --- erts/doc/src/alt_dist.xml | 653 +++++++++++++++++++++++++++++++++++++++++++++- erts/doc/src/erlang.xml | 154 +++++++++++ 2 files changed, 795 insertions(+), 12 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index be969a8267..3d87e9dcdb 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -47,23 +47,25 @@ runs on. The reason the C code is not made portable, is simply readability.

- -

This section was written a long time ago. Most of it is still - valid, but some things have changed since then. - Most notably is the driver interface. Some updates have been made - to the documentation of the driver presented here, - but more can be done and is planned for the future. - The reader is encouraged to read the - erl_driver and - driver_entry - documentation also.

-
-
Introduction

To implement a new carrier for the Erlang distribution, the main steps are as follows.

+

+ As of ERTS version 10.0 support for distribution controller + processes has been introduced. That is, the traffic over a + distribution channel can be managed by a process instead of + only by a port. This makes it possible to implement large + parts of the logic in Erlang code, and you perhaps do not + even need a new driver for the protocol. One example could + be Erlang distribution over UDP using gen_udp (your + Erlang code will of course have to take care of retranspissions, + etc in this example). That is, depending on what you want + to do you perhaps do not need to implement a driver at all + and can then skip the driver related sections below. +

+
Writing an Erlang Driver

First, the protocol must be available to the Erlang machine, which @@ -151,8 +153,635 @@

+
+ + Distribution Module +

+ The distribution module expose an API that net_kernel call + in order to manage connections to other nodes. The module name + should have the suffix _dist. +

+

+ The module needs to create some kind of listening entity (process + or port) and an acceptor process that accepts incoming connections + using the listening entity. For each connection, the module at least + needs to create one connection supervisor process, which also is + responsible for the handshake when setting up the connection, and + a distribution controller (process or port) responsible for + transport of data over the connection. The distribution controller + and the connection supervisor process should be linked together + so both of them are cleaned up when the connection is taken down. +

+

+ Note that there need to be exactly one distribution controller + per connection. A process or port can only be distribution + controller for one connection. The registration as distribution + controller cannot be undone. It will stick until the distribution + controller terminates. The distribution controller should not + ignore exit signals. It is allowed to trap exits, but it should + then voluntarily terminate when an exit signal is received. +

+ +
+ + Exported Callback Functions + +

+ The following functions are mandatory: +

+ + listen(Name) ->
  {ok, {Listen, Address, Creation}} | {error, Error}
+ +

+ listen/1 is called once in order to listen for incoming + connection requests. The call is made when the distribution is brought + up. The argument Name is the part of the node name before + the @ sign in the full node name. It can be either an atom or a + string. +

+

+ The return value consists of a Listen handle (which is + later passed to the accept/1 + callback), Address which is a #net_address{} record + with information about the address for the node (the + #net_address{} record is defined in + kernel/include/net_address.hrl), and Creation which + (currently) is an integer 1, 2, or 3. +

+

+ If epmd is to be used + for node discovery, you typically want to use the (unfortunately + undocumented) erl_epmd module (part of the kernel + application) in order to register the listen port with epmd + and retrieve Creation to use. +

+
+ + accept(Listen) ->
  AcceptorPid
+ +

+ accept/1 should spawn a process that accepts connections. This + process should preferably execute on max priority. The process + identifier of this process should be returned. +

+

+ The Listen argument will be the same as the Listen handle + part of the return value of the + listen/1 callback above. + accept/1 is called only once when the distribution protocol is + started. +

+

+ The caller of this function is a representative for net_kernel + (this may or may not be the process registered as net_kernel) + and is in this document identified as Kernel. + When a connection has been accepted by the acceptor process, it needs + to inform Kernel about the accepted connection. This is done by + passing a message on the form: +

+ +

+ DistController is either the process or port identifier + of the distribution controller for the connection. The + distribution controller should be created by the acceptor + processes when a new connection is accepted. Its job is to + dispatch traffic on the connection. +

+ Kernel responds with one of the following messages: + + {Kernel, controller, SupervisorPid} + +

+ The request was accepted and SupervisorPid is the + process identifier of the connection supervisor process + (which is created in the + accept_connection/5 + callback). +

+
+ {Kernel, unsupported_protocol} + +

+ The request was rejected. This is a fatal error. The acceptor + process should terminate. +

+
+
+

+ When an accept sequence has been completed the acceptor process + is expected to continue accepting further requests. +

+
+ + accept_connection(AcceptorPid, DistCtrl, MyNode, Allowed, SetupTime) ->
  ConnectionSupervisorPid
+ +

+ accept_connection/5 should spawn a process that will + perform the Erlang distribution handshake for the connection. + If the handshake successfully completes it should continue to + function as a connection supervisor. This process + should preferably execute on max priority. +

+

The arguments:

+ + AcceptorPid + +

+ Process identifier of the process created by the + accept/1 + callback. +

+
+ DistCtrl + +

The identifier of the distribution controller identifier + created by the acceptor process. To be passed along to + dist_util:handshake_other_started(HsData). +

+
+ MyNode + +

+ Node name of this node. To be passed along to + dist_util:handshake_other_started(HsData). +

+
+ Allowed + +

+ To be passed along to + dist_util:handshake_other_started(HsData). +

+
+ SetupTime + +

+ Time used for creating a setup timer by a + call to dist_util:start_timer(SetupTime). + The timer should be passed along to + dist_util:handshake_other_started(HsData). +

+
+
+

+ The created process should provide callbacks and other + information needed for the handshake in a + #hs_data{} + record and call dist_util:handshake_other_started(HsData) + with this record. +

+

+ dist_util:handshake_other_started(HsData) will perform + the handshake and if the handshake successfully completes this + process will then continue in a connection supervisor loop + as long as the connection is up. +

+
+ + setup(Node, Type, MyNode, LongOrShortNames, SetupTime) ->
  ConnectionSupervisorPid
+ +

+ setup/5 should spawn a process that connects to + Node. When connection has been established it should + perform the Erlang distribution handshake for the connection. + If the handshake successfully completes it should continue to + function as a connection supervisor. This process + should preferably execute on max priority. +

+

The arguments:

+ + Node + +

+ Node name of remote node. To be passed along to + dist_util:handshake_we_started(HsData). +

+
+ Type + +

+ Connection type. To be passed along to + dist_util:handshake_we_started(HsData). +

+
+ MyNode + +

+ Node name of this node. To be passed along to + dist_util:handshake_we_started(HsData). +

+
+ LongOrShortNames + +

+ Either the atom longnames or + the atom shortnames indicating + whether long or short names is used. +

+
+ SetupTime + +

+ Time used for creating a setup timer by a + call to dist_util:start_timer(SetupTime). + The timer should be passed along to + dist_util:handshake_we_started(HsData). +

+
+
+

+ The caller of this function is a representative for net_kernel + (this may or may not be the process registered as net_kernel) + and is in this document identified as Kernel. +

+

+ This function should, besides spawning the connection supervisor, + also create a distribution controller. The distribution + controller is either a process or a port which is responsible + for dispatching traffic. +

+

+ The created process should provide callbacks and other + information needed for the handshake in a + #hs_data{} + record and call dist_util:handshake_we_started(HsData) + with this record. +

+

+ dist_util:handshake_we_started(HsData) will perform + the handshake and the handshake successfully completes this + process will then continue in a connection supervisor loop + as long as the connection is up. +

+
+ + close(Listen) ->
  void()
+ +

+ Called in order to close the Listen handle + that originally was passed from the + listen/1 callback. +

+ + select(NodeName) ->
  boolean()
+ +

Return true if the host name part + of the NodeName is valid for use + with this protocol; otherwise, false. +

+
+ +
+ +

+ There are also two optional functions that may be + exported: +

+ + setopts(Listen, Opts) ->
  ok | {error, Error}
+ +

+ The argument Listen is the handle originally passed + from the + listen/1 callback. + The argument Opts is a list of options to set on future + connections. +

+
+ + getopts(Listen, Opts) ->
  {ok, OptionValues} | {error, Error}
+ +

+ The argument Listen is the handle originally passed + from the + listen/1 callback. + The argument Opts is a list of options to read for future + connections. +

+
+
+ +
+
+ + The #hs_data{} Record +

+ The dist_util:handshake_we_started/1 and + dist_util:handshake_other_started/1 functions + takes a #hs_data{} record as argument. There + are quite a lot of fields in this record that you + need to set. The record is defined in + kernel/include/dist_util.hrl. Not documented + fields should not be set, i.e., should be left as + undefined. +

+

+ The following #hs_data{} record fields need + to be set unless otherwise stated:

+ + kernel_pid + +

+ Process identifier of the Kernel process. That is, + the process that called either + setup/5 or + accept_connection/5. +

+
+ + other_node + +

Name of the other node. This field is only + mandatory when this node initiates the connection. + That is, when connection is set up via + setup/5. +

+
+ + this_node + +

+ The node name of this node. +

+
+ + socket + +

+ The identifier of the distribution controller. +

+
+ + timer + +

+ The timer created using dist_util:start_timer/1. +

+
+ + allowed + +

Information passed as Allowed to + accept_connection/5. This field is only + mandatory when the remote node initiated the + connection. That is, when the connection is set + up via + accept_connection/5. +

+
+ + f_send + +

+ A fun with the following signature: +

+ ok | {error, Error}]]> +

+ where DistCtrlr is the identifier of + the distribution controller and Data + is io data to pass to the other side. +

+

Only used during handshake phase.

+
+ + f_recv + +

+ A fun with the following signature: +

+ {ok, Packet} | {error, Reason}]]> +

+ where DistCtrlr is the identifier of the distribution + controller. + If Length is 0, all available bytes should be + returned. If Length > 0, exactly Length bytes + should be returned, or an error; possibly discarding less + than Length bytes of data when the connection is + closed from the other side. + It is used for passive receive of data from the + other end. +

+

Only used during handshake phase.

+
+ + f_setopts_pre_nodeup + +

+ A fun with the following signature: +

+ ok | {error, Error}]]> +

+ where DistCtrlr is the identifier of + the distribution controller. Called just + before the distribution channel is taken up + for normal traffic. +

+

Only used during handshake phase.

+
+ + f_setopts_post_nodeup + +

+ A fun with the following signature: +

+ ok | {error, Error}]]> +

+ where DistCtrlr is the identifier of + the distribution controller. Called just + after distribution channel has been taken + up for normal traffic. +

+

Only used during handshake phase.

+
+ + f_getll + +

+ A fun with the following signature: +

+ ID]]> +

+ where DistCtrlr is the identifier of + the distribution controller and ID is + the identifier of the low level entity that + handles the connection (often DistCtrlr + itself). +

+

Only used during handshake phase.

+
+ + f_address + +

+ A fun with the following signature: +

+ NetAddress]]> +

+ where DistCtrlr is the identifier of + the distribution controller, Node + is the node name of the node on the other end, + and NetAddress is a #net_address{} + record with information about the address + for the Node on the other end of the + connection. The #net_address{} record + is defined in + kernel/include/net_address.hrl. +

+

Only used during handshake phase.

+
+ + mf_tick + +

+ A fun with the following signature: +

+ void()]]> +

+ where DistCtrlr is the identifier + of the distribution controller. This + function should send information over + the connection that is not interpreted + by the other end while increasing the + statistics of received packets on the + other end. This is usually implemented by + sending an empty packet. +

+

+ It is of vital importance that this operation + does not block the caller for a long time. + This since it is called from the connection + supervisor. +

+

Used when connection is up.

+
+ + mf_getstat + +

+ A fun with the following signature: +

+ {ok, Received, Sent, PendSend}]]> +

+ where DistCtrlr is the identifier + of the distribution controller, Received + is received packets, Sent is + sent packets, and PendSend is + amount of packets in queue to be sent + or a boolean() indicating whether + there are packets in queue to be sent. +

+

+ It is of vital importance that this operation + does not block the caller for a long time. + This since it is called from the connection + supervisor. +

+

Used when connection is up.

+
+ + request_type + +

+ The request Type as passed to + setup/5. + This is only mandatory when the connection has + been initiated by this node. That is, the connection + is set up via setup/5. +

+
+ + mf_setopts + +

+ A fun with the following signature: +

+ ok | {error, Error}]]> +

+ where DistCtrlr is the identifier + of the distribution controller and Opts + is a list of options to set on the connection. +

+

This function is optional. Used when connection is up.

+
+ + mf_getopts + +

+ A fun with the following signature: +

+ {ok, OptionValues} | {error, Error}]]> +

+ where DistCtrlr is the identifier + of the distribution controller and Opts + is a list of options to read for the connection. +

+

This function is optional. Used when connection is up.

+
+ + f_handshake_complete + +

+ A fun with the following signature: +

+ void()]]> +

+ where DistCtrlr is the identifier + of the distribution controller, Node is + the node name of the node connected at the other + end, and DHandle is a distribution handle + needed by a distribution controller process when + calling the following BIFs: +

+ +

erlang:dist_ctrl_get_data/1

+

erlang:dist_ctrl_get_data_notification/1

+

erlang:dist_ctrl_input_handler/2

+

erlang:dist_ctrl_put_data/2

+
+

+ This function is called when the handshake has + completed and the distribution channel is up. + The distribution controller can begin dispatching + traffic over the channel. This function is optional. +

+

Only used during handshake phase.

+
+ +
+
+ +
+ + Enable Your Distribution Module + +

For net_kernel to find out which distribution module to use, + the erl command-line argument -proto_dist is used. It + is followed by one or more distribution module names, with suffix + "_dist" removed. That is, gen_tcp_dist as a distribution module + is specified as -proto_dist gen_tcp.

+ +

If no epmd (TCP port mapper daemon) is used, also command-line + option -no_epmd is to be specified, which makes + Erlang skip the epmd startup, both as an OS process and as an + Erlang ditto.

+
+ +
+
The Driver + + +

This section was written a long time ago. Most of it is still + valid, but some things have changed since then. Some updates have + been made to the documentation of the driver presented here, + but more can be done and is planned for the future. + The reader is encouraged to read the + erl_driver and + driver_entry + documentation also.

+
+

Although Erlang drivers in general can be beyond the scope of this section, a brief introduction seems to be in place.

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 105734d5b2..8b0f97f30f 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -181,6 +181,14 @@ + + + + +

An opaque handle identifing a distribution channel.

+
+
+ @@ -1214,6 +1222,152 @@ end + + + Get distribution channel data to pass to another node. + +

+ Get distribution channel data from the local node that is + to be passed to the remote node. The distribution channel + is identified by DHandle. If no data + is available, the atom none is returned. One + can request to be informed by a message when more + data is available by calling + erlang:dist_ctrl_get_data_notification(DHandle). +

+

+ The data retreived from this function needs to be delivered + as is to the node on the other end in the exact same order, + with no loss of data what so ever, as retrived from this + function. +

+

+ Only the process registered as distribution + controller for the distribution channel identified by + DHandle is allowed to call this + function. +

+

+ This function is used when implementing an alternative + distribution carrier using processes as distribution + controllers. DHandle is retrived + via the callback + f_handshake_complete. + More information about this can be found in the documentation of + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution Module. +

+
+
+ + + + Request notification about available outgoing distribution channel data. + +

+ Request notification when more data is available to + fetch using + erlang:dist_ctrl_get_data(DHandle) + for the distribution channel identified by + DHandle. When more data is present, + the caller will be sent the message dist_data. + Once a dist_data messages has been sent, no + more dist_data messages will be sent until + the dist_ctrl_get_data_notification/1 function has been called + again. +

+

+ Only the process registered as distribution + controller for the distribution channel identified by + DHandle is allowed to call this + function. +

+

+ This function is used when implementing an alternative + distribution carrier using processes as distribution + controllers. DHandle is retrived + via the callback + f_handshake_complete. + More information about this can be found in the documentation of + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution Module. +

+
+
+ + + + Register distribution channel input handler process. + +

+ Register an alternate input handler process for the + distribution channel identified by DHandle. + Once this function has been called, InputHandler + is the only process allowed to call + erlang:dist_ctrl_put_data(DHandle, Data) + with the DHandle identifing this distribution + channel. +

+

+ Only the process registered as distribution + controller for the distribution channel identified by + DHandle is allowed to call this + function. +

+

+ This function is used when implementing an alternative + distribution carrier using processes as distribution + controllers. DHandle is retrived + via the callback + f_handshake_complete. + More information about this can be found in the documentation of + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution Module. +

+
+
+ + + + Pass data into the VM from a distribution channel. + +

+ Deliver distribution channel data from a remote node to the + local node. +

+

+ The data passed to the VM using this function needs to be + passed in the exact same order, and with no loss of data + what so ever, as sent from the node on the other end. +

+

+ Only the process registered as distribution + controller for the distribution channel identified by + DHandle is allowed to call this + function unless an alternate input handler process + has been registered using + erlang:dist_ctrl_input_handler(DHandle, InputHandler). + If an alternate input handler has been registered, only + the registered input handler process is allowed to call + this function. +

+

+ This function is used when implementing an alternative + distribution carrier using processes as distribution + controllers. DHandle is retrived + via the callback + f_handshake_complete. + More information about this can be found in the documentation of + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution Module. +

+
+
+ Return the Nth element of a tuple. -- cgit v1.2.3 From 87677f64629f1f738e132659c445c3431b02c0b2 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 30 Jun 2017 16:34:26 +0200 Subject: Example of using distribution controller processes --- erts/doc/src/Makefile | 2 ++ erts/doc/src/alt_dist.xml | 14 ++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index b96cbbce40..444adf4a6e 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -173,6 +173,8 @@ release_docs_spec: docs "$(RELSYSDIR)/doc/html" $(INSTALL_DATA) $(ERL_TOP)/erts/example/time_compat.erl \ "$(RELSYSDIR)/doc/html" + $(INSTALL_DATA) $(ERL_TOP)/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl \ + "$(RELSYSDIR)/doc/html" $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3" diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index 3d87e9dcdb..300f75dc13 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -64,6 +64,11 @@ etc in this example). That is, depending on what you want to do you perhaps do not need to implement a driver at all and can then skip the driver related sections below. + The gen_tcp_dist example described in the + Distribution + Module section utilize distribution controller + processes and can be worth having a look at if you want to + use distribution controller processes.

@@ -181,6 +186,15 @@ ignore exit signals. It is allowed to trap exits, but it should then voluntarily terminate when an exit signal is received.

+

+ An example implementation of a distribution module can be found + in + $ERL_TOP/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl. + It implements the distribution over TCP/IP using the gen_tcp + API with distribution controllers implemented by processes. This + instead of using port distribution controllers as the ordinary TCP/IP + distribution uses. +

-- cgit v1.2.3 From ffd59fbd9ac262b7aba4b86e7da4992a3e668e24 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 1 Aug 2017 18:34:58 +0200 Subject: Introduce sender in distributed signals and dflag configuration --- erts/doc/src/alt_dist.xml | 69 +++++++++++++++++++++++++++++++++++++ erts/doc/src/erl_dist_protocol.xml | 70 ++++++++++++++++++++++++++++++++++++++ erts/doc/src/erlang.xml | 19 +++-------- 3 files changed, 143 insertions(+), 15 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index 300f75dc13..d3731a5391 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -760,10 +760,79 @@

Only used during handshake phase.

+ + add_flags + +

+ Distribution flags + to add to the connection. Currently all (non obsolete) flags will + automatically be enabled. +

+

+ This flag field is optional. +

+
+ + reject_flags + +

+ Distribution flags + to reject. Currently the following distribution flags can be rejected: +

+ + DFLAG_DIST_HDR_ATOM_CACHE + Do not use atom cache over this connection. + DFLAGS_STRICT_ORDER_DELIVERY + Do not use any features that require strict + order delivery. + +

+ This flag field is optional. +

+
+ + require_flags + +

+ Require these distribution + flags to be used. The connection will be aborted during the + handshake if the other end does not use them. +

+

+ This flag field is optional. +

+
+
+ + Distribution Data Delivery +

+ When using the default configuration, the data to pass + over a connection needs to be delivered as is + to the node on the receiving end in the exact same + order, with no loss of data what so ever, as sent + from the sending node. +

+

+ The data delivery order can be relaxed by disabling + features that require strict ordering. This is done by + passing the ?DFLAGS_STRICT_ORDER_DELIVERY + distribution + flags in the + reject_flags + field of the #hs_data{} + record used when setting up the connection. When relaxed + ordering is used, only the order of signals with the same + sender/receiver pair has to be preserved. + However, note that disabling the features that require + strict ordering may have a negative impact on performance, + throughput, and/or latency. +

+
+
Enable Your Distribution Module diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml index 610351db6c..a78b13aaa4 100644 --- a/erts/doc/src/erl_dist_protocol.xml +++ b/erts/doc/src/erl_dist_protocol.xml @@ -829,7 +829,31 @@ DiB == gen_digest(ChA, ICA)?

The node understand UTF-8 encoded atoms.

+ -define(DFLAG_MAP_TAG, 16#20000). + +

The node understand the map tag.

+
+ -define(DFLAG_BIG_CREATION, 16#40000). + +

The node understand big node creation.

+
+ -define(DFLAG_SEND_SENDER, 16#80000). + +

+ Use the SEND_SENDER + control message + instead of the SEND control message and use the + SEND_SENDER_TT control message instead + of the SEND_TT control message. +

+
+

+ There are also a collection of DFLAGs bitwise or:ed + together in the DFLAGS_STRICT_ORDER_DELIVERY macro. + These flags corresponds to features that require strict + ordering of data over distribution channels. +

@@ -922,6 +946,7 @@ DiB == gen_digest(ChA, ICA)? +

The ControlMessage is a tuple, where the first element indicates which distributed operation it encodes:

@@ -1028,4 +1053,49 @@ DiB == gen_digest(ChA, ICA)?
+ +
+ New Ctrlmessages for Erlang/OTP 21 + + SEND_SENDER + +

{22, FromPid, ToPid}

+

Followed by Message.

+

+ This control messages replace the SEND control + message and will be sent when the distribution flag + DFLAG_SEND_SENDER + has been negotiated in the connection setup handshake. +

+

+ Messages encoded before the connection has + been set up may still use the SEND control + message. However, once a SEND_SENDER or SEND_SENDER_TT + control message has been sent, no more SEND + control messages will be sent in the same direction + on the connection. +

+
+ SEND_SENDER_TT + +

{23, FromPid, ToPid, TraceToken}

+

Followed by Message.

+

+ This control messages replace the SEND_TT control + message and will be sent when the distribution flag + DFLAG_SEND_SENDER + has been negotiated in the connection setup handshake. +

+

+ Messages encoded before the connection has + been set up may still use the SEND_TT control + message. However, once a SEND_SENDER or SEND_SENDER_TT + control message has been sent, no more SEND_TT + control messages will be sent in the same direction + on the connection. +

+
+
+
+ diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 8b0f97f30f..f1fcbd7532 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1235,12 +1235,6 @@ end data is available by calling erlang:dist_ctrl_get_data_notification(DHandle).

-

- The data retreived from this function needs to be delivered - as is to the node on the other end in the exact same order, - with no loss of data what so ever, as retrived from this - function. -

Only the process registered as distribution controller for the distribution channel identified by @@ -1253,7 +1247,7 @@ end controllers. DHandle is retrived via the callback f_handshake_complete. - More information about this can be found in the documentation of + More information can be found in the documentation of ERTS User's Guide ➜ How to implement an Alternative Carrier for the Erlang Distribution ➜ Distribution Module. @@ -1289,7 +1283,7 @@ end controllers. DHandle is retrived via the callback f_handshake_complete. - More information about this can be found in the documentation of + More information can be found in the documentation of ERTS User's Guide ➜ How to implement an Alternative Carrier for the Erlang Distribution ➜ Distribution Module. @@ -1322,7 +1316,7 @@ end controllers. DHandle is retrived via the callback f_handshake_complete. - More information about this can be found in the documentation of + More information can be found in the documentation of ERTS User's Guide ➜ How to implement an Alternative Carrier for the Erlang Distribution ➜ Distribution Module. @@ -1338,11 +1332,6 @@ end Deliver distribution channel data from a remote node to the local node.

-

- The data passed to the VM using this function needs to be - passed in the exact same order, and with no loss of data - what so ever, as sent from the node on the other end. -

Only the process registered as distribution controller for the distribution channel identified by @@ -1360,7 +1349,7 @@ end controllers. DHandle is retrived via the callback f_handshake_complete. - More information about this can be found in the documentation of + More information can be found in the documentation of ERTS User's Guide ➜ How to implement an Alternative Carrier for the Erlang Distribution ➜ Distribution Module. -- cgit v1.2.3 From 314702f86c9199957e40edfb73bcdbddb422f9d7 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 24 Feb 2017 19:38:37 +0100 Subject: erts: Add nif ioq --- erts/doc/src/erl_nif.xml | 251 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 251 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 5a69bed34c..e47bb6a806 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -343,6 +343,81 @@ return term; enif_convert_time_unit() + + I/O Queues + +

The Erlang nif library contains function for easily working + with I/O vectors as used by the unix system call writev. + The I/O Queue is not thread safe, so some other synchronization + mechanism has to be used.

+ + + SysIOVec + + ErlNifIOVec + + enif_ioq_create() + + enif_ioq_destroy() + + enif_ioq_enq_binary() + + enif_ioq_enqv() + + enif_ioq_deq() + + enif_ioq_peek() + + enif_inspect_iovec() + + enif_free_iovec() + +

Typical usage when writing to a file descriptor looks like this:

+ 0) { + /* If the I/O queue contains data we enqueue the iovec and + then peek the data to write out of the queue. */ + if (!enif_ioq_enqv(q, iovec, 0)) + return -3; + + sysiovec = enif_ioq_peek(q, &iovcnt); + } else { + /* If the I/O queue is empty we skip the trip through it. */ + iovcnt = iovec->iovcnt; + sysiovec = iovec->iov; + } + + /* Attempt to write the data */ + n = writev(fd, sysiovec, iovcnt); + saved_errno = errno; + + if (enif_ioq_size(q) == 0) { + /* If the I/O queue was initially empty we enqueue any + remaining data into the queue for writing later. */ + if (n >= 0 && !enif_ioq_enqv(q, iovec, n)) + return -3; + } else { + /* Dequeue any data that was written from the queue. */ + if (n > 0 && !enif_ioq_deq(q, n, NULL)) + return -4; + } + + /* return n, which is either number of bytes written or -1 if + some error happened */ + errno = saved_errno; + return n; +}]]> Long-running NIFs @@ -837,6 +912,36 @@ typedef enum { + SysIOVec + +

A system I/O vector, as used by writev on + Unix and WSASend on Win32. It is used in + ErlNifIOVec and by + enif_ioq_peek.

+
+ ErlNifIOVec + + +typedef struct { + int iovcnt; + size_t size; + SysIOVec* iov; +} ErlNifIOVec; +

An I/O vector containing iovcnt SysIOVecs + pointing to the data. It is used by + + enif_inspect_iovec and + + enif_ioq_enqv.

+
+ ErlNifIOQueueOpts + + Options to configure a ErlNifIOQueue. + + ERL_NIF_IOQ_NORMAL +

Create a normal I/O Queue

+
+
@@ -1142,6 +1247,31 @@ typedef enum { + + void + enif_free_iovec(ErlNifIOvec* iov) + Free an ErlIOVec + +

Frees an io vector returned from + + enif_inspect_iovec. + This is needed only if a NULL environment is passed to + + enif_inspect_iovec.

+ +
+
+ intenif_get_atom(ErlNifEnv* env, ERL_NIF_TERM term, char* buf, unsigned size, ErlNifCharEncoding encode) @@ -1448,6 +1578,127 @@ typedef enum { + + intenif_inspect_iovec(ErlNifEnv* + env, size_t max_elements, ERL_NIF_TERM iovec_term, ERL_NIF_TERM* tail, + ErlNifIOVec** iovec) + Inspect a list of binaries as an ErlNifIOVec. + +

Fills iovec with the list of binaries provided in + iovec_term. The number of elements handled in the call is + limited to max_elements, and tail is set to the + remainder of the list. Note that the output may be longer than + max_elements on some platforms. +

+

To create a list of binaries from an arbitrary iolist, use + + erlang:iolist_to_iovec/1.

+

When calling this function, iovec should contain a pointer to + NULL or a ErlNifIOVec structure that should be used if + possible. e.g. +

+ +/* Don't use a pre-allocated structure */ +ErlNifIOVec *iovec = NULL; +enif_inspect_iovec(env, max_elements, term, &tail, &iovec); + +/* Use a stack-allocated vector as an optimization for vectors with few elements */ +ErlNifIOVec vec, *iovec = &vec; +enif_inspect_iovec(env, max_elements, term, &tail, &iovec); + +

The contents of the iovec is valid until the called nif + function returns. If the iovec should be valid after the nif + call returns, it is possible to call this function with a + NULL environment. If no environment is given the iovec + owns the data in the vector and it has to be explicitly freed using + enif_free_iovec + .

+

Returns true on success, or false if iovec_term + not an iovec.

+
+
+ + + ErlNifIOQueue * + enif_ioq_create(ErlNifIOQueueOpts opts) + Create a new IO Queue + +

Create a new I/O Queue that can be used to store data. + opts has to be set to ERL_NIF_IOQ_NORMAL. +

+
+
+ + + void + enif_ioq_destroy(ErlNifIOQueue *q) + Destroy an IO Queue and free it's content + +

Destroy the I/O queue and free all of it's contents

+
+
+ + + int + enif_ioq_deq(ErlNifIOQueue *q, size_t count, size_t *size) + Dequeue count bytes from the IO Queue + +

Dequeue count bytes from the I/O queue. + If size is not NULL, the new size of the queue + is placed there.

+

Returns true on success, or false if the I/O does + not contain count bytes. On failure the queue is left un-altered.

+
+
+ + + int + enif_ioq_enq_binary(ErlNifIOQueue *q, ErlNifBinary *bin, size_t skip) + Enqueue the binary into the IO Queue + +

Enqueue the bin into q skipping the first skip bytes.

+

Returns true on success, or false if skip is greater + than the size of bin. Any ownership of the binary data is transferred + to the queue and bin is to be considered read-only for the rest of the NIF + call and then as released.

+
+
+ + + int + enif_ioq_enqv(ErlNifIOQueue *q, ErlNifIOVec *iovec, size_t skip) + Enqueue the iovec into the IO Queue + +

Enqueue the iovec into q skipping the first skip bytes.

+

Returns true on success, or false if skip is greater + than the size of iovec.

+
+
+ + + SysIOVec * + enif_ioq_peek(ErlNifIOQueue *q, int *iovlen) + Peek inside the IO Queue + +

Get the I/O queue as a pointer to an array of SysIOVecs. + It also returns the number of elements in iovlen. + This is the only way to get data out of the queue.

+

Nothing is removed from the queue by this function, that must be done + with enif_ioq_deq.

+

The returned array is suitable to use with the Unix system + call writev.

+
+
+ + + size_t + enif_ioq_size(ErlNifIOQueue *q) + Get the current size of the IO Queue + +

Get the size of q.

+
+
+ int enif_is_atom(ErlNifEnv* env, ERL_NIF_TERM term) -- cgit v1.2.3 From 84e13543aaed5ddb0b5f34f9d88d579f829358ee Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 5 Sep 2017 14:43:54 +0200 Subject: erts: Update docs for enif_make_resource to include new defined properties in OTP-20 regarding comparison and serialization. --- erts/doc/src/erl_nif.xml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 5a69bed34c..50e07f019e 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -206,7 +206,7 @@ ok enif_make_resource. The term returned by enif_make_resource is opaque in nature. - It can be stored and passed between processes on the same node, but + It can be stored and passed between processes, but the only real end usage is to pass it back as an argument to a NIF. The NIF can then call enif_get_resource and get back a pointer to the @@ -1952,10 +1952,33 @@ typedef enum { details, see the example of creating and returning a resource object in the User's Guide.

-

Notice that the only defined behavior of using a resource term in - an Erlang program is to store it and send it between processes on the - same node. Other operations, such as matching or - term_to_binary, have unpredictable (but harmless) results.

+ +

Since ERTS 9.0 (OTP-20.0), resource terms have a defined behavior + when compared and serialized through term_to_binary or passed + between nodes.

+ + +

Two resource terms will compare equal iff they + would yield the same resource object pointer when passed to + enif_get_resource.

+
+ +

A resoure term can be serialized with term_to_binary and later + be fully recreated if the resource object is still alive when + binary_to_term is called. A stale resource term will be + returned from binary_to_term if the resource object has + been deallocated. enif_get_resource + will return false for stale resource terms.

+

The same principles of serialization apply when passing + resource terms in messages to remote nodes and back again. A + resource term will act stale on all nodes except the node where + its resource object is still alive in memory.

+
+
+

Before ERTS 9.0 (OTP-20.0), all resource terms did + compare equal to each other and to empty binaries (<<>>). + If serialized, they would be recreated as plain empty binaries.

+
-- cgit v1.2.3 From eed25a02ba2416c48587699542aaecdd09609718 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Sep 2017 13:28:52 +0200 Subject: erts: Add erlang:iolist_to_iovec OTP-14520 --- erts/doc/src/erlang.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 105734d5b2..5ed7b92896 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -59,6 +59,14 @@ the Erlang external term format.

+ + iovec() + +

A list of binaries. This datatype is useful to use + together with + enif_inspect_iovec.

+
+
@@ -2124,6 +2132,15 @@ os_prompt% + + + Converts an iolist to a iovec. + +

Returns an iovec that is made from the integers and binaries in + IoListOrBinary.

+
+
+ Check whether the local node is alive. -- cgit v1.2.3 From 948ee9b34f34a55cb4b70b7077a849c7dc7a5f18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Fri, 21 Jul 2017 14:20:16 +0200 Subject: Replace the zlib driver with a NIF All operations will now yield appropriately, allowing them to be used freely in concurrent applications. This commit also deprecates the functions listed below, although they won't raise deprecation warnings until OTP 21: zlib:adler32 zlib:crc32 zlib:inflateChunk zlib:getBufSize zlib:setBufSize The behavior of throwing an error when a dictionary is required for decompression has also been deprecated. --- erts/doc/src/zlib.xml | 219 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 171 insertions(+), 48 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 1d272c4c18..9c3e97d814 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -89,6 +89,9 @@ list_to_binary([Compressed|Last]) + + + @@ -112,6 +115,11 @@ list_to_binary([Compressed|Last]) Calculate the Adler checksum.

Calculates the Adler-32 checksum for Data.

+ +

This function is deprecated and will be removed in a future + release. Use + erlang:adler32/1 instead.

+
@@ -127,6 +135,11 @@ list_to_binary([Compressed|Last]) Crc = lists:foldl(fun(Data,Crc0) -> zlib:adler32(Z, Crc0, Data), end, zlib:adler32(Z,<< >>), Datas) + +

This function is deprecated and will be removed in a future + release. Use + erlang:adler32/2 instead.

+
@@ -141,6 +154,11 @@ Crc = lists:foldl(fun(Data,Crc0) ->

This function returns the Adler checksum of [Data1,Data2], requiring only Adler1, Adler2, and Size2.

+ +

This function is deprecated and will be removed in a future + release. Use + erlang:adler32_combine/3 instead.

+
@@ -165,6 +183,12 @@ Crc = lists:foldl(fun(Data,Crc0) -> Get current CRC.

Gets the current calculated CRC checksum.

+ +

This function is deprecated and will be removed in a future + release. Use + erlang:crc32/1 on the uncompressed data + instead.

+
@@ -173,6 +197,11 @@ Crc = lists:foldl(fun(Data,Crc0) -> Calculate CRC.

Calculates the CRC checksum for Data.

+ +

This function is deprecated and will be removed in a future + release. Use + erlang:crc32/1 instead.

+
@@ -188,6 +217,11 @@ Crc = lists:foldl(fun(Data,Crc0) -> Crc = lists:foldl(fun(Data,Crc0) -> zlib:crc32(Z, Crc0, Data), end, zlib:crc32(Z,<< >>), Datas) + +

This function is deprecated and will be removed in a future + release. Use + erlang:crc32/2 instead.

+
@@ -202,6 +236,11 @@ Crc = lists:foldl(fun(Data,Crc0) ->

This function returns the CRC checksum of [Data1,Data2], requiring only CRC1, CRC2, and Size2.

+ +

This function is deprecated and will be removed in a future + release. Use + erlang:crc32_combine/3 instead.

+
@@ -407,8 +446,8 @@ list_to_binary([B1,B2]) deflateInit/1,2,6 or deflateReset/1, before any call of - deflate/3. - The compressor and decompressor must use the same dictionary (see + deflate/3.

+

The compressor and decompressor must use the same dictionary (see inflateSetDictionary/2).

The Adler checksum of the dictionary is returned.

@@ -420,6 +459,10 @@ list_to_binary([B1,B2]) Get buffer size.

Gets the size of the intermediate buffer.

+ +

This function is deprecated and will be removed in a future + release.

+
@@ -443,14 +486,31 @@ list_to_binary([B1,B2]) Decompress data. -

Decompresses as much data as possible. - It can introduce some output latency (reading - input without producing any output).

-

If a preset dictionary is needed at this point (see - - inflateSetDictionary/2), inflate/2 throws a - {need_dictionary,Adler} exception, where Adler is - the Adler-32 checksum of the dictionary chosen by the compressor.

+

Equivalent to + inflate(Z, Data, []) +

+
+ + + + + Decompress data. + +

Decompresses as much data as possible. It can introduce some output + latency (reading input without producing any output).

+

Currently the only available option is + {exception_on_need_dict,boolean()} which controls whether the + function should throw an exception when a preset dictionary is + required for decompression. When set to false, a + need_dictionary tuple will be returned instead. See + + inflateSetDictionary/2 for details.

+ +

This option defaults to true for backwards compatibility + but we intend to remove the exception behavior in a future + release. New code that needs to handle dictionaries manually + should always specify {exception_on_need_dict,false}.

+
@@ -458,6 +518,11 @@ list_to_binary([B1,B2]) Read next uncompressed chunk. + +

This function is deprecated and will be removed in a future + release. Use safeInflate/2 + instead.

+

Reads the next chunk of uncompressed data, initialized by inflateChunk/2.

This function is to be repeatedly called, while it returns @@ -469,23 +534,27 @@ list_to_binary([B1,B2]) Decompress data with limited output size. + +

This function is deprecated and will be removed in a future + release. Use safeInflate/2 + instead.

+

Like inflate/2, - but decompresses no more data than will fit in the buffer configured - through setBufSize/2. - Is is useful when decompressing a stream with a high compression - ratio, such that a small amount of compressed input can expand up to - 1000 times.

+ but decompresses no more data than will fit in the buffer configured + through setBufSize/2 + . Is is useful when decompressing a stream with a high + compression ratio, such that a small amount of compressed input can + expand up to 1000 times.

This function returns {more, Decompressed}, when there is - more output available, and - inflateChunk/1 - is to be used to read it.

-

This function can introduce some output latency (reading - input without producing any output).

-

If a preset dictionary is needed at this point (see - - inflateSetDictionary/2), this function throws a - {need_dictionary,Adler} exception, where Adler is - the Adler-32 checksum of the dictionary chosen by the compressor.

+ more output available, and + inflateChunk/1 + is to be used to read it.

+

This function can introduce some output latency (reading input + without producing any output).

+

An exception will be thrown if a preset dictionary is required for + further decompression. See + + inflateSetDictionary/2 for details.

Example:

 walk(Compressed, Handler) ->
@@ -516,6 +585,18 @@ loop(Z, Handler, Uncompressed) ->
       
     
 
+    
+      
+      Return the decompression dictionary.
+      
+        

Returns the decompression dictionary currently in use + by the stream. This function must be called between + inflateInit/1,2 + and inflateEnd.

+

Only supported if ERTS was compiled with zlib >= 1.2.8.

+
+
+ Initialize a session for decompression. @@ -562,45 +643,83 @@ loop(Z, Handler, Uncompressed) -> Initialize the decompression dictionary.

Initializes the decompression dictionary from the specified - uncompressed byte sequence. This function must be called - immediately after a call of - inflate/2 - if this call threw a {need_dictionary,Adler} exception. - The dictionary chosen by the compressor can be determined from the - Adler value thrown by the call to inflate/2. - The compressor and decompressor must use the same dictionary (see - - deflateSetDictionary/2).

+ uncompressed byte sequence. This function must be called as a + response to an inflate operation (eg. + safeInflate/2) + returning {need_dictionary,Adler,Output} or in the case of + deprecated functions, throwing an + {'EXIT',{{need_dictionary,Adler},_StackTrace}} exception.

+

The dictionary chosen by the compressor can be determined from the + Adler value returned or thrown by the call to the inflate function. + The compressor and decompressor must use the same dictionary (See + + deflateSetDictionary/2).

+

After setting the dictionary the inflate operation should be + retried without new input.

Example:

-unpack(Z, Compressed, Dict) ->
+deprecated_unpack(Z, Compressed, Dict) ->
      case catch zlib:inflate(Z, Compressed) of
-          {'EXIT',{{need_dictionary,DictID},_}} ->
-                   zlib:inflateSetDictionary(Z, Dict),
+          {'EXIT',{{need_dictionary,_DictID},_}} ->
+                 ok = zlib:inflateSetDictionary(Z, Dict),
                  Uncompressed = zlib:inflate(Z, []);
           Uncompressed ->
                  Uncompressed
-     end.
+ end. + +new_unpack(Z, Compressed, Dict) -> + case zlib:inflate(Z, Compressed, [{exception_on_need_dict, false}]) of + {need_dictionary, _DictId, Output} -> + ok = zlib:inflateSetDictionary(Z, Dict), + [Output | zlib:inflate(Z, [])]; + Uncompressed -> + Uncompressed + end.
- - Return the decompression dictionary. + + Open a stream and return a stream reference. -

Returns the decompression dictionary currently in use - by the stream. This function must be called between - inflateInit/1,2 - and inflateEnd.

-

Only supported if ERTS was compiled with zlib >= 1.2.8.

+

Opens a zlib stream.

- - Open a stream and return a stream reference. + + Decompress data with limited output size. -

Opens a zlib stream.

+

Like inflate/2, + but returns once it has expanded beyond a small + implementation-defined threshold. It's useful when decompressing + untrusted input which could have been maliciously crafted to expand + until the system runs out of memory.

+

This function returns {continue | finished, Output}, where + Output is the data that was decompressed in this call. + New input can be queued up on each call if desired, and the function + will return {finished, Output} once all queued data has been + decompressed.

+

This function can introduce some output latency (reading + input without producing any output).

+

If a preset dictionary is required for further decompression, this + function returns a need_dictionary tuple. See + + inflateSetDictionary/2) for details.

+

Example:

+
+walk(Compressed, Handler) ->
+    Z = zlib:open(),
+    zlib:inflateInit(Z),
+    loop(Z, Handler, zlib:safeInflate(Z, Compressed)),
+    zlib:inflateEnd(Z),
+    zlib:close(Z).
+
+loop(Z, Handler, {continue, Output}) ->
+    Handler(Output),
+    loop(Z, Handler, zlib:safeInflate(Z, []));
+loop(Z, Handler, {finished, Output}) ->
+    Handler(Output).
@@ -609,6 +728,10 @@ unpack(Z, Compressed, Dict) -> Set buffer size.

Sets the intermediate buffer size.

+ +

This function is deprecated and will be removed in a future + release.

+
-- cgit v1.2.3 From 8e8a7f16acb479fc2737ff73e5e0b5569a7ab71f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Thu, 10 Aug 2017 14:25:34 +0200 Subject: Improve zlib error messages and update test suite to fit OTP-14527 --- erts/doc/src/zlib.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index 9c3e97d814..f5cc1b1e64 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -65,13 +65,17 @@ list_to_binary([Compressed|Last]) badarg Bad argument. + not_initialized + The stream hasn't been initialized, eg. if + inflateInit/1 wasn't + called prior to a call to + inflate/2. + data_error The data contains errors. stream_error Inconsistent stream state. - einval - Bad value or wrong function called. {need_dictionary,Adler32} See inflate/2. -- cgit v1.2.3 From 8c9eafb3aa8b0d31e40b165e04766df93cd2e964 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 5 Sep 2017 18:23:10 +0200 Subject: Fix xml-lint warning in doc --- erts/doc/src/notes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 76aab90e9d..050e84f0c1 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -603,7 +603,7 @@ marker="erts:erl">erl command.

See http://pcre.org/original/changelog.txt + href="http://pcre.org/original/changelog.txt">http://pcre.org/original/changelog.txt for information about changes made to PCRE between the versions 8.33 and 8.40.

-- cgit v1.2.3 From e8d5c394fcbc4abc435c4559a81192eb0481081d Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 13 Sep 2017 10:36:21 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 367d6d4d0a..e0877e75bc 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,27 @@

This document describes the changes made to the ERTS application.

+
Erts 9.0.5 + +
Fixed Bugs and Malfunctions + + +

+ Fixed bug in binary_to_term and + binary_to_atom that could cause VM crash. + Typically happens when the last character of an UTF8 + string is in the range 128 to 255, but truncated to only + one byte. Bug exists in binary_to_term since ERTS + version 5.10.2 (OTP_R16B01) and binary_to_atom + since ERTS version 9.0 (OTP-20.0).

+

+ Own Id: OTP-14590 Aux Id: ERL-474

+
+
+
+ +
+
Erts 9.0.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 0f5c4c923208b63ab645341883637318775d81d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 14 Sep 2017 07:05:29 +0200 Subject: Document that the compiler may optimize away atoms The following code could fail in the call to list_existing_atom/1: String = atom_to_list(some_atom), Atom = list_to_existing_atom(String) because the compiler will rewrite the code to: String = "some_atom", Atom = list_to_existing_atom(String) If some_atom is not used in another place, it will not exist. The compiler could be updated to preserve the atom in this simple case, but it would be hard to make sure that the compiler never loses atoms that exist in the source text. It also difficult to imagine a real world use case where this would be a problem. If an atom is mentioned only in a way that the compiler can optimize away, is there really any need to create the atom at all in list_to_existing_atom/1? Therefore, it is better to place the responsibility that the atom exists on the user of list_to_existing_atom/1. Update the documentation to mention that the compiler may optimize away atoms. https://bugs.erlang.org/browse/ERL-453 --- erts/doc/src/erlang.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 5afac46d21..2465f49581 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -432,6 +432,16 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)). binary_to_atom/2, but the atom must exist.

Failure: badarg if the atom does not exist.

+ +

Note that the compiler may optimize away atoms. For + example, the compiler will rewrite + atom_to_list(some_atom) to "some_atom". If + that expression is the only mention of the atom + some_atom in the containing module, the atom will not + be created when the module is loaded, and a subsequent call + to binary_to_existing_atom(<<"some_atom">>, utf8) + will fail.

+
@@ -2478,6 +2488,15 @@ os_prompt% but only if there already exists such atom.

Failure: badarg if there does not already exist an atom whose text representation is String.

+ +

Note that the compiler may optimize away atoms. For + example, the compiler will rewrite + atom_to_list(some_atom) to "some_atom". If + that expression is the only mention of the atom + some_atom in the containing module, the atom will not + be created when the module is loaded, and a subsequent call + to list_to_existing_atom("some_atom") will fail.

+
-- cgit v1.2.3 From 68cbafa26fa3cc36eb2ed3dd26c0dda41f6fec44 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 23 Mar 2017 19:07:53 +0100 Subject: erts: Clarify erl_driver docs about thread safety --- erts/doc/src/erl_driver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 5705100ab2..ca9d458e1e 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -157,7 +157,7 @@

Most functions in this API are not thread-safe, that is, - they cannot be called from any thread. Functions + they cannot be called from arbitrary threads. Functions that are not documented as thread-safe can only be called from driver callbacks or function calls descending from a driver callback call. Notice that driver callbacks can be called from -- cgit v1.2.3 From 7b0c3b7e51bf6b13c95565c99cd80191525295e1 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 25 Apr 2017 17:42:37 +0200 Subject: erts: Remove undocumented driver_event --- erts/doc/src/driver_entry.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index 2421e0a8d9..e8c7e26457 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -196,10 +196,7 @@ typedef struct erl_drv_entry { char **rbuf, ErlDrvSizeT rlen, unsigned int *flags); /* Works mostly like 'control', a synchronous call into the driver */ - void (*event)(ErlDrvData drv_data, ErlDrvEvent event, - ErlDrvEventData event_data); - /* Called when an event selected by - driver_event() has occurred */ + void* unused_event_callback; int extended_marker; /* ERL_DRV_EXTENDED_MARKER */ int major_version; /* ERL_DRV_EXTENDED_MAJOR_VERSION */ int minor_version; /* ERL_DRV_EXTENDED_MINOR_VERSION */ -- cgit v1.2.3 From fd86f4bfba5dd69b66e155cdc70ac787f2810961 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 20 Sep 2017 09:10:35 +0200 Subject: erts, stdlib: Fix xmllint warning --- erts/doc/src/notes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 139057adb7..4eeea87bad 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -624,7 +624,7 @@ marker="erts:erl">erl command.

See http://pcre.org/original/changelog.txt + href="http://pcre.org/original/changelog.txt">http://pcre.org/original/changelog.txt for information about changes made to PCRE between the versions 8.33 and 8.40.

-- cgit v1.2.3 From af2073640c4b7c67c9b978ebc203d57ac43e96dc Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 22 Sep 2017 15:21:49 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 178 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 4eeea87bad..1a5bea8820 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,184 @@

This document describes the changes made to the ERTS application.

+
Erts 9.1 + +
Fixed Bugs and Malfunctions + + +

+ Changed erlang:apply/2 to raise a badarg + exception if the second argument is not a proper list. + Previous behavior was a misleading undef + exception.

+

+ Own Id: OTP-14490 Aux Id: ERL-432

+
+ +

On macOS, crypto would crash if observer + had been started before crypto. On the beta for + macOS 10.13 (High Sierra), crypto would crash. + Both of those bugs have been fixed.

+

+ Own Id: OTP-14499 Aux Id: ERL-251 ERL-439

+
+ +

+ Fixed bug in enif_whereis_pid/port that could cause heap + corruption in rare cases.

+

+ Own Id: OTP-14523

+
+ +

+ Fix so that trace messages generated when in a dirty nif + are flushed correctly when the dirty nif is done + executing.

+

+ Own Id: OTP-14538

+
+ +

+ Fix escape code handling when using ANSI color codes in + the shell.

+

+ Own Id: OTP-14549 Aux Id: PR1536

+
+ +

+ Upgraded the ERTS internal PCRE library from version 8.40 + to version 8.41. See http://pcre.org/original/changelog.txt + for information about changes made to PCRE. This library + implements major parts of the re regular + expressions module.

+

+ Own Id: OTP-14574

+
+ +

+ Fixed a bug causing statistics(runtime) to produce + negative values and a bug in + statistics(wall_clock) causing it to produce + values one second too long.

+

+ statistics(runtime) now also use + getrusage() as source when available preventing + the returned value from wrapping as frequent as before.

+

+ Own Id: OTP-14597 Aux Id: ERL-465

+
+ +

+ Fixed small memory leak that could occur when sending to + a terminating port.

+

+ Own Id: OTP-14609

+
+ +

+ Fix bug causing VM crash when a module with + -on_load directive is loaded while + erlang:trace(on_load, ...) is enabled.

+

+ Own Id: OTP-14612

+
+ +

A warning that the compiler may optimize away atoms + have been added to the documentation of + list_to_existing_atom/1 and + binary_to_existing_atom/2.

+

+ Own Id: OTP-14614 Aux Id: ERL-453

+
+
+
+ + +
Improvements and New Features + + +

Lock counting can now be fully toggled at runtime in + the lock counting emulator (-emu_type lcnt). + Everything is enabled by default to match the old + behavior, but specific categories can be toggled at will + with minimal runtime overhead when disabled. Refer to the + documentation on lcnt:rt_mask/1 for details.

+

+ Own Id: OTP-13170

+
+ +

The zlib module has been refactored and all its + operations will now yield appropriately, allowing them to + be used freely in concurrent applications.

The + following functions have been deprecated, but will not + produce compiler warnings until OTP 21: + zlib:adler32, zlib:crc32, + zlib:inflateChunk, zlib:getBufSize, + zlib:setBufSize.

The behavior of throwing + an error when a dictionary is required for decompression + has also been deprecated. Refer to the documentation on + inflateSetDictionary/2 for details.

+

+ Own Id: OTP-14185

+
+ +

lcnt:collect and lcnt:clear will no + longer block all other threads in the runtime system.

+

+ Own Id: OTP-14412

+
+ +

Add erlang:iolist_to_iovec/1, which converts an + iolist() to an erlang:iovec(), which suitable for use + with enif_inspect_iovec.

+

+ Own Id: OTP-14520

+
+ +

When provided with bad arguments, the zlib + module will now raise named exceptions instead of just + badarg. For example, not_initialized when + using zlib:inflate/2 with an uninitialized + stream.

+

+ Own Id: OTP-14527

+
+ +

+ erlang:halt/2 allows any Unicode string as slogan + for the crash dump.

+

+ Own Id: OTP-14553

+
+ +

Add new nif API functions for managing an I/O Queue. + The added functions are:

+ + enif_ioq_create() + enif_ioq_destroy() + enif_ioq_enq_binary() + + enif_ioq_enqv() + enif_ioq_deq() + enif_ioq_peek() + enif_inspect_iovec() + + enif_free_iovec() +

+ Own Id: OTP-14598

+
+
+
+ +
+
Erts 9.0.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 73500d2a456023ca36172f5af896d0b1f10853b7 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 26 Sep 2017 13:25:50 +0200 Subject: Do not load .erlang from current dir It may be confusing that "hidden" .erlang is loaded from the current working directory. Use c:erlangrc([Dir1,..]) to search and load .erlang from other places than "$HOME/.erlang". Implies that c:erlangrc() needs to be documented. --- erts/doc/src/erl.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 71fe08d4e6..ae52d92a89 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1633,8 +1633,7 @@ The .erlang startup file

When Erlang/OTP is started, the system searches for a file named - .erlang in the directory where Erlang/OTP is started. If not - found, the user's home directory is searched for an .erlang + .erlang in the user's home directory is searched for an .erlang file.

If an .erlang file is found, it is assumed to contain valid Erlang expressions. These expressions are evaluated as if they were -- cgit v1.2.3 From 9395c7b4a2079349fdb881a1f537af5b73eacfd2 Mon Sep 17 00:00:00 2001 From: Lars Thorsen Date: Mon, 25 Sep 2017 15:15:37 +0200 Subject: Remove unused files from the documentation build --- erts/doc/src/Makefile | 20 +++++++++---------- erts/doc/src/fascicules.xml | 18 ------------------ erts/doc/src/part_notes.xml | 38 ------------------------------------- erts/doc/src/part_notes_history.xml | 36 ----------------------------------- 4 files changed, 9 insertions(+), 103 deletions(-) delete mode 100644 erts/doc/src/fascicules.xml delete mode 100644 erts/doc/src/part_notes.xml delete mode 100644 erts/doc/src/part_notes_history.xml (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index b96cbbce40..1f591a5cff 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -1,7 +1,7 @@ -# +# # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2016. All Rights Reserved. +# Copyright Ericsson AB 1997-2017. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ # limitations under the License. # # %CopyrightEnd% -# +# SPECS_ESRC = ../../preloaded/src/ @@ -66,9 +66,7 @@ XML_REF3_FILES = \ zlib.xml XML_PART_FILES = \ - part.xml \ - part_notes.xml \ - part_notes_history.xml + part.xml XML_CHAPTER_FILES = \ tty.xml \ @@ -116,9 +114,9 @@ SPECS_FILES = $(XML_REF3_EFILES:%.xml=$(SPECDIR)/specs_%.xml) TOP_SPECS_FILE = specs.xml # ---------------------------------------------------- -# FLAGS +# FLAGS # ---------------------------------------------------- -XML_FLAGS += +XML_FLAGS += KERNEL_SRC=$(ERL_TOP)/lib/kernel/src KERNEL_INCLUDE=$(ERL_TOP)/lib/kernel/include @@ -146,7 +144,7 @@ $(INFO_FILE): $(INFO_FILE_SRC) $(ERL_TOP)/make/$(TARGET)/otp.mk sed -e 's;%RELEASE%;$(SYSTEM_VSN);' $(INFO_FILE_SRC) > $(INFO_FILE) -debug opt: +debug opt: clean: rm -rf $(HTMLDIR)/* @@ -154,7 +152,7 @@ clean: rm -f $(MAN3DIR)/* rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) rm -f $(SPECDIR)/* - rm -f errs core *~ + rm -f errs core *~ $(SPECDIR)/specs_%.xml: escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ @@ -162,7 +160,7 @@ $(SPECDIR)/specs_%.xml: # ---------------------------------------------------- # Release Target -# ---------------------------------------------------- +# ---------------------------------------------------- include $(ERL_TOP)/make/otp_release_targets.mk release_docs_spec: docs diff --git a/erts/doc/src/fascicules.xml b/erts/doc/src/fascicules.xml deleted file mode 100644 index 1c371bd9c8..0000000000 --- a/erts/doc/src/fascicules.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - ERTS User's Guide - - - ERTS Reference Manual - - - Release Notes - - - Off-Print - - - diff --git a/erts/doc/src/part_notes.xml b/erts/doc/src/part_notes.xml deleted file mode 100644 index e579b7635d..0000000000 --- a/erts/doc/src/part_notes.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - -

- - 20042016 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - ERTS Release Notes - - - 2004-09-07 - 1.0 -
- -

The Erlang Runtime System application ERTS.

-

For information about older versions, see - Release Notes History.

-
- - - diff --git a/erts/doc/src/part_notes_history.xml b/erts/doc/src/part_notes_history.xml deleted file mode 100644 index 277683a2b5..0000000000 --- a/erts/doc/src/part_notes_history.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - -
- - 20062016 - Ericsson AB. All Rights Reserved. - - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - ERTS Release Notes History - - - - -
- -

The Erlang Runtime System application ERTS.

-
- -
- -- cgit v1.2.3 From 300925cc0de95650cf5b13e938ccf702a8eadc9e Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 4 May 2017 17:07:41 +0200 Subject: erts: temp_alloc can no longer be disabled temp_alloc is used in such a way that if it ever results in a malloc/free sequence it will slow down the system alot. So it will no longer be possible to disable it and it will not be disabled when using +Mea min. OTP-14651 --- erts/doc/src/erts_alloc.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index d3f725ef99..580780e73b 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -87,9 +87,9 @@ the number of system calls made.
-

sys_alloc and literal_alloc are always enabled and - cannot be disabled. exec_alloc is only available if it is needed - and cannot be disabled. mseg_alloc is always enabled if it is +

sys_alloc, literal_alloc and temp_alloc are always + enabled and cannot be disabled. exec_alloc is only available if it + is needed and cannot be disabled. mseg_alloc is always enabled if it is available and an allocator that uses it is enabled. All other allocators can be enabled or disabled. By default all allocators are enabled. -- cgit v1.2.3 From 988f5f5e8061ce2e135a314ca782788eda478a06 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 30 May 2017 16:35:18 +0200 Subject: erts: Move all I/O polling to a seperate thread --- erts/doc/src/erl.xml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 71fe08d4e6..d24c35d217 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -762,13 +762,36 @@ process_flag(message_queue_data, MQD).

- + +IOp PollSets -

Enables or disables the kernel poll functionality if supported by - the emulator. Defaults to (disabled). - If the emulator does not support kernel poll, and flag - is passed to the emulator, a warning is - issued at startup.

+

Sets the number of IO pollsets to use when polling for I/O. + This option is only used on platforms that support concurrent + updates of a pollset, otherwise the same number of pollsets + are used as IO poll threads. + The default is 1. +

+
+ +IOt PollThreads + +

Sets the number of IO poll threads to use when polling for I/O. + The maximum number of poll threads allowed is 1024. The default is 1. +

+
+ +IOPp PollSetsPercentage + +

Similar to +IOp but uses + percentages to set the number of IO pollsets to create, based on the + number of poll threads configured. If both +IOPp and +IOp + are used, +IOPp is ignored. +

+
+ +IOPt PollThreadsPercentage + +

Similar to +IOt but uses + percentages to set the number of IO poll threads to create, based on + the number of schedulers configures. If both +IOPt and + +IOt are used, +IOPt is ignored. +

-- cgit v1.2.3 From 22cde2bda706c0bd8574f0a1301170c80b5f4340 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 19 Jul 2017 11:47:16 +0200 Subject: erts: Remove eager check io It is not longer relevant when using the poll thread --- erts/doc/src/erl.xml | 19 ------------------- erts/doc/src/erlang.xml | 9 --------- 2 files changed, 28 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index d24c35d217..dc58cdeb13 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1296,25 +1296,6 @@ erlang:system_info(cpu_topology).

- +secio true|false - -

Enables or disables eager check I/O scheduling. Defaults - to true. The default was changed from false - as from ERTS 7.0. The behavior before this - flag was introduced corresponds to +secio false.

-

The flag effects when schedulers will check for I/O - operations possible to execute, and when such I/O operations - will execute. As the parameter name implies, - schedulers are more eager to check for I/O when - true is passed. This, however, also implies that - execution of outstanding I/O operation is not - prioritized to the same extent as when false is - passed.

-

- erlang:system_info(eager_check_io) - returns the value of this parameter used when starting - the virtual machine.

-
+sfwi Interval

Sets scheduler-forced wakeup interval. All run queues are diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index e6b983b6c2..48aac15827 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -8023,15 +8023,6 @@ ok The return value will always be false, as the elib_malloc allocator has been removed.

- - eager_check_io - -

Returns the value of command-line flag - +secio in - erl(1), which is either true or false. - For information about the different values, see the - documentation of the command-line flag.

-
ets_limit

Returns the maximum number of ETS tables allowed. This -- cgit v1.2.3 From 6543f15a3b6d9c1f71ff30ea682d64d1c8c7a7dc Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 2 Oct 2017 11:43:57 +0200 Subject: erts: Update +IOt and msacc docs --- erts/doc/src/erl.xml | 6 +++++- erts/doc/src/erlang.xml | 15 +++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index dc58cdeb13..6f6eca2a0b 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -776,6 +776,10 @@

Sets the number of IO poll threads to use when polling for I/O. The maximum number of poll threads allowed is 1024. The default is 1.

+

A good way to check if more IO poll threads are needed is to use + microstate accounting + and see what the load of the IO poll thread is. If it is high it could + be a good idea to add more threads.

+IOPp PollSetsPercentage @@ -789,7 +793,7 @@

Similar to +IOt but uses percentages to set the number of IO poll threads to create, based on - the number of schedulers configures. If both +IOPt and + the number of schedulers configured. If both +IOPt and +IOt are used, +IOPt is ignored.

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 48aac15827..0a2852b895 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6456,17 +6456,24 @@ lists:map(

MSAcc_Thread_Types:

scheduler - The main execution threads that do most of the work. + The main execution threads that do most of the work. See + erl +S for more details. dirty_cpu_scheduler - The threads for long running cpu intensive work. + The threads for long running cpu intensive work. See + erl +SDcpu for more details. dirty_io_scheduler - The threads for long running I/O work. + The threads for long running I/O work. See + erl +SDio for more details. async Async threads are used by various linked-in drivers (mainly the - file drivers) do offload non-CPU intensive work. + file drivers) do offload non-CPU intensive work. See + erl +A for more details.
aux Takes care of any work that is not specifically assigned to a scheduler. + poll + Does the IO polling for the emulator. See + erl +IOt for more details.

The following MSAcc_Thread_States are available. All states are exclusive, meaning that a thread cannot be in two -- cgit v1.2.3 From b584195a6befac314eef75ac3f1ae2ac4f448a61 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 2 Oct 2017 15:55:32 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 1a5bea8820..fa200176e4 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,30 @@

This document describes the changes made to the ERTS application.

+
Erts 9.1.1 + +
Fixed Bugs and Malfunctions + + +

The new zlib module returned a data_error when + inflating concatenated streams, which was incompatible + with the old module's behavior of returning the + uncompressed data up to the end of the first stream.

+

+ Own Id: OTP-14648

+
+ +

zlib:gunzip/1 will no longer stop at the end of the + first stream when decompressing concatenated gzip + files.

+

+ Own Id: OTP-14649

+
+
+
+ +
+
Erts 9.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From baf53defc90c4aa8a4caa6b2c6ead6a1b58df199 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 2 Oct 2017 19:16:19 +0200 Subject: fixup! Do not load .erlang from current dir --- erts/doc/src/erl.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index ae52d92a89..823ca9544f 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1633,8 +1633,7 @@ The .erlang startup file

When Erlang/OTP is started, the system searches for a file named - .erlang in the user's home directory is searched for an .erlang - file.

+ .erlang in the user's home directory.

If an .erlang file is found, it is assumed to contain valid Erlang expressions. These expressions are evaluated as if they were input to the shell.

-- cgit v1.2.3 From f443163b0a58e80e154fa38a5ae36f0bb8b074fd Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 5 Oct 2017 16:58:30 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 99736c1641..e1c8dbb501 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,55 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.5.3 + +
Fixed Bugs and Malfunctions + + +

+ A timer internal bit-field used for storing scheduler id + was too small. As a result, VM internal timer data + structures could become inconsistent when using 1024 + schedulers on the system. Note that systems with less + than 1024 schedulers are not effected by this bug.

+

+ This bug was introduced in ERTS version 7.0 (OTP 18.0).

+

+ Own Id: OTP-14548 Aux Id: OTP-11997, ERL-468

+
+ +

+ Fixed bug in binary_to_term and + binary_to_atom that could cause VM crash. + Typically happens when the last character of an UTF8 + string is in the range 128 to 255, but truncated to only + one byte. Bug exists in binary_to_term since ERTS + version 5.10.2 (OTP_R16B01) and binary_to_atom + since ERTS version 9.0 (OTP-20.0).

+

+ Own Id: OTP-14590 Aux Id: ERL-474

+
+ +

+ Fix bug causing VM crash when a module with + -on_load directive is loaded while + erlang:trace(on_load, ...) is enabled.

+

+ Own Id: OTP-14612

+
+ +

+ Fixed bug that could cause a VM crash when a corrupt + message is received on distribution channel from other + node.

+

+ Own Id: OTP-14661 Aux Id: ERIERL-80

+
+
+
+ +
+
Erts 8.3.5.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From f4081916133844a7a9241a600b285c750570321c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 9 Oct 2017 15:00:24 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index fa200176e4..14103cca28 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,23 @@

This document describes the changes made to the ERTS application.

+
Erts 9.1.2 + +
Fixed Bugs and Malfunctions + + +

+ Fixed bug that could cause a VM crash when a corrupt + message is received on distribution channel from other + node.

+

+ Own Id: OTP-14661 Aux Id: ERIERL-80

+
+
+
+ +
+
Erts 9.1.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 8ab02314baa4bf6fd1e3769b7222943a7084db28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Mon, 9 Oct 2017 08:59:32 +0200 Subject: Add zlib:set_controlling_process/2 --- erts/doc/src/zlib.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml index f5cc1b1e64..6f4c42da27 100644 --- a/erts/doc/src/zlib.xml +++ b/erts/doc/src/zlib.xml @@ -71,6 +71,11 @@ list_to_binary([Compressed|Last]) called prior to a call to inflate/2. + not_on_controlling_process + The stream was used by a process that doesn't control it. Use + + set_controlling_process/2 if you need to transfer + a stream to a different process. data_error The data contains errors. @@ -739,6 +744,15 @@ loop(Z, Handler, {finished, Output}) -> + + + Transfers ownership of a zlib stream. + +

Changes the controlling process of Z to + Pid, which must be a local process.

+
+
+ Uncompress data with standard zlib functionality. -- cgit v1.2.3 From bb0b43eae854125688f3143e53c8974cafed4ad2 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 6 Sep 2017 17:00:14 +0200 Subject: Don't allow null chars in various strings Various places that now reject null chars inside strings - Primitive file operations reject it in filenames. - Primitive environment variable operations reject it in names and values. - os:cmd() reject it in its input. Also '=' characters are rejected by primitive environment variable operations in environment variable names. Documentation has been updated to document null characters in these types of data as invalid. Currently these operations accept null chars at the end of strings, but that will change in the future. --- erts/doc/src/erlang.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 2465f49581..aa24eeedd5 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3683,6 +3683,12 @@ RealSystem = system + MissedSystem {env, Env} +

+ Types:
+   Name = os:env_var_name()
+   Val = os:env_var_value() | false
+   Env = [{Name, Val}] +

Only valid for {spawn, Command}, and {spawn_executable, FileName}. The environment of the started process is extended using @@ -3697,7 +3703,13 @@ RealSystem = system + MissedSystem exception is Val being the atom false (in analogy with os:getenv/1, - which removes the environment variable.

+ which removes the environment variable. +

+

+ For information about encoding requirements, see documentation + of the types for Name and + Val. +

{args, [ string() | binary() ]} -- cgit v1.2.3 From 1143c915c4c29f20d6202c3ec10ebbf04a567c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 12 Oct 2017 20:55:52 +0200 Subject: Document the guarantees provided by get_stacktrace --- erts/doc/src/erlang.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b40aae5d28..d0588fe3c1 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2029,6 +2029,18 @@ helper() -> where the exception occurred or the function was called. +

Developers should rely on stacktrace entries only for + debugging purposes.

+

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.

+

The only exception to this rule is error:undef which + guarantees to include the Module, Function and Arity + of the attempted function as the first stacktrace entry.

+

See also error/1 and error/2.

-- cgit v1.2.3 From 890fb3bc90cdab64506cd4a43ca0a04727b5b7ea Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 16 Oct 2017 17:56:46 +0200 Subject: erts: Add 'used' option to binary_to_term/2 --- erts/doc/src/erlang.xml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 2465f49581..a83ae3eb4b 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -549,9 +549,7 @@ hello Decode an Erlang external term format binary. -

As binary_to_term/1, but takes options that affect decoding - of the binary.

-

Option:

+

As binary_to_term/1, but takes these options:

safe @@ -567,18 +565,31 @@ hello creation of new external function references. None of those resources are garbage collected, so unchecked creation of them can exhaust available memory.

-
-
-

Failure: badarg if safe is specified and unsafe - data is decoded.

-> binary_to_term(<<131,100,0,5,104,101,108,108,111>>, [safe]).
+> binary_to_term(<<131,100,0,5,"hello">>, [safe]).
 ** exception error: bad argument
 > hello.
 hello
-> binary_to_term(<<131,100,0,5,104,101,108,108,111>>, [safe]).
+> binary_to_term(<<131,100,0,5,"hello">>, [safe]).
 hello
 
+ + used + +

Changes the return value to {Term, Used} where Used + is the number of bytes actually read from Binary.

+
+> Input = <<131,100,0,5,"hello","world">>.
+<<131,100,0,5,104,101,108,108,111,119,111,114,108,100>>
+> {Term, Used} = binary_to_term(Input, [used]).
+{hello, 9}
+> split_binary(Input, Used).
+{<<131,100,0,5,104,101,108,108,111>>, <<"world">>}
+
+
+ +

Failure: badarg if safe is specified and unsafe + data is decoded.

See also term_to_binary/1, -- cgit v1.2.3 From ecfa7567476ccf38c7987f0ee0eaa5987c9695f5 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 25 Oct 2017 08:08:01 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 14103cca28..2507451533 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,29 @@

This document describes the changes made to the ERTS application.

+
Erts 9.1.3 + +
Fixed Bugs and Malfunctions + + +

Added zlib:set_controlling_process/2 to move a + zstream() between processes.

+

+ Own Id: OTP-14672 Aux Id: ERL-494

+
+ +

+ Fix so that schedulers are bound correctly when the first + available cpu is not the first detected cpu. e.g. when + using "taskset -c X..Y" when X is not equal to 0.

+

+ Own Id: OTP-14694

+
+
+
+ +
+
Erts 9.1.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 561a504deaf0c8ebfc0b769b614561151369ed03 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 27 Oct 2017 12:48:04 +0200 Subject: erts: Improve some links in erlang(3) Use the "anchor" attribute to improve placement of anchors in conjunction with the "clause_i" attribute. --- erts/doc/src/erlang.xml | 128 +++++++++++++++++++++++++++--------------------- 1 file changed, 72 insertions(+), 56 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d0588fe3c1..da02a8592e 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4730,11 +4730,11 @@ RealSystem = system + MissedSystem - + Set process flag min_heap_size for the calling process. -

Changes the minimum heap size for the calling process.

Returns the old value of the flag.

@@ -4752,12 +4752,12 @@ RealSystem = system + MissedSystem
- + Set process flag max_heap_size for the calling process. -

This flag sets the maximum heap size for the calling process. If MaxHeapSize is an integer, the system default values for kill and error_logger are used. @@ -4826,12 +4826,12 @@ RealSystem = system + MissedSystem - + Set process flag message_queue_data for the calling process. -

This flag determines how messages in the message queue are stored, as follows:

@@ -4868,11 +4868,12 @@ RealSystem = system + MissedSystem
- + Set process flag priority for the calling process. -

+

Sets the process priority. Level is an atom. Four priority levels exist: low, normal, high, and max. Default @@ -6347,10 +6348,10 @@ true - + Information about active processes and ports. -

Returns the same as statistics(active_tasks_all) @@ -6362,10 +6363,10 @@ true - + Information about active processes and ports. -

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 @@ -6413,10 +6414,10 @@ true - + Information about exact reductions. -

Returns the number of exact reductions.

statistics(exact_reductions) is @@ -6451,10 +6452,10 @@ true - + Information about microstate accounting. -

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 @@ -6594,10 +6595,10 @@ lists:map( - + Information about reductions. -

Returns information about reductions, for example:

 > statistics(reductions).
@@ -6613,9 +6614,10 @@ lists:map(
     
 
     
-      
+      
       Information about the run-queues.
-      
+      
         

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 @@ -6629,9 +6631,10 @@ lists:map( - + Information about the run-queue lengths. - +

Returns the same as statistics(run_queue_lengths_all) @@ -6643,9 +6646,10 @@ lists:map( - + Information about the run-queue lengths. - +

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 @@ -6703,10 +6707,10 @@ lists:map( - + Information about each schedulers work time. -

Returns a list of tuples with {SchedulerId, ActiveTime, TotalTime}, where @@ -6824,10 +6828,10 @@ ok - + Information about each schedulers work time. -

The same as statistics(scheduler_wall_time), except that it also include information about all dirty I/O @@ -6849,9 +6853,10 @@ ok - + Information about active processes and ports. - +

The same as calling lists:sum(statistics(active_tasks)), but more efficient.

@@ -6859,9 +6864,10 @@ ok
- + Information about active processes and ports. - +

The same as calling lists:sum(statistics(active_tasks_all)), but more efficient.

@@ -6869,9 +6875,10 @@ ok
- + Information about the run-queue lengths. - +

The same as calling lists:sum(statistics(run_queue_lengths)), but more efficient.

@@ -6879,9 +6886,10 @@ ok
- + Information about the run-queue lengths. - +

The same as calling lists:sum(statistics(run_queue_lengths_all)), but more efficient.

@@ -7029,7 +7037,8 @@ ok
- + Set system flag cpu_topology. @@ -7038,7 +7047,7 @@ ok -

+

This argument is deprecated. Instead of using this argument, use command-line argument +sct in @@ -7076,10 +7085,11 @@ ok - + Set system_flag_dirty_cpu_schedulers_online. -

+

Sets the number of dirty CPU schedulers online. Range is , where N is the smallest of the return values of @@ -7123,10 +7133,11 @@ ok - + Set system flag microstate_accounting. -

+

Turns on/off microstate accounting measurements. When passing reset, all counters are reset to 0.

For more information see @@ -7168,11 +7179,11 @@ ok - + Set system flag max_heap_size. -

Sets the default maximum heap size settings for processes. The size is specified in words. The new max_heap_size @@ -7186,10 +7197,11 @@ ok - + Set system flag multi_scheduling. -

+

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 @@ -7241,12 +7253,13 @@ ok - + Set system flag scheduler_bind_type. -

+

This argument is deprecated. Instead of using this argument, use command-line argument +sbt in @@ -7367,10 +7380,11 @@ ok - + Set system flag scheduler_wall_time. -

+

Turns on or off scheduler wall time measurements.

For more information, see @@ -7379,10 +7393,11 @@ ok - + Set system flag schedulers_online. -

+

Sets the number of schedulers online. Range is .

@@ -7421,10 +7436,11 @@ ok
- + Finalize the time offset. -

+

Finalizes the time offset when single time warp mode is used. If another time warp mode @@ -7597,7 +7613,8 @@ ok - + Information about the CPU topology of the system. @@ -7625,7 +7642,6 @@ ok -

Returns various information about the CPU topology of the current system (emulator) as specified by Item:

-- cgit v1.2.3 From feb06ff821acbdaee4b44f5e39be6f522353306c Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 27 Oct 2017 12:59:11 +0200 Subject: erts: Correct a link in erlang(3) --- erts/doc/src/erlang.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index da02a8592e..c77f426919 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -7190,7 +7190,7 @@ ok effects only processes spawned efter the change has been made. max_heap_size can be set for individual processes using spawn_opt/2,3,4 or - + process_flag/2.

Returns the old value of the flag.

-- cgit v1.2.3 From 6ef6bbbcb18323b86eb4e654f72d2b1c6bad086f Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 24 Oct 2017 10:46:12 +0200 Subject: Update message queue and pinfo binary docs --- erts/doc/src/erlang.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 2465f49581..9d3ec406b4 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4687,7 +4687,7 @@ RealSystem = system + MissedSystem

The default message_queue_data process flag is determined by command-line argument +hmqd in erl(1).

-

If the process potentially can get many messages, +

If the process potentially can get many messages in its queue, you are advised to set the flag to off_heap. This because a garbage collection with many messages placed on the heap can become extremely expensive and the process can @@ -4960,11 +4960,15 @@ RealSystem = system + MissedSystem {binary, BinInfo}

BinInfo is a list containing miscellaneous - information about binaries currently referred to by this - process. This InfoTuple can be changed or + information about binaries on the heap of this + process. + This InfoTuple can be changed or removed without prior notice. In the current implementation BinInfo is a list of tuples. The tuples contain; BinaryId, BinarySize, BinaryRefcCount.

+

The message queue is on the heap depending on the + process flag + message_queue_data.

{catchlevel, CatchLevel} -- cgit v1.2.3 From 6c25aaa1e447b12dcb640b0e3311a3722b501ddc Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 24 Oct 2017 16:55:33 +0200 Subject: system: Add info to profiling effeciency guide --- erts/doc/src/erlang.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 9d3ec406b4..7e5388b708 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2955,7 +2955,10 @@ os_prompt%

The total amount of memory currently allocated for the emulator that is not directly related to any Erlang process. Memory presented as processes is not - included in this memory.

+ included in this memory. + instrument(3) can be used to + get a more detailed breakdown of what memory is part + of this type.

atom -- cgit v1.2.3 From c4606d0ce55eac7c383520de765cffba2c235ace Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 31 Oct 2017 10:37:39 +0100 Subject: erts: Add term2bin note about encoding guarantee --- erts/doc/src/erlang.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 7e5388b708..b04f2b008e 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -8876,6 +8876,10 @@ hello

See also binary_to_term/1.

+ +

There is no guarantee that this function will return + the same encoded representation for the same term.

+
-- cgit v1.2.3 From cc8dade5326d130f1c704f7a47a4d0ce88af370e Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 23 Oct 2017 13:10:21 +0200 Subject: Refactor xmllint check and make it fail on failure This commit also adds a check to see that all files that are part of an xi:include also have part of XML_FILES and vice versa. It also fixes any applications where this was not true. --- erts/doc/src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index 1f591a5cff..18c5490d7b 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -69,6 +69,7 @@ XML_PART_FILES = \ part.xml XML_CHAPTER_FILES = \ + introduction.xml \ tty.xml \ match_spec.xml \ crash_dump.xml \ @@ -80,8 +81,7 @@ XML_CHAPTER_FILES = \ erl_dist_protocol.xml \ communication.xml \ time_correction.xml \ - notes.xml \ - notes_history.xml + notes.xml TOPDOCDIR=../../../doc -- cgit v1.2.3 From 2ad665902380f1d18d6ad0b175b00b9e66dec77c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 9 Nov 2017 16:15:57 +0100 Subject: Update release notes --- erts/doc/src/notes.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 2507451533..1d309f8f86 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,49 @@

This document describes the changes made to the ERTS application.

+
Erts 9.1.4 + +
Fixed Bugs and Malfunctions + + +

Microstate accounting sometimes produced incorrect + results for dirty schedulers.

+

+ Own Id: OTP-14707

+
+ +

Fixed a regression in zlib:gunzip/1 that + prevented it from working when the decompressed size was + a perfect multiple of 16384. This regression was + introduced in 20.1.1

+

+ Own Id: OTP-14730 Aux Id: ERL-507

+
+ +

Fixed a memory corruption bug in + enif_inspect_iovec; writable binaries stayed + writable after entering the iovec.

+

+ Own Id: OTP-14745

+
+ +

Fixed a crash in enif_inspect_iovec on + encountering empty binaries.

+

+ Own Id: OTP-14750

+
+ +

zlib:deflateParams/3 will no longer return + buf_error when called after zlib:deflate/2 + with zlib 1.2.11.

+

+ Own Id: OTP-14751

+
+
+
+ +
+
Erts 9.1.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 07a38dac41aec3c5b96f7b3df71a761f10ae3e0a Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 15 Nov 2017 14:40:25 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 1b91e5bc58..ac063edd20 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,60 @@

This document describes the changes made to the ERTS application.

+
Erts 7.3.1.4 + +
Fixed Bugs and Malfunctions + + +

+ Fix performance bug in pre-allocators that could cause + them to permanently fall back on normal more expensive + memory allocation. Pre-allocators are used for quick + allocation of short lived meta data used by messages and + other scheduled tasks. Bug exists since OTP_R15B02.

+

+ Own Id: OTP-14491

+
+ +

+ Fixed bug in operator bxor causing erroneuos + result when one operand is a big negative + integer with the lowest N*W bits as zero and the + other operand not larger than N*W bits. N + is an integer of 1 or larger and W is 32 or 64 + depending on word size.

+

+ Own Id: OTP-14514

+
+ +

+ A timer internal bit-field used for storing scheduler id + was too small. As a result, VM internal timer data + structures could become inconsistent when using 1024 + schedulers on the system. Note that systems with less + than 1024 schedulers are not effected by this bug.

+

+ This bug was introduced in ERTS version 7.0 (OTP 18.0).

+

+ Own Id: OTP-14548 Aux Id: OTP-11997, ERL-468

+
+ +

+ Fixed bug in binary_to_term and + binary_to_atom that could cause VM crash. + Typically happens when the last character of an UTF8 + string is in the range 128 to 255, but truncated to only + one byte. Bug exists in binary_to_term since ERTS + version 5.10.2 (OTP_R16B01) and binary_to_atom + since ERTS version 9.0 (OTP-20.0).

+

+ Own Id: OTP-14590 Aux Id: ERL-474

+
+
+
+ +
+
Erts 7.3.1.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 99e6510d22accbcc7ce4e7c198bd6940422eda3f Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 17 Nov 2017 14:19:24 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 1d309f8f86..ce388ba3a8 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,32 @@

This document describes the changes made to the ERTS application.

+
Erts 9.1.5 + +
Fixed Bugs and Malfunctions + + +

Fixed a bug in file closure on Unix; close(2) was + retried on EINTR which could cause a different (recently + opened) file to be closed as well.

+

+ Own Id: OTP-14775

+
+ +

+ A race-condition when tearing down a connection with + active node monitors could cause the runtime system to + crash.

+

+ This bug was introduced in ERTS version 8.0 (OTP 19.0).

+

+ Own Id: OTP-14781 Aux Id: OTP-13047

+
+
+
+ +
+
Erts 9.1.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 9ff9e4cbbeb26b5d420e4552dedbda1820660ed7 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 17 Nov 2017 16:27:40 +0100 Subject: erts: Clarify RUN_ERL_LOG_GENERATIONS --- erts/doc/src/run_erl.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml index a9b6a7e2c6..e4c1b943c4 100644 --- a/erts/doc/src/run_erl.xml +++ b/erts/doc/src/run_erl.xml @@ -181,6 +181,12 @@

Controls the number of log files written before older files are reused. Defaults to 5, minimum is 2, maximum is 1000.

+

Note that, as a way to indicate the newest file, run_erl will + delete the oldest log file to maintain a "hole" in the file + sequences. For example, if log files #1, #2, #4 and #5 exists, that + means #2 is the latest and #4 is the oldest. You will therefore at most + get one less log file than the value set by + RUN_ERL_LOG_GENERATIONS.

RUN_ERL_LOG_MAXSIZE -- cgit v1.2.3 From 3bfbed2e40e1118077d9981c4195c9a94403ed74 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 21 Nov 2017 22:25:41 +0100 Subject: Document enif_realloc --- erts/doc/src/erl_nif.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 419e41693e..88eb6725cb 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2759,6 +2759,18 @@ enif_map_iterator_destroy(env, &iter); + + void * + enif_realloc(void* ptr, size_t size) + Reallocate dynamic memory. + +

Reallocates memory allocated by + enif_alloc to + size bytes.

+

Returns NULL if the reallocation fails.

+
+
+ int enif_realloc_binary(ErlNifBinary* bin, size_t size) -- cgit v1.2.3 From 15aaf359c770d302bef57482c13341646ef275cd Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 22 Nov 2017 22:24:45 +0100 Subject: Document alignment guarantees of enif_alloc and enif_realloc --- erts/doc/src/erl_nif.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 88eb6725cb..ef3cdb89e9 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -952,6 +952,8 @@ typedef struct {

Allocates memory of size bytes.

Returns NULL if the allocation fails.

+

The returned pointer is suitably aligned for any built-in type that + fit in the allocated memory.

@@ -2768,6 +2770,8 @@ enif_map_iterator_destroy(env, &iter); enif_alloc to size bytes.

Returns NULL if the reallocation fails.

+

The returned pointer is suitably aligned for any built-in type that + fit in the allocated memory.

-- cgit v1.2.3 From 8ed0d75c186d9da24bd6cfb85732487b17a3b054 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 23 Nov 2017 15:05:34 +0100 Subject: erts: Fix erlang:monitor toward c-nodes by suppressing DOP_MONITOR_P, DOP_MONITOR_P_EXIT and DOP_DEMONITOR_P if not supported by the remote node. In 17e198d6ee60f7dec9abfed272cf4226aea44535 I changed the behavior of erlang:monitor to not raise badarg for c-nodes but instead create a monitor to only supervise the connection. But I forgot to prevent DOP_MONITOR_P and friends from being sent to the node that does not expect them. Note: We test both DFLAG_DIST_MONITOR and DFLAG_DIST_MONITOR_NAME for the node to support process monitoring. This is because erl_interface is buggy as it sets DFLAG_DIST_MONITOR without really supporting it. ToDo: Should erl_interface stop setting DFLAG_DIST_MONITOR or should we change the meaning of these flags? --- erts/doc/src/erlang.xml | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3b7b9d6a50..d78e75a91d 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3358,25 +3358,6 @@ RealSystem = system + MissedSystem monitored process resides).

-

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 badarg.

- -

The format of the 'DOWN' message changed in ERTS - 5.2 (Erlang/OTP R9B) for monitoring - by registered name. Element Object of - the 'DOWN' message could in earlier versions - sometimes be the process identifier of the monitored process and sometimes - be the registered name. Now element Object 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 'DOWN' messages on - the new format even if they are monitoring processes on old - nodes. Processes on old nodes always get 'DOWN' - messages on the old format.

-
- Monitoring a process @@ -3384,7 +3365,19 @@ RealSystem = system + MissedSystem process identified by Item, which can be a pid() (local or remote), an atom RegisteredName or a tuple {RegisteredName, Node} for a registered process, - located elsewhere.

+ located elsewhere.

+ +

Before ERTS 10.0 (OTP 21.0), monitoring a process could fail with + badarg if the monitored process resided on a primitive node + (such as erl_interface or jinterface), where remote process monitoring + is not implemented.

+

Now, such a call to monitor will instead succeed and a + monitor is created. But the monitor will only supervise the + connection. That is, a {'DOWN', _, process, _, noconnection} is + the only message that may be received, as the primitive node have no + way of reporting the status of the monitored process.

+
+
Monitoring a port -- cgit v1.2.3 From 01f96ee6197a7b5a2c64353a3b38260994ce5ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 16 Nov 2017 06:10:12 +0100 Subject: Add documentation for the new stacktrace syntax --- erts/doc/src/erlang.xml | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index daf3002ec7..d7404fa3ce 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1985,39 +1985,26 @@ true Get the call stack back-trace of the last exception. -

Gets the call stack back-trace (stacktrace) for an - exception that has just been caught - in the calling process as a list of - {Module,Function,Arity,Location} - tuples. Field Arity in the first tuple can be the - argument list of that function call instead of an arity integer, - depending on the exception.

-

If there has not been any exceptions in a process, the - stacktrace is []. After a code change for the process, - the stacktrace can also be reset to [].

-

erlang:get_stacktrace/0 is only guaranteed to return - a stacktrace if called (directly or indirectly) from within the - scope of a try expression. That is, the following call works:

+

erlang:get_stacktrace/0 is deprecated and will stop working + in a future release.

+

Instead of using erlang:get_stacktrace/0 to retrieve + the call stack back-trace, use the following syntax:

 try Expr
 catch
-  C:R ->
-   {C,R,erlang:get_stacktrace()}
+  Class:Reason:Stacktrace ->
+   {Class,Reason,Stacktrace}
 end
-

As does this call:

-
-try Expr
-catch
-  C:R ->
-   {C,R,helper()}
-end
-
-helper() ->
-  erlang:get_stacktrace().
- -

In a future release, - erlang:get_stacktrace/0 will return [] if called - from outside a try expression.

+

erlang:get_stacktrace/0 retrieves the call stack back-trace + (stacktrace) for an exception that has just been + caught in the calling process as a list of + {Module,Function,Arity,Location} + tuples. Field Arity in the first tuple can + be the argument list of that function call instead of an arity + integer, depending on the exception.

+

If there has not been any exceptions in a process, the + stacktrace is []. After a code change for the process, + the stacktrace can also be reset to [].

The stacktrace is the same data as operator catch returns, for example:

-- 
cgit v1.2.3


From 5036bf7d5006a6f1a4294b4a3b1f4120d39113ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= 
Date: Tue, 7 Nov 2017 09:31:24 +0100
Subject: Add enif_ioq_peek_head

This introduces a way to retrieve erlang terms from NIF IO queues
without having to resort to copying.

OTP-14797
---
 erts/doc/src/erl_nif.xml | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

(limited to 'erts/doc')

diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index ef3cdb89e9..23f0c66429 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -367,6 +367,8 @@ return term;
             enif_ioq_deq()
             
             enif_ioq_peek()
+            
+            enif_ioq_peek_head()
             
             enif_inspect_iovec()
             
@@ -1683,8 +1685,7 @@ enif_inspect_iovec(env, max_elements, term, &tail, &iovec);
       Peek inside the IO Queue
       
         

Get the I/O queue as a pointer to an array of SysIOVecs. - It also returns the number of elements in iovlen. - This is the only way to get data out of the queue.

+ It also returns the number of elements in iovlen.

Nothing is removed from the queue by this function, that must be done with enif_ioq_deq.

The returned array is suitable to use with the Unix system @@ -1692,6 +1693,21 @@ enif_inspect_iovec(env, max_elements, term, &tail, &iovec); + + int + enif_ioq_peek_head(ErlNifEnv *env, ErlNifIOQueue *q, size_t *size, ERL_NIF_TERM *bin_term) + Peek the head of the IO Queue. + +

Get the head of the IO Queue as a binary term.

+

If size is not NULL, the size of the head is placed + there.

+

Nothing is removed from the queue by this function, that must be done + with enif_ioq_deq.

+

Returns true on success, or false if the queue is + empty.

+
+ + size_t enif_ioq_size(ErlNifIOQueue *q) -- cgit v1.2.3 From d455cf67203c29354ff792ea44aea09e7a2155f8 Mon Sep 17 00:00:00 2001 From: Tony Rogvall Date: Wed, 6 Dec 2017 02:28:29 +0100 Subject: Add -MMD option to erlc The compile option makedep_side_effect, erlc -MMD, instructs the compiler to emit dependencies and continue to compile as normal. --- erts/doc/src/erlc.xml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml index 7355be488b..2214b76a51 100644 --- a/erts/doc/src/erlc.xml +++ b/erts/doc/src/erlc.xml @@ -143,6 +143,14 @@

Produces a Makefile rule to track header dependencies. The rule is sent to stdout. No object file is produced.

+ + -MMD + +

Generate dependencies as a side-effect. The object file + will be produced as normal. This option overrides the + option .

+
+ -MF <Makefile>

As option , except that the -- cgit v1.2.3 From 47198f179ab14cf8cfcdab0d976650cd1519b236 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 8 Dec 2017 10:57:50 +0100 Subject: Update release notes --- erts/doc/src/notes.xml | 137 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 91eabb5607..39dd90b8a0 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,143 @@

This document describes the changes made to the ERTS application.

+
Erts 9.2 + +
Fixed Bugs and Malfunctions + + +

+ Fix a bug in tracing where the {caller} match spec + function would be set to undefined incorrectly when used + in conjunction with return_to or return_trace on some + functions.

+

+ The functions effected are: erlang:put/2, erlang:erase/1, + erlang:process_info/1,2, erlang:nif_load/2, + erts_internal:garbage_collection/1 and + erts_internal:check_process_code/1.

+

+ Because of this bug, the analysis done by fprof could + become incorrect when the functions above are the + tail-call in a function.

+

+ Own Id: OTP-14677

+
+ +

+ Fix emulator deadlock that would happen if + trap_exit was set to true and a process sends an + exit signal to itself using exit(self(), Reason) + while receive tracing was enabled for that process.

+

+ Own Id: OTP-14678 Aux Id: ERL-495

+
+ +

Writing of crash dumps is significantly faster.

+

Maps are now included in crash dumps.

+

Constants terms would only be shown in one process, + while other processes referencing the same constant term + would show a marker for incomplete heap.

+

+ Own Id: OTP-14685 Aux Id: OTP-14611, OTP-14603, OTP-14595

+
+ +

+ The fallback home directory for windows has been changed + to be the PROFILE directory instead of the WINDOWS + directory. The fallback is used when the environment + variables HOMEDRIVE and HOMEPATH have not been set.

+

+ Own Id: OTP-14691

+
+ +

+ Fix bug for hipe compiled code using + <<X/utf32>> binary construction that + could cause faulty result or even VM crash.

+

+ On architectures other than x86_64, code need to be + recompiled to benefit from this fix.

+

+ Own Id: OTP-14740

+
+ +

+ Fixed bug in erlang:garbage_collect/2 and + erlang:check_process_code/3, when called with + option {async,ReqestId}. Could cause VM crash or + heap corruption if RequestId was an immediate term + (like a pid, atom or small integer). Bug exists since + OTP-17.0.

+

+ Own Id: OTP-14752

+
+ +

ERL_NIF_MINOR_VERSION wasn't bumped with the addition + of enif_ioq_*.

+

+ Own Id: OTP-14779

+
+ +

Purging of loaded code that contained "fake literals" + (for example the magic reference obtained from + 'ets:new/2') would crash the runtime system. + Corrected.

+

+ Own Id: OTP-14791

+
+ +

Setting the size of the atom table to a number near + 2147483647 (using the '+t' option) would cause the + emulator to exit with a failure to allocate a huge amount + of memory. This has been corrected. Also the usage + message for the '+t' option has been corrected to + show the correct upper limit 2147483647 instead of 0.

+

+ Own Id: OTP-14796

+
+ +

Fixed a bug that prevented registered process names + from being resolved in lcnt results.

+

+ Own Id: OTP-14803

+
+ +

Formatting bugs were fixed in several HiPE debug + BIFs.

+

+ Own Id: OTP-14804

+
+
+
+ + +
Improvements and New Features + + +

Binaries and some other data in crash dumps are now + encoded in base64 (instead of in hex), which will reduce + the size of crash dumps.

+

A few bugs in the handling of sub binaries in + crashdump_viewer have been fixed.

+

+ Own Id: OTP-14686

+
+ +

+ Micro optimization for send operations of messages to + other nodes. The local ack-message, which is otherwise + sent back from TPC/IP port driver to sending client + process, is now ignored earlier for distributed send + operations.

+

+ Own Id: OTP-14689

+
+
+
+ +
+
Erts 9.1.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b8dc58da77e4ccf3eb8c30c77b3924e27f89c6e4 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 15 Dec 2017 16:03:50 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index e1c8dbb501..2f2a527176 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,32 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.5.4 + +
Fixed Bugs and Malfunctions + + +

Fixed a bug in file closure on Unix; close(2) was + retried on EINTR which could cause a different (recently + opened) file to be closed as well.

+

+ Own Id: OTP-14775

+
+ +

+ A race-condition when tearing down a connection with + active node monitors could cause the runtime system to + crash.

+

+ This bug was introduced in ERTS version 8.0 (OTP 19.0).

+

+ Own Id: OTP-14781 Aux Id: OTP-13047

+
+
+
+ +
+
Erts 8.3.5.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 185a0cdc2d0f72d64768dc6dd5465ad6fe561028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Tue, 5 Dec 2017 10:27:51 +0100 Subject: Document that os:putenv/2 and putenv(3) modify different environments This is *ONLY* relevant for drivers/NIFs, so it's probably counter- productive to document it elsewhere. --- erts/doc/src/erl_driver.xml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index ca9d458e1e..c790872fe4 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -2304,8 +2304,13 @@ r = driver_async(myPort, &myKey, myData, myFunc); ]]> buffer is too small, a value > 0 is returned and *value_size has been set to the buffer size needed.

-

Do not use libc's getenv or similar C library - interfaces from a driver.

+

This function reads the emulated environment used by + os:getenv/1 and not + the environment used by libc's getenv(3) or similar. Drivers + that require that these are in sync will need to do so + themselves, but keep in mind that they are segregated for a reason; + getenv(3) and its friends are not thread-safe and + may cause unrelated code to misbehave or crash the emulator.

This function is thread-safe.

@@ -2650,8 +2655,13 @@ erl_drv_output_term(driver_mk_port(drvport), spec, sizeof(spec) / sizeof(spec[0] environment variable is removed.

-

Do not use libc's putenv or similar C library - interfaces from a driver.

+

This function modifies the emulated environment used by + os:putenv/2 and not + the environment used by libc's putenv(3) or similar. Drivers + that require that these are in sync will need to do so + themselves, but keep in mind that they are segregated for a reason; + putenv(3) and its friends are not thread-safe and + may cause unrelated code to misbehave or crash the emulator.

This function is thread-safe.

-- cgit v1.2.3 From 8171c997f02e8b54b3f238d5652345fe6d77523b Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 15 Dec 2017 15:44:50 +0100 Subject: stdlib: Improve erl_eval's stacktraces The call "erlang:get_stacktrace()" is not handled explicitly. If there are issues, they can probably be ignored since erlang:get_stacktrace/1 will be deprecated and removed. --- erts/doc/src/erlang.xml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index d7404fa3ce..1b04690239 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -1444,11 +1444,14 @@ b
the process to terminate, it has no return value. Example:

 > catch error(foobar).
-{'EXIT',{foobar,[{erl_eval,do_apply,5},
-                 {erl_eval,expr,5},
-                 {shell,exprs,6},
-                 {shell,eval_exprs,6},
-                 {shell,eval_loop,3}]}}
+{'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}]}]}} +
-- cgit v1.2.3 From 5813c5984488835177e898e65f9987af80b78701 Mon Sep 17 00:00:00 2001 From: Konstantinos Kallas Date: Wed, 17 Jan 2018 11:57:15 +0200 Subject: Fix a broken erlang:trace/3 link in doc --- erts/doc/src/erlang.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b04f2b008e..69af7430f1 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -8799,7 +8799,7 @@ ok erlang:now(). This is also the default if no time stamp flag is specified. If cpu_timestamp has been enabled through - erlang:trace/3, + erlang:trace/3, this also effects the time stamp produced in profiling messages when flag timestamp is enabled.

-- cgit v1.2.3 From 2ab931cec15917e1297aafce350439c8daa7a726 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 23 Jan 2018 11:47:58 +0100 Subject: Reword docs related to the runtime system mode The existing wording may be interpreted as saying that embedded mode eager loads all modules. This revision makes clear embedded mode only disables module auto loading. Since I was on it, I have reordered a couple of places to describe interactive first, and then embedded. It feels natural to cover first the default and positive mode (auto loads), and then its negation. --- erts/doc/src/erl.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index bd824b3405..99f0421080 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -360,11 +360,12 @@ -

Indicates if the system is to load code dynamically - (), or if all code is to be loaded - during system initialization (); see - code(3). - Defaults to .

+

Modules are auto loaded when they are first referenced if the + runtime system runs in mode, which is + the default. In mode modules are not auto + loaded. The latter is recommended when the boot script preloads all + modules, as conventionally happens in OTP releases. See + code(3)

.
@@ -1693,4 +1694,3 @@ code:load_abs("..../user_default"). ]]> make(3)

- -- cgit v1.2.3 From e2848c09db25b356fdddc4f5f9dd4da6e6cfb6ec Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 5 Feb 2018 16:31:12 +0100 Subject: erts: Update abstract format doc with stacktrace variable --- erts/doc/src/absform.xml | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index e49c8c32e9..2ada903edb 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -4,7 +4,7 @@
- 20012017 + 20012018 Ericsson AB. All Rights Reserved. @@ -614,26 +614,58 @@

If C is a catch clause P -> B, where P is a pattern and B is a body, then - Rep(C) = {clause,LINE,[Rep({throw,P,_})],[],Rep(B)}.

+ Rep(C) = {clause,LINE,[Rep({throw,P,_})],[],Rep(B)}, + that is, a catch clause with an explicit exception class + throw and with or without an explicit stacktrace + variable _ cannot be distinguished from a catch clause + without an explicit exception class and without an explicit + stacktrace variable.

If C is a catch clause X : P -> B, where X is an atomic literal or a variable pattern, P is a pattern, and B is a body, then - Rep(C) = {clause,LINE,[Rep({X,P,_})],[],Rep(B)}.

+ Rep(C) = {clause,LINE,[Rep({X,P,_})],[],Rep(B)}, + that is, a catch clause with an explicit exception class and + with an explicit stacktrace variable _ cannot be + distinguished from a catch clause with an explicit exception + class and without an explicit stacktrace variable.

+
+ +

If C is a catch clause X : P : S -> B, + where X is an atomic literal or a variable pattern, + P is a pattern, S is a variable, and B + is a body, then + Rep(C) = {clause,LINE,[Rep({X,P,S})],[],Rep(B)}.

If C is a catch clause P when Gs -> B, where P is a pattern, Gs is a guard sequence, and B is a body, then - Rep(C) = {clause,LINE,[Rep({throw,P,_})],Rep(Gs),Rep(B)}.

+ Rep(C) = {clause,LINE,[Rep({throw,P,_})],Rep(Gs),Rep(B)}, + that is, a catch clause with an explicit exception class + throw and with or without an explicit stacktrace + variable _ cannot be distinguished from a catch clause + without an explicit exception class and without an explicit + stacktrace variable.

If C is a catch clause X : P when Gs -> B, where X is an atomic literal or a variable pattern, P is a pattern, Gs is a guard sequence, and B is a body, then - Rep(C) = {clause,LINE,[Rep({X,P,_})],Rep(Gs),Rep(B)}.

+ Rep(C) = {clause,LINE,[Rep({X,P,_})],Rep(Gs),Rep(B)}, + that is, a catch clause with an explicit exception class and + with an explicit stacktrace variable _ cannot be + distinguished from a catch clause with an explicit exception + class and without an explicit stacktrace variable.

+
+ +

If C is a catch clause X : P : S when Gs -> B, + where X is an atomic literal or a variable pattern, + P is a pattern, Gs is a guard sequence, + S is a variable, and B is a body, then + Rep(C) = {clause,LINE,[Rep({X,P,S})],Rep(Gs),Rep(B)}.

If C is a function clause ( Ps ) -> B, -- cgit v1.2.3 From 443b2e0fabe9dfbe78d7fe857b29e74f7533da39 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 23 Jan 2018 22:26:44 +0100 Subject: erts: Add migration options "acnl" and "acfml" acnl: Abandon Carrier Nr Limit acfml: Abandon Carrier Free block Min Limit --- erts/doc/src/erts_alloc.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 8ab35851c1..0d2b89ae42 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -478,6 +478,28 @@ allocators based on the alloc_util framework, except temp_alloc (which would be pointless).

+ + acfml ]]> + + +

Abandon carrier free block min limit. A valid ]]> + is a positive integer representing a block size limit. The largest + free block in a carrier must be at least bytes large, for the + carrier to be abandoned. The default is zero but can be changed + in the future.

+

See also acul.

+
+ + acnl ]]> + + +

Abandon carrier number limit. A valid ]]> + is a positive integer representing max number of abandoned carriers per + allocator instance. Defaults to 1000 which will practically disable + the limit, but this can be changed in the future.

+

See also acul.

+
+ as bf|aobf|aoff|aoffcbf|aoffcaobf|gf|af]]> -- cgit v1.2.3 From defd43985282606e841e2bcb29ad7414080d5a80 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 26 Jan 2018 18:42:32 +0100 Subject: erts: Add age order first fit allocator strategies ageffcaoff: Age First Fit Carrier, Address Order First Fit (within carrier) ageffcbf : Age First Fit Carrier, Best Fit (within carrier) ageffcaobf: Age First Fit Carrier, Address Order Best Fit (within carrier) Prefer old carriers, the older the better. --- erts/doc/src/erts_alloc.xml | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 0d2b89ae42..4b43836742 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -225,6 +225,33 @@ used. The time complexity is proportional to log N, where N is the number of free blocks.

+ Age order first fit carrier address order first fit + +

Strategy: Find the oldest carrier that + can satisfy the requested block size, then find a block within + that carrier using the "address order first fit" strategy.

+

Implementation: A balanced binary search tree is + used. The time complexity is proportional to log N, where + N is the number of free blocks.

+
+ Age order first fit carrier best fit + +

Strategy: Find the oldest carrier that + can satisfy the requested block size, then find a block within + that carrier using the "best fit" strategy.

+

Implementation: Balanced binary search trees are + used. The time complexity is proportional to log N, where + N is the number of free blocks.

+
+ Age order first fit carrier address order best fit + +

Strategy: Find the oldest carrier that + can satisfy the requested block size, then find a block within + that carrier using the "address order best fit" strategy.

+

Implementation: Balanced binary search trees are + used. The time complexity is proportional to log N, where + N is the number of free blocks.

+
Good fit

Strategy: Try to find the best fit, but settle for the best fit @@ -467,7 +494,8 @@ fetched, it will function as an ordinary carrier. This feature has special requirements on the allocation strategy used. Only - the strategies aoff, aoffcbf, and aoffcaobf + the strategies aoff, aoffcbf, aoffcaobf, + ageffcaoffm, ageffcbf and ageffcaobf support abandoned carriers.

This feature also requires multiple thread specific instances @@ -501,7 +529,7 @@ - as bf|aobf|aoff|aoffcbf|aoffcaobf|gf|af]]> + as bf|aobf|aoff|aoffcbf|aoffcaobf|ageffcaoff|ageffcbf|ageffcaobf|gf|af]]>

Allocation strategy. The following strategies are valid:

@@ -512,6 +540,11 @@
aoffcaobf (address order first fit carrier address order best fit) + ageffcaoff (age order first fit carrier address order first fit) + ageffcbf (age order first fit carrier best fit) + + ageffcaobf (age order first fit carrier address + order best fit) gf (good fit) af (a fit) -- cgit v1.2.3 From d1e89f8df4be7197fdab36a3e1662183a7dfe6ae Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 25 Jan 2018 19:05:50 +0100 Subject: erts: Add system_flags(erts_alloc,"+M?sbct *") to change sbct limit in runtime for chosen allocator type. With great power comes great responsibility. --- erts/doc/src/erlang.xml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 24a091073d..5f3652eeb3 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6707,6 +6707,23 @@ ok + Set system flag for erts_alloc. + +

Sets system flags for + erts_alloc(3). + Alloc is the allocator to affect, for example + binary_alloc. F is the flag to change and + V is the new value.

+

Only a subset of all erts_alloc flags can be changed + at run time. This subset is currently only the flag + sbct.

+

Returns ok if the flag was set or notsup if not + supported by erts_alloc.

+
+
+ + + Set system flag fullsweep_after.

Sets system flag fullsweep_after. @@ -6725,7 +6742,7 @@ ok - + Set system flag microstate_accounting.

@@ -6738,7 +6755,7 @@ ok - + Set system flag min_heap_size.

Sets the default minimum heap size for processes. The size @@ -6753,7 +6770,7 @@ ok - + Set system flag min_bin_vheap_size.

Sets the default minimum binary virtual heap size for @@ -6770,7 +6787,7 @@ ok - + Set system flag max_heap_size. @@ -6788,7 +6805,7 @@ ok - + Set system flag multi_scheduling.

@@ -6843,7 +6860,7 @@ ok - + Set system flag scheduler_bind_type. @@ -6969,7 +6986,7 @@ ok - + Set system flag scheduler_wall_time.

@@ -6981,7 +6998,7 @@ ok - + Set system flag schedulers_online.

@@ -7009,7 +7026,7 @@ ok - + Set system flag trace_control_word.

Sets the value of the node trace control word to @@ -7023,7 +7040,7 @@ ok - + Finalize the time offset.

-- cgit v1.2.3 From e11c649522be8849cc21e364734be62c7783f090 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 12 Feb 2018 13:38:43 +0100 Subject: Update release notes --- erts/doc/src/notes.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 39dd90b8a0..f62788d2d8 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,48 @@

This document describes the changes made to the ERTS application.

+
Erts 9.2.1 + +
Improvements and New Features + + +

+ Improve search algorithm of abandoned memory carriers. + Instead of limited linear search, each allocator instance + maintain a balanced search tree of all its abandoned + carriers for faster and more exhaustive search.

+

+ Own Id: OTP-14915 Aux Id: ERIERL-88

+
+ +

+ New erts_alloc command line options +M_acnl and + +M_acfml to limit carrier abandonment.

+

+ Own Id: OTP-14916 Aux Id: ERIERL-88

+
+ +

+ New family of erts_alloc strategies: Age Order + First Fit. Similar to "address order", but instead the + oldest possible carrier is always chosen for allocation.

+

+ Own Id: OTP-14917 Aux Id: ERIERL-88

+
+ +

+ Add possibility to change allocator options at runtime + with system_info(erts_alloc, ...). Only option + sbct (single block carrier threshold) is currently + supported via this interface.

+

+ Own Id: OTP-14918 Aux Id: ERIERL-88

+
+
+
+ +
+
Erts 9.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 9298482871dec324fb757bce52f15474f4525ebe Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 23 Feb 2018 15:15:43 +0100 Subject: erts: Clarify enif_self docs --- erts/doc/src/erl_nif.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index ef3cdb89e9..b9c2e70b57 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -3044,9 +3044,10 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) { Get the pid of the calling process. -

Initializes the pid variable *pid to represent the - calling process.

-

Returns pid.

+

Initializes the ErlNifPid + variable at *pid to represent the calling process.

+

Returns pid if successful, or NULL if caller_env is not + a process-bound environment.

-- cgit v1.2.3 From 165b8455d4bf2e3797008a9ad8496b203d017474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Mon, 19 Feb 2018 19:40:10 +0100 Subject: Suggest using enif_make_new_binary when possible While enif_make_binary will create heap-binaries from ErlNifBinaries when possible now, enif_alloc_binary still allocates a Binary* off-heap which is avoided entirely with enif_make_new_binary. --- erts/doc/src/erl_nif.xml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 23f0c66429..9655fcd994 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -974,6 +974,10 @@ typedef struct { enif_make_binary. An allocated (and owned) ErlNifBinary can be kept between NIF calls.

+

If you do not need to reallocate or keep the data alive across NIF + calls, consider using + enif_make_new_binary instead as it will allocate + small binaries on the process heap when possible.

Returns true on success, or false if allocation fails.

-- cgit v1.2.3 From 3aa27a437b27d2c02357ed28360b67e3005e49d3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 1 Mar 2018 16:10:45 +0100 Subject: erts: Cleanup erlang:system_info docs Attempt to make the system_info docs easier to navigate by grouping items of similar themes together in the documentation. --- erts/doc/src/erlang.xml | 1840 +++++++++++++++++++++++++++-------------------- erts/doc/src/notes.xml | 2 +- 2 files changed, 1056 insertions(+), 786 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 771897ba94..56eaa47af4 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6753,17 +6753,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 - statistics(scheduler_wall_time_all) + + statistics(scheduler_wall_time_all) instead.

Normal schedulers will have scheduler identifiers in the range 1 =< SchedulerId =< - erlang:system_info(schedulers). + + erlang:system_info(schedulers). Dirty CPU schedulers will have scheduler identifiers in the range erlang:system_info(schedulers) < SchedulerId =< erlang:system_info(schedulers) + - erlang:system_info(dirty_cpu_schedulers). + + erlang:system_info(dirty_cpu_schedulers).

The different types of schedulers handle specific types of jobs. Every job is assigned to a specific @@ -6839,13 +6842,16 @@ ok schedulers.

Dirty IO schedulers will have scheduler identifiers in the range - erlang:system_info(schedulers) + + erlang:system_info(schedulers) + - erlang:system_info(dirty_cpu_schedulers) < + + erlang:system_info(dirty_cpu_schedulers) < SchedulerId =< erlang:system_info(schedulers) + erlang:system_info(dirty_cpu_schedulers) + - erlang:system_info(dirty_io_schedulers).

+ + erlang:system_info(dirty_io_schedulers).

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, @@ -7484,11 +7490,144 @@ ok - - - - - + + System info overview. + +

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.

+ + + Memory Allocation + +

+ allocated_areas, + allocator, + alloc_util_allocators, + allocator_sizes, + elib_malloc +

+
+ + CPU Topology + +

+ cpu_topology, + logical_processors, + update_cpu_info +

+
+ + Process Information + +

+ fullsweep_after, + garbage_collection, + heap_sizes, + heap_type, + max_heap_size, + message_queue_data, + min_heap_size, + min_bin_vheap_size, + procs +

+
+ + System Limits + +

+ atom_count, + atom_limit, + ets_limit, + port_count, + port_limit, + process_count, + process_limit +

+
+ + System Time + +

+ end_time, + os_monotonic_time_source, + os_system_time_source, + start_time, + time_correction, + time_offset, + time_warp_mode, + tolerant_timeofday +

+
+ + Scheduler Information + +

+ dirty_cpu_schedulers, + dirty_cpu_schedulers_online, + dirty_io_schedulers, + multi_scheduling, + multi_scheduling_blockers, + normal_multi_scheduling_blockers, + scheduler_bind_type, + scheduler_bindings, + scheduler_id, + schedulers, + smp_support, + threads, + thread_pool_size +

+
+ + Distribution Information + +

+ creation, + delayed_node_table_gc, + dist, + dist_buf_busy_limit, + dist_ctrl +

+
+ + System Information + +

+ build_type, + c_compiler_used, + check_io, + compat_rel, + debug_compiled, + driver_version, + dynamic_trace, + dynamic_trace_probes, + info, + kernel_poll, + loaded, + machine, + modified_timing_level, + nif_version, + otp_release, + port_parallelism, + system_version, + system_architecture, + trace_control_word, + version, + wordsize +

+
+
+ + + + + + + + + + Information about the system allocators. @@ -7497,12 +7636,13 @@ ok -

Returns various information about the allocators of the - current system (emulator) as specified by +

Returns various information about the memory allocators + of the current system (emulator) as specified by Item:

- allocated_areas + + allocated_areas

Returns a list of tuples with information about miscellaneous allocated memory areas.

@@ -7524,9 +7664,9 @@ ok erlang:memory/0,1.

- allocator + + allocator -

Returns {Allocator, Version, Features, Settings, where:

@@ -7559,19 +7699,9 @@ ok erts_alloc(3).

- alloc_util_allocators - - -

Returns a list of the names of all allocators using - the ERTS internal alloc_util framework - as atoms. For more information, see section - The - alloc_util framework - in erts_alloc(3).

-
- {allocator, Alloc} + + {allocator, Alloc} -

Returns information about the specified allocator. As from ERTS 5.6.1, the return value is a list of {instance, InstanceNo, InstanceInfo} tuples, @@ -7616,9 +7746,19 @@ ok values. The first value is the memory pool size and the second value is the used memory size.

- {allocator_sizes, Alloc} + + alloc_util_allocators + +

Returns a list of the names of all allocators using + the ERTS internal alloc_util framework + as atoms. For more information, see section + The + alloc_util framework + in erts_alloc(3).

+
+ + {allocator_sizes, Alloc} -

Returns various size information for the specified allocator. The information returned is a subset of the information returned by @@ -7626,14 +7766,23 @@ ok erlang:system_info({allocator, Alloc}).

+ + elib_malloc + +

This option will be removed in a future release. + The return value will always be false, as the + elib_malloc allocator has been removed.

+
- + anchor="system_info_cpu_topology"/> + + + Information about the CPU topology of the system. @@ -7664,7 +7813,8 @@ ok the current system (emulator) as specified by Item:

- cpu_topology + + cpu_topology

Returns the CpuTopology currently used by the emulator. The CPU topology is used when binding schedulers @@ -7727,31 +7877,89 @@ ok cpu_topology.

+ + logical_processors + +

Returns the detected number of logical processors configured + in the system. The return value is either an integer, or + the atom unknown if the emulator cannot + detect the configured logical processors.

+
+ + logical_processors_available + +

Returns the detected number of logical processors available + to the Erlang runtime system. The return value is either an + integer, or the atom unknown if the emulator + cannot detect the available logical processors. The number + of available logical processors is less than or equal to + the number of + logical processors online.

+
+ + logical_processors_online + +

Returns the detected number of logical processors online on + the system. The return value is either an integer, + or the atom unknown if the emulator cannot + detect logical processors online. The number of logical + processors online is less than or equal to the number of + logical processors + configured.

+
+ + update_cpu_info + +

The runtime system rereads the CPU information available + and updates its internally stored information about the + detected + CPU topology and the number of logical processors + configured, + online, + and + available.

+

If the CPU information has changed since the last time + it was read, the atom changed is returned, otherwise + the atom unchanged. If the CPU information has changed, + you probably want to + adjust the + number of schedulers online. You typically want + to have as many schedulers online as + logical + processors available.

+
- - - - - - + + + + + + + + + Information about the default process heap settings. +

Returns information about the default process heap settings:

- fullsweep_after + + fullsweep_after

Returns {fullsweep_after, integer() >= 0}, which is the fullsweep_after garbage collection setting used by default. For more information, see garbage_collection described below.

- garbage_collection + + garbage_collection

Returns a list describing the default garbage collection settings. A process spawned on the local node by a @@ -7764,7 +7972,30 @@ ok can spawn a process that does not use the default settings.

- max_heap_size + + heap_sizes + +

Returns a list of integers representing valid heap sizes + in words. All Erlang heaps are sized from sizes in this + list.

+
+ + heap_type + +

Returns the heap type used by the current emulator. One + heap type exists:

+ + private + + 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. + + +
+ + max_heap_size

Returns {max_heap_size, MaxHeapSize}, where MaxHeapSize is the current @@ -7792,185 +8023,376 @@ ok process_flag(message_queue_data, MQD).

- min_heap_size + + min_heap_size

Returns {min_heap_size, MinHeapSize}, where MinHeapSize is the current system-wide minimum heap size for spawned processes.

- min_bin_vheap_size + + min_bin_vheap_size

Returns {min_bin_vheap_size, MinBinVHeapSize}, where MinBinVHeapSize is the current system-wide minimum binary virtual heap size for spawned processes.

+ + procs + +

Returns a binary containing a string of process and port + information formatted as in Erlang crash dumps. For more + information, see section + How to interpret the Erlang crash dumps + in the User's Guide.

+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Information about the system. + + + + + + + + Information about various system limits. -

Returns various information about the current system - (emulator) as specified by Item:

+ +

Returns information about the current system + (emulator) limits as specified by Item:

- atom_count + + atom_count -

Returns the number of atoms currently existing at the - local node. The value is given as an integer.

+ local node. The value is given as an integer.

- atom_limit + + atom_limit -

Returns the maximum number of atoms allowed. - This limit can be increased at startup by passing - command-line flag - +t to - erl(1). + This limit can be increased at startup by passing + command-line flag + +t to + erl(1).

- build_type + + ets_limit -

Returns an atom describing the build type of the runtime - system. This is normally the atom opt for optimized. - Other possible return values are debug, purify, - quantify, purecov, gcov, valgrind, - gprof, and lcnt. Possible return values - can be added or removed at any time without prior notice.

-
- c_compiler_used - -

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 undefined - if unknown. The second element is a term describing the - version of the compiler, or undefined if unknown.

+

Returns the maximum number of ETS tables allowed. This + limit can be increased at startup by passing + command-line flag + +e to + erl(1) or by setting environment variable + ERL_MAX_ETS_TABLES before starting the Erlang + runtime system.

- check_io + port_count -

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.

+

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 + length(erlang:ports()), but more efficient.

- compat_rel + + port_limit -

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 - +R in - erl(1).

+

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 + +Q in erl(1).

- cpu_topology + + process_count -

See above.

+

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 + length(processes()), but more efficient.

- creation + + process_limit -

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, 0 is returned.

+

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 +P + in erl(1).

- debug_compiled +
+
+
+ + + + + + + + + + + Information about system time. + + +

Returns information about the current system + (emulator) time as specified by Item:

+ + end_time -

Returns true if the emulator has been - debug-compiled, otherwise false.

+

The last Erlang monotonic + time in native + time unit that + can be represented internally in the current Erlang runtime system + instance. The time between the + start time and + the end time is at least a quarter of a millennium.

- delayed_node_table_gc + + os_monotonic_time_source - -

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 - +zdntgc - to erl(1). For more information, see the documentation of - the command-line flag.

+

Returns a list containing information about the source of + OS + monotonic time that is used by the runtime system.

+

If [] is returned, no OS monotonic time is + available. The list contains two-tuples with Keys + as first element, and Values 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:

+ + {function, Function} +

Function is the name of the function + used. This tuple always exists if OS monotonic time is + available to the runtime system.

+
+ {clock_id, ClockId} +

This tuple only exists if Function + can be used with different clocks. ClockId + corresponds to the clock identifier used when calling + Function.

+
+ {resolution, OsMonotonicTimeResolution} +

Highest possible + + resolution + of current OS monotonic time source as parts per + second. If no resolution information can be retrieved + from the OS, OsMonotonicTimeResolution is + set to the resolution of the time unit of + Functions return value. That is, the actual + resolution can be lower than + OsMonotonicTimeResolution. Notice that + the resolution does not say anything about the + + accuracy or whether the + + precision aligns with the resolution. You do, + however, know that the precision is not better than + OsMonotonicTimeResolution.

+
+ {extended, Extended} +

Extended equals yes if + the range of time values has been extended; + otherwise Extended equals no. The + range must be extended if Function + returns values that wrap fast. This typically + is the case when the return value is a 32-bit value.

+
+ {parallel, Parallel} +

Parallel equals yes if + Function is called in parallel from multiple + threads. If it is not called in parallel, because + calls must be serialized, Parallel equals + no.

+
+ {time, OsMonotonicTime} +

OsMonotonicTime equals current OS + monotonic time in native + time unit.

+
+
- dirty_cpu_schedulers + + os_system_time_source - -

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, - and BIFs that cannot be managed cleanly by the normal - emulator schedulers.

-

The number of dirty CPU scheduler threads is determined - at emulator boot time and cannot be changed after that. - However, the number of dirty CPU scheduler threads online - can be changed at any time. The number of dirty CPU - schedulers can be set at startup by passing - command-line flag - +SDcpu or +

Returns a list containing information about the source of + OS + system time that is used by the runtime system.

+

The list contains two-tuples with Keys + as first element, and Values 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:

+ + {function, Function} +

Function is the name of the funcion used.

+
+ {clock_id, ClockId} +

Exists only if Function + can be used with different clocks. ClockId + corresponds to the clock identifier used when calling + Function.

+
+ {resolution, OsSystemTimeResolution} +

Highest possible + + resolution + of current OS system time source as parts per + second. If no resolution information can be retrieved + from the OS, OsSystemTimeResolution is + set to the resolution of the time unit of + Functions return value. That is, the actual + resolution can be lower than + OsSystemTimeResolution. Notice that + the resolution does not say anything about the + + accuracy or whether the + + precision do align with the resolution. You do, + however, know that the precision is not better than + OsSystemTimeResolution.

+
+ {parallel, Parallel} +

Parallel equals yes if + Function is called in parallel from multiple + threads. If it is not called in parallel, because + calls needs to be serialized, Parallel equals + no.

+
+ {time, OsSystemTime} +

OsSystemTime equals current OS + system time in native + time unit.

+
+
+
+ start_time + +

The Erlang monotonic + time in native + time unit at the + time when current Erlang runtime system instance started.

+

See also + erlang:system_info(end_time).

+
+ + time_correction + +

Returns a boolean value indicating whether + + time correction is enabled or not.

+
+ + time_offset + +

Returns the state of the time offset:

+ + preliminary + +

The time offset is preliminary, and will be changed + and finalized later. The preliminary time offset + is used during the preliminary phase of the + + single time warp mode.

+
+ final + +

The time offset is final. This either because + + no time warp mode is used, or because the time + offset have been finalized when + + single time warp mode is used.

+
+ volatile + +

The time offset is volatile. That is, it can + change at any time. This is because + + multi-time warp mode is used.

+
+
+
+ + time_warp_mode + +

Returns a value identifying the + + time warp mode that is used:

+ + no_time_warp + The + no time warp mode is used. + + single_time_warp + The + single time warp mode is used. + + multi_time_warp + The + multi-time warp mode is used. + + +
+ + tolerant_timeofday + +

Returns whether a pre ERTS 7.0 backwards compatible + compensation for sudden changes of system time is enabled + or disabled. Such compensation is enabled when the + time offset + is final, and + + time correction is enabled.

+
+
+
+
+ + + + + + + + + + + + + + + + Information about system schedulers. + + +

Returns information about schedulers, scheduling and threads in the + current system as specified by Item:

+ + + dirty_cpu_schedulers + +

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, + and BIFs that cannot be managed cleanly by the normal + emulator schedulers.

+

The number of dirty CPU scheduler threads is determined + at emulator boot time and cannot be changed after that. + However, the number of dirty CPU scheduler threads online + can be changed at any time. The number of dirty CPU + schedulers can be set at startup by passing + command-line flag + +SDcpu or +SDPcpu in erl(1).

See also @@ -7989,9 +8411,9 @@ ok erlang:system_flag(schedulers_online, SchedulersOnline).

- dirty_cpu_schedulers_online + + dirty_cpu_schedulers_online -

Returns the number of dirty CPU schedulers online. The return value satisfies , @@ -8013,9 +8435,9 @@ ok erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline).

- dirty_io_schedulers + + dirty_io_schedulers -

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 @@ -8032,685 +8454,540 @@ ok erlang:system_flag(dirty_cpu_schedulers_online, DirtyCPUSchedulersOnline).

- dist + + multi_scheduling -

Returns a binary containing a string of distribution - information formatted as in Erlang crash dumps. For more - information, see section - How to interpret the Erlang crash dumps - in the User's Guide.

+

Returns one of the following:

+ + disabled + +

The emulator has been started with only one scheduler thread.

+
+ blocked + +

The emulator has more than one scheduler thread, + but all scheduler threads except one are blocked. + That is, only one scheduler thread schedules + Erlang processes and executes Erlang code.

+
+ blocked_normal + +

The emulator has more than one scheduler thread, + but all normal scheduler threads except one are + blocked. Notice that dirty schedulers are not + blocked, and can schedule Erlang processes and + execute native code.

+
+ enabled + +

The emulator has more than one scheduler thread, + and no scheduler threads are blocked. That is, + all available scheduler threads schedule + Erlang processes and execute Erlang code.

+
+
+

See also + + erlang:system_flag(multi_scheduling, BlockState), + + erlang:system_info(multi_scheduling_blockers), + + erlang:system_info(normal_multi_scheduling_blockers), + and + erlang:system_info(schedulers).

- dist_buf_busy_limit + + multi_scheduling_blockers - -

Returns the value of the distribution buffer busy limit - in bytes. This limit can be set at startup by passing - command-line flag - +zdbbl - to erl(1).

+

Returns a list of Pids when + multi-scheduling is blocked, otherwise the empty list is + returned. The Pids in the list + represent all the processes currently + blocking multi-scheduling. A Pid occurs + only once in the list, even if the corresponding + process has blocked multiple times.

+

See also + + erlang:system_flag(multi_scheduling, BlockState), + + erlang:system_info(multi_scheduling), + + erlang:system_info(normal_multi_scheduling_blockers), + and + erlang:system_info(schedulers).

- dist_ctrl + + normal_multi_scheduling_blockers -

Returns a list of tuples - {Node, ControllingEntity}, - one entry for each connected remote node. - Node is the node name - and ControllingEntity is the port or process - identifier responsible for the communication to that node. - More specifically, ControllingEntity for - nodes connected through TCP/IP (the normal case) is the socket - used in communication with the specific node.

+

Returns a list of Pids when + normal multi-scheduling is blocked (that is, all normal schedulers + but one is blocked), otherwise the empty list is returned. + The Pids in the list represent all the + processes currently blocking normal multi-scheduling. + A Pid occurs only once in the list, even if + the corresponding process has blocked multiple times.

+

See also + + erlang:system_flag(multi_scheduling, BlockState), + + erlang:system_info(multi_scheduling), + + erlang:system_info(multi_scheduling_blockers), + and + erlang:system_info(schedulers).

- driver_version + + scheduler_bind_type -

Returns a string containing the Erlang driver version - used by the runtime system. It has the form - - "<major ver>.<minor ver>".

+

Returns information about how the user has requested + schedulers to be bound or not bound.

+

Notice that although a user has requested + schedulers to be bound, they can silently have failed + to bind. To inspect the scheduler bindings, call + + erlang:system_info(scheduler_bindings).

+

For more information, see command-line argument + +sbt + in erl(1) and + + erlang:system_info(scheduler_bindings).

- dynamic_trace + + scheduler_bindings -

Returns an atom describing the dynamic trace framework - compiled into the virtual machine. It can be - dtrace, systemtap, or none. For a - commercial or standard build, it is always none. - The other return values indicate a custom configuration - (for example, ./configure --with-dynamic-trace=dtrace). - For more information about dynamic tracing, see - - dyntrace(3) manual page and the - README.dtrace/README.systemtap files in the - Erlang source code top directory.

+

Returns information about the currently used scheduler + bindings.

+

A tuple of a size equal to + + erlang:system_info(schedulers) + is returned. The tuple elements are integers + or the atom unbound. Logical processor identifiers + are represented as integers. The Nth + element of the tuple equals the current binding for + the scheduler with the scheduler identifier equal to + N. For example, if the schedulers are bound, + element(erlang:system_info(scheduler_id), + erlang:system_info(scheduler_bindings)) returns + the identifier of the logical processor that the calling + process is executing on.

+

Notice that only schedulers online can be bound to logical + processors.

+

For more information, see command-line argument + +sbt + in erl(1) and + + erlang:system_info(schedulers_online).

- dynamic_trace_probes + + scheduler_id -

Returns a boolean() indicating if dynamic trace - probes (dtrace or systemtap) are built into - the emulator. This can only be true if the virtual - machine was built for dynamic tracing (that is, - system_info(dynamic_trace) returns - dtrace or systemtap).

+

Returns the scheduler ID (SchedulerId) of the + scheduler thread that the calling process is executing + on. SchedulerId is a positive integer, + where .

+

See also + + erlang:system_info(schedulers).

- end_time + + schedulers -

The last Erlang monotonic - time in native - time unit that - can be represented internally in the current Erlang runtime system - instance. The time between the - start time and - the end time is at least a quarter of a millennium.

+

Returns the number of scheduler threads used by + the emulator. Scheduler threads online schedules Erlang + processes and Erlang ports, and execute Erlang code + and Erlang linked-in driver code.

+

The number of scheduler threads is determined at + emulator boot time and cannot be changed later. + However, the number of schedulers online can + be changed at any time.

+

See also + + erlang:system_flag(schedulers_online, + SchedulersOnline), + + erlang:system_info(schedulers_online), + + erlang:system_info(scheduler_id), + + erlang:system_flag(multi_scheduling, BlockState), + + erlang:system_info(multi_scheduling), + + erlang:system_info(normal_multi_scheduling_blockers) + and + erlang:system_info(multi_scheduling_blockers). +

- elib_malloc + + schedulers_online -

This option will be removed in a future release. - The return value will always be false, as the - elib_malloc allocator has been removed.

+

Returns the number of schedulers online. The scheduler + identifiers of schedulers online satisfy the relationship + .

+

For more information, see + + erlang:system_info(schedulers) and + + erlang:system_flag(schedulers_online, + SchedulersOnline).

- ets_limit + + smp_support -

Returns the maximum number of ETS tables allowed. This - limit can be increased at startup by passing - command-line flag - +e to - erl(1) or by setting environment variable - ERL_MAX_ETS_TABLES before starting the Erlang - runtime system.

+

Returns true.

- heap_sizes + + threads -

Returns a list of integers representing valid heap sizes - in words. All Erlang heaps are sized from sizes in this - list.

+

Returns true.

- heap_type + + thread_pool_size -

Returns the heap type used by the current emulator. One - heap type exists:

- - private - - 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. - - + +

Returns the number of async threads in the async thread + pool used for asynchronous driver calls + ( + erl_driver:driver_async()). + The value is given as an integer.

- info +
+
+
+ + + + + + + + Information about erlang distribution. + + +

Returns information about Erlang Distribution in the + current system as specified by Item:

+ + + creation -

Returns a binary containing a string of miscellaneous - system information formatted as in Erlang crash dumps. - For more information, see section - - How to interpret the Erlang crash dumps - in the User's Guide.

+

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, 0 is returned.

- kernel_poll + + delayed_node_table_gc -

Returns true if the emulator uses some kind of - kernel-poll implementation, otherwise false.

+

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 + +zdntgc + to erl(1). For more information, see the documentation of + the command-line flag.

- loaded + + dist -

Returns a binary containing a string of loaded module +

Returns a binary containing a string of distribution information formatted as in Erlang crash dumps. For more - information, see section - How to interpret the Erlang - crash dumps in the User's Guide.

-
- logical_processors - - -

Returns the detected number of logical processors configured - in the system. The return value is either an integer, or - the atom unknown if the emulator cannot - detect the configured logical processors.

-
- logical_processors_available - - -

Returns the detected number of logical processors available - to the Erlang runtime system. The return value is either an - integer, or the atom unknown if the emulator - cannot detect the available logical processors. The number - of available logical processors is less than or equal to - the number of - logical processors online.

-
- logical_processors_online - - -

Returns the detected number of logical processors online on - the system. The return value is either an integer, - or the atom unknown if the emulator cannot - detect logical processors online. The number of logical - processors online is less than or equal to the number of - logical processors - configured.

-
- machine - -

Returns a string containing the Erlang machine name.

+ information, see section + How to interpret the Erlang crash dumps + in the User's Guide.

- modified_timing_level + + dist_buf_busy_limit -

Returns the modified timing-level (an integer) if - modified timing is enabled, otherwise undefined. - For more information about modified timing, see +

Returns the value of the distribution buffer busy limit + in bytes. This limit can be set at startup by passing command-line flag - +T - in erl(1)

-
- multi_scheduling - - -

Returns one of the following:

- - disabled - -

The emulator has been started with only one scheduler thread.

-
- blocked - -

The emulator has more than one scheduler thread, - but all scheduler threads except one are blocked. - That is, only one scheduler thread schedules - Erlang processes and executes Erlang code.

-
- blocked_normal - -

The emulator has more than one scheduler thread, - but all normal scheduler threads except one are - blocked. Notice that dirty schedulers are not - blocked, and can schedule Erlang processes and - execute native code.

-
- enabled - -

The emulator has more than one scheduler thread, - and no scheduler threads are blocked. That is, - all available scheduler threads schedule - Erlang processes and execute Erlang code.

-
-
-

See also - - erlang:system_flag(multi_scheduling, BlockState), - - erlang:system_info(multi_scheduling_blockers), - - erlang:system_info(normal_multi_scheduling_blockers), - and - erlang:system_info(schedulers).

-
- multi_scheduling_blockers - - -

Returns a list of Pids when - multi-scheduling is blocked, otherwise the empty list is - returned. The Pids in the list - represent all the processes currently - blocking multi-scheduling. A Pid occurs - only once in the list, even if the corresponding - process has blocked multiple times.

-

See also - - erlang:system_flag(multi_scheduling, BlockState), - - erlang:system_info(multi_scheduling), - - erlang:system_info(normal_multi_scheduling_blockers), - and - erlang:system_info(schedulers).

-
- nif_version - -

Returns a string containing the version of the Erlang NIF - interface used by the runtime system. It is on the form - "<major ver>.<minor ver>".

+ +zdbbl + to erl(1).

- normal_multi_scheduling_blockers + + dist_ctrl - -

Returns a list of Pids when - normal multi-scheduling is blocked (that is, all normal schedulers - but one is blocked), otherwise the empty list is returned. - The Pids in the list represent all the - processes currently blocking normal multi-scheduling. - A Pid occurs only once in the list, even if - the corresponding process has blocked multiple times.

-

See also - - erlang:system_flag(multi_scheduling, BlockState), - - erlang:system_info(multi_scheduling), - - erlang:system_info(multi_scheduling_blockers), - and - erlang:system_info(schedulers).

+

Returns a list of tuples + {Node, ControllingEntity}, + one entry for each connected remote node. + Node is the node name + and ControllingEntity is the port or process + identifier responsible for the communication to that node. + More specifically, ControllingEntity for + nodes connected through TCP/IP (the normal case) is the socket + used in communication with the specific node.

- - otp_release +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Information about the system. + + +

Returns various information about the current system + (emulator) as specified by Item:

+ + + build_type - -

Returns a string containing the OTP release number of the - OTP release that the currently executing ERTS application - is part of.

-

As from Erlang/OTP 17, the OTP release number corresponds to - the major OTP version number. No - erlang:system_info() 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 - - System principles in System Documentation.

+

Returns an atom describing the build type of the runtime + system. This is normally the atom opt for optimized. + Other possible return values are debug, purify, + quantify, purecov, gcov, valgrind, + gprof, and lcnt. Possible return values + can be added or removed at any time without prior notice.

- - os_monotonic_time_source + + c_compiler_used -

Returns a list containing information about the source of - OS - monotonic time that is used by the runtime system.

-

If [] is returned, no OS monotonic time is - available. The list contains two-tuples with Keys - as first element, and Values 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:

- - {function, Function} -

Function is the name of the function - used. This tuple always exists if OS monotonic time is - available to the runtime system.

-
- {clock_id, ClockId} -

This tuple only exists if Function - can be used with different clocks. ClockId - corresponds to the clock identifier used when calling - Function.

-
- {resolution, OsMonotonicTimeResolution} -

Highest possible - - resolution - of current OS monotonic time source as parts per - second. If no resolution information can be retrieved - from the OS, OsMonotonicTimeResolution is - set to the resolution of the time unit of - Functions return value. That is, the actual - resolution can be lower than - OsMonotonicTimeResolution. Notice that - the resolution does not say anything about the - - accuracy or whether the - - precision aligns with the resolution. You do, - however, know that the precision is not better than - OsMonotonicTimeResolution.

-
- {extended, Extended} -

Extended equals yes if - the range of time values has been extended; - otherwise Extended equals no. The - range must be extended if Function - returns values that wrap fast. This typically - is the case when the return value is a 32-bit value.

-
- {parallel, Parallel} -

Parallel equals yes if - Function is called in parallel from multiple - threads. If it is not called in parallel, because - calls must be serialized, Parallel equals - no.

-
- {time, OsMonotonicTime} -

OsMonotonicTime equals current OS - monotonic time in native - time unit.

-
-
+

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 undefined + if unknown. The second element is a term describing the + version of the compiler, or undefined if unknown.

- - os_system_time_source + + check_io -

Returns a list containing information about the source of - OS - system time that is used by the runtime system.

-

The list contains two-tuples with Keys - as first element, and Values 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:

- - {function, Function} -

Function is the name of the funcion used.

-
- {clock_id, ClockId} -

Exists only if Function - can be used with different clocks. ClockId - corresponds to the clock identifier used when calling - Function.

-
- {resolution, OsSystemTimeResolution} -

Highest possible - - resolution - of current OS system time source as parts per - second. If no resolution information can be retrieved - from the OS, OsSystemTimeResolution is - set to the resolution of the time unit of - Functions return value. That is, the actual - resolution can be lower than - OsSystemTimeResolution. Notice that - the resolution does not say anything about the - - accuracy or whether the - - precision do align with the resolution. You do, - however, know that the precision is not better than - OsSystemTimeResolution.

-
- {parallel, Parallel} -

Parallel equals yes if - Function is called in parallel from multiple - threads. If it is not called in parallel, because - calls needs to be serialized, Parallel equals - no.

-
- {time, OsSystemTime} -

OsSystemTime equals current OS - system time in native - time unit.

-
-
+

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.

- port_parallelism + + compat_rel - -

Returns the default port parallelism scheduling hint used. - For more information, see command-line argument - +spp - in erl(1).

+

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 + +R in + erl(1).

- port_count + + debug_compiled -

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 - length(erlang:ports()), but more efficient.

+

Returns true if the emulator has been + debug-compiled, otherwise false.

- port_limit + + driver_version - -

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 - +Q in erl(1).

+

Returns a string containing the Erlang driver version + used by the runtime system. It has the form + + "<major ver>.<minor ver>".

- - process_count + + dynamic_trace -

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 - length(processes()), but more efficient.

+

Returns an atom describing the dynamic trace framework + compiled into the virtual machine. It can be + dtrace, systemtap, or none. For a + commercial or standard build, it is always none. + The other return values indicate a custom configuration + (for example, ./configure --with-dynamic-trace=dtrace). + For more information about dynamic tracing, see + + dyntrace(3) manual page and the + README.dtrace/README.systemtap files in the + Erlang source code top directory.

- process_limit + + dynamic_trace_probes - -

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 +P - in erl(1).

+

Returns a boolean() indicating if dynamic trace + probes (dtrace or systemtap) are built into + the emulator. This can only be true if the virtual + machine was built for dynamic tracing (that is, + system_info(dynamic_trace) returns + dtrace or systemtap).

- procs + + info -

Returns a binary containing a string of process and port - information formatted as in Erlang crash dumps. For more - information, see section +

Returns a binary containing a string of miscellaneous + system information formatted as in Erlang crash dumps. + For more information, see section + How to interpret the Erlang crash dumps in the User's Guide.

- scheduler_bind_type + + kernel_poll - -

Returns information about how the user has requested - schedulers to be bound or not bound.

-

Notice that although a user has requested - schedulers to be bound, they can silently have failed - to bind. To inspect the scheduler bindings, call - - erlang:system_info(scheduler_bindings).

-

For more information, see command-line argument - +sbt - in erl(1) and - - erlang:system_info(scheduler_bindings).

+

Returns true if the emulator uses some kind of + kernel-poll implementation, otherwise false.

- scheduler_bindings + + loaded - -

Returns information about the currently used scheduler - bindings.

-

A tuple of a size equal to - - erlang:system_info(schedulers) - is returned. The tuple elements are integers - or the atom unbound. Logical processor identifiers - are represented as integers. The Nth - element of the tuple equals the current binding for - the scheduler with the scheduler identifier equal to - N. For example, if the schedulers are bound, - element(erlang:system_info(scheduler_id), - erlang:system_info(scheduler_bindings)) returns - the identifier of the logical processor that the calling - process is executing on.

-

Notice that only schedulers online can be bound to logical - processors.

-

For more information, see command-line argument - +sbt - in erl(1) and - - erlang:system_info(schedulers_online).

+

Returns a binary containing a string of loaded module + information formatted as in Erlang crash dumps. For more + information, see section + How to interpret the Erlang + crash dumps in the User's Guide.

- scheduler_id + + machine - -

Returns the scheduler ID (SchedulerId) of the - scheduler thread that the calling process is executing - on. SchedulerId is a positive integer, - where .

-

See also - - erlang:system_info(schedulers).

+

Returns a string containing the Erlang machine name.

- schedulers + + modified_timing_level - -

Returns the number of scheduler threads used by - the emulator. Scheduler threads online schedules Erlang - processes and Erlang ports, and execute Erlang code - and Erlang linked-in driver code.

-

The number of scheduler threads is determined at - emulator boot time and cannot be changed later. - However, the number of schedulers online can - be changed at any time.

-

See also - - erlang:system_flag(schedulers_online, - SchedulersOnline), - - erlang:system_info(schedulers_online), - - erlang:system_info(scheduler_id), - - erlang:system_flag(multi_scheduling, BlockState), - - erlang:system_info(multi_scheduling), - - erlang:system_info(normal_multi_scheduling_blockers) - and - erlang:system_info(multi_scheduling_blockers). -

+

Returns the modified timing-level (an integer) if + modified timing is enabled, otherwise undefined. + For more information about modified timing, see + command-line flag + +T + in erl(1)

- schedulers_online + + nif_version - -

Returns the number of schedulers online. The scheduler - identifiers of schedulers online satisfy the relationship - .

-

For more information, see - - erlang:system_info(schedulers) and - - erlang:system_flag(schedulers_online, - SchedulersOnline).

+

Returns a string containing the version of the Erlang NIF + interface used by the runtime system. It is on the form + "<major ver>.<minor ver>".

- smp_support + + otp_release -

Returns true.

+ +

Returns a string containing the OTP release number of the + OTP release that the currently executing ERTS application + is part of.

+

As from Erlang/OTP 17, the OTP release number corresponds to + the major OTP version number. No + erlang:system_info() 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 + + System principles in System Documentation.

- start_time + + port_parallelism -

The Erlang monotonic - time in native - time unit at the - time when current Erlang runtime system instance started.

-

See also - erlang:system_info(end_time).

+

Returns the default port parallelism scheduling hint used. + For more information, see command-line argument + +spp + in erl(1).

- system_version + + system_version

Returns a string containing version number and some important properties, such as the number of schedulers.

- system_architecture + + system_architecture

Returns a string containing the processor and OS architecture the emulator is built for.

- threads - -

Returns true.

-
- thread_pool_size - - -

Returns the number of async threads in the async thread - pool used for asynchronous driver calls - ( - erl_driver:driver_async()). - The value is given as an integer.

-
- time_correction - - -

Returns a boolean value indicating whether - - time correction is enabled or not.

-
- time_offset - - -

Returns the state of the time offset:

- - preliminary - -

The time offset is preliminary, and will be changed - and finalized later. The preliminary time offset - is used during the preliminary phase of the - - single time warp mode.

-
- final - -

The time offset is final. This either because - - no time warp mode is used, or because the time - offset have been finalized when - - single time warp mode is used.

-
- volatile - -

The time offset is volatile. That is, it can - change at any time. This is because - - multi-time warp mode is used.

-
-
-
- - time_warp_mode - -

Returns a value identifying the - - time warp mode that is used:

- - no_time_warp - The - no time warp mode is used. - - single_time_warp - The - single time warp mode is used. - - multi_time_warp - The - multi-time warp mode is used. - - -
- tolerant_timeofday - - -

Returns whether a pre ERTS 7.0 backwards compatible - compensation for sudden changes of system time is enabled - or disabled. Such compensation is enabled when the - time offset - is final, and - - time correction is enabled.

-
- trace_control_word + + trace_control_word

Returns the value of the node trace control word. For more information, see function get_tcw in section Match Specifications in Erlang in the User's Guide.

- update_cpu_info - - -

The runtime system rereads the CPU information available - and updates its internally stored information about the - detected - CPU topology and the number of logical processors - configured, - online, - and - available.

-

If the CPU information has changed since the last time - it was read, the atom changed is returned, otherwise - the atom unchanged. If the CPU information has changed, - you probably want to - adjust the - number of schedulers online. You typically want - to have as many schedulers online as - logical - processors available.

-
- version + + version -

Returns a string containing the version number of the emulator.

- wordsize + + wordsize

Same as {wordsize, internal}.

@@ -8732,13 +9009,6 @@ ok 64-bit architecture, 8 is returned.

- -

Argument scheduler has changed name to - scheduler_id to avoid mix up with argument - schedulers. Argument scheduler was - introduced in ERTS 5.5 and renamed in - ERTS 5.5.1.

-
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 3109da6738..7ef42c2318 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -10964,7 +10964,7 @@ update_cpu_info will make the runtime system reread and update the internally stored CPU information. For more information see the documentation of erlang:system_info(update_cpu_info).

+ marker="erlang#system_info_update_cpu_info">erlang:system_info(update_cpu_info).

The CPU topology is now automatically detected on Windows systems with less than 33 logical processors. The runtime -- cgit v1.2.3 From 7fb3ed7d2731050186eb5224fe8e6050e4909341 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 26 Feb 2018 20:40:51 +0100 Subject: erts,kernel: Add dist_util:strict_order_flags/0 to replace DFLAGS_STRICT_ORDER_DELIVERY and remove that compile time dependency. --- erts/doc/src/alt_dist.xml | 11 +++++------ erts/doc/src/erl_dist_protocol.xml | 7 +++---- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index d3731a5391..92d40d8558 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -782,10 +782,9 @@ DFLAG_DIST_HDR_ATOM_CACHE Do not use atom cache over this connection. - DFLAGS_STRICT_ORDER_DELIVERY - Do not use any features that require strict - order delivery. +

Use function dist_util:strict_order_flags/0 to get all flags + for features that require strict order delivery.

This flag field is optional.

@@ -819,9 +818,9 @@

The data delivery order can be relaxed by disabling features that require strict ordering. This is done by - passing the ?DFLAGS_STRICT_ORDER_DELIVERY - distribution - flags in the + passing the + distribution flags + returned by dist_util:strict_order_flags/0 in the reject_flags field of the #hs_data{} record used when setting up the connection. When relaxed diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml index a78b13aaa4..98a9a76b60 100644 --- a/erts/doc/src/erl_dist_protocol.xml +++ b/erts/doc/src/erl_dist_protocol.xml @@ -849,10 +849,9 @@ DiB == gen_digest(ChA, ICA)?

- There are also a collection of DFLAGs bitwise or:ed - together in the DFLAGS_STRICT_ORDER_DELIVERY macro. - These flags corresponds to features that require strict - ordering of data over distribution channels. + There is also function dist_util:strict_order_flags/0 + returning all flags (bitwise or:ed together) corresponding to features + that require strict ordering of data over distribution channels.

-- cgit v1.2.3 From b0860754c392a591389f5f35ee5458758f6db10f Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 2 Mar 2018 18:49:29 +0100 Subject: erts: Improve send/2 docs with link to ! operator and clarify ugly badarg for unregistered atom argument. --- erts/doc/src/erlang.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 771897ba94..ff0480291b 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -5700,11 +5700,17 @@ true

Sends a message and returns Msg. This - is the same as Dest ! Msg.

+ is the same as using the + send operator: + Dest ! Msg.

Dest can be a remote or local process identifier, a (local) port, a locally registered name, or a tuple {RegName, Node} - for a registered name at another node.

+ for a registered name at another node.

+

The function fails with a badarg run-time error if + Dest is an atom name, but this name is not + registered. This is the only case when send fails for an + unreachable destination Dest (of correct type).

-- cgit v1.2.3 From 8fd6e3353b094aa94e37e257ee20cd5e0e5dddcb Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 30 Jan 2018 22:19:00 +0100 Subject: erts: Remove hipe amd64 code super carrier (exec_mmap) --- erts/doc/src/erts_alloc.xml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 580780e73b..67c9f017ea 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -68,8 +68,7 @@ fixed size data types. exec_alloc Allocator used by the HiPE - application for native executable code on specific architectures - (x86_64). + application for native executable code. std_alloc Allocator used for most memory blocks not allocated through any of the other allocators described above. @@ -667,19 +666,6 @@
-
- Special Flag for exec_alloc - - ]]> - -

exec_alloc super carrier size (in MB). The amount of - virtual address space reserved for native executable code - used by the HiPE application - on specific architectures (x86_64). Defaults to 512.

-
-
-
-
Instrumentation Flags -- cgit v1.2.3 From 07444cf881f6e8bca808a04a7eddd2ed1ac74ce6 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 7 Mar 2018 19:14:25 +0100 Subject: erts: Add enif_fprintf docs --- erts/doc/src/erl_nif.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index f2f380ca4e..9b446615a4 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1235,6 +1235,17 @@ typedef struct { + + intenif_fprintf(FILE *stream, const char *format, ...) + Format strings and Erlang terms. + +

Similar to fprintf but this format string also accepts + "%T", which formats Erlang terms.

+

This function was originally intenden for debugging purpose. It is not + recommended to print very large terms with %T.

+
+
+ voidenif_free(void* ptr) Free dynamic memory. @@ -3136,6 +3147,8 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {

Similar to snprintf but this format string also accepts "%T", which formats Erlang terms.

+

This function was originally intenden for debugging purpose. It is not + recommended to print very large terms with %T.

-- cgit v1.2.3 From 7c7ba7191a3932e737fa81fd0166df1c637d4b31 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Mar 2018 11:01:07 +0100 Subject: Update release notes --- erts/doc/src/notes.xml | 127 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index f62788d2d8..21168eee23 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,133 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3 + +
Fixed Bugs and Malfunctions + + +

+ Fixed a configure test for libz internals + that unintentionally caused various native code in OTP to + link against libz. Under certain circumstances + this caused the build of OTP to fail.

+

+ Own Id: OTP-14840 Aux Id: ERL-529

+
+ +

+ File names containing unicode codepoints larger than 255 + were not correctly encoded in stack traces.

+

+ Own Id: OTP-14847 Aux Id: ERL-544

+
+ +

+ Fix HiPE bug for binary constructs like + <<X/utf8>> which could in rare cases + cause faulty results or VM crash.

+

+ This fix affects both the hipe compiler and + erts runtime in an incompatible way. Old + hipe compiled files need to be recompiled to load and run + properly as native.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14850 Aux Id: PR-1664

+
+ +

+ Fix term_to_binary/2 spec for + minor_version.

+

+ Own Id: OTP-14876 Aux Id: ERL-548

+
+ +

+ Fix bug in erlang:binary_to_integer/2 where invalid + characters were not detected for bases larger then 10. + e.g. binary_to_integer(<<":">>, 16) + would return 3 and not badarg as it should.

+

+ Own Id: OTP-14879

+
+ +

Fixed bug in float_to_list/2 and + float_to_binary/2 with option decimals that + caused a faulty rounding up of the last decimal digit for + about 6% of floats with a fraction part.

+

For example, float_to_list(0.145, + [{decimals,1}]) returned "0.2" instead of + "0.1".

+

+ Own Id: OTP-14890

+
+ +

+ Fix bug causing slow hipe execution in modules loaded + early during boot or loaded by code:atomic_load or + code:finish_loading.

+

+ Own Id: OTP-14891

+
+ +

Fixed a buffer overflow in an internal string + formatting function that could be hit if specifying a + long floating-point format specifier to + erts_sprintf or similar.

+

+ Own Id: OTP-14920

+
+ +

erlang:iolist_to_iovec/1 and + enif_inspect_iovec will no longer fail when + provided with binaries that have been matched-out on a + non-byte boundary.

+

+ Own Id: OTP-14921

+
+ +

iolist_to_binary/1 and + erlang:iolist_to_iovec/1 will now badarg if + supplied with a bitstring (without a list).

+

+ Own Id: OTP-14926

+
+ +

+ Reject loading modules with names containing directory + separators ('/' or '\' on Windows).

+

+ Own Id: OTP-14933 Aux Id: ERL-564, PR-1716

+
+ +

+ Fix potential dead-lock when the tracer process dies + while a the traced process is running on a dirty + scheduler.

+

+ Own Id: OTP-14938

+
+
+
+ + +
Improvements and New Features + + +

+ More crash dump info such as: process binary virtual heap + stats, full info for process causing out-of-mem during + GC, more port related info, and dirty scheduler info.

+

+ Own Id: OTP-14820

+
+
+
+ +
+
Erts 9.2.1
Improvements and New Features -- cgit v1.2.3 From f78c3ee64cd1328a03e4680d893ebfe8e47ac8b4 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Sat, 10 Mar 2018 17:03:03 +0100 Subject: update erlang:process_info/1 docs --- erts/doc/src/erlang.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3ed0f59b7d..08c55d595c 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4881,7 +4881,6 @@ RealSystem = system + MissedSystem initial_call status message_queue_len - messages links dictionary trap_exit -- cgit v1.2.3 From 713e6726102f8d262c538431cdf1ff01177a6d45 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Tue, 13 Mar 2018 14:17:42 +0000 Subject: Fix typos in erl_nif.xml --- erts/doc/src/erl_nif.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index b9c2e70b57..705ce46b75 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -538,7 +538,7 @@ int writeiovec(ErlNifEnv *env, ERL_NIF_TERM term, ERL_NIF_TERM *tail, have to wait for a very long time. Blocking multi-scheduling, that is, calling erlang:system_flag(multi_scheduling, block), can - also take a very long time to complete. This becaue all ongoing + also take a very long time to complete. This is because all ongoing dirty operations on all dirty schedulers must complete before the block operation can complete.

Many operations communicating with a process executing a @@ -588,7 +588,7 @@ int writeiovec(ErlNifEnv *env, ERL_NIF_TERM term, ERL_NIF_TERM *tail, unload is called to release the library. All are described individually below.

The fourth argument NULL is ignored. It - was earlier used for the deprectated reload callback + was earlier used for the deprecated reload callback which is no longer supported since OTP 20.

If compiling a NIF for static inclusion through --enable-static-nifs, you must define STATIC_ERLANG_NIF @@ -2216,7 +2216,7 @@ enif_inspect_iovec(env, max_elements, term, &tail, &iovec); enif_get_resource.

-

A resoure term can be serialized with term_to_binary and later +

A resource term can be serialized with term_to_binary and later be fully recreated if the resource object is still alive when binary_to_term is called. A stale resource term will be returned from binary_to_term if the resource object has @@ -2960,7 +2960,7 @@ enif_map_iterator_destroy(env, &iter);

Argument mode describes the type of events to wait for. It can be ERL_NIF_SELECT_READ, ERL_NIF_SELECT_WRITE or a bitwise OR combination to wait for both. It can also be ERL_NIF_SELECT_STOP - which is described further below. When a read or write event is triggerred, + which is described further below. When a read or write event is triggered, a notification message like this is sent to the process identified by pid:

{select, Obj, Ref, ready_input | ready_output} @@ -3011,7 +3011,7 @@ enif_map_iterator_destroy(env, &iter); The stop callback was scheduled to run on some other thread or later by this thread. -

Returns a negative value if the call failed where the follwing bits can be set:

+

Returns a negative value if the call failed where the following bits can be set:

ERL_NIF_SELECT_INVALID_EVENT Argument event is not a valid OS event object. @@ -3019,9 +3019,9 @@ enif_map_iterator_destroy(env, &iter); The system call failed to add the event object to the poll set. -

Use bitwise AND to test for specific bits in the return vaue. +

Use bitwise AND to test for specific bits in the return value. New significant bits may be added in future releases to give more detailed - information for both failed and successful calls. Do NOT use equallity tests + information for both failed and successful calls. Do NOT use equality tests like ==, as that may cause your application to stop working.

Example:

@@ -3086,7 +3086,7 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) { enif_free_env of cleared for reuse with enif_clear_env.

If msg_env is set to NULL, the msg term is - copied and the original term and its environemt is still valid after + copied and the original term and its environment is still valid after the call.

This function is only thread-safe when the emulator with SMP support is used. It can only be used in a non-SMP emulator from a NIF-calling -- cgit v1.2.3 From 4ec470dedb903e0113416edf3f590b85b1dedc9a Mon Sep 17 00:00:00 2001 From: Vladimir Gordeev Date: Thu, 15 Mar 2018 17:26:47 +0300 Subject: Tracing MatchSpec docs update I was running this code in shell and expected it to take default `self()` meta tracer, and start tracing `erlang:put/2`. ``` F = fun F() -> timer:sleep(5000), erlang:get(unique_field), erlang:put(unique_field, 123), F() end. erlang:trace_pattern({erlang, put, 2}, [{['$1', '_'], [{'==', '$1', unique_field}], []}], [global]). erlang:trace_pattern({erlang, get, 1}, [{['_'], [], [{trace, [], [call, timestamp]}]}], [meta]). Pid = spawn(F). ``` But tracing didn't start: ``` 6> flush(). Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118606,753838}} Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118611,754798}} Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118616,755705}} ok 7> erlang:trace_info(Pid, flags). {flags,[]} ``` Turns out that I had false expectations, that `{trace, _, _}` would enable tracing on that process, inheriting meta tracer process as consumer of trace messages. Instead it tried to take tracer from executing process (which is pointed out in docs). But there was none, so no tracing was started and flags were simply ignored (which is not that obvious from docs). Updated docs to point out that there are cases when flags would be simply ignored, and no tracing would start. --- erts/doc/src/match_spec.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 2a14f1e47b..644b989800 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -405,7 +405,8 @@ .

If a tracer is specified in both lists, the tracer in the enable list takes precedence. If no tracer is specified, the same - tracer as the process executing the match specification is used.

+ tracer as the process executing the match specification is used (not the meta tracer). + If that process doesn't have tracer either, then trace flags are ignored.

When using a tracer module, the module must be loaded before the match specification is executed. If it is not loaded, the match fails.

-- cgit v1.2.3 From f338d0011cbc83e82b4ff2264a7e37f52190828f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Wed, 21 Mar 2018 11:36:25 +0100 Subject: Change default async thread count to 1 All uses of async threads in the built-in drivers have been replaced with dirty IO, so it no longer makes sense to leave the default at 10. --- erts/doc/src/erl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 99f0421080..00dec37590 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -572,7 +572,7 @@

Sets the number of threads in async thread pool. Valid range - is 0-1024. Defaults to 10 if thread support is available.

+ is 0-1024. Defaults to 1.

-- cgit v1.2.3 From 30d5b7ee32d099f2a23c26e873aeb08be1b1d966 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 15 Mar 2018 17:14:39 +0100 Subject: erts: Add enif_*_name functions --- erts/doc/src/erl_nif.xml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 9b446615a4..9d92e87baa 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1103,6 +1103,16 @@ typedef struct { + + char* + enif_cond_name(ErlNifCond* cnd) + + +

Same as + erl_drv_cond_name.

+
+
+ void enif_cond_signal(ErlNifCond *cnd) @@ -2626,6 +2636,16 @@ enif_map_iterator_destroy(env, &iter);
+ + char* + enif_mutex_name(ErlNifMutex* mtx) + + +

Same as + erl_drv_mutex_name.

+
+
+ int enif_mutex_trylock(ErlNifMutex *mtx) @@ -2870,6 +2890,16 @@ enif_map_iterator_destroy(env, &iter); + + char* + enif_rwlock_name(ErlNifRWLock* rwlck) + + +

Same as + erl_drv_rwlock_name.

+
+
+ void enif_rwlock_rlock(ErlNifRWLock *rwlck) @@ -3211,6 +3241,16 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) { + + char* + enif_thread_name(ErlNifTid tid) + Thread name + +

Same as + erl_drv_thread_name.

+
+
+ ErlNifThreadOpts * enif_thread_opts_create(char *name) -- cgit v1.2.3 From e36c103236ac70c29caf910d31651bed6c24dfe8 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 15 Mar 2018 21:02:47 +0100 Subject: erts: Add enif_vfprintf and enif_vsnprintf --- erts/doc/src/erl_nif.xml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 9d92e87baa..1daac88d47 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -875,7 +875,7 @@ typedef enum {

An enumeration of the properties that can be requested from - enif_unique_integer. + enif_make_unique_integer. For default properties, use value 0.

ERL_NIF_UNIQUE_POSITIVE @@ -3367,6 +3367,30 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {
+ + int + enif_vfprintf(FILE *stream, const char *format, va_list ap) + + Format strings and Erlang terms. + +

Equivalent to enif_fprintf + except that its called with a va_list instead of a variable number of + arguments.

+
+
+ + + int + enif_vsnprintf(char *str, size_t size, const char *format, va_list ap) + + Format strings and Erlang terms. + +

Equivalent to enif_snprintf + except that its called with a va_list instead of a variable number of + arguments.

+
+
+ int enif_whereis_pid(ErlNifEnv *env, -- cgit v1.2.3 From 97a5f6c89c7b937e0a1192e02a7dc94f64f558cf Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 16 Mar 2018 17:11:39 +0100 Subject: erts: Add statement about errno to enif_*printf docs --- erts/doc/src/erl_nif.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 1daac88d47..6b9ca971dc 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1252,7 +1252,8 @@ typedef struct {

Similar to fprintf but this format string also accepts "%T", which formats Erlang terms.

This function was originally intenden for debugging purpose. It is not - recommended to print very large terms with %T.

+ recommended to print very large terms with %T. The function may + change errno, even if successful.

@@ -3178,7 +3179,8 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {

Similar to snprintf but this format string also accepts "%T", which formats Erlang terms.

This function was originally intenden for debugging purpose. It is not - recommended to print very large terms with %T.

+ recommended to print very large terms with %T. The function may + change errno, even if successful.

-- cgit v1.2.3 From 0c33c7eb6642adf974fcd2b0426198bd666d28e2 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 16 Mar 2018 20:02:21 +0100 Subject: erts: Remove const from ErlNifResourceDown doc to conform with erl_nif.h --- erts/doc/src/erl_nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 6b9ca971dc..5c7d91b9c2 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -809,7 +809,7 @@ typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj); ErlNifResourceDown -typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, const ErlNifPid* pid, const ErlNifMonitor* mon); +typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, ErlNifPid* pid, ErlNifMonitor* mon);

The function prototype of a resource down function, called on the behalf of enif_monitor_process. obj is the resource, pid -- cgit v1.2.3 From 187564ffccee4a3b5727bdab3df2458f3b5ced72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Tue, 20 Mar 2018 13:28:26 +0100 Subject: Add enif_make_map_from_arrays --- erts/doc/src/erl_nif.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 27b0945c10..cabc07d020 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2184,6 +2184,20 @@ enif_inspect_iovec(env, max_elements, term, &tail, &iovec); + + int + enif_make_map_from_arrays(ErlNifEnv* env, ERL_NIF_TERM keys[], + ERL_NIF_TERM values[], size_t cnt, ERL_NIF_TERM *map_out) + Make map term from the given keys and values. + +

Makes a map term from the given keys and values.

+

If successful, this function sets *map_out to the new map and + returns true. Returns false there are any duplicate + keys.

+

All keys and values must belong to env.

+ + + unsigned char *enif_make_new_binary(ErlNifEnv* env, size_t size, ERL_NIF_TERM* termp) -- cgit v1.2.3 From f278cee87dd7ef929a64b411b4e83c3d7028687a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Fri, 23 Mar 2018 13:15:08 +0100 Subject: Add +sbwt/+swt analogues for dirty schedulers Sharing these settings for all schedulers can degrade performance, so it makes sense to be able to configure them separately. This also changes the default busy-wait time to "short" for both kinds of dirty schedulers. --- erts/doc/src/erl.xml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 00dec37590..5089d4e0ce 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1155,6 +1155,26 @@ without prior notice.

+ + +sbwtdcpu none|very_short|short|medium|long|very_long + +

As +sbwt but affects + dirty CPU schedulers. Defaults to short.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+ + +sbwtdio none|very_short|short|medium|long|very_long + +

As +sbwt but affects + dirty IO schedulers. Defaults to short.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+scl true|false

Enables or disables scheduler compaction of load. By default @@ -1420,6 +1440,26 @@ notice.

+ + +swtdcpu very_low|low|medium|high|very_high + +

As +swt but + affects dirty CPU schedulers. Defaults to medium.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+ + +swtdio very_low|low|medium|high|very_high + +

As +swt but affects + dirty IO schedulers. Defaults to medium.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
-- cgit v1.2.3 From 249da1f79a877e3c79b661a9e520ea8910d14726 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 6 Apr 2018 16:53:18 +0200 Subject: erts: Fix doc typo for enif_free_iovec --- erts/doc/src/erl_nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index cabc07d020..8a9ae58e99 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1292,7 +1292,7 @@ typedef struct { ErlNifIOVec *iovec = NULL; size_t max_elements = 128; ERL_NIF_TERM tail; -if (!enif_inspect_iovec(NULL, max_elements, term, &tail, iovec)) +if (!enif_inspect_iovec(NULL, max_elements, term, &tail, &iovec)) return 0; // Do things with the iovec -- cgit v1.2.3 From 42205c9a8daf7e974331d5df48b061611412e9d9 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 9 Feb 2018 18:16:10 +0100 Subject: Fix erlang:abs/2 type docs --- erts/doc/src/erlang.xml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index c086928bb3..814997b21d 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -204,10 +204,6 @@ Arithmetical absolute value. - - Float = float() - Int = integer() -

Returns an integer or float that is the arithmetical absolute value of Float or -- cgit v1.2.3 From a91f4640bc4554f9a746afa65bacda0e1a60afc0 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 6 Apr 2018 16:40:56 +0200 Subject: erl_docgen: Add ghlink step for all non-generated doc xml files In order to get line numbers into the ghlink we have to add a post processing step for all xml files. --- erts/doc/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index c4f1baf89e..5fa8b0673a 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -155,7 +155,7 @@ clean: rm -f errs core *~ $(SPECDIR)/specs_%.xml: - escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ + $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ -o$(dir $@) -module $(patsubst $(SPECDIR)/specs_%.xml,%,$@) # ---------------------------------------------------- -- cgit v1.2.3 From ec7be0d6f6ccff9aaae0f1bd0461812c898e13e9 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 6 Apr 2018 16:41:11 +0200 Subject: erl_docgen: Add hover links for ghlink All functions, datatype and h3 headings have gotten a hover attribute that shows a link directly to the edit page on github for easy editing of documentation. The github link links to the maint branch. An early attempt was done to use the SHA of the current branch, but that did not work well as github can only take pull requests from branches. --- erts/doc/src/erlang.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 814997b21d..d4d4dd7f31 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -53,14 +53,14 @@ - ext_binary() +

A binary data object, structured according to the Erlang external term format.

- iovec() +

A list of binaries. This datatype is useful to use together with -- cgit v1.2.3 From 957f9ae644ae55a005b032e63e31021690292115 Mon Sep 17 00:00:00 2001 From: Chris Keele Date: Thu, 19 Apr 2018 01:23:36 -0700 Subject: Remove trace-specific terms from docs for table-oriented matchspecs This removes the matchspec instructions `is_seq_trace` and `get_tcw/0` from the documentation for table-oriented matchspecs. This is likely correct as both are already documented under "Functions Allowed Only for Tracing", despite appearing in the list of possible options for table specs. The following observations further back this change up: ```erl erlang:match_spec_test([whatever], [{'_', [], [{is_seq_trace}]}], trace). %=> {ok,true,[],[]} erlang:match_spec_test({whatever}, [{'_', [], [{is_seq_trace}]}], table). %=> {error,[{error,"Special form 'is_seq_trace' used in wrong %dialect."}]} erlang:match_spec_test([whatever], [{'_', [], [{get_tcw}]}], trace). %=> {ok,true,[],[]} erlang:match_spec_test({whatever}, [{'_', [], [{get_tcw}]}], table). %=> {error,[{error,"Function get_tcw/0 cannot be called in this context."}]} ``` --- erts/doc/src/match_spec.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 2a14f1e47b..869991443e 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -169,10 +169,9 @@ | | | | | | - | | - | | - | | - + | | + | | + | ConditionExpression ::= ExprMatchVariable | { GuardFunction } | { GuardFunction, ConditionExpression, ... } | TermConstruct @@ -202,8 +201,7 @@ =']]> | | | | | | - | | - + | MatchBody ::= [ ConditionExpression, ... ] -- cgit v1.2.3 From e8f0e99339ed9c6283915ddce9ec378962bfe380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Fri, 20 Apr 2018 15:53:52 +0200 Subject: Fix seealso tags for +sbwt/+swt --- erts/doc/src/erl.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 5089d4e0ce..74654a295d 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -1158,7 +1158,7 @@ +sbwtdcpu none|very_short|short|medium|long|very_long -

As +sbwt but affects +

As +sbwt but affects dirty CPU schedulers. Defaults to short.

This flag can be removed or changed at any time @@ -1168,7 +1168,7 @@ +sbwtdio none|very_short|short|medium|long|very_long -

As +sbwt but affects +

As +sbwt but affects dirty IO schedulers. Defaults to short.

This flag can be removed or changed at any time @@ -1443,7 +1443,7 @@ +swtdcpu very_low|low|medium|high|very_high -

As +swt but +

As +swt but affects dirty CPU schedulers. Defaults to medium.

This flag can be removed or changed at any time @@ -1453,7 +1453,7 @@ +swtdio very_low|low|medium|high|very_high -

As +swt but affects +

As +swt but affects dirty IO schedulers. Defaults to medium.

This flag can be removed or changed at any time -- cgit v1.2.3 From 573a5abd9d6b1668b49376b489b187780c7125c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Tue, 27 Mar 2018 13:14:40 +0200 Subject: erts: Rewrite memory instrumentation This commit replaces the old memory instrumentation with a new implementation that scans carriers instead of wrapping erts_alloc/erts_free. The old implementation could not extract information without halting the emulator, had considerable runtime overhead, and the memory maps it produced were noisy and lacked critical information. Since the new implementation walks through existing data structures there's no longer a need to start the emulator with special flags to get information about carrier utilization/fragmentation. Memory fragmentation is also easier to diagnose as it's presented on a per-carrier basis which eliminates the need to account for "holes" between mmap segments. To help track allocations, each allocation can now be tagged with what it is and who allocated it at the cost of one extra word per allocation. This is controlled on a per-allocator basis with the +Matags option, and is enabled by default for binary_alloc and driver_alloc (which is also used by NIFs). --- erts/doc/src/erts_alloc.xml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 53e136d76c..0893eb291c 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -559,6 +559,20 @@ than this threshold, otherwise the carrier is shrunk. See also rsbcst.

+ atags true|false]]> + +

Adds a small tag to each allocated block that contains basic + information about what it is and who allocated it. Use the + instrument + module to inspect this information.

+ +

The runtime overhead is one word per allocation when enabled. This + may change at any time in the future.

+ +

The default is true for binary_alloc and + driver_alloc, and false for the other allocator + types.

+
e true|false]]>

Enables allocator ]]>.

@@ -724,22 +738,12 @@
Instrumentation Flags - +Mim true|false - -

A map over current allocations is kept by the emulator. - The allocation map can be retrieved through module - - instrument(3). +Mim true - implies +Mis true. +Mim true is the same as flag - -instr in - erl(1).

-
- +Mis true|false - -

Status over allocated memory is kept by the emulator. - The allocation status can be retrieved through module - - instrument(3).

+ +M<S>atags + +

Adds a small tag to each allocated block that contains basic + information about what it is and who allocated it. See + +M<S>atags for a + more complete description.

+Mit X -- cgit v1.2.3 From ad72c0d37ffb214cac874f51ac29fe2cdb47a2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Muska=C5=82a?= Date: Sat, 3 Feb 2018 15:41:11 +0100 Subject: Introduce map_get guard-safe function Rationale Today all compound data types except for maps can be deconstructed in guards. For tuples we have `element/2` and for lists `hd/1` and `tl/1`. Maps are completely opaque to guards. This means matching on maps can't be abstracted into macros, which is often done with repetitive guards. It also means that maps have to be always selected whole from ETS tables, even when only one field would be enough, which creates a potential efficiency issue. This PR introduces an `erlang:map_get/2` guard-safe function that allows extracting a map field in guard. An alternative to this function would be to introduce the syntax for extracting a value from a map that was planned in the original EEP: `Map#{Key}`. Even outside of guards, since this function is a guard-BIF it is more efficient than using `maps:get/2` (since it does not need to set up the stack), and more convenient from pattern matching on the map (compare: `#{key := Value} = Map, Value` to `map_get(key, Map)`). Performance considerations A common concern against adding this function is the notion that "guards have to be fast" and ideally execute in constant time. While there are some counterexamples (`length/1`), what is more important is the fact that adding those functions does not change in any way the time complexity of pattern matching - it's already possible to match on map fields today directly in patterns - adding this ability to guards will niether slow down or speed up the execution, it will only make certain programs more convenient to write. This first version is very naive and does not perform any optimizations. --- erts/doc/src/erlang.xml | 20 +++++++++++++++++++- erts/doc/src/match_spec.xml | 7 ++++--- 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index c086928bb3..e287db88d3 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2968,6 +2968,25 @@ os_prompt% + + + Extract a value from a map + +

Returns value Value associated with + Key if Map contains + Key.

+

The call fails with a {badmap,Map} exception if + Map is not a map, or with a {badkey,Key} + exception if no value is associated with Key.

+

Example:

+ +> Key = 1337, + Map = #{42 => value_two,1337 => "value one","a" => 1}, + map_get(Key,Map). +"value one" +
+
+ Return the size of a map. @@ -11003,4 +11022,3 @@ true - diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 644b989800..319e5a030a 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -110,7 +110,8 @@
GuardFunction ::= BoolFunction | | | | - | | + | | + | | | | | | | | @@ -190,7 +191,8 @@ GuardFunction ::= BoolFunction | | | | - | | + | | + | | | | | | | | @@ -867,4 +869,3 @@ can be useful for testing complicated ETS matches.

- -- cgit v1.2.3 From e77aaa6f6c7495dd0d763200535ba78430cde8c9 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 24 Apr 2018 16:01:22 +0200 Subject: erts: Correct abstract format doc regarding map creation --- erts/doc/src/absform.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index 2ada903edb..158f4dc4e8 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -407,9 +407,8 @@

If E is a map creation #{A_1, ..., A_k}, - where each A_i is an association E_i_1 => E_i_2 - or E_i_1 := E_i_2, then Rep(E) = - {map,LINE,[Rep(A_1), ..., Rep(A_k)]}. + where each A_i is an association E_i_1 => E_i_2, + then Rep(E) = {map,LINE,[Rep(A_1), ..., Rep(A_k)]}. For Rep(A), see below.

@@ -731,9 +730,8 @@

If Gt is a map creation #{A_1, ..., A_k}, - where each A_i is an association Gt_i_1 => Gt_i_2 - or Gt_i_1 := Gt_i_2, then Rep(Gt) = - {map,LINE,[Rep(A_1), ..., Rep(A_k)]}. + where each A_i is an association Gt_i_1 => Gt_i_2, + then Rep(Gt) = {map,LINE,[Rep(A_1), ..., Rep(A_k)]}. For Rep(A), see above.

-- cgit v1.2.3 From 5d0874a8f9fd617308d9024783db1e4e24268184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Muska=C5=82a?= Date: Fri, 27 Apr 2018 12:40:07 +0200 Subject: Introduce is_map_key/2 guard BIF This complements the `map_get/2` guard BIF introduced in #1784. Rationale. `map_get/2` allows accessing map fields in guards, but it might be problematic in more complex guard expressions, for example: foo(X) when map_get(a, X) =:= 1 or is_list(X) -> ... The `is_list/1` part of the guard could never succeed since the `map_get/2` guard would fail the whole guard expression. In this situation, this could be solved by using `;` instead of `or` to separate the guards, but it is not possible in every case. To solve this situation, this PR proposes a `is_map_key/2` guard that allows to check if a map has key inside a guard before trying to access that key. When combined with `is_map/1` this allows to construct a purely boolean guard expression testing a value of a key in a map. Implementation. Given the use case motivating the introduction of this function, the PR contains compiler optimisations that produce optimial code for the following guard expression: foo(X) when is_map(X) and is_map_key(a, X) and map_get(a, X) =:= 1 -> ok; foo(_) -> error. Given all three tests share the failure label, the `is_map_key/2` and `is_map/2` tests are optimised away. As with `map_get/2` the `is_map_key/2` BIF is allowed in match specs. --- erts/doc/src/erlang.xml | 20 ++++++++++++++++++++ erts/doc/src/match_spec.xml | 23 ++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index f561413fab..3154fdaf8c 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2431,6 +2431,26 @@ os_prompt%
+ + + + +

Returns true if map Map contains + Key and returns false if it does not + contain the Key.

+

The call fails with a {badmap,Map} exception if + Map is not a map.

+

Example:

+ +> Map = #{"42" => value}. +#{"42" => value} +> is_map_key("42",Map). +true +> is_map_key(value,Map). +false +
+
+ Check whether a term is a number. diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 888366b239..46a3daebe8 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -86,12 +86,12 @@ | | | | | | - | | - | | - | | - | | - | | - + | | + | | + | | + | | + | | + | ConditionExpression ::= ExprMatchVariable | { GuardFunction } | { GuardFunction, ConditionExpression, ... } | TermConstruct @@ -168,11 +168,12 @@ | | | | | | - | | - | | - | | - | | - | + | | + | | + | | + | | + | | + ConditionExpression ::= ExprMatchVariable | { GuardFunction } | { GuardFunction, ConditionExpression, ... } | TermConstruct -- cgit v1.2.3 From 202bb737e3deabfebee683266f4b7c42781eb521 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 30 Apr 2018 10:06:42 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 768 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 768 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index fcc7ec5b66..fb33710340 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,774 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0 + +
Fixed Bugs and Malfunctions + + +

+ The type specifications for file:posix/0 and + inet:posix/0 have been updated according to which + errors file and socket operations should be able to + return.

+

+ Own Id: OTP-14019 Aux Id: ERL-550

+
+ +

+ Fix error printout from run_erl and a bug that could + cause unintended fds to be leaked into the started + program.

+

+ Own Id: OTP-14537 Aux Id: PR1529

+
+ +

File operations used to accept filenames + containing null characters (integer value zero). This + caused the name to be truncated and in some cases + arguments to primitive operations to be mixed up. + Filenames containing null characters inside the filename + are now rejected and will cause primitive file + operations to fail.

Also environment variable + operations used to accept names and + values of + environment variables containing null characters (integer + value zero). This caused operations to silently produce + erroneous results. Environment variable names and values + containing null characters inside the name or value are + now rejected and will cause environment variable + operations to fail.

Primitive environment + variable operations also used to accept the $= + character in environment variable names causing various + problems. $= characters in environment variable + names are now also rejected.

Also + os:cmd/1 now + reject null characters inside its command. +

erlang:open_port/2 + will also reject null characters inside the port name + from now on.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14543 Aux Id: ERL-370

+
+ +

+ Fix bugs related to the bookkeeping of microstate + accounting states.

+

+ Own Id: OTP-14652

+
+ +

os:putenv and os:getenv no longer access + the process environment directly and instead work on a + thread-safe emulation. The only observable difference is + that it's not kept in sync with libc + getenv(3) / putenv(3), so those who relied + on that behavior in drivers or NIFs will need to add + manual synchronization.

On Windows this means that + you can no longer resolve DLL dependencies by modifying + the PATH just before loading the driver/NIF. To + make this less of a problem, the emulator now adds the + target DLL's folder to the DLL search path.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14666

+
+ +

Corrected erlang:is_builtin(erlang, M, F) to + return true for apply/2 and + yield/0.

+

+ Own Id: OTP-14713 Aux Id: ERL-500

+
+ +

Fixed a bug where the PATH environment variable wasn't + updated correctly on a release downgrade, effectively + keeping the PATH of the new release.

+

+ Own Id: OTP-14719

+
+ +

A receive optimization that avoids scanning the entire + message queue when receiving a message containing a + freshly created reference could in rare circumstances + (involving recursive calls to the functions that does the + receive) cause the receive to hang. This has been + corrected.

+

+ Own Id: OTP-14782 Aux Id: ERL-511

+
+ +

+ Fix building of Erlang/OTP on platforms which have small + data area with short addressing. For example the + PowerPC/RTEMS platform.

+

+ Own Id: OTP-14909 Aux Id: PR-1692

+
+ +

Fixed a crash when enif_make_binary is called + with a binary produced by enif_inspect_binary in a + different environment.

+

+ Own Id: OTP-14931

+
+ +

Fixed a crash when enif_make_binary is called + more than once with a binary that had previously been + added to an enif_ioq.

+

+ Own Id: OTP-14932

+
+ +

+ The erl_child_setup program now ignores SIGTERM signals.

+

+ Own Id: OTP-14943 Aux Id: ERL-576

+
+ +

+ Force 64-bit alignment on pre-allocators on architectures + which needs it.

+

+ Own Id: OTP-14977

+
+ +

+ Fixed a bug where dirty scheduler picked up non-dirty + work.

+

+ Own Id: OTP-14978

+
+ +

+ Calls to gen_tcp:send/2 on closed sockets now returns + {error, closed} instead of + {error,enotconn}.

+

+ Own Id: OTP-15001

+
+ +

+ erlang:monotonic_time/1 failed with badarg + when passing the perf_counter time unit as + argument.

+

+ Own Id: OTP-15008

+
+ +

+ Fix bug where rapid init:restart() calls would + sometimes crash because a code load request leaked in + between the restarts.

+

+ Own Id: OTP-15013

+
+ +

+ Improve float_to_list(F, [{decimals,D}]) to closer + conform with io_lib:format("~.*f", [D,F]).

+

+ There are however, still cases when float_to_list + does not produce the exact same result as + io_lib:format, especially for large values + F and/or many decimals D.

+

+ Own Id: OTP-15015 Aux Id: OTP-14890

+
+ +

Fixed a deadlock that would occur on certain + allocators when a reallocation failed with +ramv + enabled.

+

+ Own Id: OTP-15024

+
+ +

+ Fix bug that made it impossible to use an erl_tracer as + the seq_trace trace receiver.

+

+ Own Id: OTP-15029

+
+ +

+ Fix bug where a large (> 1 GB) emulator generated error + logger message would cause the emulator to crash.

+

+ Own Id: OTP-15032

+
+
+
+ + +
Improvements and New Features + + +

It is now possible to open device files and FIFOs with + file:open/2.

+

+ Own Id: OTP-11462

+
+ +

+ The erlang:system_flag(scheduler_wall_time,Bool) call is + now reference counted and will be turned off if the + (last) process that started the performance statistics + dies. Thus it is no longer possible to start the + statistics with rpc:call(Node, erlang, system_flag, + [scheduler_wall_time, true]) since it will be turned off + directly afterwards when the rpc process dies.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-11694

+
+ +

+ A new logging API is added to OTP. This is implemented in + the Kernel application, module logger.

+

+ Legacy calls to error_logger will be automatically + redirected to the new API.

+

+ See the reference manual for module logger, and the + User's Guide for the Kernel application for more + information.

+

+ Own Id: OTP-13295

+
+ +

+ gen_sctp:connect_init/4 or rather connect in + inet_drv.c for SCTP has been fixed to not check + the write file descriptor for writeability after a + connect, since for SCTP (SOCK_SEQPACKET) that property + does not seem to be any kind of indicator for when a + connect has finished. This fixes connects that the OS + returned as "in progress" that was misinterpreted by + gen_sctp:connect_init as failed.

+

+ Own Id: OTP-13760 Aux Id: PR-1592

+
+ +

The file driver has been rewritten as a NIF, + decreasing the latency of file operations. Two notable + incompatibilities are:

The + use_threads option for file:sendfile/5 no + longer has any effect; we either use non-blocking + sendfile(2) or fall back to file:read + + gen_tcp:send.

The + file-specific DTrace probes have been removed. The same + effect can be achieved with normal tracing together with + the nif__entry/nif__return probes to track + scheduling.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14256

+
+ +

The I/O polling functionality of erts has been + re-written to better make use of the OSs polling + mechanisms. This change means that erts will now always + prefer to use a kernel-polling mechanism if possible. + Also all of the I/O polling has been moved to dedicated + threads instead of being placed in the scheduler + loops.

As a result of this, the erl options + +K and +secio have been removed. It is + still possible to disable kernel-poll, but it has to be + done at compile time through the configure option + --disable-kernel-poll.

The new erl + options +IOt + and +IOp can + be used to change how many IO poll threads and poll sets + that erts should use. See their respective documentation + for more details.

+

+ Own Id: OTP-14346

+
+ +

Truly asynchronous auto-connect. Earlier, when + erlang:send was done toward an unconnected node, + the function would not return until the connection setup + had completed (or failed). Now the function returns + directly after the signal has been enqueued and the + connection setup started.

+

The same applies to all distributed operations that + may trigger auto-connect, i.e. '!', send, + link, monitor, monitor_node, + exit/2 and group_leader.

+

The interface for all these functions are unchanged as + they do not return connection failures. The only + exception is erlang:monitor where a possible + incompatibility is introduced: An attempt to monitor + a process on a primitive node (such as erl_interface or + jinterface), where remote process monitoring is not + implemented, will no longer fail with badarg + exception. Instead a monitor will be created, but it will + only supervise the connection to the node.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14370

+
+ +

Changed the default behaviour of .erlang + loading: .erlang is no longer loaded from the + current directory. c:erlangrc(PathList) can be + used to search and load an .erlang file from user + specified directories.

escript, + erlc, dialyzer and typer no longer + load an .erlang at all.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14439

+
+ +

+ New functionality for implementation of alternative + carriers for the Erlang distribution has been introduced. + This mainly consists of support for usage of distribution + controller processes (previously only ports could be used + as distribution controllers). For more information see + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution + Module.

+

+ Own Id: OTP-14459

+
+ +

+ Add support for the lcc compiler and in extension the + Elbrus 2000 platform.

+

+ Own Id: OTP-14492

+
+ +

Support for "tuple calls" have been removed from the + run-time system. Tuple calls was an undocumented and + unsupported feature which allowed the module argument for + an apply operation to be a tuple: Var = dict:new(), + Var:size(). This "feature" frequently caused + confuses, especially when such call failed. The + stacktrace would point out functions that don't exist in + the source code.

+

For legacy code that need to use parameterized modules + or tuple calls for some other reason, there is a new + compiler option called tuple_calls. When this + option is given, the compiler will generate extra code + that emulates the old behavior for calls where the module + is a variable.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14497

+
+ +

Creation of small maps with literal keys has been + optimized to be faster and potentially use less memory . + The keys are combined into a literal key tuple which is + put into the literal pool. The key tuple can be shared + between many instances of maps having the same keys.

+

+ Own Id: OTP-14502

+
+ +

+ When an exception is thrown, include the arguments of the + call in the stacktrace for BIFs band, bor, + bsl, bsr, bxor, div, + rem and the operators +, -, * + and /.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14508

+
+ +

+ The non-smp emulators have been removed. This means that + the configure options --disable-threads and + --enable-plain-emulator have been removed and + configure will now refuse to build Erlang/OTP on + platforms without thread support.

+

+ In order to achieve a similar setup as the non-smp + emulator, it is possible to start Erlang/OTP with the + +S 1 option.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14518

+
+ +

Modules that use floating point constants compiled + with R15 or earlier will need to be re-compiled before + they can be loaded.

+

+ Own Id: OTP-14575

+
+ +

+ Implementation of true asynchronous signaling between + processes in order to improve scalability. Signals + affected include exit, monitor, demonitor, monitor + triggered, link, unlink, and group leader.

+

+ Own Id: OTP-14589

+
+ +

+ Added a PGO (profile guided optimization) pass to the + build step of erts. This can be disabled by passing + --disable-pgo to configure.

+

+ Own Id: OTP-14604

+
+ +

+ Improved the performance of binary:split and + binary:match.

+

+ Own Id: OTP-14610 Aux Id: PR-1480

+
+ +

+ It is not longer possible to disable dirty schedulers + when building erlang.

+

+ Own Id: OTP-14613

+
+ +

Loaded BEAM code in a 64-bit system requires less + memory because of better packing of operands for + instructions.

+

These memory savings were achieved by major + improvements to the beam_makeops scripts used when + building the run time system and BEAM compiler. There is + also new for documentation for beam_makeops that + describes how new BEAM instructions and loader + transformations can be implemented. The documentation is + found in here in a source directory or git repository: + erts/emulator/internal_doc/beam_makeops.md. An online + version can be found here: + https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

+

+ Own Id: OTP-14626

+
+ +

file:read_file has been changed to read the + content of files that report a size of 0 even when data + can be read from them. An example of such a file is + /proc/cpuinfo on Linux.

+

+ Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

+
+ +

+ It is no longer possible to disable the temp_alloc + allocator. Disabling it caused serious performance + degradations and was never what was wanted.

+

+ Own Id: OTP-14651

+
+ +

The reduction cost of sending messages is now + constant. It will no longer scale according to the length + of the receiving process' message queue.

+

+ Own Id: OTP-14667

+
+ +

+ Improved loading of modules with -on_load + directive, to no longer block all schedulers when the + load operation is completed.

+

+ Own Id: OTP-14680

+
+ +

+ On platforms with real-time signals available, SIGRTMIN+1 + is now used as the internal scheduler suspend signal + instead of SIGUSR2.

+

+ Own Id: OTP-14682

+
+ +

When the value returned from a 'catch' + expression is ignored, no stacktrace will be built if an + exception is caught. That will save time and produce less + garbage. There are also some minor optimizations of + 'try/catch' both in the compiler and + run-time system.

+

+ Own Id: OTP-14683

+
+ +

The guarantees and non-guarantees of + erlang:get_stacktrace/0 are now documented.

+

+ Own Id: OTP-14687

+
+ +

There is a new syntax in 'try/catch' for + retrieving the stacktrace without calling + 'erlang:get_stacktrace/0'. See the reference + manual for a description of the new syntax. The + 'erlang:get_stacktrace/0' BIF is now + deprecated.

+

+ Own Id: OTP-14692

+
+ +

+ New 'used' option for binary_to_term/2 that will + also return number of bytes actually read from the + binary. This enables easy access to any extra data in the + binary located directly after the returned term.

+

+ Own Id: OTP-14780

+
+ +

+ Added more statistics for + erlang:system_info({allocator,A}) in the + mbcs_pool section.

+

+ Own Id: OTP-14795 Aux Id: ERL-88

+
+ +

Added enif_ioq_peek_head to allow retrieving + Erlang terms from NIF IO queues without having to resort + to copying.

+

+ Own Id: OTP-14797

+
+ +

There is a new option 'makedep_side_effect' for + the compiler and -MMD for 'erlc' that + generates dependencies and continues to compile as + normal.

+

+ Own Id: OTP-14830

+
+ +

Added ets:whereis/1 for retrieving the table + identifier of a named table.

+

+ Own Id: OTP-14884

+
+ +

seq_trace labels may now be any erlang + term.

+

+ Own Id: OTP-14899

+
+ +

+ Optimized the common case of monitor followed by + send to the same local process. The monitor signal + is now delayed in order to be piggybacked with the sent + message and thereby only get one lock operation on the + message queue of the receiver. A delayed monitor signal + is flushed if no send has been done at the latest + when the process is scheduled out.

+

+ Own Id: OTP-14901

+
+ +

+ Make hipe compiled code work on x86_64 (amd64) with OS + security feature PIE, where executable code can be loaded + into a random location. Old behavior, if hipe was + enabled, was to disable PIE build options for the VM.

+

+ Own Id: OTP-14903

+
+ +

The number of driver async threads will now default to + 1 as the standard drivers do not use them anymore. Users + that changed this value to tweak the file driver should + replace +A with +SDio since it now uses + dirty IO schedulers instead of async threads.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14928

+
+ +

+ Optimize == and /= for binaries with + different sizes to be constant in time instead of + proportional to the size of their common prefix.

+

+ Own Id: OTP-14934 Aux Id: PR-1708

+
+ +

+ Refactorings making some internal process flags available + for other usage.

+

+ Own Id: OTP-14948

+
+ +

+ Removed need for HiPE to allocate native executable + memory in low 2GB address space on x86_64. Command line + option +MXscs is thereby obsolete and ignored.

+

+ Own Id: OTP-14951

+
+ +

Added enif_make_map_from_arrays for creating a + populated map, analogous to + enif_make_list_from_array.

+

+ Own Id: OTP-14954

+
+ +

Added configuration switches for busy-wait and wake up + thresholds for dirty schedulers, and changing these + settings for normal schedulers will no longer affect + dirty schedulers.

Refer to the documentation for + details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

The + default busy wait threshold for dirty scheduler threads + has also been lowered to short.

+

+ Own Id: OTP-14959

+
+ +

+ The list of "taints" now also includes dynamic loaded + drivers in addition to NIF libraries. Statically linked + drivers and NIF libraries that are part of erts are not + included. The "taints" are returned by + system_info(taints) and printed in the header of + erl_crash.dump files.

+

+ Own Id: OTP-14960

+
+ +

Added instrument:allocations and + instrument:carriers for retrieving information + about memory utilization and fragmentation.

+

The old instrument interface has been removed, + as have the related options +Mim and + +Mis.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14961

+
+ +

Added the nifs option to + ?MODULE:module_info/1 for listing a module's + installed NIF functions.

+

+ Own Id: OTP-14965

+
+ +

+ New implementation of erlang:process_info/[1,2].

+

+ In the general case when inspecting another process, the + new implementation sends an asynchronous process-info + request signal to the other process and waits for the + result instead of locking the other process and reading + the result directly. In some special cases where no + conflicts occur, signal order wont be violated, and the + amount of data requested is guaranteed to be small, the + inspected process may be inspected directly.

+

+ Appropriate amount of reductions are now also bumped when + inspecting a process.

+

+ Own Id: OTP-14966

+
+ +

+ Removed process start time from crash dump in order to + save memory in process control block.

+

+ Own Id: OTP-14975 Aux Id: PR-1597

+
+ +

+ Optimize erlang:put/2 when updating existing key + with a new immediate value (atom, small integer, pid, + port).

+

+ Own Id: OTP-14976

+
+ +

+ erlang:process_info/1 has been changed to no + longer include messages by default. Instead + erlang:process_info/2 should be used.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14986 Aux Id: PR-1745

+
+ +

+ New NIF functions: enif_mutex_name, enif_cond_name, + enif_rwlock_name, enif_thread_name, enif_vfprintf, + enif_vsnprintf.

+

+ Own Id: OTP-14994

+
+ +

When erlang:system_flag(backtrace_depth, 0) has + been called, all exceptions will now contain the entry + for one function (despite the zero). It used to + be that a hand-made stack backtrace passed to + erlang:raise/3 would be be truncated to an empty + list.

+

+ Own Id: OTP-15026

+
+ +

+ Fixed bug for named ets tables which could cause + unexpected results from matchspec iteration functions + (ets:select* and ets:match*) if the table + was deleted and recreated with the same name during the + iteration. The iteration could incorrectly continue + through the recreated table. The expected correct + behavior is now for the iteration call to fail with a + badarg exception if the table is deleted before + the iteration has completed.

+

+ Own Id: OTP-15031

+
+ +

The map_get/2 guard BIF has been added. It + works the same way as maps:get/2, except that it + is allowed to use it in guards.

+

+ Own Id: OTP-15037 Aux Id: PR-1784

+
+
+
+ +
+
Erts 9.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 561e871d680a081d531ff205b8331eacca1d7a3c Mon Sep 17 00:00:00 2001 From: Henrik Date: Wed, 2 May 2018 09:19:05 +0200 Subject: Revert "Update release notes" This reverts commit 202bb737e3deabfebee683266f4b7c42781eb521. --- erts/doc/src/notes.xml | 768 ------------------------------------------------- 1 file changed, 768 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index fb33710340..fcc7ec5b66 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,774 +31,6 @@

This document describes the changes made to the ERTS application.

-
Erts 10.0 - -
Fixed Bugs and Malfunctions - - -

- The type specifications for file:posix/0 and - inet:posix/0 have been updated according to which - errors file and socket operations should be able to - return.

-

- Own Id: OTP-14019 Aux Id: ERL-550

-
- -

- Fix error printout from run_erl and a bug that could - cause unintended fds to be leaked into the started - program.

-

- Own Id: OTP-14537 Aux Id: PR1529

-
- -

File operations used to accept filenames - containing null characters (integer value zero). This - caused the name to be truncated and in some cases - arguments to primitive operations to be mixed up. - Filenames containing null characters inside the filename - are now rejected and will cause primitive file - operations to fail.

Also environment variable - operations used to accept names and - values of - environment variables containing null characters (integer - value zero). This caused operations to silently produce - erroneous results. Environment variable names and values - containing null characters inside the name or value are - now rejected and will cause environment variable - operations to fail.

Primitive environment - variable operations also used to accept the $= - character in environment variable names causing various - problems. $= characters in environment variable - names are now also rejected.

Also - os:cmd/1 now - reject null characters inside its command. -

erlang:open_port/2 - will also reject null characters inside the port name - from now on.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14543 Aux Id: ERL-370

-
- -

- Fix bugs related to the bookkeeping of microstate - accounting states.

-

- Own Id: OTP-14652

-
- -

os:putenv and os:getenv no longer access - the process environment directly and instead work on a - thread-safe emulation. The only observable difference is - that it's not kept in sync with libc - getenv(3) / putenv(3), so those who relied - on that behavior in drivers or NIFs will need to add - manual synchronization.

On Windows this means that - you can no longer resolve DLL dependencies by modifying - the PATH just before loading the driver/NIF. To - make this less of a problem, the emulator now adds the - target DLL's folder to the DLL search path.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14666

-
- -

Corrected erlang:is_builtin(erlang, M, F) to - return true for apply/2 and - yield/0.

-

- Own Id: OTP-14713 Aux Id: ERL-500

-
- -

Fixed a bug where the PATH environment variable wasn't - updated correctly on a release downgrade, effectively - keeping the PATH of the new release.

-

- Own Id: OTP-14719

-
- -

A receive optimization that avoids scanning the entire - message queue when receiving a message containing a - freshly created reference could in rare circumstances - (involving recursive calls to the functions that does the - receive) cause the receive to hang. This has been - corrected.

-

- Own Id: OTP-14782 Aux Id: ERL-511

-
- -

- Fix building of Erlang/OTP on platforms which have small - data area with short addressing. For example the - PowerPC/RTEMS platform.

-

- Own Id: OTP-14909 Aux Id: PR-1692

-
- -

Fixed a crash when enif_make_binary is called - with a binary produced by enif_inspect_binary in a - different environment.

-

- Own Id: OTP-14931

-
- -

Fixed a crash when enif_make_binary is called - more than once with a binary that had previously been - added to an enif_ioq.

-

- Own Id: OTP-14932

-
- -

- The erl_child_setup program now ignores SIGTERM signals.

-

- Own Id: OTP-14943 Aux Id: ERL-576

-
- -

- Force 64-bit alignment on pre-allocators on architectures - which needs it.

-

- Own Id: OTP-14977

-
- -

- Fixed a bug where dirty scheduler picked up non-dirty - work.

-

- Own Id: OTP-14978

-
- -

- Calls to gen_tcp:send/2 on closed sockets now returns - {error, closed} instead of - {error,enotconn}.

-

- Own Id: OTP-15001

-
- -

- erlang:monotonic_time/1 failed with badarg - when passing the perf_counter time unit as - argument.

-

- Own Id: OTP-15008

-
- -

- Fix bug where rapid init:restart() calls would - sometimes crash because a code load request leaked in - between the restarts.

-

- Own Id: OTP-15013

-
- -

- Improve float_to_list(F, [{decimals,D}]) to closer - conform with io_lib:format("~.*f", [D,F]).

-

- There are however, still cases when float_to_list - does not produce the exact same result as - io_lib:format, especially for large values - F and/or many decimals D.

-

- Own Id: OTP-15015 Aux Id: OTP-14890

-
- -

Fixed a deadlock that would occur on certain - allocators when a reallocation failed with +ramv - enabled.

-

- Own Id: OTP-15024

-
- -

- Fix bug that made it impossible to use an erl_tracer as - the seq_trace trace receiver.

-

- Own Id: OTP-15029

-
- -

- Fix bug where a large (> 1 GB) emulator generated error - logger message would cause the emulator to crash.

-

- Own Id: OTP-15032

-
-
-
- - -
Improvements and New Features - - -

It is now possible to open device files and FIFOs with - file:open/2.

-

- Own Id: OTP-11462

-
- -

- The erlang:system_flag(scheduler_wall_time,Bool) call is - now reference counted and will be turned off if the - (last) process that started the performance statistics - dies. Thus it is no longer possible to start the - statistics with rpc:call(Node, erlang, system_flag, - [scheduler_wall_time, true]) since it will be turned off - directly afterwards when the rpc process dies.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-11694

-
- -

- A new logging API is added to OTP. This is implemented in - the Kernel application, module logger.

-

- Legacy calls to error_logger will be automatically - redirected to the new API.

-

- See the reference manual for module logger, and the - User's Guide for the Kernel application for more - information.

-

- Own Id: OTP-13295

-
- -

- gen_sctp:connect_init/4 or rather connect in - inet_drv.c for SCTP has been fixed to not check - the write file descriptor for writeability after a - connect, since for SCTP (SOCK_SEQPACKET) that property - does not seem to be any kind of indicator for when a - connect has finished. This fixes connects that the OS - returned as "in progress" that was misinterpreted by - gen_sctp:connect_init as failed.

-

- Own Id: OTP-13760 Aux Id: PR-1592

-
- -

The file driver has been rewritten as a NIF, - decreasing the latency of file operations. Two notable - incompatibilities are:

The - use_threads option for file:sendfile/5 no - longer has any effect; we either use non-blocking - sendfile(2) or fall back to file:read + - gen_tcp:send.

The - file-specific DTrace probes have been removed. The same - effect can be achieved with normal tracing together with - the nif__entry/nif__return probes to track - scheduling.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14256

-
- -

The I/O polling functionality of erts has been - re-written to better make use of the OSs polling - mechanisms. This change means that erts will now always - prefer to use a kernel-polling mechanism if possible. - Also all of the I/O polling has been moved to dedicated - threads instead of being placed in the scheduler - loops.

As a result of this, the erl options - +K and +secio have been removed. It is - still possible to disable kernel-poll, but it has to be - done at compile time through the configure option - --disable-kernel-poll.

The new erl - options +IOt - and +IOp can - be used to change how many IO poll threads and poll sets - that erts should use. See their respective documentation - for more details.

-

- Own Id: OTP-14346

-
- -

Truly asynchronous auto-connect. Earlier, when - erlang:send was done toward an unconnected node, - the function would not return until the connection setup - had completed (or failed). Now the function returns - directly after the signal has been enqueued and the - connection setup started.

-

The same applies to all distributed operations that - may trigger auto-connect, i.e. '!', send, - link, monitor, monitor_node, - exit/2 and group_leader.

-

The interface for all these functions are unchanged as - they do not return connection failures. The only - exception is erlang:monitor where a possible - incompatibility is introduced: An attempt to monitor - a process on a primitive node (such as erl_interface or - jinterface), where remote process monitoring is not - implemented, will no longer fail with badarg - exception. Instead a monitor will be created, but it will - only supervise the connection to the node.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14370

-
- -

Changed the default behaviour of .erlang - loading: .erlang is no longer loaded from the - current directory. c:erlangrc(PathList) can be - used to search and load an .erlang file from user - specified directories.

escript, - erlc, dialyzer and typer no longer - load an .erlang at all.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14439

-
- -

- New functionality for implementation of alternative - carriers for the Erlang distribution has been introduced. - This mainly consists of support for usage of distribution - controller processes (previously only ports could be used - as distribution controllers). For more information see - ERTS - User's Guide ➜ How to implement an Alternative Carrier - for the Erlang Distribution ➜ Distribution - Module.

-

- Own Id: OTP-14459

-
- -

- Add support for the lcc compiler and in extension the - Elbrus 2000 platform.

-

- Own Id: OTP-14492

-
- -

Support for "tuple calls" have been removed from the - run-time system. Tuple calls was an undocumented and - unsupported feature which allowed the module argument for - an apply operation to be a tuple: Var = dict:new(), - Var:size(). This "feature" frequently caused - confuses, especially when such call failed. The - stacktrace would point out functions that don't exist in - the source code.

-

For legacy code that need to use parameterized modules - or tuple calls for some other reason, there is a new - compiler option called tuple_calls. When this - option is given, the compiler will generate extra code - that emulates the old behavior for calls where the module - is a variable.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14497

-
- -

Creation of small maps with literal keys has been - optimized to be faster and potentially use less memory . - The keys are combined into a literal key tuple which is - put into the literal pool. The key tuple can be shared - between many instances of maps having the same keys.

-

- Own Id: OTP-14502

-
- -

- When an exception is thrown, include the arguments of the - call in the stacktrace for BIFs band, bor, - bsl, bsr, bxor, div, - rem and the operators +, -, * - and /.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14508

-
- -

- The non-smp emulators have been removed. This means that - the configure options --disable-threads and - --enable-plain-emulator have been removed and - configure will now refuse to build Erlang/OTP on - platforms without thread support.

-

- In order to achieve a similar setup as the non-smp - emulator, it is possible to start Erlang/OTP with the - +S 1 option.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14518

-
- -

Modules that use floating point constants compiled - with R15 or earlier will need to be re-compiled before - they can be loaded.

-

- Own Id: OTP-14575

-
- -

- Implementation of true asynchronous signaling between - processes in order to improve scalability. Signals - affected include exit, monitor, demonitor, monitor - triggered, link, unlink, and group leader.

-

- Own Id: OTP-14589

-
- -

- Added a PGO (profile guided optimization) pass to the - build step of erts. This can be disabled by passing - --disable-pgo to configure.

-

- Own Id: OTP-14604

-
- -

- Improved the performance of binary:split and - binary:match.

-

- Own Id: OTP-14610 Aux Id: PR-1480

-
- -

- It is not longer possible to disable dirty schedulers - when building erlang.

-

- Own Id: OTP-14613

-
- -

Loaded BEAM code in a 64-bit system requires less - memory because of better packing of operands for - instructions.

-

These memory savings were achieved by major - improvements to the beam_makeops scripts used when - building the run time system and BEAM compiler. There is - also new for documentation for beam_makeops that - describes how new BEAM instructions and loader - transformations can be implemented. The documentation is - found in here in a source directory or git repository: - erts/emulator/internal_doc/beam_makeops.md. An online - version can be found here: - https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

-

- Own Id: OTP-14626

-
- -

file:read_file has been changed to read the - content of files that report a size of 0 even when data - can be read from them. An example of such a file is - /proc/cpuinfo on Linux.

-

- Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

-
- -

- It is no longer possible to disable the temp_alloc - allocator. Disabling it caused serious performance - degradations and was never what was wanted.

-

- Own Id: OTP-14651

-
- -

The reduction cost of sending messages is now - constant. It will no longer scale according to the length - of the receiving process' message queue.

-

- Own Id: OTP-14667

-
- -

- Improved loading of modules with -on_load - directive, to no longer block all schedulers when the - load operation is completed.

-

- Own Id: OTP-14680

-
- -

- On platforms with real-time signals available, SIGRTMIN+1 - is now used as the internal scheduler suspend signal - instead of SIGUSR2.

-

- Own Id: OTP-14682

-
- -

When the value returned from a 'catch' - expression is ignored, no stacktrace will be built if an - exception is caught. That will save time and produce less - garbage. There are also some minor optimizations of - 'try/catch' both in the compiler and - run-time system.

-

- Own Id: OTP-14683

-
- -

The guarantees and non-guarantees of - erlang:get_stacktrace/0 are now documented.

-

- Own Id: OTP-14687

-
- -

There is a new syntax in 'try/catch' for - retrieving the stacktrace without calling - 'erlang:get_stacktrace/0'. See the reference - manual for a description of the new syntax. The - 'erlang:get_stacktrace/0' BIF is now - deprecated.

-

- Own Id: OTP-14692

-
- -

- New 'used' option for binary_to_term/2 that will - also return number of bytes actually read from the - binary. This enables easy access to any extra data in the - binary located directly after the returned term.

-

- Own Id: OTP-14780

-
- -

- Added more statistics for - erlang:system_info({allocator,A}) in the - mbcs_pool section.

-

- Own Id: OTP-14795 Aux Id: ERL-88

-
- -

Added enif_ioq_peek_head to allow retrieving - Erlang terms from NIF IO queues without having to resort - to copying.

-

- Own Id: OTP-14797

-
- -

There is a new option 'makedep_side_effect' for - the compiler and -MMD for 'erlc' that - generates dependencies and continues to compile as - normal.

-

- Own Id: OTP-14830

-
- -

Added ets:whereis/1 for retrieving the table - identifier of a named table.

-

- Own Id: OTP-14884

-
- -

seq_trace labels may now be any erlang - term.

-

- Own Id: OTP-14899

-
- -

- Optimized the common case of monitor followed by - send to the same local process. The monitor signal - is now delayed in order to be piggybacked with the sent - message and thereby only get one lock operation on the - message queue of the receiver. A delayed monitor signal - is flushed if no send has been done at the latest - when the process is scheduled out.

-

- Own Id: OTP-14901

-
- -

- Make hipe compiled code work on x86_64 (amd64) with OS - security feature PIE, where executable code can be loaded - into a random location. Old behavior, if hipe was - enabled, was to disable PIE build options for the VM.

-

- Own Id: OTP-14903

-
- -

The number of driver async threads will now default to - 1 as the standard drivers do not use them anymore. Users - that changed this value to tweak the file driver should - replace +A with +SDio since it now uses - dirty IO schedulers instead of async threads.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14928

-
- -

- Optimize == and /= for binaries with - different sizes to be constant in time instead of - proportional to the size of their common prefix.

-

- Own Id: OTP-14934 Aux Id: PR-1708

-
- -

- Refactorings making some internal process flags available - for other usage.

-

- Own Id: OTP-14948

-
- -

- Removed need for HiPE to allocate native executable - memory in low 2GB address space on x86_64. Command line - option +MXscs is thereby obsolete and ignored.

-

- Own Id: OTP-14951

-
- -

Added enif_make_map_from_arrays for creating a - populated map, analogous to - enif_make_list_from_array.

-

- Own Id: OTP-14954

-
- -

Added configuration switches for busy-wait and wake up - thresholds for dirty schedulers, and changing these - settings for normal schedulers will no longer affect - dirty schedulers.

Refer to the documentation for - details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

The - default busy wait threshold for dirty scheduler threads - has also been lowered to short.

-

- Own Id: OTP-14959

-
- -

- The list of "taints" now also includes dynamic loaded - drivers in addition to NIF libraries. Statically linked - drivers and NIF libraries that are part of erts are not - included. The "taints" are returned by - system_info(taints) and printed in the header of - erl_crash.dump files.

-

- Own Id: OTP-14960

-
- -

Added instrument:allocations and - instrument:carriers for retrieving information - about memory utilization and fragmentation.

-

The old instrument interface has been removed, - as have the related options +Mim and - +Mis.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14961

-
- -

Added the nifs option to - ?MODULE:module_info/1 for listing a module's - installed NIF functions.

-

- Own Id: OTP-14965

-
- -

- New implementation of erlang:process_info/[1,2].

-

- In the general case when inspecting another process, the - new implementation sends an asynchronous process-info - request signal to the other process and waits for the - result instead of locking the other process and reading - the result directly. In some special cases where no - conflicts occur, signal order wont be violated, and the - amount of data requested is guaranteed to be small, the - inspected process may be inspected directly.

-

- Appropriate amount of reductions are now also bumped when - inspecting a process.

-

- Own Id: OTP-14966

-
- -

- Removed process start time from crash dump in order to - save memory in process control block.

-

- Own Id: OTP-14975 Aux Id: PR-1597

-
- -

- Optimize erlang:put/2 when updating existing key - with a new immediate value (atom, small integer, pid, - port).

-

- Own Id: OTP-14976

-
- -

- erlang:process_info/1 has been changed to no - longer include messages by default. Instead - erlang:process_info/2 should be used.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14986 Aux Id: PR-1745

-
- -

- New NIF functions: enif_mutex_name, enif_cond_name, - enif_rwlock_name, enif_thread_name, enif_vfprintf, - enif_vsnprintf.

-

- Own Id: OTP-14994

-
- -

When erlang:system_flag(backtrace_depth, 0) has - been called, all exceptions will now contain the entry - for one function (despite the zero). It used to - be that a hand-made stack backtrace passed to - erlang:raise/3 would be be truncated to an empty - list.

-

- Own Id: OTP-15026

-
- -

- Fixed bug for named ets tables which could cause - unexpected results from matchspec iteration functions - (ets:select* and ets:match*) if the table - was deleted and recreated with the same name during the - iteration. The iteration could incorrectly continue - through the recreated table. The expected correct - behavior is now for the iteration call to fail with a - badarg exception if the table is deleted before - the iteration has completed.

-

- Own Id: OTP-15031

-
- -

The map_get/2 guard BIF has been added. It - works the same way as maps:get/2, except that it - is allowed to use it in guards.

-

- Own Id: OTP-15037 Aux Id: PR-1784

-
-
-
- -
-
Erts 9.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d45a09c774b6173f4db804e25b21a67e58b66d6b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 2 May 2018 15:53:43 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 21168eee23..8bd8e6c7b8 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.1 + +
Fixed Bugs and Malfunctions + + +

Fixed a crash in heart:get_cmd/0 when the + stored command was too long.

+

+ Own Id: OTP-15034

+
+
+
+ +
+
Erts 9.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 26e0b16cbcf583ebcc7050c7f4d7b2f08537f09c Mon Sep 17 00:00:00 2001 From: bitnitdit Date: Sun, 6 May 2018 19:15:50 +0800 Subject: Fix typos in erlang.xml --- erts/doc/src/erlang.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3ed0f59b7d..0c5cd18088 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -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 auto-imported. Thus, it is not necessary to specify the - module name. For example, the calls atom_to_list(Erlang) - and erlang:atom_to_list(Erlang) are identical.

+ module name. For example, the calls atom_to_list(erlang) + and erlang:atom_to_list(erlang) are identical.

Auto-imported BIFs are listed without module prefix. BIFs listed with module prefix are not auto-imported.

-- cgit v1.2.3 From 49a5de34c1d16ae09487ea6a5bc77923e7d3f11d Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Thu, 10 May 2018 12:13:10 +0100 Subject: Fix typos in erl_driver.xml --- erts/doc/src/erl_driver.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index 5705100ab2..967fd6e8f0 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -429,7 +429,7 @@ Return types for driver callbacks -

Rrewrite driver callback +

Rewrite driver callback control to use return type ErlDrvSSizeT instead of int.

Rewrite driver callback @@ -841,7 +841,7 @@ int suggested_stack_size;

Thread options structure passed to erl_drv_thread_create. - The following fields exists:

+ The following field exists:

suggested_stack_size A suggestion, in kilowords, on how large a stack to use. @@ -3210,6 +3210,6 @@ erl_drv_output_term(driver_mk_port(drvport), spec, sizeof(spec) / sizeof(spec[0] erlang(3), erl_ddll(3), section How to Implement an Alternative - Carrier for the Erlang Distribution> in the User's Guide

+ Carrier for the Erlang Distribution in the User's Guide

-- cgit v1.2.3 From 78f639da759cd3f8b5f28bc86ec404f3c3db60f4 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Fri, 13 Apr 2018 14:33:38 +0200 Subject: New process suspend implementation based on async signaling --- erts/doc/src/erlang.xml | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 3154fdaf8c..cff56b9cb8 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -7005,10 +7005,47 @@ ok from other events in the system. It is only guaranteed that Suspendee eventually suspends (unless it - is resumed). If option asynchronous has not + is resumed). If no asynchronous options has been passed, the caller of erlang:suspend_process/2 is blocked until Suspendee has suspended.

+ {asynchronous, ReplyTag} + +

A suspend request is sent to the process identified by + Suspendee. When the suspend request + has been processed, a reply message is sent to the caller + of this function. The reply is on the form {ReplyTag, + State} where State is either:

+ + exited + +

+ Suspendee has exited. +

+
+ suspended + +

+ Suspendee is now suspended. +

+
+ not_suspended + +

+ Suspendee is not suspended. + This can only happen when the process that + issued this request, have called + resume_process(Suspendee) + before getting the reply. +

+
+
+

+ Appart from the reply message, the {asynchronous, + ReplyTag} option behaves exactly the same as the + asynchronous option without reply tag. +

+
unless_suspending

The process identified by Suspendee is @@ -7032,6 +7069,13 @@ ok

This BIF is intended for debugging only.

+ +

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.

+

Failures:

badarg -- cgit v1.2.3 From 662f3c7ba50ff8ec13d86171bcfc61fd3da9deed Mon Sep 17 00:00:00 2001 From: Timmo Verlaan Date: Mon, 29 Jan 2018 21:27:22 +0100 Subject: epmd: allow alternative to dns resolving for nodename This makes it possible to create a custom integration with a key-value store for example. The key would then point to the actual address. You would have to write your own epmd module to make use of that feature. --- erts/doc/src/Makefile | 1 + erts/doc/src/alt_disco.xml | 93 ++++++++++++++++++++++++++++++++++++++++++++++ erts/doc/src/part.xml | 1 + 3 files changed, 95 insertions(+) create mode 100644 erts/doc/src/alt_disco.xml (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index 5fa8b0673a..96cc4413a9 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -74,6 +74,7 @@ XML_CHAPTER_FILES = \ match_spec.xml \ crash_dump.xml \ alt_dist.xml \ + alt_disco.xml \ driver.xml \ absform.xml \ inet_cfg.xml \ diff --git a/erts/doc/src/alt_disco.xml b/erts/doc/src/alt_disco.xml new file mode 100644 index 0000000000..d04221b9b3 --- /dev/null +++ b/erts/doc/src/alt_disco.xml @@ -0,0 +1,93 @@ + + + + +
+ + 20182018 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + How to Implement an Alternative Service Discovery for Erlang Distribution + + Timmo Verlaan + + + + + 2018-04-25 + PA1 + alt_disco.xml +
+

+ This section describes how to implement an alternative discovery mechanism + for Erlang distribution. Discovery is normally done using DNS and the + Erlang Port Mapper Daemon (EPMD) for port discovery. +

+ +

+ Support for alternative service discovery mechanisms was added in Erlang/OTP + 21. +

+ + +
+ Introduction +

To implement your own service discovery module you have to write your own + EPMD module. The EPMD module is + responsible for providing the location of another node. The distribution + modules (inet_tcp_dist/inet_tls_dist) call the EPMD module to + get the IP address and port of the other node. The EPMD module that is part + of Erlang/OTP will resolve the hostname using DNS and uses the EPMD unix + process to get the port of another node. The EPMD unix process does this by + connecting to the other node on a well-known port, port 4369.

+
+ +
+ Discovery module +

The discovery module needs to implement the same API as the regular + EPMD module. However, instead of + communicating with EPMD you can connect to any service to find out + connection details of other nodes. A discovery module is enabled + by setting -epmd_module + when starting erlang. The discovery module must implement the following + callbacks:

+ + + start_link/0 + Start any processes needed by the discovery module. + names/1 + Return node names held by the registrar for the given host. + register_node/2 + Register the given node name with the registrar. + port_please/3 + Return the distribution port used by the given node. + + +

The discovery module may implement the following callback:

+ + + address_please/3 +

Return the address of the given node. + If not implemented, + inet:gethostbyname/1 will be used instead

+

This callback may also return the port of the given node. In that case + port_please/3 + may be omitted.

+
+
+
diff --git a/erts/doc/src/part.xml b/erts/doc/src/part.xml index d583b873a0..fc39cb30e6 100644 --- a/erts/doc/src/part.xml +++ b/erts/doc/src/part.xml @@ -37,6 +37,7 @@ + -- cgit v1.2.3 From fd8e49b5bddceaae803670121b603b5eee8c5c08 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 25 May 2018 12:14:27 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 877 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 877 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 929d569f16..d741e29958 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,883 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0 + +
Fixed Bugs and Malfunctions + + +

+ The type specifications for file:posix/0 and + inet:posix/0 have been updated according to which + errors file and socket operations should be able to + return.

+

+ Own Id: OTP-14019 Aux Id: ERL-550

+
+ +

+ Fix error printout from run_erl and a bug that could + cause unintended fds to be leaked into the started + program.

+

+ Own Id: OTP-14537 Aux Id: PR1529

+
+ +

File operations used to accept filenames + containing null characters (integer value zero). This + caused the name to be truncated and in some cases + arguments to primitive operations to be mixed up. + Filenames containing null characters inside the filename + are now rejected and will cause primitive file + operations to fail.

Also environment variable + operations used to accept names and + values of + environment variables containing null characters (integer + value zero). This caused operations to silently produce + erroneous results. Environment variable names and values + containing null characters inside the name or value are + now rejected and will cause environment variable + operations to fail.

Primitive environment + variable operations also used to accept the $= + character in environment variable names causing various + problems. $= characters in environment variable + names are now also rejected.

Also + os:cmd/1 now + reject null characters inside its command. +

erlang:open_port/2 + will also reject null characters inside the port name + from now on.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14543 Aux Id: ERL-370

+
+ +

+ Fix bugs related to the bookkeeping of microstate + accounting states.

+

+ Own Id: OTP-14652

+
+ +

os:putenv and os:getenv no longer access + the process environment directly and instead work on a + thread-safe emulation. The only observable difference is + that it's not kept in sync with libc + getenv(3) / putenv(3), so those who relied + on that behavior in drivers or NIFs will need to add + manual synchronization.

On Windows this means that + you can no longer resolve DLL dependencies by modifying + the PATH just before loading the driver/NIF. To + make this less of a problem, the emulator now adds the + target DLL's folder to the DLL search path.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14666

+
+ +

Corrected erlang:is_builtin(erlang, M, F) to + return true for apply/2 and + yield/0.

+

+ Own Id: OTP-14713 Aux Id: ERL-500

+
+ +

Fixed a bug where the PATH environment variable wasn't + updated correctly on a release downgrade, effectively + keeping the PATH of the new release.

+

+ Own Id: OTP-14719

+
+ +

A receive optimization that avoids scanning the entire + message queue when receiving a message containing a + freshly created reference could in rare circumstances + (involving recursive calls to the functions that does the + receive) cause the receive to hang. This has been + corrected.

+

+ Own Id: OTP-14782 Aux Id: ERL-511

+
+ +

+ Fix building of Erlang/OTP on platforms which have small + data area with short addressing. For example the + PowerPC/RTEMS platform.

+

+ Own Id: OTP-14909 Aux Id: PR-1692

+
+ +

Fixed a crash when enif_make_binary is called + with a binary produced by enif_inspect_binary in a + different environment.

+

+ Own Id: OTP-14931

+
+ +

Fixed a crash when enif_make_binary is called + more than once with a binary that had previously been + added to an enif_ioq.

+

+ Own Id: OTP-14932

+
+ +

+ The erl_child_setup program now ignores SIGTERM signals.

+

+ Own Id: OTP-14943 Aux Id: ERL-576

+
+ +

+ Force 64-bit alignment on pre-allocators on architectures + which needs it.

+

+ Own Id: OTP-14977

+
+ +

+ Fixed a bug where dirty scheduler picked up non-dirty + work.

+

+ Own Id: OTP-14978

+
+ +

+ Calls to gen_tcp:send/2 on closed sockets now + returns {error, closed} instead of + {error,enotconn}.

+

+ Own Id: OTP-15001

+
+ +

+ erlang:monotonic_time/1 failed with badarg + when passing the perf_counter time unit as + argument.

+

+ Own Id: OTP-15008

+
+ +

+ Fix bug where rapid init:restart() calls would + sometimes crash because a code load request leaked in + between the restarts.

+

+ Own Id: OTP-15013

+
+ +

+ Improve float_to_list(F, [{decimals,D}]) to closer + conform with io_lib:format("~.*f", [D,F]).

+

+ There are however, still cases when float_to_list + does not produce the exact same result as + io_lib:format, especially for large values + F and/or many decimals D.

+

+ Own Id: OTP-15015 Aux Id: OTP-14890

+
+ +

Fixed a deadlock that would occur on certain + allocators when a reallocation failed with +ramv + enabled.

+

+ Own Id: OTP-15024

+
+ +

+ Fix bug that made it impossible to use an erl_tracer as + the seq_trace trace receiver.

+

+ Own Id: OTP-15029

+
+ +

+ Fix bug where a large (> 1 GB) emulator generated error + logger message would cause the emulator to crash.

+

+ Own Id: OTP-15032

+
+ +

The emulator will no longer crash when reading the + file information of an ordinary file that has an NTFS + reparse point, such as files stored in a OneDrive-mapped + folder.

+

+ Own Id: OTP-15062 Aux Id: ERL-615

+
+ +

+ Fixed bug in enif_binary_to_term which could cause + memory corruption for immediate terms (atoms, small + integers, pids, ports, empty lists).

+

+ Own Id: OTP-15080

+
+ +

+ Fixed bug in erlang:system_profile/2 that could + cause superfluous {profile,_,active,_,_} messages + for terminating processes.

+

+ Own Id: OTP-15085

+
+ +

+ On OSs with per thread CPU time support, change + cpu_timestamp in erlang:trace/3 to use + it instead of per process CPU time. This makes this + option useable on such OSs when running multiple + schedulers.

+

+ Own Id: OTP-15090

+
+
+
+ + +
Improvements and New Features + + +

It is now possible to open device files and FIFOs with + file:open/2.

+

+ Own Id: OTP-11462

+
+ +

+ The erlang:system_flag(scheduler_wall_time,Bool) + call is now reference counted and will be turned off if + the (last) process that started the performance + statistics dies. Thus it is no longer possible to start + the statistics with rpc:call(Node, erlang, + system_flag, [scheduler_wall_time, true]) since it + will be turned off directly afterwards when the rpc + process dies.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-11694

+
+ +

A new logging API is added to Erlang/OTP, see the + logger(3) manual + page, and section Logging in the + Kernel User's Guide.

+

Calls to error_logger are automatically + redirected to the new API, and legacy error logger event + handlers can still be used. It is, however, recommended + to use the Logger API directly when writing new code.

+

Notice the following potential incompatibilities:

+

Kernel configuration parameters + error_logger still works, but is overruled if the + default handler's output destination is configured with + Kernel configuration parameter logger.

In + general, parameters for configuring error logger are + overwritten by new parameters for configuring + Logger.

The concept of SASL error + logging is deprecated, meaning that by default the SASL + application does not affect which log events are + logged.

By default, supervisor reports and crash + reports are logged by the default Logger handler started + by Kernel, and end up at the same destination (terminal + or file) as other standard log event from Erlang/OTP.

+

Progress reports are not logged by default, but can be + enabled with the Kernel configuration parameter + logger_progress_reports.

To obtain + backwards compatibility with the SASL error logging + functionality from earlier releases, set Kernel + configuration parameter logger_sasl_compatible to + true. This prevents the default Logger handler + from logging any supervisor-, crash-, or progress + reports. Instead, SASL adds a separate Logger handler + during application start, which takes care of these log + events. The SASL configuration parameters + sasl_error_logger and sasl_errlog_type + specify the destination (terminal or file) and severity + level to log for these events.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13295

+
+ +

+ gen_sctp:connect_init/4 or rather connect in + inet_drv.c for SCTP has been fixed to not check + the write file descriptor for writeability after a + connect, since for SCTP (SOCK_SEQPACKET) that property + does not seem to be any kind of indicator for when a + connect has finished. This fixes connects that the OS + returned as "in progress" that was misinterpreted by + gen_sctp:connect_init as failed.

+

+ Own Id: OTP-13760 Aux Id: PR-1592

+
+ +

The file driver has been rewritten as a NIF, + decreasing the latency of file operations. Two notable + incompatibilities are:

The + use_threads option for file:sendfile/5 no + longer has any effect; we either use non-blocking + sendfile(2) or fall back to file:read + + gen_tcp:send.

The + file-specific DTrace probes have been removed. The same + effect can be achieved with normal tracing together with + the nif__entry/nif__return probes to track + scheduling.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14256

+
+ +

The I/O polling functionality of erts has been + re-written to better make use of the OSs polling + mechanisms. This change means that erts will now always + prefer to use a kernel-polling mechanism if possible. + Also all of the I/O polling has been moved to dedicated + threads instead of being placed in the scheduler + loops.

As a result of this, the erl options + +K and +secio have been removed. It is + still possible to disable kernel-poll, but it has to be + done at compile time through the configure option + --disable-kernel-poll.

The new erl + options +IOt + and +IOp can + be used to change how many IO poll threads and poll sets + that erts should use. See their respective documentation + for more details.

+

+ Own Id: OTP-14346

+
+ +

Truly asynchronous auto-connect. Earlier, when + erlang:send was done toward an unconnected node, + the function would not return until the connection setup + had completed (or failed). Now the function returns + directly after the signal has been enqueued and the + connection setup started.

+

The same applies to all distributed operations that + may trigger auto-connect, i.e. '!', send, + link, monitor, monitor_node, + exit/2 and group_leader.

+

The interface for all these functions are unchanged as + they do not return connection failures. The only + exception is erlang:monitor where a possible + incompatibility is introduced: An attempt to monitor + a process on a primitive node (such as erl_interface or + jinterface), where remote process monitoring is not + implemented, will no longer fail with badarg + exception. Instead a monitor will be created, but it will + only supervise the connection to the node.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14370

+
+ +

Changed the default behaviour of .erlang + loading: .erlang is no longer loaded from the + current directory. c:erlangrc(PathList) can be + used to search and load an .erlang file from user + specified directories.

escript, + erlc, dialyzer and typer no longer + load an .erlang at all.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14439

+
+ +

+ New functionality for implementation of alternative + carriers for the Erlang distribution has been introduced. + This mainly consists of support for usage of distribution + controller processes (previously only ports could be used + as distribution controllers). For more information see + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution + Module.

+

+ Own Id: OTP-14459

+
+ +

+ Add support for the lcc compiler and in extension the + Elbrus 2000 platform.

+

+ Own Id: OTP-14492

+
+ +

Support for "tuple calls" have been removed from the + run-time system. Tuple calls was an undocumented and + unsupported feature which allowed the module argument for + an apply operation to be a tuple: Var = dict:new(), + Var:size(). This "feature" frequently caused + confusion, especially when such call failed. The + stacktrace would point out functions that don't exist in + the source code.

+

For legacy code that need to use parameterized modules + or tuple calls for some other reason, there is a new + compiler option called tuple_calls. When this + option is given, the compiler will generate extra code + that emulates the old behavior for calls where the module + is a variable.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14497

+
+ +

Creation of small maps with literal keys has been + optimized to be faster and potentially use less memory. + The keys are combined into a literal key tuple which is + put into the literal pool. The key tuple can be shared + between many instances of maps having the same keys.

+

+ Own Id: OTP-14502

+
+ +

+ When an exception is thrown, include the arguments of the + call in the stacktrace for BIFs band, bor, + bsl, bsr, bxor, div, + rem and the operators +, -, * + and /.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14508

+
+ +

+ The non-smp emulators have been removed. This means that + the configure options --disable-threads and + --enable-plain-emulator have been removed and + configure will now refuse to build Erlang/OTP on + platforms without thread support.

+

+ In order to achieve a similar setup as the non-smp + emulator, it is possible to start Erlang/OTP with the + +S 1 option.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14518

+
+ +

Modules that use floating point constants compiled + with R15 or earlier will need to be re-compiled before + they can be loaded.

+

+ Own Id: OTP-14575

+
+ +

+ Implementation of true asynchronous signaling between + processes in order to improve scalability. Signals + affected include exit, monitor, demonitor, monitor + triggered, link, unlink, and group leader.

+

+ Own Id: OTP-14589

+
+ +

+ Added a PGO (profile guided optimization) pass to the + build step of erts. This can be disabled by passing + --disable-pgo to configure.

+

+ Own Id: OTP-14604

+
+ +

+ Improved the performance of binary:split and + binary:match.

+

+ Own Id: OTP-14610 Aux Id: PR-1480

+
+ +

+ It is not longer possible to disable dirty schedulers + when building erlang.

+

+ Own Id: OTP-14613

+
+ +

Loaded BEAM code in a 64-bit system requires less + memory because of better packing of operands for + instructions.

+

These memory savings were achieved by major + improvements to the beam_makeops scripts used when + building the run time system and BEAM compiler. There is + also new for documentation for beam_makeops that + describes how new BEAM instructions and loader + transformations can be implemented. The documentation is + found in here in a source directory or git repository: + erts/emulator/internal_doc/beam_makeops.md. An online + version can be found here: + https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

+

+ Own Id: OTP-14626

+
+ +

file:read_file has been changed to read the + content of files that report a size of 0 even when data + can be read from them. An example of such a file is + /proc/cpuinfo on Linux.

+

+ Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

+
+ +

+ It is no longer possible to disable the temp_alloc + allocator. Disabling it caused serious performance + degradations and was never what was wanted.

+

+ Own Id: OTP-14651

+
+ +

The reduction cost of sending messages is now + constant. It will no longer scale according to the length + of the receiving process' message queue.

+

+ Own Id: OTP-14667

+
+ +

+ Improved loading of modules with -on_load + directive, to no longer block all schedulers when the + load operation is completed.

+

+ Own Id: OTP-14680

+
+ +

+ On platforms with real-time signals available, SIGRTMIN+1 + is now used as the internal scheduler suspend signal + instead of SIGUSR2.

+

+ Own Id: OTP-14682

+
+ +

When the value returned from a 'catch' + expression is ignored, no stacktrace will be built if an + exception is caught. That will save time and produce less + garbage. There are also some minor optimizations of + 'try/catch' both in the compiler and + run-time system.

+

+ Own Id: OTP-14683

+
+ +

The guarantees and non-guarantees of + erlang:get_stacktrace/0 are now documented.

+

+ Own Id: OTP-14687

+
+ +

There is a new syntax in 'try/catch' for + retrieving the stacktrace without calling + 'erlang:get_stacktrace/0'. See the reference + manual for a description of the new syntax. The + 'erlang:get_stacktrace/0' BIF is now + deprecated.

+

+ Own Id: OTP-14692

+
+ +

+ New 'used' option for binary_to_term/2 that will + also return number of bytes actually read from the + binary. This enables easy access to any extra data in the + binary located directly after the returned term.

+

+ Own Id: OTP-14780

+
+ +

+ Added more statistics for + erlang:system_info({allocator,A}) in the + mbcs_pool section.

+

+ Own Id: OTP-14795 Aux Id: ERL-88

+
+ +

Added enif_ioq_peek_head to retrieve Erlang + terms from NIF IO queues without having to resort to + copying.

+

+ Own Id: OTP-14797

+
+ +

There is a new option 'makedep_side_effect' for + the compiler and -MMD for 'erlc' that + generates dependencies and continues to compile as + normal.

+

+ Own Id: OTP-14830

+
+ +

Added ets:whereis/1 for retrieving the table + identifier of a named table.

+

+ Own Id: OTP-14884

+
+ +

seq_trace labels may now be any erlang + term.

+

+ Own Id: OTP-14899

+
+ +

+ Optimized the common case of monitor followed by + send to the same local process. The monitor signal + is now delayed in order to be piggybacked with the sent + message and thereby only get one lock operation on the + message queue of the receiver. A delayed monitor signal + is flushed if no send has been done at the latest + when the process is scheduled out.

+

+ Own Id: OTP-14901

+
+ +

+ Make hipe compiled code work on x86_64 (amd64) with OS + security feature PIE, where executable code can be loaded + into a random location. Old behavior, if hipe was + enabled, was to disable PIE build options for the VM.

+

+ Own Id: OTP-14903

+
+ +

The number of driver async threads will now default to + 1 as the standard drivers do not use them anymore. Users + that changed this value to tweak the file driver should + replace +A with +SDio since it now uses + dirty IO schedulers instead of async threads.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14928

+
+ +

+ Optimize == and /= for binaries with + different sizes to be constant in time instead of + proportional to the size of their common prefix.

+

+ Own Id: OTP-14934 Aux Id: PR-1708

+
+ +

+ Refactorings making some internal process flags available + for other usage.

+

+ Own Id: OTP-14948

+
+ +

+ Removed need for HiPE to allocate native executable + memory in low 2GB address space on x86_64. Command line + option +MXscs is thereby obsolete and ignored.

+

+ Own Id: OTP-14951

+
+ +

Added enif_make_map_from_arrays for creating a + populated map, analogous to + enif_make_list_from_array.

+

+ Own Id: OTP-14954

+
+ +

Added configuration switches for busy-wait and wake up + thresholds for dirty schedulers, and changing these + settings for normal schedulers will no longer affect + dirty schedulers.

Refer to the documentation for + details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

The + default busy wait threshold for dirty scheduler threads + has also been lowered to short.

+

+ Own Id: OTP-14959

+
+ +

+ The list of "taints" now also includes dynamic loaded + drivers in addition to NIF libraries. Statically linked + drivers and NIF libraries that are part of erts are not + included. The "taints" are returned by + system_info(taints) and printed in the header of + erl_crash.dump files.

+

+ Own Id: OTP-14960

+
+ +

Added instrument:allocations and + instrument:carriers for retrieving information + about memory utilization and fragmentation.

+

The old instrument interface has been removed, + as have the related options +Mim and + +Mis.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14961

+
+ +

The process suspend functionality used by the erlang:suspend_process/2 + BIF has been reimplemented using the newly introduced + true asynchronous signaling between processes. This + mainly to reduce memory usage in the process control + block of all processes, but also in order to simplify the + implementation.

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.

Other ERTS internal + functionality that used the previous process suspend + functionality have also been reimplemented to use + asynchronous signaling instead.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14964 Aux Id: OTP-14589

+
+ +

Added the nifs option to + ?MODULE:module_info/1 for listing a module's + installed NIF functions.

+

+ Own Id: OTP-14965

+
+ +

+ New implementation of erlang:process_info/[1,2].

+

+ In the general case when inspecting another process, the + new implementation sends an asynchronous process-info + request signal to the other process and waits for the + result instead of locking the other process and reading + the result directly. In some special cases where no + conflicts occur, signal order wont be violated, and the + amount of data requested is guaranteed to be small, the + inspected process may be inspected directly.

+

+ Appropriate amount of reductions are now also bumped when + inspecting a process.

+

+ Own Id: OTP-14966

+
+ +

+ Removed process start time from crash dump in order to + save memory in process control block.

+

+ Own Id: OTP-14975 Aux Id: PR-1597

+
+ +

+ Optimize erlang:put/2 when updating existing key + with a new immediate value (atom, small integer, pid, + port).

+

+ Own Id: OTP-14976

+
+ +

+ erlang:process_info/1 has been changed to no + longer include messages by default. Instead + erlang:process_info/2 should be used.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14986 Aux Id: PR-1745

+
+ +

+ New NIF functions: enif_mutex_name, + enif_cond_name, enif_rwlock_name, + enif_thread_name, enif_vfprintf, + enif_vsnprintf.

+

+ Own Id: OTP-14994

+
+ +

When erlang:system_flag(backtrace_depth, 0) has + been called, all exceptions will now contain the entry + for one function (despite the zero). It used to + be that a hand-made stack backtrace passed to + erlang:raise/3 would be be truncated to an empty + list.

+

+ Own Id: OTP-15026

+
+ +

+ Fixed bug for named ets tables which could cause + unexpected results from matchspec iteration functions + (ets:select* and ets:match*) if the table + was deleted and recreated with the same name during the + iteration. The iteration could incorrectly continue + through the recreated table. The expected correct + behavior is now for the iteration call to fail with a + badarg exception if the table is deleted before + the iteration has completed.

+

+ Own Id: OTP-15031

+
+ +

Two new guards BIFs operating on maps have been added: + map_get/2 and is_map_key/2. They do the + same as maps:get/2 and maps:is_key/2, + respectively, except that they are allowed to be used in + guards.

+

+ Own Id: OTP-15037 Aux Id: PR-1784, PR-1802

+
+ +

+ Release run-queue lock while cleaning up terminated dirty + process.

+

+ Own Id: OTP-15081

+
+ +

The callback module passed as -epmd_module to + erl has been expanded to be able to do name and port + resolving.

Documentation has also been added in + the erl_epmd + reference manual and ERTS User's Guide How to Implement an Alternative + Service Discovery for Erlang Distribution.

+

+ Own Id: OTP-15086 Aux Id: PR-1694

+
+
+
+ +
+
Erts 9.3.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b9faca269de1de51ae33577cc204befbea24243c Mon Sep 17 00:00:00 2001 From: Henrik Date: Tue, 29 May 2018 10:47:25 +0200 Subject: Revert "Prepare release" This reverts commit fd8e49b5bddceaae803670121b603b5eee8c5c08. --- erts/doc/src/notes.xml | 877 ------------------------------------------------- 1 file changed, 877 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index d741e29958..929d569f16 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,883 +31,6 @@

This document describes the changes made to the ERTS application.

-
Erts 10.0 - -
Fixed Bugs and Malfunctions - - -

- The type specifications for file:posix/0 and - inet:posix/0 have been updated according to which - errors file and socket operations should be able to - return.

-

- Own Id: OTP-14019 Aux Id: ERL-550

-
- -

- Fix error printout from run_erl and a bug that could - cause unintended fds to be leaked into the started - program.

-

- Own Id: OTP-14537 Aux Id: PR1529

-
- -

File operations used to accept filenames - containing null characters (integer value zero). This - caused the name to be truncated and in some cases - arguments to primitive operations to be mixed up. - Filenames containing null characters inside the filename - are now rejected and will cause primitive file - operations to fail.

Also environment variable - operations used to accept names and - values of - environment variables containing null characters (integer - value zero). This caused operations to silently produce - erroneous results. Environment variable names and values - containing null characters inside the name or value are - now rejected and will cause environment variable - operations to fail.

Primitive environment - variable operations also used to accept the $= - character in environment variable names causing various - problems. $= characters in environment variable - names are now also rejected.

Also - os:cmd/1 now - reject null characters inside its command. -

erlang:open_port/2 - will also reject null characters inside the port name - from now on.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14543 Aux Id: ERL-370

-
- -

- Fix bugs related to the bookkeeping of microstate - accounting states.

-

- Own Id: OTP-14652

-
- -

os:putenv and os:getenv no longer access - the process environment directly and instead work on a - thread-safe emulation. The only observable difference is - that it's not kept in sync with libc - getenv(3) / putenv(3), so those who relied - on that behavior in drivers or NIFs will need to add - manual synchronization.

On Windows this means that - you can no longer resolve DLL dependencies by modifying - the PATH just before loading the driver/NIF. To - make this less of a problem, the emulator now adds the - target DLL's folder to the DLL search path.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14666

-
- -

Corrected erlang:is_builtin(erlang, M, F) to - return true for apply/2 and - yield/0.

-

- Own Id: OTP-14713 Aux Id: ERL-500

-
- -

Fixed a bug where the PATH environment variable wasn't - updated correctly on a release downgrade, effectively - keeping the PATH of the new release.

-

- Own Id: OTP-14719

-
- -

A receive optimization that avoids scanning the entire - message queue when receiving a message containing a - freshly created reference could in rare circumstances - (involving recursive calls to the functions that does the - receive) cause the receive to hang. This has been - corrected.

-

- Own Id: OTP-14782 Aux Id: ERL-511

-
- -

- Fix building of Erlang/OTP on platforms which have small - data area with short addressing. For example the - PowerPC/RTEMS platform.

-

- Own Id: OTP-14909 Aux Id: PR-1692

-
- -

Fixed a crash when enif_make_binary is called - with a binary produced by enif_inspect_binary in a - different environment.

-

- Own Id: OTP-14931

-
- -

Fixed a crash when enif_make_binary is called - more than once with a binary that had previously been - added to an enif_ioq.

-

- Own Id: OTP-14932

-
- -

- The erl_child_setup program now ignores SIGTERM signals.

-

- Own Id: OTP-14943 Aux Id: ERL-576

-
- -

- Force 64-bit alignment on pre-allocators on architectures - which needs it.

-

- Own Id: OTP-14977

-
- -

- Fixed a bug where dirty scheduler picked up non-dirty - work.

-

- Own Id: OTP-14978

-
- -

- Calls to gen_tcp:send/2 on closed sockets now - returns {error, closed} instead of - {error,enotconn}.

-

- Own Id: OTP-15001

-
- -

- erlang:monotonic_time/1 failed with badarg - when passing the perf_counter time unit as - argument.

-

- Own Id: OTP-15008

-
- -

- Fix bug where rapid init:restart() calls would - sometimes crash because a code load request leaked in - between the restarts.

-

- Own Id: OTP-15013

-
- -

- Improve float_to_list(F, [{decimals,D}]) to closer - conform with io_lib:format("~.*f", [D,F]).

-

- There are however, still cases when float_to_list - does not produce the exact same result as - io_lib:format, especially for large values - F and/or many decimals D.

-

- Own Id: OTP-15015 Aux Id: OTP-14890

-
- -

Fixed a deadlock that would occur on certain - allocators when a reallocation failed with +ramv - enabled.

-

- Own Id: OTP-15024

-
- -

- Fix bug that made it impossible to use an erl_tracer as - the seq_trace trace receiver.

-

- Own Id: OTP-15029

-
- -

- Fix bug where a large (> 1 GB) emulator generated error - logger message would cause the emulator to crash.

-

- Own Id: OTP-15032

-
- -

The emulator will no longer crash when reading the - file information of an ordinary file that has an NTFS - reparse point, such as files stored in a OneDrive-mapped - folder.

-

- Own Id: OTP-15062 Aux Id: ERL-615

-
- -

- Fixed bug in enif_binary_to_term which could cause - memory corruption for immediate terms (atoms, small - integers, pids, ports, empty lists).

-

- Own Id: OTP-15080

-
- -

- Fixed bug in erlang:system_profile/2 that could - cause superfluous {profile,_,active,_,_} messages - for terminating processes.

-

- Own Id: OTP-15085

-
- -

- On OSs with per thread CPU time support, change - cpu_timestamp in erlang:trace/3 to use - it instead of per process CPU time. This makes this - option useable on such OSs when running multiple - schedulers.

-

- Own Id: OTP-15090

-
-
-
- - -
Improvements and New Features - - -

It is now possible to open device files and FIFOs with - file:open/2.

-

- Own Id: OTP-11462

-
- -

- The erlang:system_flag(scheduler_wall_time,Bool) - call is now reference counted and will be turned off if - the (last) process that started the performance - statistics dies. Thus it is no longer possible to start - the statistics with rpc:call(Node, erlang, - system_flag, [scheduler_wall_time, true]) since it - will be turned off directly afterwards when the rpc - process dies.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-11694

-
- -

A new logging API is added to Erlang/OTP, see the - logger(3) manual - page, and section Logging in the - Kernel User's Guide.

-

Calls to error_logger are automatically - redirected to the new API, and legacy error logger event - handlers can still be used. It is, however, recommended - to use the Logger API directly when writing new code.

-

Notice the following potential incompatibilities:

-

Kernel configuration parameters - error_logger still works, but is overruled if the - default handler's output destination is configured with - Kernel configuration parameter logger.

In - general, parameters for configuring error logger are - overwritten by new parameters for configuring - Logger.

The concept of SASL error - logging is deprecated, meaning that by default the SASL - application does not affect which log events are - logged.

By default, supervisor reports and crash - reports are logged by the default Logger handler started - by Kernel, and end up at the same destination (terminal - or file) as other standard log event from Erlang/OTP.

-

Progress reports are not logged by default, but can be - enabled with the Kernel configuration parameter - logger_progress_reports.

To obtain - backwards compatibility with the SASL error logging - functionality from earlier releases, set Kernel - configuration parameter logger_sasl_compatible to - true. This prevents the default Logger handler - from logging any supervisor-, crash-, or progress - reports. Instead, SASL adds a separate Logger handler - during application start, which takes care of these log - events. The SASL configuration parameters - sasl_error_logger and sasl_errlog_type - specify the destination (terminal or file) and severity - level to log for these events.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-13295

-
- -

- gen_sctp:connect_init/4 or rather connect in - inet_drv.c for SCTP has been fixed to not check - the write file descriptor for writeability after a - connect, since for SCTP (SOCK_SEQPACKET) that property - does not seem to be any kind of indicator for when a - connect has finished. This fixes connects that the OS - returned as "in progress" that was misinterpreted by - gen_sctp:connect_init as failed.

-

- Own Id: OTP-13760 Aux Id: PR-1592

-
- -

The file driver has been rewritten as a NIF, - decreasing the latency of file operations. Two notable - incompatibilities are:

The - use_threads option for file:sendfile/5 no - longer has any effect; we either use non-blocking - sendfile(2) or fall back to file:read + - gen_tcp:send.

The - file-specific DTrace probes have been removed. The same - effect can be achieved with normal tracing together with - the nif__entry/nif__return probes to track - scheduling.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14256

-
- -

The I/O polling functionality of erts has been - re-written to better make use of the OSs polling - mechanisms. This change means that erts will now always - prefer to use a kernel-polling mechanism if possible. - Also all of the I/O polling has been moved to dedicated - threads instead of being placed in the scheduler - loops.

As a result of this, the erl options - +K and +secio have been removed. It is - still possible to disable kernel-poll, but it has to be - done at compile time through the configure option - --disable-kernel-poll.

The new erl - options +IOt - and +IOp can - be used to change how many IO poll threads and poll sets - that erts should use. See their respective documentation - for more details.

-

- Own Id: OTP-14346

-
- -

Truly asynchronous auto-connect. Earlier, when - erlang:send was done toward an unconnected node, - the function would not return until the connection setup - had completed (or failed). Now the function returns - directly after the signal has been enqueued and the - connection setup started.

-

The same applies to all distributed operations that - may trigger auto-connect, i.e. '!', send, - link, monitor, monitor_node, - exit/2 and group_leader.

-

The interface for all these functions are unchanged as - they do not return connection failures. The only - exception is erlang:monitor where a possible - incompatibility is introduced: An attempt to monitor - a process on a primitive node (such as erl_interface or - jinterface), where remote process monitoring is not - implemented, will no longer fail with badarg - exception. Instead a monitor will be created, but it will - only supervise the connection to the node.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14370

-
- -

Changed the default behaviour of .erlang - loading: .erlang is no longer loaded from the - current directory. c:erlangrc(PathList) can be - used to search and load an .erlang file from user - specified directories.

escript, - erlc, dialyzer and typer no longer - load an .erlang at all.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14439

-
- -

- New functionality for implementation of alternative - carriers for the Erlang distribution has been introduced. - This mainly consists of support for usage of distribution - controller processes (previously only ports could be used - as distribution controllers). For more information see - ERTS - User's Guide ➜ How to implement an Alternative Carrier - for the Erlang Distribution ➜ Distribution - Module.

-

- Own Id: OTP-14459

-
- -

- Add support for the lcc compiler and in extension the - Elbrus 2000 platform.

-

- Own Id: OTP-14492

-
- -

Support for "tuple calls" have been removed from the - run-time system. Tuple calls was an undocumented and - unsupported feature which allowed the module argument for - an apply operation to be a tuple: Var = dict:new(), - Var:size(). This "feature" frequently caused - confusion, especially when such call failed. The - stacktrace would point out functions that don't exist in - the source code.

-

For legacy code that need to use parameterized modules - or tuple calls for some other reason, there is a new - compiler option called tuple_calls. When this - option is given, the compiler will generate extra code - that emulates the old behavior for calls where the module - is a variable.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14497

-
- -

Creation of small maps with literal keys has been - optimized to be faster and potentially use less memory. - The keys are combined into a literal key tuple which is - put into the literal pool. The key tuple can be shared - between many instances of maps having the same keys.

-

- Own Id: OTP-14502

-
- -

- When an exception is thrown, include the arguments of the - call in the stacktrace for BIFs band, bor, - bsl, bsr, bxor, div, - rem and the operators +, -, * - and /.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14508

-
- -

- The non-smp emulators have been removed. This means that - the configure options --disable-threads and - --enable-plain-emulator have been removed and - configure will now refuse to build Erlang/OTP on - platforms without thread support.

-

- In order to achieve a similar setup as the non-smp - emulator, it is possible to start Erlang/OTP with the - +S 1 option.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14518

-
- -

Modules that use floating point constants compiled - with R15 or earlier will need to be re-compiled before - they can be loaded.

-

- Own Id: OTP-14575

-
- -

- Implementation of true asynchronous signaling between - processes in order to improve scalability. Signals - affected include exit, monitor, demonitor, monitor - triggered, link, unlink, and group leader.

-

- Own Id: OTP-14589

-
- -

- Added a PGO (profile guided optimization) pass to the - build step of erts. This can be disabled by passing - --disable-pgo to configure.

-

- Own Id: OTP-14604

-
- -

- Improved the performance of binary:split and - binary:match.

-

- Own Id: OTP-14610 Aux Id: PR-1480

-
- -

- It is not longer possible to disable dirty schedulers - when building erlang.

-

- Own Id: OTP-14613

-
- -

Loaded BEAM code in a 64-bit system requires less - memory because of better packing of operands for - instructions.

-

These memory savings were achieved by major - improvements to the beam_makeops scripts used when - building the run time system and BEAM compiler. There is - also new for documentation for beam_makeops that - describes how new BEAM instructions and loader - transformations can be implemented. The documentation is - found in here in a source directory or git repository: - erts/emulator/internal_doc/beam_makeops.md. An online - version can be found here: - https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

-

- Own Id: OTP-14626

-
- -

file:read_file has been changed to read the - content of files that report a size of 0 even when data - can be read from them. An example of such a file is - /proc/cpuinfo on Linux.

-

- Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

-
- -

- It is no longer possible to disable the temp_alloc - allocator. Disabling it caused serious performance - degradations and was never what was wanted.

-

- Own Id: OTP-14651

-
- -

The reduction cost of sending messages is now - constant. It will no longer scale according to the length - of the receiving process' message queue.

-

- Own Id: OTP-14667

-
- -

- Improved loading of modules with -on_load - directive, to no longer block all schedulers when the - load operation is completed.

-

- Own Id: OTP-14680

-
- -

- On platforms with real-time signals available, SIGRTMIN+1 - is now used as the internal scheduler suspend signal - instead of SIGUSR2.

-

- Own Id: OTP-14682

-
- -

When the value returned from a 'catch' - expression is ignored, no stacktrace will be built if an - exception is caught. That will save time and produce less - garbage. There are also some minor optimizations of - 'try/catch' both in the compiler and - run-time system.

-

- Own Id: OTP-14683

-
- -

The guarantees and non-guarantees of - erlang:get_stacktrace/0 are now documented.

-

- Own Id: OTP-14687

-
- -

There is a new syntax in 'try/catch' for - retrieving the stacktrace without calling - 'erlang:get_stacktrace/0'. See the reference - manual for a description of the new syntax. The - 'erlang:get_stacktrace/0' BIF is now - deprecated.

-

- Own Id: OTP-14692

-
- -

- New 'used' option for binary_to_term/2 that will - also return number of bytes actually read from the - binary. This enables easy access to any extra data in the - binary located directly after the returned term.

-

- Own Id: OTP-14780

-
- -

- Added more statistics for - erlang:system_info({allocator,A}) in the - mbcs_pool section.

-

- Own Id: OTP-14795 Aux Id: ERL-88

-
- -

Added enif_ioq_peek_head to retrieve Erlang - terms from NIF IO queues without having to resort to - copying.

-

- Own Id: OTP-14797

-
- -

There is a new option 'makedep_side_effect' for - the compiler and -MMD for 'erlc' that - generates dependencies and continues to compile as - normal.

-

- Own Id: OTP-14830

-
- -

Added ets:whereis/1 for retrieving the table - identifier of a named table.

-

- Own Id: OTP-14884

-
- -

seq_trace labels may now be any erlang - term.

-

- Own Id: OTP-14899

-
- -

- Optimized the common case of monitor followed by - send to the same local process. The monitor signal - is now delayed in order to be piggybacked with the sent - message and thereby only get one lock operation on the - message queue of the receiver. A delayed monitor signal - is flushed if no send has been done at the latest - when the process is scheduled out.

-

- Own Id: OTP-14901

-
- -

- Make hipe compiled code work on x86_64 (amd64) with OS - security feature PIE, where executable code can be loaded - into a random location. Old behavior, if hipe was - enabled, was to disable PIE build options for the VM.

-

- Own Id: OTP-14903

-
- -

The number of driver async threads will now default to - 1 as the standard drivers do not use them anymore. Users - that changed this value to tweak the file driver should - replace +A with +SDio since it now uses - dirty IO schedulers instead of async threads.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14928

-
- -

- Optimize == and /= for binaries with - different sizes to be constant in time instead of - proportional to the size of their common prefix.

-

- Own Id: OTP-14934 Aux Id: PR-1708

-
- -

- Refactorings making some internal process flags available - for other usage.

-

- Own Id: OTP-14948

-
- -

- Removed need for HiPE to allocate native executable - memory in low 2GB address space on x86_64. Command line - option +MXscs is thereby obsolete and ignored.

-

- Own Id: OTP-14951

-
- -

Added enif_make_map_from_arrays for creating a - populated map, analogous to - enif_make_list_from_array.

-

- Own Id: OTP-14954

-
- -

Added configuration switches for busy-wait and wake up - thresholds for dirty schedulers, and changing these - settings for normal schedulers will no longer affect - dirty schedulers.

Refer to the documentation for - details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

The - default busy wait threshold for dirty scheduler threads - has also been lowered to short.

-

- Own Id: OTP-14959

-
- -

- The list of "taints" now also includes dynamic loaded - drivers in addition to NIF libraries. Statically linked - drivers and NIF libraries that are part of erts are not - included. The "taints" are returned by - system_info(taints) and printed in the header of - erl_crash.dump files.

-

- Own Id: OTP-14960

-
- -

Added instrument:allocations and - instrument:carriers for retrieving information - about memory utilization and fragmentation.

-

The old instrument interface has been removed, - as have the related options +Mim and - +Mis.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14961

-
- -

The process suspend functionality used by the erlang:suspend_process/2 - BIF has been reimplemented using the newly introduced - true asynchronous signaling between processes. This - mainly to reduce memory usage in the process control - block of all processes, but also in order to simplify the - implementation.

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.

Other ERTS internal - functionality that used the previous process suspend - functionality have also been reimplemented to use - asynchronous signaling instead.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14964 Aux Id: OTP-14589

-
- -

Added the nifs option to - ?MODULE:module_info/1 for listing a module's - installed NIF functions.

-

- Own Id: OTP-14965

-
- -

- New implementation of erlang:process_info/[1,2].

-

- In the general case when inspecting another process, the - new implementation sends an asynchronous process-info - request signal to the other process and waits for the - result instead of locking the other process and reading - the result directly. In some special cases where no - conflicts occur, signal order wont be violated, and the - amount of data requested is guaranteed to be small, the - inspected process may be inspected directly.

-

- Appropriate amount of reductions are now also bumped when - inspecting a process.

-

- Own Id: OTP-14966

-
- -

- Removed process start time from crash dump in order to - save memory in process control block.

-

- Own Id: OTP-14975 Aux Id: PR-1597

-
- -

- Optimize erlang:put/2 when updating existing key - with a new immediate value (atom, small integer, pid, - port).

-

- Own Id: OTP-14976

-
- -

- erlang:process_info/1 has been changed to no - longer include messages by default. Instead - erlang:process_info/2 should be used.

-

- *** POTENTIAL INCOMPATIBILITY ***

-

- Own Id: OTP-14986 Aux Id: PR-1745

-
- -

- New NIF functions: enif_mutex_name, - enif_cond_name, enif_rwlock_name, - enif_thread_name, enif_vfprintf, - enif_vsnprintf.

-

- Own Id: OTP-14994

-
- -

When erlang:system_flag(backtrace_depth, 0) has - been called, all exceptions will now contain the entry - for one function (despite the zero). It used to - be that a hand-made stack backtrace passed to - erlang:raise/3 would be be truncated to an empty - list.

-

- Own Id: OTP-15026

-
- -

- Fixed bug for named ets tables which could cause - unexpected results from matchspec iteration functions - (ets:select* and ets:match*) if the table - was deleted and recreated with the same name during the - iteration. The iteration could incorrectly continue - through the recreated table. The expected correct - behavior is now for the iteration call to fail with a - badarg exception if the table is deleted before - the iteration has completed.

-

- Own Id: OTP-15031

-
- -

Two new guards BIFs operating on maps have been added: - map_get/2 and is_map_key/2. They do the - same as maps:get/2 and maps:is_key/2, - respectively, except that they are allowed to be used in - guards.

-

- Own Id: OTP-15037 Aux Id: PR-1784, PR-1802

-
- -

- Release run-queue lock while cleaning up terminated dirty - process.

-

- Own Id: OTP-15081

-
- -

The callback module passed as -epmd_module to - erl has been expanded to be able to do name and port - resolving.

Documentation has also been added in - the erl_epmd - reference manual and ERTS User's Guide How to Implement an Alternative - Service Discovery for Erlang Distribution.

-

- Own Id: OTP-15086 Aux Id: PR-1694

-
-
-
- -
-
Erts 9.3.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 1c8365272a55301609dc8c46aa49fa0ac048506e Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 18 May 2018 17:59:33 +0200 Subject: erts: Add system_info(ets_count) --- erts/doc/src/erlang.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index cff56b9cb8..5e0d30ebb7 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -8166,6 +8166,12 @@ ok erl(1).

+ + ets_count + +

Returns the number of ETS tables currently existing at the + local node.

+
ets_limit -- cgit v1.2.3 From b8631ef58c94507d876155ac92335fd9606b259f Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 21 May 2018 17:49:52 +0200 Subject: erts,stdlib: Improve docs about obsolete ets_limit --- erts/doc/src/erl.xml | 6 ++++-- erts/doc/src/erlang.xml | 10 +++------- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 74654a295d..4cf0066999 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -631,14 +631,16 @@ of process heaps is destroyed by the crash dump generation.

Option +d instructs the emulator to produce only a core dump and no crash dump if an internal error is detected.

-

Calling +

Calling erlang:halt/1 with a string argument still produces a crash dump. On Unix systems, sending an emulator process a SIGUSR1 signal also forces a crash dump.

-

Sets the maximum number of ETS tables.

+

Sets the maximum number of ETS tables. This limit is + partially obsolete. +

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 5e0d30ebb7..b1fc4ec450 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -8175,13 +8175,9 @@ ok ets_limit -

Returns the maximum number of ETS tables allowed. This - limit can be increased at startup by passing - command-line flag - +e to - erl(1) or by setting environment variable - ERL_MAX_ETS_TABLES before starting the Erlang - runtime system.

+

Returns the limit for number of ETS tables. This limit is + partially obsolete + and number of tables are only limited by available memory.

port_count -- cgit v1.2.3 From abd5642652c564fbcd65c77e62ccc170d737ea8a Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 5 Jun 2018 11:57:43 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 8bd8e6c7b8..31411cc1a2 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,31 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.2 + +
Fixed Bugs and Malfunctions + + +

+ Fixed bug in enif_binary_to_term which could cause + memory corruption for immediate terms (atoms, small + integers, pids, ports, empty lists).

+

+ Own Id: OTP-15080

+
+ +

+ Fixed bug in erlang:system_profile/2 that could + cause superfluous {profile,_,active,_,_} messages + for terminating processes.

+

+ Own Id: OTP-15085

+
+
+
+ +
+
Erts 9.3.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b9d2cb688e562d200663bdbedfa65adc5a29aeae Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Fri, 8 Jun 2018 14:18:36 +0200 Subject: [logger] Update documentation --- erts/doc/src/erlang.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 15bd80e72f..1b973cd60e 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4832,11 +4832,11 @@ RealSystem = system + MissedSystem error_logger -

When set to true, the runtime system sends a - message to the current - error_logger +

When set to true, the runtime system logs an + error event via + logger, containing details about the process when the maximum - heap size is reached. One error_logger report is sent + heap size is reached. One log event is sent each time the limit is reached.

If error_logger is not defined in the map, the system default is used. The default system default is true. @@ -4850,7 +4850,7 @@ RealSystem = system + MissedSystem 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 kill set to false and inspect - the error_logger 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.

@@ -7382,7 +7382,7 @@ ok

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 error_logger. To verify that the + an error event is logged. To verify that the schedulers have bound as requested, call erlang:system_info(scheduler_bindings).

-- cgit v1.2.3 From fb0bb409bff616220b66395e28a882fa9737ff0c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 13 Jun 2018 10:40:21 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 31411cc1a2..5b414853a3 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,26 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3 + +
Fixed Bugs and Malfunctions + + +

+ Fixed bug in ets that could cause VM crash if + process A terminates after fixating a table and process B + deletes the table at "the same time". The table fixation + could be done with ets:safe_fixtable or if process + A terminates in the middle of a long running + select or match call.

+

+ Own Id: OTP-15109

+
+
+
+ +
+
Erts 9.3.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b0900fc2f7daab1c77dd8878c39ab24591bb076b Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Thu, 5 Apr 2018 01:40:20 +0200 Subject: Explain why the AM becomes group leader --- erts/doc/src/erlang.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 1b973cd60e..984072076c 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2068,8 +2068,15 @@ end Typically, this is used when a process started from a certain shell is to have another group leader than init.

+

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.

See also - group_leader/0.

+ group_leader/0 + and OTP + design principles related to starting and stopping + applications.

-- cgit v1.2.3 From 5ca92e2eac1e84fd22f60e7abc3aa2b0ff1cb42b Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Mon, 18 Jun 2018 14:51:18 +0200 Subject: Update copyright year --- erts/doc/src/Makefile | 2 +- erts/doc/src/alt_dist.xml | 2 +- erts/doc/src/driver_entry.xml | 2 +- erts/doc/src/erl.xml | 2 +- erts/doc/src/erl_dist_protocol.xml | 2 +- erts/doc/src/erl_driver.xml | 2 +- erts/doc/src/erl_nif.xml | 2 +- erts/doc/src/erlang.xml | 2 +- erts/doc/src/erlc.xml | 2 +- erts/doc/src/erts_alloc.xml | 2 +- erts/doc/src/match_spec.xml | 2 +- erts/doc/src/notes.xml | 2 +- erts/doc/src/part.xml | 2 +- erts/doc/src/run_erl.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index 96cc4413a9..3cc29e14b1 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 1997-2017. All Rights Reserved. +# Copyright Ericsson AB 1997-2018. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml index 92d40d8558..e6245130fc 100644 --- a/erts/doc/src/alt_dist.xml +++ b/erts/doc/src/alt_dist.xml @@ -4,7 +4,7 @@
- 20002016 + 20002018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml index e8c7e26457..fd7d6223f6 100644 --- a/erts/doc/src/driver_entry.xml +++ b/erts/doc/src/driver_entry.xml @@ -4,7 +4,7 @@
- 20012016 + 20012018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 4cf0066999..05a9895687 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -4,7 +4,7 @@
- 19962017 + 19962018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml index 98a9a76b60..c90c8f9521 100644 --- a/erts/doc/src/erl_dist_protocol.xml +++ b/erts/doc/src/erl_dist_protocol.xml @@ -5,7 +5,7 @@
2007 - 2017 + 2018 Ericsson AB, All Rights Reserved diff --git a/erts/doc/src/erl_driver.xml b/erts/doc/src/erl_driver.xml index e6c9905039..7055889e4a 100644 --- a/erts/doc/src/erl_driver.xml +++ b/erts/doc/src/erl_driver.xml @@ -4,7 +4,7 @@
- 20012017 + 20012018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 8a9ae58e99..a8eff43623 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -4,7 +4,7 @@
- 20012017 + 20012018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 984072076c..b39d0e5e23 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -4,7 +4,7 @@
- 19962017 + 19962018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml index 2214b76a51..be9b4e8d97 100644 --- a/erts/doc/src/erlc.xml +++ b/erts/doc/src/erlc.xml @@ -4,7 +4,7 @@
- 19972016 + 19972018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index 0893eb291c..a094217959 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -4,7 +4,7 @@
- 20022017 + 20022018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 46a3daebe8..5cd6dc1750 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -4,7 +4,7 @@
- 19992016 + 19992018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index b9de00a8af..aaab52e424 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -4,7 +4,7 @@
- 20042017 + 20042018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/part.xml b/erts/doc/src/part.xml index fc39cb30e6..05e9a24af8 100644 --- a/erts/doc/src/part.xml +++ b/erts/doc/src/part.xml @@ -4,7 +4,7 @@
- 19962016 + 19962018 Ericsson AB. All Rights Reserved. diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml index e4c1b943c4..fa36457489 100644 --- a/erts/doc/src/run_erl.xml +++ b/erts/doc/src/run_erl.xml @@ -4,7 +4,7 @@
- 19992016 + 19992018 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From bb19e24a485e9ef43bcca3fbe9757da83f70c3a0 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 19 Jun 2018 08:24:54 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 936 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 936 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index aaab52e424..ed0946d6ba 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,942 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0 + +
Fixed Bugs and Malfunctions + + +

+ The type specifications for file:posix/0 and + inet:posix/0 have been updated according to which + errors file and socket operations should be able to + return.

+

+ Own Id: OTP-14019 Aux Id: ERL-550

+
+ +

+ Fix error printout from run_erl and a bug that could + cause unintended fds to be leaked into the started + program.

+

+ Own Id: OTP-14537 Aux Id: PR1529

+
+ +

File operations used to accept filenames + containing null characters (integer value zero). This + caused the name to be truncated and in some cases + arguments to primitive operations to be mixed up. + Filenames containing null characters inside the filename + are now rejected and will cause primitive file + operations to fail.

Also environment variable + operations used to accept names and + values of + environment variables containing null characters (integer + value zero). This caused operations to silently produce + erroneous results. Environment variable names and values + containing null characters inside the name or value are + now rejected and will cause environment variable + operations to fail.

Primitive environment + variable operations also used to accept the $= + character in environment variable names causing various + problems. $= characters in environment variable + names are now also rejected.

Also + os:cmd/1 now + reject null characters inside its command. +

erlang:open_port/2 + will also reject null characters inside the port name + from now on.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14543 Aux Id: ERL-370

+
+ +

+ Fix bugs related to the bookkeeping of microstate + accounting states.

+

+ Own Id: OTP-14652

+
+ +

os:putenv and os:getenv no longer access + the process environment directly and instead work on a + thread-safe emulation. The only observable difference is + that it's not kept in sync with libc + getenv(3) / putenv(3), so those who relied + on that behavior in drivers or NIFs will need to add + manual synchronization.

On Windows this means that + you can no longer resolve DLL dependencies by modifying + the PATH just before loading the driver/NIF. To + make this less of a problem, the emulator now adds the + target DLL's folder to the DLL search path.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14666

+
+ +

Corrected erlang:is_builtin(erlang, M, F) to + return true for apply/2 and + yield/0.

+

+ Own Id: OTP-14713 Aux Id: ERL-500

+
+ +

Fixed a bug where the PATH environment variable wasn't + updated correctly on a release downgrade, effectively + keeping the PATH of the new release.

+

+ Own Id: OTP-14719

+
+ +

A receive optimization that avoids scanning the entire + message queue when receiving a message containing a + freshly created reference could in rare circumstances + (involving recursive calls to the functions that does the + receive) cause the receive to hang. This has been + corrected.

+

+ Own Id: OTP-14782 Aux Id: ERL-511

+
+ +

+ Fix building of Erlang/OTP on platforms which have small + data area with short addressing. For example the + PowerPC/RTEMS platform.

+

+ Own Id: OTP-14909 Aux Id: PR-1692

+
+ +

Fixed a crash when enif_make_binary is called + with a binary produced by enif_inspect_binary in a + different environment.

+

+ Own Id: OTP-14931

+
+ +

Fixed a crash when enif_make_binary is called + more than once with a binary that had previously been + added to an enif_ioq.

+

+ Own Id: OTP-14932

+
+ +

+ The erl_child_setup program now ignores SIGTERM signals.

+

+ Own Id: OTP-14943 Aux Id: ERL-576

+
+ +

+ Force 64-bit alignment on pre-allocators on architectures + which needs it.

+

+ Own Id: OTP-14977

+
+ +

+ Fixed a bug where dirty scheduler picked up non-dirty + work.

+

+ Own Id: OTP-14978

+
+ +

+ Calls to gen_tcp:send/2 on closed sockets now + returns {error, closed} instead of + {error,enotconn}.

+

+ Own Id: OTP-15001

+
+ +

+ erlang:monotonic_time/1 failed with badarg + when passing the perf_counter time unit as + argument.

+

+ Own Id: OTP-15008

+
+ +

+ Fix bug where rapid init:restart() calls would + sometimes crash because a code load request leaked in + between the restarts.

+

+ Own Id: OTP-15013

+
+ +

+ Improve float_to_list(F, [{decimals,D}]) to closer + conform with io_lib:format("~.*f", [D,F]).

+

+ There are however, still cases when float_to_list + does not produce the exact same result as + io_lib:format, especially for large values + F and/or many decimals D.

+

+ Own Id: OTP-15015 Aux Id: OTP-14890

+
+ +

Fixed a deadlock that would occur on certain + allocators when a reallocation failed with +ramv + enabled.

+

+ Own Id: OTP-15024

+
+ +

+ Fix bug that made it impossible to use an erl_tracer as + the seq_trace trace receiver.

+

+ Own Id: OTP-15029

+
+ +

+ Fix bug where a large (> 1 GB) emulator generated error + logger message would cause the emulator to crash.

+

+ Own Id: OTP-15032

+
+ +

The emulator will no longer crash when reading the + file information of an ordinary file that has an NTFS + reparse point, such as files stored in a OneDrive-mapped + folder.

+

+ Own Id: OTP-15062 Aux Id: ERL-615

+
+ +

+ Fixed bug in enif_binary_to_term which could cause + memory corruption for immediate terms (atoms, small + integers, pids, ports, empty lists).

+

+ Own Id: OTP-15080

+
+ +

+ Fixed bug in erlang:system_profile/2 that could + cause superfluous {profile,_,active,_,_} messages + for terminating processes.

+

+ Own Id: OTP-15085

+
+ +

+ On OSs with per thread CPU time support, change + cpu_timestamp in erlang:trace/3 to use + it instead of per process CPU time. This makes this + option useable on such OSs when running multiple + schedulers.

+

+ Own Id: OTP-15090

+
+ +

+ Fix segfault in abort_signal_task which could happen if a + port terminated while there were outstanding port tasks + that were not signals, for example a + ready_input/ready_output event.

+

+ Own Id: OTP-15108 Aux Id: ERL-621

+
+ +

+ Fixed bug in ets that could cause VM crash if + process A terminates after fixating a table and process B + deletes the table at "the same time". The table fixation + could be done with ets:safe_fixtable or if process + A terminates in the middle of a long running + select or match call.

+

+ Own Id: OTP-15109

+
+ +

Owner and group changes through + file:write_file_info, file:change_owner, + and file:change_group will no longer report + success on permission errors.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-15118

+
+ +

+ Fix a bug error reporting from escripts on windows where + the error message would get garbled.

+

+ Own Id: OTP-15119 Aux Id: PR-1826

+
+ +

+ Fix segfault when a process is interally re-scheduled + while being traced for in out events. This bug was + introduced in erts-8.0 (OTP-19.0).

+

+ Own Id: OTP-15125

+
+
+
+ + +
Improvements and New Features + + +

It is now possible to open device files and FIFOs with + file:open/2.

+

+ Own Id: OTP-11462

+
+ +

+ The erlang:system_flag(scheduler_wall_time,Bool) + call is now reference counted and will be turned off if + the (last) process that started the performance + statistics dies. Thus it is no longer possible to start + the statistics with rpc:call(Node, erlang, + system_flag, [scheduler_wall_time, true]) since it + will be turned off directly afterwards when the rpc + process dies.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-11694

+
+ +

A new logging API is added to Erlang/OTP, see the + logger(3) manual + page, and section Logging in the + Kernel User's Guide.

+

Calls to error_logger are automatically + redirected to the new API, and legacy error logger event + handlers can still be used. It is, however, recommended + to use the Logger API directly when writing new code.

+

Notice the following potential incompatibilities:

+

Kernel configuration parameters + error_logger still works, but is overruled if the + default handler's output destination is configured with + Kernel configuration parameter logger.

In + general, parameters for configuring error logger are + overwritten by new parameters for configuring + Logger.

The concept of SASL error + logging is deprecated, meaning that by default the SASL + application does not affect which log events are + logged.

By default, supervisor reports and crash + reports are logged by the default Logger handler started + by Kernel, and end up at the same destination (terminal + or file) as other standard log event from Erlang/OTP.

+

Progress reports are not logged by default, but can be + enabled by setting the primary log level to info, for + example with the Kernel configuration parameter + logger_level.

To obtain backwards + compatibility with the SASL error logging functionality + from earlier releases, set Kernel configuration parameter + logger_sasl_compatible to true. This + prevents the default Logger handler from logging any + supervisor-, crash-, or progress reports. Instead, SASL + adds a separate Logger handler during application start, + which takes care of these log events. The SASL + configuration parameters sasl_error_logger and + sasl_errlog_type specify the destination (terminal + or file) and severity level to log for these + events.

+

+ Since Logger is new in Erlang/OTP 21.0, we do reserve the + right to introduce changes to the Logger API and + functionality in patches following this release. These + changes might or might not be backwards compatible with + the initial version.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-13295

+
+ +

+ gen_sctp:connect_init/4 or rather connect in + inet_drv.c for SCTP has been fixed to not check + the write file descriptor for writeability after a + connect, since for SCTP (SOCK_SEQPACKET) that property + does not seem to be any kind of indicator for when a + connect has finished. This fixes connects that the OS + returned as "in progress" that was misinterpreted by + gen_sctp:connect_init as failed.

+

+ Own Id: OTP-13760 Aux Id: PR-1592

+
+ +

The file driver has been rewritten as a NIF, + decreasing the latency of file operations. Notable + incompatibilities are:

The + use_threads option for file:sendfile/5 no + longer has any effect; we either use non-blocking + sendfile(2) or fall back to file:read + + gen_tcp:send.

The + file-specific DTrace probes have been removed. The same + effect can be achieved with normal tracing together with + the nif__entry/nif__return probes to track + scheduling.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14256

+
+ +

The I/O polling functionality of erts has been + re-written to better make use of the OSs polling + mechanisms. This change means that erts will now always + prefer to use a kernel-polling mechanism if possible. + Also all of the I/O polling has been moved to dedicated + threads instead of being placed in the scheduler + loops.

As a result of this, the erl options + +K and +secio have been removed. It is + still possible to disable kernel-poll, but it has to be + done at compile time through the configure option + --disable-kernel-poll.

The new erl + options +IOt + and +IOp can + be used to change how many IO poll threads and poll sets + that erts should use. See their respective documentation + for more details.

+

+ Own Id: OTP-14346

+
+ +

Truly asynchronous auto-connect. Earlier, when + erlang:send was aimed toward an unconnected node, + the function would not return until the connection setup + had completed (or failed). Now the function returns + directly after the message has been enqueued and the + connection setup started.

+

The same applies to all distributed operations that + may trigger auto-connect, i.e. '!', send, + link, monitor, monitor_node, + exit/2 and group_leader.

+

The interface for all these functions are unchanged as + they do not return connection failures. The only + exception is erlang:monitor where a possible + incompatibility is introduced: An attempt to monitor + a process on a primitive node (such as erl_interface or + jinterface), where remote process monitoring is not + implemented, will no longer fail with badarg + exception. Instead a monitor will be created, but it will + only supervise the connection to the node.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14370

+
+ +

Changed the default behaviour of .erlang + loading: .erlang is no longer loaded from the + current directory. c:erlangrc(PathList) can be + used to search and load an .erlang file from user + specified directories.

escript, + erlc, dialyzer and typer no longer + load an .erlang at all.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14439

+
+ +

+ New functionality for implementation of alternative + carriers for the Erlang distribution has been introduced. + This mainly consists of support for usage of distribution + controller processes (previously only ports could be used + as distribution controllers). For more information see + ERTS + User's Guide ➜ How to implement an Alternative Carrier + for the Erlang Distribution ➜ Distribution + Module.

+

+ Own Id: OTP-14459

+
+ +

+ Add support for the lcc compiler and in extension the + Elbrus 2000 platform.

+

+ Own Id: OTP-14492

+
+ +

Support for "tuple calls" have been removed from the + run-time system. Tuple calls was an undocumented and + unsupported feature which allowed the module argument for + an apply operation to be a tuple: Var = dict:new(), + Var:size(). This "feature" frequently caused + confusion, especially when such call failed. The + stacktrace would point out functions that don't exist in + the source code.

+

For legacy code that need to use parameterized modules + or tuple calls for some other reason, there is a new + compiler option called tuple_calls. When this + option is given, the compiler will generate extra code + that emulates the old behavior for calls where the module + is a variable.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14497

+
+ +

Creation of small maps with literal keys has been + optimized to be faster and potentially use less memory. + The keys are combined into a literal key tuple which is + put into the literal pool. The key tuple can be shared + between many instances of maps having the same keys.

+

+ Own Id: OTP-14502

+
+ +

+ When an exception is thrown, include the arguments of the + call in the stacktrace for BIFs band, bor, + bsl, bsr, bxor, div, + rem and the operators +, -, * + and /.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14508

+
+ +

+ The non-smp emulators have been removed. This means that + the configure options --disable-threads and + --enable-plain-emulator have been removed and + configure will now refuse to build Erlang/OTP on + platforms without thread support.

+

+ In order to achieve a similar setup as the non-smp + emulator, it is possible to start Erlang/OTP with the + +S 1 option.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14518

+
+ +

Modules that use floating point constants compiled + with R15 or earlier will need to be re-compiled before + they can be loaded.

+

+ Own Id: OTP-14575

+
+ +

+ Implementation of true asynchronous signaling between + processes in order to improve scalability. Signals + affected include exit, monitor, demonitor, monitor + triggered, link, unlink, and group leader.

+

+ Own Id: OTP-14589

+
+ +

+ Added a PGO (profile guided optimization) pass to the + build step of erts. This can be disabled by passing + --disable-pgo to configure.

+

+ Own Id: OTP-14604

+
+ +

+ Improved the performance of binary:split and + binary:match.

+

+ Own Id: OTP-14610 Aux Id: PR-1480

+
+ +

+ It is not longer possible to disable dirty schedulers + when building erlang.

+

+ Own Id: OTP-14613

+
+ +

Loaded BEAM code in a 64-bit system requires less + memory because of better packing of operands for + instructions.

+

These memory savings were achieved by major + improvements to the beam_makeops scripts used when + building the run time system and BEAM compiler. There is + also new for documentation for beam_makeops that + describes how new BEAM instructions and loader + transformations can be implemented. The documentation is + found in here in a source directory or git repository: + erts/emulator/internal_doc/beam_makeops.md. An online + version can be found here: + https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

+

+ Own Id: OTP-14626

+
+ +

file:read_file has been changed to read the + content of files that report a size of 0 even when data + can be read from them. An example of such a file is + /proc/cpuinfo on Linux.

+

+ Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

+
+ +

+ It is no longer possible to disable the temp_alloc + allocator. Disabling it caused serious performance + degradations and was never what was wanted.

+

+ Own Id: OTP-14651

+
+ +

The reduction cost of sending messages is now + constant. It will no longer scale according to the length + of the receiving process' message queue.

+

+ Own Id: OTP-14667

+
+ +

+ Improved loading of modules with -on_load + directive, to no longer block all schedulers when the + load operation is completed.

+

+ Own Id: OTP-14680

+
+ +

+ On platforms with real-time signals available, SIGRTMIN+1 + is now used as the internal scheduler suspend signal + instead of SIGUSR2.

+

+ Own Id: OTP-14682

+
+ +

When the value returned from a 'catch' + expression is ignored, no stacktrace will be built if an + exception is caught. That will save time and produce less + garbage. There are also some minor optimizations of + 'try/catch' both in the compiler and + run-time system.

+

+ Own Id: OTP-14683

+
+ +

The guarantees and non-guarantees of + erlang:get_stacktrace/0 are now documented.

+

+ Own Id: OTP-14687

+
+ +

There is a new syntax in 'try/catch' for + retrieving the stacktrace without calling + 'erlang:get_stacktrace/0'. See the reference + manual for a description of the new syntax. The + 'erlang:get_stacktrace/0' BIF is now + deprecated.

+

+ Own Id: OTP-14692

+
+ +

+ New 'used' option for binary_to_term/2 that will + also return number of bytes actually read from the + binary. This enables easy access to any extra data in the + binary located directly after the returned term.

+

+ Own Id: OTP-14780

+
+ +

+ Added more statistics for + erlang:system_info({allocator,A}) in the + mbcs_pool section.

+

+ Own Id: OTP-14795 Aux Id: ERL-88

+
+ +

Added enif_ioq_peek_head to retrieve Erlang + terms from NIF IO queues without having to resort to + copying.

+

+ Own Id: OTP-14797

+
+ +

There is a new option 'makedep_side_effect' for + the compiler and -MMD for 'erlc' that + generates dependencies and continues to compile as + normal.

+

+ Own Id: OTP-14830

+
+ +

Added ets:whereis/1 for retrieving the table + identifier of a named table.

+

+ Own Id: OTP-14884

+
+ +

seq_trace labels may now be any erlang + term.

+

+ Own Id: OTP-14899

+
+ +

+ Optimized the common case of monitor followed by + send to the same local process. The monitor signal + is now delayed in order to be piggybacked with the sent + message and thereby only get one lock operation on the + message queue of the receiver. A delayed monitor signal + is flushed if no send has been done at the latest + when the process is scheduled out.

+

+ Own Id: OTP-14901

+
+ +

+ Make hipe compiled code work on x86_64 (amd64) with OS + security feature PIE, where executable code can be loaded + into a random location. Old behavior, if hipe was + enabled, was to disable PIE build options for the VM.

+

+ Own Id: OTP-14903

+
+ +

The number of driver async threads will now default to + 1 as the standard drivers do not use them anymore. Users + that changed this value to tweak the file driver should + replace +A with +SDio since it now uses + dirty IO schedulers instead of async threads.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14928

+
+ +

+ Optimize == and /= for binaries with + different sizes to be constant in time instead of + proportional to the size of their common prefix.

+

+ Own Id: OTP-14934 Aux Id: PR-1708

+
+ +

+ Refactorings making some internal process flags available + for other usage.

+

+ Own Id: OTP-14948

+
+ +

+ Removed need for HiPE to allocate native executable + memory in low 2GB address space on x86_64. Command line + option +MXscs is thereby obsolete and ignored.

+

+ Own Id: OTP-14951

+
+ +

Added enif_make_map_from_arrays for creating a + populated map, analogous to + enif_make_list_from_array.

+

+ Own Id: OTP-14954

+
+ +

Added configuration switches for busy-wait and wake up + thresholds for dirty schedulers, and changing these + settings for normal schedulers will no longer affect + dirty schedulers.

Refer to the documentation for + details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

The + default busy wait threshold for dirty scheduler threads + has also been lowered to short.

+

+ Own Id: OTP-14959

+
+ +

+ The list of "taints" now also includes dynamic loaded + drivers in addition to NIF libraries. Statically linked + drivers and NIF libraries that are part of erts are not + included. The "taints" are returned by + system_info(taints) and printed in the header of + erl_crash.dump files.

+

+ Own Id: OTP-14960

+
+ +

Added instrument:allocations and + instrument:carriers for retrieving information + about memory utilization and fragmentation.

+

The old instrument interface has been removed, + as have the related options +Mim and + +Mis.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14961

+
+ +

The process suspend functionality used by the erlang:suspend_process/2 + BIF has been reimplemented using the newly introduced + true asynchronous signaling between processes. This + mainly to reduce memory usage in the process control + block of all processes, but also in order to simplify the + implementation.

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.

Other ERTS internal + functionality that used the previous process suspend + functionality have also been reimplemented to use + asynchronous signaling instead.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14964 Aux Id: OTP-14589

+
+ +

Added the nifs option to + ?MODULE:module_info/1 for listing a module's + installed NIF functions.

+

+ Own Id: OTP-14965

+
+ +

+ New implementation of erlang:process_info/[1,2].

+

+ In the general case when inspecting another process, the + new implementation sends an asynchronous process-info + request signal to the other process and waits for the + result instead of locking the other process and reading + the result directly. In some special cases where no + conflicts occur, signal order wont be violated, and the + amount of data requested is guaranteed to be small, the + inspected process may be inspected directly.

+

+ Appropriate amount of reductions are now also bumped when + inspecting a process.

+

+ Own Id: OTP-14966

+
+ +

+ Removed process start time from crash dump in order to + save memory in process control block.

+

+ Own Id: OTP-14975 Aux Id: PR-1597

+
+ +

+ Optimize erlang:put/2 when updating existing key + with a new immediate value (atom, small integer, pid, + port).

+

+ Own Id: OTP-14976

+
+ +

+ erlang:process_info/1 has been changed to no + longer include messages by default. Instead + erlang:process_info/2 should be used.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-14986 Aux Id: PR-1745

+
+ +

+ New erlang:system_info(ets_count) to get total + number of ets tables existing at the local node.

+

+ Own Id: OTP-14987

+
+ +

+ New NIF functions: enif_mutex_name, + enif_cond_name, enif_rwlock_name, + enif_thread_name, enif_vfprintf, + enif_vsnprintf.

+

+ Own Id: OTP-14994

+
+ +

When erlang:system_flag(backtrace_depth, 0) has + been called, all exceptions will now contain the entry + for one function (despite the zero). It used to + be that a hand-made stack backtrace passed to + erlang:raise/3 would be be truncated to an empty + list.

+

+ Own Id: OTP-15026

+
+ +

+ Fixed bug for named ets tables which could cause + unexpected results from matchspec iteration functions + (ets:select* and ets:match*) if the table + was deleted and recreated with the same name during the + iteration. The iteration could incorrectly continue + through the recreated table. The expected correct + behavior is now for the iteration call to fail with a + badarg exception if the table is deleted before + the iteration has completed.

+

+ Own Id: OTP-15031

+
+ +

Two new guards BIFs operating on maps have been added: + map_get/2 and is_map_key/2. They do the + same as maps:get/2 and maps:is_key/2, + respectively, except that they are allowed to be used in + guards.

+

+ Own Id: OTP-15037 Aux Id: PR-1784, PR-1802

+
+ +

+ Release run-queue lock while cleaning up terminated dirty + process.

+

+ Own Id: OTP-15081

+
+ +

The callback module passed as -epmd_module to + erl has been expanded to be able to do name and port + resolving.

Documentation has also been added in + the erl_epmd + reference manual and ERTS User's Guide How to Implement an Alternative + Service Discovery for Erlang Distribution.

+

+ Own Id: OTP-15086 Aux Id: PR-1694

+
+
+
+ +
+
Erts 9.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b2ce42832189f964c7e868297f87573706232364 Mon Sep 17 00:00:00 2001 From: Artur Cygan Date: Tue, 19 Jun 2018 22:52:03 +0200 Subject: Update system_info doc to include ets_count --- erts/doc/src/erlang.xml | 170 ++++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 84 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b39d0e5e23..41612f3ac1 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -7581,7 +7581,7 @@ ok - + System info overview.

Returns information about the current system. @@ -7629,6 +7629,7 @@ ok

atom_count, atom_limit, + ets_count, ets_limit, port_count, port_limit, @@ -7872,8 +7873,8 @@ ok - - + + Information about the CPU topology of the system. @@ -8024,16 +8025,16 @@ ok - - - - - - - - - + + + + + + + + Information about the default process heap settings. @@ -8143,14 +8144,14 @@ ok - + - - - - - + + + + + + Information about various system limits. @@ -8173,7 +8174,7 @@ ok erl(1).

- + ets_count

Returns the number of ETS tables currently existing at the @@ -8225,13 +8226,13 @@ ok - - - - - - - + + + + + + + Information about system time. @@ -8455,16 +8456,16 @@ ok anchor="system_info_scheduler"/> - - - - - - - - - - + + + + + + + + + + Information about system schedulers. @@ -8851,53 +8852,54 @@ ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Information about the system. -- cgit v1.2.3 From fedc1bb5ff55d4a153f89bb5c41caaff697039e2 Mon Sep 17 00:00:00 2001 From: Christopher Keele Date: Sun, 24 Jun 2018 01:33:31 -0700 Subject: Add missing bracket to erlang:spawn_opt/4 priority option docs --- erts/doc/src/erlang.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index b39d0e5e23..0a98e9c822 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6170,7 +6170,7 @@ true

Monitors the new process (like monitor/2 does).

- {priority, Level + {priority, Level}

Sets the priority of the new process. Equivalent to executing -- cgit v1.2.3 From aeb4b903064ac690372fe4d2e668397d349c00d9 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 25 Jun 2018 13:19:45 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index ed0946d6ba..67e27afc81 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.1 + +
Fixed Bugs and Malfunctions + + +

The keys used in os:getenv and os:putenv + are case-insensitive again on Windows.

+

+ Own Id: OTP-15147 Aux Id: ERL-644

+
+
+
+ +
+
Erts 10.0
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b059b597cb31be08220cb967c117033f34ca49c4 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 28 Jun 2018 17:09:22 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5b414853a3..dbff85c195 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3.1 + +
Fixed Bugs and Malfunctions + + +

Fixed a rare bug that could cause processes to be + scheduled after they had been freed.

+

+ Own Id: OTP-15067 Aux Id: ERL-573

+
+
+
+ +
+
Erts 9.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 5c8e7e905a678e1214cab55fed38d6d93fab04cb Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 29 Jun 2018 14:30:53 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 67e27afc81..856020dfc9 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,34 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.2 + +
Fixed Bugs and Malfunctions + + +

Fixed a rare bug that could cause processes to be + scheduled after they had been freed.

+

+ Own Id: OTP-15067 Aux Id: ERL-573

+
+
+
+ + +
Known Bugs and Problems + + +

Fixed a race condition in the inet driver that could + cause receive to hang when the emulator was compiled with + gcc 8.

+

+ Own Id: OTP-15158 Aux Id: ERL-654

+
+
+
+ +
+
Erts 10.0.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 2f029aa2df32c2d0c1fdd2801ed52cbadafd56f7 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 2 Jul 2018 21:17:19 +0200 Subject: erts: Remove obsolete paragraph about ERL_NO_VFORK from erlang:open_port/2 docs. --- erts/doc/src/erlang.xml | 7 ------- 1 file changed, 7 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 29b1d106cd..73800687b7 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3772,13 +3772,6 @@ RealSystem = system + MissedSystem 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.

-

When starting external programs on Solaris, the system - call vfork is used in preference to fork - for performance reasons, although it has a history of - being less robust. If there are problems using - vfork, setting environment variable - ERL_NO_VFORK to any value causes fork - to be used instead.

For external programs, PATH is searched (or an equivalent method is used to find programs, depending on the OS). This is done by invoking -- cgit v1.2.3 From 03a6cfaaaf0a0902a608bdcdbc848b0e68a2a70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Wed, 4 Jul 2018 10:22:00 +0200 Subject: Fix release notes for OTP-21.0.2 The release notes generated in the README and notes.xml were out of sync, and notes.xml erroneously listed a fixed bug as open. --- erts/doc/src/notes.xml | 6 ------ 1 file changed, 6 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 856020dfc9..eb81614872 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -41,12 +41,6 @@

Own Id: OTP-15067 Aux Id: ERL-573

- -
- - -
Known Bugs and Problems -

Fixed a race condition in the inet driver that could cause receive to hang when the emulator was compiled with -- cgit v1.2.3 From 9e335b03355708de02017d279a67a42a503892a1 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 5 Jul 2018 15:40:05 +0200 Subject: erts: Correct The Abstract Format A minor correction regarding literal character types. --- erts/doc/src/absform.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index 158f4dc4e8..f29bb7b8f9 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -801,7 +801,8 @@ {ann_type,LINE,[Rep(A),Rep(T_0)]}.

-

If T is an atom or integer literal L, then Rep(T) = Rep(L).

+

If T is an atom, a character, or an integer literal L, + then Rep(T) = Rep(L).

If T is a bitstring type <<_:M,_:_*N>>, -- cgit v1.2.3 From 6fdcb401a0de580fba38eec63a92b45ee73c8b64 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 9 Jul 2018 18:23:35 +0200 Subject: erts: Fix spec and docs for process_info 'monitored_by' to include ports and NIF resources. Added new opaque type 'nif_resource'. --- erts/doc/src/erl_nif.xml | 2 +- erts/doc/src/erlang.xml | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index a8eff43623..0fff8f7cad 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -194,7 +194,7 @@ ok

Binaries are sequences of whole bytes. Bitstrings with an arbitrary bit length have no support yet.

- Resource objects + Resource objects

The use of resource objects is a safe way to return pointers to native data structures from a NIF. A resource object is diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 73800687b7..8e014c3010 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -197,6 +197,15 @@ + + + +

An opaque handle identifing a + NIF resource object + .

+ + + @@ -5288,10 +5297,10 @@ RealSystem = system + MissedSystem

MinBinVHeapSize is the minimum binary virtual heap size for the process.

- {monitored_by, Pids} + {monitored_by, MonitoredBy} -

A list of process identifiers monitoring the process (with - monitor/2).

+

A list of identifiers for all the processes, ports and NIF + resources, that are monitoring the process.

{monitors, Monitors} -- cgit v1.2.3 From 806a4a7f33befc482aa10e25c3cdcf63b87cc594 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 12 Jul 2018 17:53:43 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index eb81614872..ab10647245 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,29 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.3 + +
Fixed Bugs and Malfunctions + + +

Fixed a scheduler bug that caused normal schedulers to + run dirty code.

+

+ Own Id: OTP-15154

+
+ +

+ Fixed a bug in erlang:trace_info/2 which caused + the emulator to crash when a bad argument was passed. The + bug was introduced in ERTS version 10.0.

+

+ Own Id: OTP-15183 Aux Id: ERL-670

+
+
+
+ +
+
Erts 10.0.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From b453f67879df577fcf5b0eb6062ec444b0c43958 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 13 Jul 2018 15:10:57 +0200 Subject: docs: make clean all XMLDIR --- erts/doc/src/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index 3cc29e14b1..21aa3db864 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -149,6 +149,7 @@ debug opt: clean: rm -rf $(HTMLDIR)/* + rm -rf $(XMLDIR) rm -f $(MAN1DIR)/* rm -f $(MAN3DIR)/* rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) -- cgit v1.2.3 From 970732aaabaf7184dc11af27dc0211e9d93c05c6 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 16 Jul 2018 18:41:13 +0200 Subject: erts: Clarify erl_nif docs of enif_*printf and %T --- erts/doc/src/erl_nif.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 0fff8f7cad..a20b8ee884 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1250,8 +1250,9 @@ typedef struct { Format strings and Erlang terms.

Similar to fprintf but this format string also accepts - "%T", which formats Erlang terms.

-

This function was originally intenden for debugging purpose. It is not + "%T", which formats Erlang terms of type + ERL_NIF_TERM.

+

This function is primarily intenden for debugging purpose. It is not recommended to print very large terms with %T. The function may change errno, even if successful.

@@ -3191,8 +3192,9 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) { Format strings and Erlang terms.

Similar to snprintf but this format string also accepts - "%T", which formats Erlang terms.

-

This function was originally intenden for debugging purpose. It is not + "%T", which formats Erlang terms of type + ERL_NIF_TERM.

+

This function is primarily intenden for debugging purpose. It is not recommended to print very large terms with %T. The function may change errno, even if successful.

-- cgit v1.2.3 From 1abacb0e1d272840531b425eef90badd857b13d8 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 18 Jul 2018 14:19:31 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index ab10647245..9463947ab0 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,34 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.4 + +
Fixed Bugs and Malfunctions + + +

Fixed a bug that prevented the noshell option + from working correctly on Mac OS X and BSD.

+

+ Own Id: OTP-15169

+
+ +

Fixed a crash when matching directly against a literal + map using a single key that had been saved on the + stack.

+

+ Own Id: OTP-15184

+
+ +

Fix node crash when passing a bad time option to + file:read_file_info/2.

+

+ Own Id: OTP-15196

+
+
+
+ +
+
Erts 10.0.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 7507f47dc14093443fb8446b969f73d276339413 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 20 Jul 2018 14:10:09 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index dbff85c195..b863bc245a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,31 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3.2 + +
Fixed Bugs and Malfunctions + + +

Fixed a race condition in the inet driver that could + cause receive to hang when the emulator was compiled with + gcc 8.

+

+ Own Id: OTP-15158 Aux Id: ERL-654

+
+ +

+ Fix bug in generation of erl_crash.dump, which could + cause VM to crash.

+

+ Bug exist since erts-9.2 (OTP-20.2).

+

+ Own Id: OTP-15181

+
+
+
+ +
+
Erts 9.3.3.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 831dc5b50dfaeb1ae9679cdeb3f7c7949adf547c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 9 Aug 2018 16:46:45 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 2f2a527176..9dc09dde01 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,37 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.5.5 + +
Fixed Bugs and Malfunctions + + +

Fixed a race condition in the inet driver that could + cause receive to hang when the emulator was compiled with + gcc 8.

+

+ Own Id: OTP-15158 Aux Id: ERL-654

+
+ +

+ Fixed a bug causing some Erlang references to be + inconsistently ordered. This could for example cause + failure to look up certain elements with references as + keys in search data structures. This bug was introduced + in R13B02.

+

+ Thanks to Simon Cornish for finding the bug and supplying + a fix.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-15225

+
+
+
+ +
+
Erts 8.3.5.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 962ea06fa99e36a4631ec6459895d9466e61964c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 9 Aug 2018 17:29:04 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index b863bc245a..4913b0f204 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,41 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3.3 + +
Fixed Bugs and Malfunctions + + +

+ Fixed a bug which caused an emulator crash when + enif_send() was called by a NIF that executed on a + dirty scheduler. The bug was either triggered when the + NIF called enif_send() without a message + environment, or when the process executing the NIF was + send traced.

+

+ Own Id: OTP-15223

+
+ +

+ Fixed a bug causing some Erlang references to be + inconsistently ordered. This could for example cause + failure to look up certain elements with references as + keys in search data structures. This bug was introduced + in R13B02.

+

+ Thanks to Simon Cornish for finding the bug and supplying + a fix.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-15225

+
+
+
+ +
+
Erts 9.3.3.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d41ed9524c7fc93b27aa28f51e8a07be4703a27b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 10 Aug 2018 19:02:49 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 9463947ab0..446296571c 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,41 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.5 + +
Fixed Bugs and Malfunctions + + +

+ Fixed a bug which caused an emulator crash when + enif_send() was called by a NIF that executed on a + dirty scheduler. The bug was either triggered when the + NIF called enif_send() without a message + environment, or when the process executing the NIF was + send traced.

+

+ Own Id: OTP-15223

+
+ +

+ Fixed a bug causing some Erlang references to be + inconsistently ordered. This could for example cause + failure to look up certain elements with references as + keys in search data structures. This bug was introduced + in R13B02.

+

+ Thanks to Simon Cornish for finding the bug and supplying + a fix.

+

+ *** POTENTIAL INCOMPATIBILITY ***

+

+ Own Id: OTP-15225

+
+
+
+ +
+
Erts 10.0.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From ded95242ba01c3e21e47cf6594fa73ba3fb16ad7 Mon Sep 17 00:00:00 2001 From: Mariano Guerra Date: Thu, 16 Aug 2018 23:47:26 +0200 Subject: erts/time_correction.xml: remove extra closing parenthesis --- erts/doc/src/time_correction.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/time_correction.xml b/erts/doc/src/time_correction.xml index 77e7a40529..53b555387c 100644 --- a/erts/doc/src/time_correction.xml +++ b/erts/doc/src/time_correction.xml @@ -940,7 +940,7 @@ EventTag = {Time, UMI} - erlang:system_info(os_system_time_source)) + erlang:system_info(os_system_time_source) -- cgit v1.2.3 From a0b01685da8e1a7184b188bdd198e79e38d758a3 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 29 Aug 2018 13:32:12 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 446296571c..5862318ab7 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,32 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.6 + +
Fixed Bugs and Malfunctions + + +

+ A race between termination of a process and resume of the + same process via erlang:resume_process/1 could + cause the VM to crash. This bug was introduced in erts + version 10.0 (OTP 21.0).

+

+ Own Id: OTP-15237

+
+ +

+ When tracing on running, in trace events + could be lost when a process was rescheduled between a + dirty and a normal scheduler.

+

+ Own Id: OTP-15269 Aux Id: ERL-713

+
+
+
+ +
+
Erts 10.0.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 12d2c65ed477e9fde9a411727de4cc67c53b1a1c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 5 Sep 2018 20:53:36 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5862318ab7..c7491e2741 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,34 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.7 + +
Fixed Bugs and Malfunctions + + +

+ A process could get stuck in an infinite rescheduling + loop between normal and dirty schedulers. This bug was + introduced in ERTS version 10.0.

+

+ Thanks to Maxim Fedorov for finding and fixing this + issue.

+

+ Own Id: OTP-15275 Aux Id: PR-1943

+
+ +

+ Garbage collection of a distribution entry could cause an + emulator crash if net_kernel had not brought + previous connection attempts on it down properly.

+

+ Own Id: OTP-15279 Aux Id: ERIERL-226

+
+
+
+ +
+
Erts 10.0.6
Fixed Bugs and Malfunctions -- cgit v1.2.3 From e180470d0da74692a83a0789513685f8873a1b1d Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 7 Sep 2018 14:40:27 +0200 Subject: Correct doc markers --- erts/doc/src/escript.xml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 9b0d42185e..be1664b39f 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -4,7 +4,7 @@
- 20072017 + 20072018 Ericsson AB. All Rights Reserved. @@ -155,9 +155,12 @@ io:setopts([{encoding, unicode}]) for example:

 halt(1).
-

To retrieve the pathname of the script, call - - escript:script_name() from your script +

+ To retrieve the pathname of the script, call + + escript:script_name() + + from your script (the pathname is usually, but not always, absolute).

If the file contains source code (as in the example above), it is processed by the @@ -229,6 +232,7 @@ $ escript factorial.beam 5 factorial 5 = 120 $ escript factorial.zip 5 factorial 5 = 120 + @@ -259,7 +263,7 @@ factorial 5 = 120 zip:create_option()] -

+

Creates an escript from a list of sections. The sections can be specified in any order. An escript begins with an optional Header followed by a mandatory Body. If @@ -344,6 +348,7 @@ ok {{2010,3,2},{0,59,22}}, 54,1,0,0,0,0,0}, <<"%% demo.erl\n-module(demo).\n-export([main/1]).\n\n%% Demo\nmain(_Arg"...>>}]} + @@ -368,9 +373,11 @@ ok SourceCode = BeamCode = ZipArchive = binary() -

- Parses an escript and extracts its sections. This is the reverse - of create/2.

+

+ Parses an escript and extracts its sections. + This is the reverse of + create/2. +

All sections are returned even if they do not exist in the escript. If a particular section happens to have the same value as the default value, the extracted value is set to the @@ -393,6 +400,7 @@ ok {ok,[{{archive,<<80,75,3,4,20,0,0,0,8,0,118,7,98,60,105, 152,61,93,107,0,0,0,118,0,...>>} {emu_args,undefined}]} + @@ -403,7 +411,7 @@ ok File = filename() -

+

Returns the name of the escript that is executed. If the function is invoked outside the context of an escript, the behavior is undefined.

-- cgit v1.2.3 From f80b65a178fa95b5454cb238bdf71e27f240eed5 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 11 Sep 2018 16:57:02 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index c7491e2741..f986cb7722 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,36 @@

This document describes the changes made to the ERTS application.

+
Erts 10.0.8 + +
Fixed Bugs and Malfunctions + + +

+ As of ERTS version 10.0 (OTP 21.0) the + erl_child_setup program, which creates port + programs, ignores TERM signals. This setting was + unintentionally inherited by port programs. Handling of + TERM signals in port programs has now been + restored to the default behavior. That is, terminate the + process.

+

+ Own Id: OTP-15289 Aux Id: ERIERL-235, OTP-14943, ERL-576

+
+ +

+ The fix made for OTP-15279 in erts-10.07 (OTP-21.0.8) was + not complete. It could cause a new connection attempt to + be incorrectly aborted in certain cases. This fix will + amend that flaw.

+

+ Own Id: OTP-15296 Aux Id: OTP-15279, ERIERL-226

+
+
+
+ +
+
Erts 10.0.7
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 8856bfa8d104b700d67180c15eff98003d28e075 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Tue, 11 Sep 2018 10:09:30 +0200 Subject: erts: Add comment about [] and nil() to The Abstract Format --- erts/doc/src/absform.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index f29bb7b8f9..d77d989057 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -811,7 +811,9 @@

If T is the empty list type [], then Rep(T) = - {type,Line,nil,[]}.

+ {type,Line,nil,[]}, that is, the empty list type + [] cannot be distinguished from the predefined type + nil().

If T is a fun type fun(), then Rep(T) = -- cgit v1.2.3 From 616d7d2b27182ce704ea647e075c2d66cd7c100a Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 19 Sep 2018 16:21:19 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 9dc09dde01..7368d3e174 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the ERTS application.

+
Erts 8.3.5.6 + +
Fixed Bugs and Malfunctions + + +

+ Fixed small memory leak that could occur when sending to + a terminating port.

+

+ Own Id: OTP-14609 Aux Id: ERIERL-238

+
+
+
+ +
+
Erts 8.3.5.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From d04b53936d5e9f84a3066ecd466993671b1428bf Mon Sep 17 00:00:00 2001 From: Henrik Nord Date: Fri, 21 Sep 2018 12:23:25 +0200 Subject: Update copyright year --- erts/doc/src/time_correction.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/time_correction.xml b/erts/doc/src/time_correction.xml index 53b555387c..a9f06d8a7d 100644 --- a/erts/doc/src/time_correction.xml +++ b/erts/doc/src/time_correction.xml @@ -4,7 +4,7 @@
- 19992016 + 19992018 Ericsson AB. All Rights Reserved. -- cgit v1.2.3 From fb7006280f8d5a45459e1fba066fe6f6131e8e86 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 24 Sep 2018 11:32:41 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 153 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index b6fb2570a8..fb3bd18a53 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,159 @@

This document describes the changes made to the ERTS application.

+
Erts 10.1 + +
Fixed Bugs and Malfunctions + + +

+ Fix the seq_trace token to not be cleared when a process + receives messages sent by erts. Some examples of when + this could happen is all port BIFs, i.e. + open_port, port_command etc etc.

+

+ Fix so that messages sent by nifs can be traced using + normal and seq_trace tracing.

+

+ Own Id: OTP-15038 Aux Id: ERL-602

+
+ +

+ Fixed specs and documentation for process_info + item monitored_by to include port identifiers and + nif resources as possible types.

+

+ Own Id: OTP-15180 Aux Id: ERL-648

+
+ +

+ Fix bug in generation of erl_crash.dump, which could + cause VM to crash.

+

+ Bug exist since erts-9.2 (OTP-20.2).

+

+ Own Id: OTP-15181

+
+ +

+ Fix bug where ctrl-break or ctrl-c would not trigger the + break mode properly on Windows. This bug was introduced + in erts-10.0 (OTP-21).

+

+ Own Id: OTP-15205

+
+ +

+ Fix a performance bug for reception of UDP packages, + where a memory buffer would be reallocated when it should + not have been.

+

+ Introduce a limit on the maximum automatic increase of + the UDP user-space buffer to the theoretical max of the + network PATH, i.e. 65535.

+

+ Own Id: OTP-15206

+
+ +

+ Fix alignment of erts allocator state internally in erts. + With the improper alignment the emulator would refuse to + start when compiled with clang on 32-bit systems.

+

+ Own Id: OTP-15208 Aux Id: PR-1897 ERL-677

+
+ +

+ Fix bug where too many concurrent calls to + erlang:open_port({spawn,"cmd"},...) would result + in the emulator terminating with the reason "Failed to + write to erl_child_setup: ". After this fix the + open_port call will throw an emfile + exception instead.

+

+ Own Id: OTP-15210

+
+ +

+ Upgraded the ERTS internal PCRE library from version 8.41 + to version 8.42. See http://pcre.org/original/changelog.txt + for information about changes made to PCRE. This library + implements major parts of the re regular + expressions module.

+

+ Own Id: OTP-15217

+
+ +

+ Fix open_port({fd,X,Y}, ...) to release the file + descriptors from the pollset when closing the port. + Without this fix the same file descriptor number could + not be reused when doing multiple open_port and + port_close sequences.

+

+ Own Id: OTP-15236 Aux Id: ERL-692

+
+ +

+ Fixed bug in float_to_list/2 and + float_to_binary/2 with options + [{decimals,0},compact] causing totally wrong + results. Bug exists since OTP-21.0.

+

+ Own Id: OTP-15276 Aux Id: PR-1920

+
+ +

+ Fixed bug in erlang:memory causing ets to + report too much. This small false memory leak (16 bytes + each time) can only happen when a specific race condition + occurs between scheduler threads on a table with option + write_concurrency.

+

+ Own Id: OTP-15278

+
+ +

+ Minor configure test fixes

+

+ Own Id: OTP-15282

+
+ +

+ Improved robustness of distribution connection setup. In + OTP-21.0 a truly asynchronous connection setup was + introduced. This is further improvement on that work to + make the emulator more robust and also be able to recover + in cases when involved Erlang processes misbehave.

+

+ Own Id: OTP-15297 Aux Id: OTP-15279, OTP-15280

+
+
+
+ + +
Improvements and New Features + + +

+ The socket options recvtos, recvttl, + recvtclass and pktoptions have been + implemented in the socket modules. See the documentation + for the gen_tcp, gen_udp and inet + modules. Note that support for these in the runtime + system is platform dependent. Especially for + pktoptions which is very Linux specific and + obsoleted by the RFCs that defined it.

+

+ Own Id: OTP-15145 Aux Id: ERIERL-187

+
+
+
+ +
+
Erts 10.0.8
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 8f7c468bf851dbaba72bb230bae42034de7d2203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=B6m=C3=B6ri?= Date: Tue, 25 Sep 2018 16:49:22 +0200 Subject: Document bit_size in match-specs and allow in fun2ms It is already allowed in match-specs. --- erts/doc/src/match_spec.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml index 5cd6dc1750..48e502739a 100644 --- a/erts/doc/src/match_spec.xml +++ b/erts/doc/src/match_spec.xml @@ -113,6 +113,7 @@ | | | | | | + | | | | | | | @@ -194,6 +195,7 @@ | | | | | | + | | | | | | | @@ -269,8 +271,9 @@ other false to return ; otherwise returns false.

- abs, element, hd, length, node, - round, size, tl, trunc, '+', + abs, element, hd, length, + map_get, map_size, node, round, + size, bit_size, tl, trunc, '+', '-', '*', 'div', 'rem', 'band', 'bor', 'bxor', 'bnot', 'bsl', 'bsr', '>', '>=', '<', '=<', -- cgit v1.2.3 From 0edd7ee4d575656f6da6558e40d6993f41a4be38 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 1 Oct 2018 15:34:16 +0200 Subject: Fix spelling of intended in erl_nif docs --- erts/doc/src/erl_nif.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index a20b8ee884..190ec12d0e 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1252,7 +1252,7 @@ typedef struct {

Similar to fprintf but this format string also accepts "%T", which formats Erlang terms of type ERL_NIF_TERM.

-

This function is primarily intenden for debugging purpose. It is not +

This function is primarily intended for debugging purpose. It is not recommended to print very large terms with %T. The function may change errno, even if successful.

@@ -3194,7 +3194,7 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {

Similar to snprintf but this format string also accepts "%T", which formats Erlang terms of type ERL_NIF_TERM.

-

This function is primarily intenden for debugging purpose. It is not +

This function is primarily intended for debugging purpose. It is not recommended to print very large terms with %T. The function may change errno, even if successful.

-- cgit v1.2.3 From 5c2432bbf36296370a8fae1896007e5c967600e6 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 11 Oct 2018 21:08:39 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 24bcc76e4b..f906019b14 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -30,6 +30,84 @@

This document describes the changes made to the ERTS application.

+
Erts 6.4.1.7 + +
Fixed Bugs and Malfunctions + + +

+ A process communicating with a port via one of the + erlang:port_* BIFs could potentially end up in an + inconsistent state if the port terminated during the + communication. When this occurred the process could later + block in a receive even though it had messages + matching in its message queue.

+

+ This bug was introduced in erts version 5.10 (OTP R16A).

+

+ Own Id: OTP-13424 Aux Id: OTP-10336

+
+ +

+ Calls to erl_drv_send_term() or + erl_drv_output_term() from a non-scheduler thread + while the corresponding port was invalid caused the + emulator to enter an inconsistent state which eventually + caused an emulator crash.

+

+ Own Id: OTP-13866

+
+ +

Driver and NIF operations accessing processes or ports + could cause an emulator crash when used from + non-scheduler threads. Those operations are:

+ erl_drv_send_term() + driver_send_term() + erl_drv_output_term() + driver_output_term() + enif_send() + enif_port_command() +

+ Own Id: OTP-13869

+
+ +

+ Fix bug in binary_to_term for binaries created by + term_to_binary with option compressed. The + bug can cause badarg exception for a valid binary + when Erlang VM is linked against a zlib library of + version 1.2.9 or newer. Bug exists since OTP 17.0.

+

+ Own Id: OTP-14159 Aux Id: ERL-340

+
+ +

+ Fixed bug in operator bxor causing erroneuos + result when one operand is a big negative + integer with the lowest N*W bits as zero and the + other operand not larger than N*W bits. N + is an integer of 1 or larger and W is 32 or 64 + depending on word size.

+

+ Own Id: OTP-14514

+
+ +

+ Fixed bug in binary_to_term and + binary_to_atom that could cause VM crash. + Typically happens when the last character of an UTF8 + string is in the range 128 to 255, but truncated to only + one byte. Bug exists in binary_to_term since ERTS + version 5.10.2 (OTP_R16B01) and binary_to_atom + since ERTS version 9.0 (OTP-20.0).

+

+ Own Id: OTP-14590 Aux Id: ERL-474

+
+
+
+ +
+
Erts 6.4.1.6
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 218f84f6b7cca496d3100fcb3ba1b3f7fa2fc1ac Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 12 Oct 2018 17:12:09 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index fb3bd18a53..8a377a4d48 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,34 @@

This document describes the changes made to the ERTS application.

+
Erts 10.1.1 + +
Fixed Bugs and Malfunctions + + +

+ A bug where the socket option 'pktoptions' caused a read + of uninitialized memory has been fixed. Would cause + malfunction on FreeBSD.

+

+ Own Id: OTP-14297 Aux Id: OTP-15141

+
+ +

Fixed a memory leak on errors when reading files.

+

+ Own Id: OTP-15318

+
+ +

File access through UNC paths works again on Windows. + This regression was introduced in OTP 21.

+

+ Own Id: OTP-15333 Aux Id: ERL-737

+
+
+
+ +
+
Erts 10.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From de1f4615af6f5c3cd67c655393f59edb592839f3 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Tue, 16 Oct 2018 15:13:11 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 4913b0f204..a0c7defd54 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,24 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3.4 + +
Fixed Bugs and Malfunctions + + +

+ Fixed bug in ets:select_replace when called with a + fully bound key could cause a following call to + ets:next or ets:prev to crash the emulator + or return invalid result.

+

+ Own Id: OTP-15346

+
+
+
+ +
+
Erts 9.3.3.3
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 25e058c10e5ec5384a8b4401fe45f081b2d71aab Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 26 Oct 2018 14:30:49 +0200 Subject: Prepare release --- erts/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index ac063edd20..36cf42c77f 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the ERTS application.

+
Erts 7.3.1.5 + +
Fixed Bugs and Malfunctions + + +

+ Fixed small memory leak that could occur when sending to + a terminating port.

+

+ Own Id: OTP-14609 Aux Id: ERIERL-238

+
+
+
+ +
+
Erts 7.3.1.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From bb3f1ed6945a8cca2efa1a571f26e831911944a1 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 31 Oct 2018 17:14:08 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index a0c7defd54..e339b22e98 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,30 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3.5 + +
Fixed Bugs and Malfunctions + + +

+ ERTS internal trees of monitor structures could get into + an inconsistent state. This could cause 'DOWN' + messages not to be delivered when they should, as well as + delivery of 'DOWN' messages that should not be + delivered.

+

+ This bug was introduced in ERTS version 9.0 (OTP 20.0) + and was fixed in ERTS version 10.0 (OTP 21.0) due to a + rewrite of the monitor code. That is, this bug only exist + in the OTP 20 release.

+

+ Own Id: OTP-15399 Aux Id: ERL-751, ERIERL-262, OTP-14205

+
+
+
+ +
+
Erts 9.3.3.4
Fixed Bugs and Malfunctions -- cgit v1.2.3 From f5313be396144700acff451279062dab9674e436 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 5 Nov 2018 10:48:29 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index e339b22e98..b909e18dc6 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.3.6 + +
Improvements and New Features + + +

List subtraction (The -- operator) will now + yield properly on large inputs.

+

+ Own Id: OTP-15371

+
+
+
+ +
+
Erts 9.3.3.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 805748eb668d5562fe17f3172cdae07a86166c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 4 Oct 2018 10:30:05 +0200 Subject: Add a persistent term storage Persistent terms are useful for storing Erlang terms that are never or infrequently updated. They have the following advantages: * Constant time access. A persistent term is not copied when it is looked up. The constant factor is lower than for ETS, and no locks are taken when looking up a term. * Persistent terms are not copied in garbage collections. * There is only ever one copy of a persistent term (until it is deleted). That makes them useful for storing configuration data that needs to be easily accessible by all processes. Persistent terms have the following drawbacks: * Updates are expensive. The hash table holding the keys for the persistent terms are updated whenever a persistent term is added, updated or deleted. * Updating or deleting a persistent term triggers a "global GC", which will schedule a heap scan of all processes to search the heap of all processes for the deleted term. If a process still holds a reference to the deleted term, the process will be garbage collected and the term copied to the heap of the process. This global GC can make the system less responsive for some time. Three BIFs (implemented in C in the emulator) is the entire interface to the persistent term functionality: * put(Key, Value) to store a persistent term. * get(Key) to look up a persistent term. * erase(Key) to delete a persistent term. There are also two additional BIFs to obtain information about persistent terms: * info() to return a map with information about persistent terms. * get() to return a list of a {Key,Value} tuples for all persistent terms. (The values are not copied.) --- erts/doc/src/Makefile | 2 + erts/doc/src/persistent_term.xml | 290 +++++++++++++++++++++++++++++++++++++++ erts/doc/src/ref_man.xml | 1 + erts/doc/src/specs.xml | 1 + 4 files changed, 294 insertions(+) create mode 100644 erts/doc/src/persistent_term.xml (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index 21aa3db864..fccdd744f3 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -52,6 +52,7 @@ XML_REF3_EFILES = \ erlang.xml \ erl_tracer.xml \ init.xml \ + persistent_term.xml \ zlib.xml XML_REF3_FILES = \ @@ -63,6 +64,7 @@ XML_REF3_FILES = \ erlang.xml \ erts_alloc.xml \ init.xml \ + persistent_term.xml \ zlib.xml XML_PART_FILES = \ diff --git a/erts/doc/src/persistent_term.xml b/erts/doc/src/persistent_term.xml new file mode 100644 index 0000000000..d2a138d65f --- /dev/null +++ b/erts/doc/src/persistent_term.xml @@ -0,0 +1,290 @@ + + + + +
+ + 20182018 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + persistent_term + + + + + persistent_term.xml +
+ persistent_term + Persistent terms. + +

This module is similar to ets in that it provides a + storage for Erlang terms that can be accessed in constant time, + but with the difference that persistent_term has been + highly optimized for reading terms at the expense of writing and + updating terms. When a persistent term is updated or deleted, a + global garbage collection pass is run to scan all processes for + the deleted term, and to copy it into each process that still uses + it. Therefore, persistent_term is suitable for storing + Erlang terms that are frequently accessed but never or + infrequently updated.

+ +

Persistent terms is an advanced feature and is not a + general replacement for ETS tables. Before using persistent terms, + make sure to fully understand the consequence to system + performance when updating or deleting persistent terms.

+ +

Term lookup (using get/1), is done in constant time + and without taking any locks, and the term is not + copied to the heap (as is the case with terms stored in ETS + tables).

+ +

Storing or updating a term (using put/2) is proportional to the + number of already created persistent terms because the hash table + holding the keys will be copied. In addition, the term itself will + be copied.

+ +

When a (complex) term is deleted (using erase/1) or replaced by another + (using put/2), a global + garbage collection is initiated. It works like this:

+ + +

All processes in the system will be scheduled to run a + scan of their heaps for the term that has been deleted. While + such scan is relatively light-weight, if there are many + processes, the system can become less responsive until all + process have scanned theirs heaps.

+ +

If the deleted term (or any part of it) is still used + by a process, that process will do a major (fullsweep) garbage + collection and copy the term into the process. However, at most + two processes at a time will be scheduled to do that kind of + garbage collection.

+
+ +

Deletion of atoms and other terms that fit in one machine word + is specially optimized to avoid doing a global GC. It is still not + recommended to update persistent terms with such values too + frequently because the hash table holding the keys is copied every + time a persistent term is updated.

+ +

Some examples are suitable uses for persistent terms are:

+ + +

Storing of configuration data that must be easily + accessible by all processes.

+ +

Storing of references for NIF resources.

+ +

Storing of references for efficient counters.

+ +

Storing an atom to indicate a logging level or whether debugging + is turned on.

+
+ +
+ +
+ Storing Huge Persistent Terms +

The current implementation of persistent terms uses the literal + allocator also used for + literals (constant terms) in BEAM code. By default, 1 GB of + virtual address space is reserved for literals in BEAM code and + persistent terms. The amount of virtual address space reserved for + literals can be changed by using the +MIscs option when + starting the emulator.

+ +

Here is an example how the reserved virtual address space for literals + can be raised to 2 GB (2048 MB):

+ +
+    erl +MIscs 2048
+
+ +
+ Warning For Many Persistent Terms +

The runtime system will send a warning report to the + error logger if more than 20000 persistent terms have been + created. It will look like this:

+ +
+More than 20000 persistent terms have been created.
+It is recommended to avoid creating an excessive number of
+persistent terms, as creation and deletion of persistent terms
+will be slower as the number of persistent terms increases.
+
+ +
+ Best Practices for Using Persistent Terms + +

It is recommended to use keys like ?MODULE or + {?MODULE,SubKey} to avoid name collisions.

+ +

Prefer creating a few large persistent terms to creating many + small persistent terms. The execution time for storing a + persistent term is proportional to the number of already existing + terms.

+ +

Updating a persistent term with the same value as it already + has is specially optimized to do nothing quickly; thus, there is + no need compare the old and new values and avoid calling + put/2 if the values + are equal.

+ +

When atoms or other terms that fit in one machine word are + deleted, no global GC is needed. Therefore, persistent terms that + have atoms as their values can be updated more frequently, but + note that updating such persistent terms is still much more + expensive than reading them.

+ +

Updating or deleting a persistent term will trigger a global GC + if the term does not fit in one machine word. Processes will be + scheduled as usual, but all processes will be made runnable at + once, which will make the system less responsive until all process + have run and scanned their heaps for the deleted terms. One way to + minimize the effects on responsiveness could be to minimize the + number of processes on the node before updating or deleting a + persistent term. It would also be wise to avoid updating terms + when the system is at peak load.

+ +

Avoid storing a retrieved persistent term in a process if that + persistent term could be deleted or updated in the future. If a + process holds a reference to a persistent term when the term is + deleted, the process will be garbage collected and the term copied + to process.

+ +

Avoid updating or deleting more than one persistent term at a + time. Each deleted term will trigger its own global GC. That + means that deleting N terms will make the system less responsive N + times longer than deleting a single persistent term. Therefore, + terms that are to be updated at the same time should be collected + into a larger term, for example, a map or a tuple.

+
+ +
+ Example + +

The following example shows how lock contention for ETS tables + can be minimized by having one ETS table for each scheduler. The + table identifiers for the ETS tables are stored as a single + persistent term:

+ +
+    %% There is one ETS table for each scheduler.
+    Sid = erlang:system_info(scheduler_id),
+    Tid = element(Sid, persistent_term:get(?MODULE)),
+    ets:update_counter(Tid, Key, 1).
+ +
+ + + + + +

Any Erlang term.

+
+
+ + + +

Any Erlang term.

+
+
+
+ + + + + Erase the name for a persistent term. + +

Erase the name for the persistent term with key + Key. The return value will be true + if there was a persistent term with the key + Key, and false if there was no + persistent term associated with the key.

+

If there existed a previous persistent term associated with + key Key, a global GC has been initiated + when erase/1 returns. See Description.

+
+
+ + + + Get all persistent terms. + +

Retrieve the keys and values for all persistent terms. + The keys will be copied to the heap for the process calling + get/0, but the values will not.

+
+
+ + + + Get the value for a persistent term. + +

Retrieve the value for the persistent term associated with + the key Key. The lookup will be made in + constant time and the value will not be copied to the heap + of the calling process.

+

This function fails with a badarg exception if no + term has been stored with the key + Key.

+

If the calling process holds on to the value of the + persistent term and the persistent term is deleted in the future, + the term will be copied to the process.

+
+
+ + + + Get information about persistent terms. + +

Return information about persistent terms in a map. The map + has the following keys:

+ + count +

The number of persistent terms.

+ memory +

The total amount of memory (measured in bytes) + used by all persistent terms.

+
+
+
+ + + + Store a term. + +

Store the value Value as a persistent term and + associate it with the key Key.

+

If the value Value is equal to the value + previously stored for the key, put/2 will do nothing and return + quickly.

+

If there existed a previous persistent term associated with + key Key, a global GC has been initiated + when put/2 returns. See Description.

+
+
+
+
diff --git a/erts/doc/src/ref_man.xml b/erts/doc/src/ref_man.xml index 0617463a7b..ff64aa86b8 100644 --- a/erts/doc/src/ref_man.xml +++ b/erts/doc/src/ref_man.xml @@ -34,6 +34,7 @@ + diff --git a/erts/doc/src/specs.xml b/erts/doc/src/specs.xml index ed6be650e5..1ab6cdc19e 100644 --- a/erts/doc/src/specs.xml +++ b/erts/doc/src/specs.xml @@ -4,5 +4,6 @@ + -- cgit v1.2.3 From d8aef84f6ecb12f1367a3b9c783da1306b66a10c Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 9 Nov 2018 15:24:48 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 36cf42c77f..fd04eae2cc 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 7.3.1.6 + +
Improvements and New Features + + +

List subtraction (The -- operator) will now + yield properly on large inputs.

+

+ Own Id: OTP-15371

+
+
+
+ +
+
Erts 7.3.1.5
Fixed Bugs and Malfunctions -- cgit v1.2.3 From e3c71d353e884316420eebea2d7ef802c651437b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Thu, 15 Nov 2018 12:26:12 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 8a377a4d48..5dabb2adf9 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,22 @@

This document describes the changes made to the ERTS application.

+
Erts 10.1.2 + +
Fixed Bugs and Malfunctions + + +

Fixed a rare bug where files could be closed on a + normal instead of an IO scheduler, resulting in system + instability if the operation blocked.

+

+ Own Id: OTP-15421

+
+
+
+ +
+
Erts 10.1.1
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 1315c6457e49595fdd3f91693c0506964416c9f0 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Thu, 15 Nov 2018 15:24:32 +0100 Subject: erts: Add new module 'atomics' --- erts/doc/src/Makefile | 10 +-- erts/doc/src/atomics.xml | 183 +++++++++++++++++++++++++++++++++++++++++++++++ erts/doc/src/ref_man.xml | 1 + erts/doc/src/specs.xml | 1 + 4 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 erts/doc/src/atomics.xml (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index fccdd744f3..56f8f40069 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -53,19 +53,15 @@ XML_REF3_EFILES = \ erl_tracer.xml \ init.xml \ persistent_term.xml \ + atomics.xml \ zlib.xml XML_REF3_FILES = \ + $(XML_REF3_EFILES) \ driver_entry.xml \ erl_nif.xml \ - erl_tracer.xml \ erl_driver.xml \ - erl_prim_loader.xml \ - erlang.xml \ - erts_alloc.xml \ - init.xml \ - persistent_term.xml \ - zlib.xml + erts_alloc.xml XML_PART_FILES = \ part.xml diff --git a/erts/doc/src/atomics.xml b/erts/doc/src/atomics.xml new file mode 100644 index 0000000000..3fca92fb97 --- /dev/null +++ b/erts/doc/src/atomics.xml @@ -0,0 +1,183 @@ + + + + +
+ + 2018 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + atomics +
+ atomics + Atomic Functions + +

This module provides a set of functions to do atomic operations towards + mutable atomic variables. The implementation utilizes only + atomic hardware instructions without any software level locking, which makes + it very efficient for concurrent access. The atomics are organized into + arrays with the follwing semantics:

+ + +

Atomics are 64 bit integers.

+
+ +

Atomics can be represented as either signed or unsigned.

+
+ +

Atomics wrap around at overflow and underflow operations.

+
+ +

All operations guarantee atomicity. No intermediate results can be + seen. The result of one mutation can only be the input to one + following mutation.

+
+ +

All atomic operations are mutually ordered. If atomic B is updated + after atomic A, then that is how it will appear to any + concurrent readers. No one can read the new value of B and then read the + old value of A.

+
+ +

Indexes into atomic arrays are one-based. An atomic array of + arity N contains N atomics with index from 1 to N.

+
+
+
+ + + + +

Identifies an atomic array returned from + new/2.

+
+
+
+ + + + + Create atomic array + +

Create a new atomic array of Arity atomics.

+

Argument Opts is a list of the following possible + options:

+ + {signed, boolean()} +

Indicate if the elements of the array will be treated + as signed or unsigned integers. Default is true (signed).

+

The integer interval for signed atomics are from -(1 bsl 63) + to (1 bsl 63)-1 and for unsigned atomics from 0 to (1 + bsl 64)-1.

+
+
+
+
+ + + + Set atomic value + +

Set atomic to Value.

+
+
+ + + + Read atomic value + +

Read atomic value.

+
+
+ + + + Add to atomic + +

Add Incr to atomic.

+
+
+ + + + Atomic add and get + +

Atomic addition and return of the result.

+
+
+ + + + Subtract from atomic + +

Subtract Decr from atomic.

+
+
+ + + + Atomic sub and get + +

Atomic subtraction and return of the result.

+
+
+ + + + Atomic exchange. + +

Atomically replaces the value of the atomic with + Desired and returns the value it held + previously.

+
+
+ + + + Atomic compare and exchange. + +

Atomically compares the atomic with Expected, + and if those are equal, set atomic to Desired. + Returns ok if Desired was written. Returns + the actual atomic value if not equal to Expected.

+
+
+ + + + Get information about atomic array. + +

Return information about an atomic array in a map. The map + has the following keys:

+ + size +

The number of atomics in the array.

+ max +

The highest possible value an atomic in this array can + hold.

+ min +

The lowest possible value an atomic in this array can + hold.

+ memory +

Approximate memory consumption for the array in + bytes.

+
+
+
+ +
+
diff --git a/erts/doc/src/ref_man.xml b/erts/doc/src/ref_man.xml index ff64aa86b8..98f7bbbb8b 100644 --- a/erts/doc/src/ref_man.xml +++ b/erts/doc/src/ref_man.xml @@ -50,5 +50,6 @@ + diff --git a/erts/doc/src/specs.xml b/erts/doc/src/specs.xml index 1ab6cdc19e..784212dfa0 100644 --- a/erts/doc/src/specs.xml +++ b/erts/doc/src/specs.xml @@ -6,4 +6,5 @@ + -- cgit v1.2.3 From fefb5d039e87ff7137e78b3d5f2eaf01e498ec4d Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 25 Sep 2018 13:34:52 +0200 Subject: erts: Add new module 'counters' --- erts/doc/src/Makefile | 1 + erts/doc/src/counters.xml | 142 ++++++++++++++++++++++++++++++++++++++++++++++ erts/doc/src/ref_man.xml | 1 + erts/doc/src/specs.xml | 1 + 4 files changed, 145 insertions(+) create mode 100644 erts/doc/src/counters.xml (limited to 'erts/doc') diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile index 56f8f40069..40f74b78ff 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -54,6 +54,7 @@ XML_REF3_EFILES = \ init.xml \ persistent_term.xml \ atomics.xml \ + counters.xml \ zlib.xml XML_REF3_FILES = \ diff --git a/erts/doc/src/counters.xml b/erts/doc/src/counters.xml new file mode 100644 index 0000000000..85eedfdadc --- /dev/null +++ b/erts/doc/src/counters.xml @@ -0,0 +1,142 @@ + + + + +
+ + 2018 + Ericsson AB. All Rights Reserved. + + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + counters +
+ counters + Counter Functions + +

This module provides a set of functions to do operations towards + shared mutable counter variables. The implementation does not utilize any + software level locking, which makes it very efficient for concurrent + access. The counters are organized into arrays with the follwing + semantics:

+ + +

Counters are 64 bit signed integers.

+
+ +

Counters wrap around at overflow and underflow operations.

+
+

Counters are initialized to zero and can then only be written to + by adding or subtracting.

+
+ +

Write operations guarantee atomicity. No intermediate results can be + seen from a single write operation.

+
+ +

Two types of counter arrays can be created with options atomics or + write_concurrency. The atomics counters have good allround + performance with nice consistent semantics while + write_concurrency counters offers even better concurrent + write performance at the expense of some potential read + inconsistencies. See new/2.

+
+ +

Indexes into counter arrays are one-based. A counter array of + size N contains N counters with index from 1 to N.

+
+
+
+ + + + +

Identifies a counter array returned from + new/2.

+
+
+
+ + + + + Create counter array + +

Create a new counter array of Size counters.

+

Argument Opts is a list of the following possible + options:

+ + atomics (Default) +

Counters will be sequentially consistent. If write + operation A is done sequencially before write operation B, then a concurrent reader + may see none of them, only A, or both A and B. It cannot see only B.

+
+ write_concurrency +

This is an optimization to achieve very efficient concurrent + write operations at the expense of potential read inconsistency and memory + consumption per counter.

+

Read operations may see sequentially inconsistent results with + regard to concurrent write operations. Even if write operation A is done + sequencially before write operation B, a concurrent reader may see any + combination of A and B, including only B. A read operation is only + guaranteed to see all writes done sequentially before the read. No writes + are ever lost, but will eventually all be seen.

+
+
+
+
+ + + + Read counter value + +

Read counter value.

+
+
+ + + + Add to counter + +

Add Incr to counter.

+
+
+ + + + Subtract from counter + +

Subtract Decr from counter.

+
+
+ + + + Get information about counter array. + +

Return information about a counter array in a map. The map + has the following keys (at least):

+ + size +

The number of counters in the array.

+ memory +

Approximate memory consumption for the array in + bytes.

+
+
+
+ +
+
diff --git a/erts/doc/src/ref_man.xml b/erts/doc/src/ref_man.xml index 98f7bbbb8b..a78aaa449e 100644 --- a/erts/doc/src/ref_man.xml +++ b/erts/doc/src/ref_man.xml @@ -51,5 +51,6 @@ + diff --git a/erts/doc/src/specs.xml b/erts/doc/src/specs.xml index 784212dfa0..0b943e6295 100644 --- a/erts/doc/src/specs.xml +++ b/erts/doc/src/specs.xml @@ -7,4 +7,5 @@ + -- cgit v1.2.3 From f504781a136b1992a1cee26a7da841892d796d91 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 21 Nov 2018 15:54:17 +0100 Subject: erts: Add counters:put/3 --- erts/doc/src/counters.xml | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/counters.xml b/erts/doc/src/counters.xml index 85eedfdadc..ba4a22759f 100644 --- a/erts/doc/src/counters.xml +++ b/erts/doc/src/counters.xml @@ -85,14 +85,22 @@ write_concurrency

This is an optimization to achieve very efficient concurrent - write operations at the expense of potential read inconsistency and memory - consumption per counter.

+ add and sub operations at the expense of potential read + inconsistency and memory consumption per counter.

Read operations may see sequentially inconsistent results with regard to concurrent write operations. Even if write operation A is done sequencially before write operation B, a concurrent reader may see any combination of A and B, including only B. A read operation is only guaranteed to see all writes done sequentially before the read. No writes are ever lost, but will eventually all be seen.

+

The typical use case for write_concurrency is when + concurrent calls to add and + sub toward the same counters + are very frequent, while calls to get + and put are much + less frequent. The lack of absolute read consistency must also be + acceptable.

@@ -110,7 +118,8 @@ Add to counter -

Add Incr to counter.

+

Add Incr to counter at index + Ix.

@@ -118,7 +127,26 @@ Subtract from counter -

Subtract Decr from counter.

+

Subtract Decr from counter at index + Ix.

+
+ + + + + Set counter to value + +

Write Value to counter at index + Ix.

+ +

Despite its name, the write_concurrency optimization does not + improve put. A call to put is a relative heavy + operation compared to the very lightweight and scalable add and + sub. The cost for a put with + write_concurrency is lika a get + plus a put without write_concurrency.

+
-- cgit v1.2.3 From e9845ee002fdd6995ec1a097993a0e7e145c6488 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Wed, 21 Nov 2018 18:33:01 +0100 Subject: erts: Clarify erl_nif docs about callback environments --- erts/doc/src/erl_nif.xml | 67 +++++++++++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 24 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 190ec12d0e..095fc79bdf 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -293,7 +293,7 @@ return term; arguments. When you write to a shared state either through static variables or enif_priv_data, you need to supply your own explicit - synchronization. This includes terms in process-independent + synchronization. This includes terms in process independent environments that are shared between threads. Resource objects also require synchronization if you treat them as mutable.

The library initialization callbacks load and @@ -596,7 +596,7 @@ int writeiovec(ErlNifEnv *env, ERL_NIF_TERM term, ERL_NIF_TERM *tail, --enable-static-nifs, you must define STATIC_ERLANG_NIF before the ERL_NIF_INIT declaration.

- int (*load)(ErlNifEnv* env, void** priv_data, + int (*load)(ErlNifEnv* caller_env, void** priv_data, ERL_NIF_TERM load_info)

load is called when the NIF library is loaded @@ -612,7 +612,7 @@ int writeiovec(ErlNifEnv *env, ERL_NIF_TERM term, ERL_NIF_TERM *tail, anything other than 0. load can be NULL if initialization is not needed.

- int (*upgrade)(ErlNifEnv* env, void** + int (*upgrade)(ErlNifEnv* caller_env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info)

upgrade is called when the NIF library is loaded @@ -626,7 +626,7 @@ int writeiovec(ErlNifEnv *env, ERL_NIF_TERM term, ERL_NIF_TERM *tail,

The library fails to load if upgrade returns anything other than 0 or if upgrade is NULL.

- void (*unload)(ErlNifEnv* env, void* + void (*unload)(ErlNifEnv* caller_env, void* priv_data)

unload is called when the module code that @@ -654,27 +654,41 @@ int writeiovec(ErlNifEnv *env, ERL_NIF_TERM term, ERL_NIF_TERM *tail,

ErlNifEnv represents an environment that can host Erlang terms. All terms in an environment are valid as long as the environment is valid. ErlNifEnv is an opaque type; pointers to - it can only be passed on to API functions. Two types of environments + it can only be passed on to API functions. Three types of environments exist:

- Process-bound environment + Process bound environment

Passed as the first argument to all NIFs. All function arguments passed to a NIF belong to that environment. The return value from a NIF must also be a term belonging to the same environment.

-

A process-bound environment contains transient information +

A process bound environment contains transient information about the calling Erlang process. The environment is only valid in the thread where it was supplied as argument until the NIF returns. It is thus useless and dangerous to store pointers to - process-bound environments between NIF calls.

+ process bound environments between NIF calls.

- Process-independent environment + Callback environment + +

Passed as the first argument to all the non-NIF callback functions + (load, + upgrade, + unload, + dtor, + down and + stop). + Works like a process bound environment but with a temporary + pseudo process that "terminates" when the callback has + returned. Terms may be created in this environment but they will + only be accessible during the callback.

+
+ Process independent environment

Created by calling enif_alloc_env. This environment can be used to store terms between NIF calls and to send terms with enif_send. A - process-independent environment with all its terms is valid until + process independent environment with all its terms is valid until you explicitly invalidate it with enif_free_env or enif_send.

@@ -799,7 +813,7 @@ typedef struct { ErlNifResourceDtor -typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj); +typedef void ErlNifResourceDtor(ErlNifEnv* caller_env, void* obj);

The function prototype of a resource destructor function.

The obj argument is a pointer to the resource. The only allowed use for the resource in the destructor is to access its @@ -809,7 +823,7 @@ typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj); ErlNifResourceDown -typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, ErlNifPid* pid, ErlNifMonitor* mon); +typedef void ErlNifResourceDown(ErlNifEnv* caller_env, void* obj, ErlNifPid* pid, ErlNifMonitor* mon);

The function prototype of a resource down function, called on the behalf of enif_monitor_process. obj is the resource, pid @@ -820,7 +834,7 @@ typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, ErlNifPid* pid, ErlNi ErlNifResourceStop -typedef void ErlNifResourceStop(ErlNifEnv* env, void* obj, ErlNifEvent event, int is_direct_call); +typedef void ErlNifResourceStop(ErlNifEnv* caller_env, void* obj, ErlNifEvent event, int is_direct_call);

The function prototype of a resource stop function, called on the behalf of enif_select. obj is the resource, event is OS event, @@ -987,7 +1001,7 @@ typedef struct { ErlNifEnv *enif_alloc_env() Create a new environment. -

Allocates a new process-independent environment. The environment can +

Allocates a new process independent environment. The environment can be used to hold terms that are not bound to any process. Such terms can later be copied to a process environment with enif_make_copy or @@ -1211,14 +1225,17 @@ typedef struct { - intenif_demonitor_process(ErlNifEnv* env, void* obj, + intenif_demonitor_process(ErlNifEnv* caller_env, void* obj, const ErlNifMonitor* mon) Cancel a process monitor.

Cancels a monitor created earlier with enif_monitor_process. Argument obj is a pointer - to the resource holding the monitor and *mon identifies the monitor.

+ to the resource holding the monitor and *mon identifies the + monitor.

+

Argument caller_env is the environment of the calling process + or callback. Must only be NULL if calling from a custom thread.

Returns 0 if the monitor was successfully identified and removed. Returns a non-zero value if the monitor could not be identified, which means it was either

@@ -2572,7 +2589,7 @@ enif_map_iterator_destroy(env, &iter); - intenif_monitor_process(ErlNifEnv* env, void* obj, + intenif_monitor_process(ErlNifEnv* caller_env, void* obj, const ErlNifPid* target_pid, ErlNifMonitor* mon) Monitor a process from a resource. @@ -2593,6 +2610,8 @@ enif_map_iterator_destroy(env, &iter); enif_compare_monitors. A monitor is automatically removed when it triggers or when the resource is deallocated.

+

Argument caller_env is the environment of the calling process + or callback. Must only be NULL if calling from a custom thread.

Returns 0 on success, < 0 if no down callback is provided, and > 0 if the process is no longer alive.

This function is only thread-safe when the emulator with SMP support @@ -2768,7 +2787,7 @@ enif_map_iterator_destroy(env, &iter); The port ID of the receiving port. The port ID is to refer to a port on the local node. msg_env - The environment of the message term. Can be a process-independent + The environment of the message term. Can be a process independent environment allocated with enif_alloc_env or NULL. msg @@ -3124,26 +3143,26 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {

Initializes the ErlNifPid variable at *pid to represent the calling process.

Returns pid if successful, or NULL if caller_env is not - a process-bound environment.

+ a process bound environment.

- intenif_send(ErlNifEnv* env, ErlNifPid* to_pid, + intenif_send(ErlNifEnv* caller_env, ErlNifPid* to_pid, ErlNifEnv* msg_env, ERL_NIF_TERM msg) Send a message to a process.

Sends a message to a process.

- env - The environment of the calling process. Must be NULL - only if calling from a created thread. + caller_env + The environment of the calling process or callback. Must be NULL + only if calling from a custom thread not spawned by ERTS. *to_pid The pid of the receiving process. The pid is to refer to a process on the local node. msg_env The environment of the message term. Must be a - process-independent environment allocated with + process independent environment allocated with enif_alloc_env or NULL. msg -- cgit v1.2.3 From 41d99b0fd412c9a7ea5a080274fac98a84ec283b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 23 Nov 2018 09:44:32 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5dabb2adf9..b9f5ef70bf 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,26 @@

This document describes the changes made to the ERTS application.

+
Erts 10.1.3 + +
Improvements and New Features + + +

Added an optional ./configure flag to compile + the emulator with spectre mitigation: + --with-spectre-mitigation

+

Note that this requires a recent version of GCC with + support for spectre mitigation and the + --mindirect-branch=thunk flag, such as + 8.1.

+

+ Own Id: OTP-15430 Aux Id: ERIERL-237

+
+
+
+ +
+
Erts 10.1.2
Fixed Bugs and Malfunctions -- cgit v1.2.3 From 791742877a893e41d17bf2fd6b0e10c3dfebec8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Mon, 26 Nov 2018 09:52:32 +0100 Subject: persistent_term.xml: Fix spelling --- erts/doc/src/persistent_term.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/persistent_term.xml b/erts/doc/src/persistent_term.xml index d2a138d65f..29a6c67051 100644 --- a/erts/doc/src/persistent_term.xml +++ b/erts/doc/src/persistent_term.xml @@ -71,7 +71,7 @@ scan of their heaps for the term that has been deleted. While such scan is relatively light-weight, if there are many processes, the system can become less responsive until all - process have scanned theirs heaps.

+ process have scanned their heaps.

If the deleted term (or any part of it) is still used by a process, that process will do a major (fullsweep) garbage -- cgit v1.2.3 From 4c808f18dc4dfca509d61adb5b41d20086c37cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20B=C5=82aszk=C3=B3w?= Date: Thu, 29 Nov 2018 17:03:50 +0100 Subject: Replace mathematical jargon in erl_nif docs PR-2037 --- erts/doc/src/erl_nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 095fc79bdf..bbc12b0a56 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -2285,7 +2285,7 @@ enif_inspect_iovec(env, max_elements, term, &tail, &iovec); between nodes.

-

Two resource terms will compare equal iff they +

Two resource terms will compare equal if and only if they would yield the same resource object pointer when passed to enif_get_resource.

-- cgit v1.2.3 From a2ca3bd78fc002dd1e6533c191e44092cc3aa949 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Mon, 10 Dec 2018 11:07:05 +0100 Subject: Prepare release --- erts/doc/src/notes.xml | 195 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) (limited to 'erts/doc') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 2a823d9fe7..a34b3edd7a 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,201 @@

This document describes the changes made to the ERTS application.

+
Erts 10.2 + +
Fixed Bugs and Malfunctions + + +

+ When a process was waiting for a TCP socket send + operation to complete, and another process closed the + socket during that send, the sending process could hang. + This bug has now been corrected.

+

+ Own Id: OTP-12242 Aux Id: ERL-561

+
+ +

+ Document bit_size in match specifications and + allow it in ets:fun2ms.

+

+ Own Id: OTP-15343 Aux Id: PR-1962

+
+ +

+ Fixed bug in ets:select_replace when called with a + fully bound key could cause a following call to + ets:next or ets:prev to crash the emulator + or return invalid result.

+

+ Own Id: OTP-15346

+
+ +

When a module has been purged from memory, any + literals belonging to that module will be copied to all + processes that hold references to them. The max heap size + limit would be ignored in the garbage collection + initiated when copying literals to a process. If the max + heap size was exceeded, the process would typically be + terminated in the following garbage collection. Corrected + to terminate the process directly if copying a literal + would exceed the max heap size.

+

+ Own Id: OTP-15360

+
+ +

+ Fix compilation of run_erl on Solaris 11.4 and later.

+

+ Own Id: OTP-15389

+
+ +

Fixed a bug where lists:reverse/1-2 could use + far too many reductions. This bug was introduced in + OTP 21.1.

+

+ Own Id: OTP-15436

+
+ +

Fixed a bug where a dirty scheduler could stay awake + forever if a distribution entry was removed as part of a + dirty GC.

+

+ Own Id: OTP-15446 Aux Id: PR-2024

+
+ +

+ Fix microstate accounting handing in various places. Most + importantly the GC states when the GC is run on a dirty + scheduler are now managed correctly.

+

+ Own Id: OTP-15450 Aux Id: ERIERL-229

+
+ +

+ Fixed bug in file:sendfile when the send operation + failed. For sockets in active modes it could cause + emulator crash or a hanging call. For sockets with + {active,false} an unexpected {inet_reply, _, + _} message could be sent to the calling process. The + bug exists since OTP-21.0.

+

+ Own Id: OTP-15461 Aux Id: ERL-784

+
+ +

+ The erts configure script has been updated to reject any + CFLAGS that does not have -O. This in order to + prevent the common mistake of forgetting to add + -O2 to custom CFLAGS.

+

+ Own Id: OTP-15465

+
+ +

+ Fix reduction count in lists:member/2

+

+ Own Id: OTP-15474 Aux Id: ERIERL-229

+
+
+
+ + +
Improvements and New Features + + +

+ New counters and atomics modules supplies + access to highly efficient operations on mutable fixed + word sized variables.

+

+ Own Id: OTP-13468

+
+ +

There is a new module persistent_term that + implements a term storage suitable for terms that are + frequently used but never or infrequently updated. + Lookups are done in constant time without copying the + terms.

+

+ Own Id: OTP-14669 Aux Id: PR-1989

+
+ +

+ A function inet:getifaddrs/1 that takes a list + with a namespace option has been added, for platforms + that support that feature, for example Linux (only?).

+

+ Own Id: OTP-15121 Aux Id: ERIERL-189, PR-1974

+
+ +

Added the nopush option for TCP sockets, which + corresponds to TCP_NOPUSH on *BSD and + TCP_CORK on Linux.

+

This is also used internally in file:sendfile + to reduce latency on subsequent send operations.

+

+ Own Id: OTP-15357 Aux Id: ERL-698

+
+ +

List subtraction (The -- operator) will now + yield properly on large inputs.

+

+ Own Id: OTP-15371

+
+ +

+ Optimize handling of send_delay for tcp sockes to better + work with the new pollthread implementation introduced in + OTP-21.

+

+ Own Id: OTP-15471 Aux Id: ERIERL-229

+
+ +

+ Optimize driver_set_timer with a zero timeout to + short-circuit and not create any timer structure, but + instead schedule the timer immediately.

+

+ Own Id: OTP-15472 Aux Id: ERIERL-229

+
+ +

+ Add erl_xcomp_code_model_small as a cross + configure variable in order to let the emulator be build + with the assumption that a small code model will be used + on the target machine.

+

+ Own Id: OTP-15473 Aux Id: ERIERL-229

+
+ +

+ Add a new pollset that is made to handle sockets that use + {active, true} or {active, N}. The new + pollset will not be polled by a pollthread, but instead + polled by a normal scheduler.

+

+ This change was made because of the overhead associated + with constantly having to re-apply the ONESHOT mechanism + on fds that all input events were interesting.

+

+ The new pollset is only active on platforms that support + concurrent kernel poll updates, i.e. Linux and BSD.

+

+ Own Id: OTP-15475 Aux Id: ERIERL-229

+
+ +

+ Fix bug where emulator would segfault if a literal + message was sent when sequence tracing was enabled.

+

+ Own Id: OTP-15478 Aux Id: ERL-741

+
+
+
+ +
+
Erts 10.1.3
Improvements and New Features -- cgit v1.2.3