aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2015-12-15erts: It is not possible to exit the forker driverLukas Larsson
2015-12-15erts: Fix memory leak at async open portLukas Larsson
When an async open port fails early, it would sometimes leak memory.
2015-12-15erts: Move os_pid to port hash to child setupLukas Larsson
Had to move the hashing because of a race that can otherwise happen where a new os_pid value was inserted into the hash before the previous value had been removed. Also replaced the protocol inbetween erts and child setup to be a binary protocol. This was done in order to deal with the varying size of Eterm.
2015-12-15erts: Fix forker driver ifdefs for win32Lukas Larsson
2015-12-15erts: Create forker process for spawn driverLukas Larsson
Instead of forking from the beam process, we create a separate process in which all forks are done. This has several advantages: 1) performance: * don't have to close all fd's in the world * fork only has to copy stuff from a small process * work is done in a completely seperate process * a 3x performance increase has been measured, can be made even greater (10x) if we cache the environment in child setup 2) stability * the exec is done in another process than beam, which means that if the file that we exec to is on an nfs that is not available right now we will not block a scheduler until the nfs returns. 3) simplicity * don't have to deal with SIGCHLD in the erts Unfortunately, this solution also implies some badness. 1) There will always be a seperate process running together with beam on unix. This could be confusing and undesirable. 2) We have to transfer the entire environment to child_setup for each command. OTP-13088
2015-12-15erts: Refactor out erts functions from hashLukas Larsson
2015-12-15erts: Bump driver minor versionLukas Larsson
2015-12-15erts: Add erl_drv_set_pidLukas Larsson
OTP-13087
2015-12-15erts: Add support for asynchronous open_portLukas Larsson
OTP-13086
2015-11-04Merge branch 'sverk/binary_split_bif'Sverker Eriksson
OTP-13082 * sverk/binary_split_bif: erts: Minor refactor for binary find BIF backend erts: Refactor BIF for binary:match,matches,split erts: Refactor backend of binary:split erts: Replace 0 with THE_NON_VALUE stdlib: Add BIF option 'trim_all' to binary:split/3 stdlib: Add BIF binary:split/2 and binary:split/3 Conflicts: bootstrap/lib/stdlib/ebin/binary.beam
2015-11-04erts: Minor refactor for binary find BIF backendAndrew Bennett
* Use NULL instead of THE_NON_VALUE for non-Eterm variable. * Add BinaryFindState_bignum struct to avoid unnecessary type casting.
2015-11-04erts: Refactor BIF for binary:match,matches,splitAndrew Bennett
with an common do_binary_find() used by match, matches and split.
2015-11-04erts: Refactor backend of binary:splitSverker Eriksson
to reduce code volume.
2015-11-04erts: Replace 0 with THE_NON_VALUESverker Eriksson
2015-11-04stdlib: Add BIF option 'trim_all' to binary:split/3Andrew Bennett
2015-11-04stdlib: Add BIF binary:split/2 and binary:split/3Andrew Bennett
2015-11-02Merge branch 'maint'Lukas Larsson
2015-11-02Merge branch 'lukas/erts/win32_bool_fix/OTP-13079' into maintLukas Larsson
* lukas/erts/win32_bool_fix/OTP-13079: erts: bool is a reserved word, use boolean instead
2015-10-27Merge branch 'maint'Henrik Nord
2015-10-27Merge branch 'lrascao/fix/build_fail_on_enabled_dist_debug' into maintHenrik Nord
* lrascao/fix/build_fail_on_enabled_dist_debug: Fix build fail when enabling distribution debug messages
2015-10-26erts: Add {line_delimiter, byte()} option to inet:setopts/2Serge Aleynikov
A new {line_delimiter, byte()} option allows line-oriented TCP-based protocols to use a custom line delimiting character. It is to be used in conjunction with {packet, line}. This option also works with erlang:decode_packet/3 when its first argument is 'line'.
2015-10-26Update primary bootstrapIngela Anderton Andin
2015-10-26erts: Add {line_delimiter, byte()} option to inet:setopts/2Serge Aleynikov
A new {line_delimiter, byte()} option allows line-oriented TCP-based protocols to use a custom line delimiting character. It is to be used in conjunction with {packet, line}. This option also works with erlang:decode_packet/3 when its first argument is 'line'.
2015-10-12Merge branch 'bjorn/erts/builtin/OTP-13034'Björn Gustavsson
* bjorn/erts/builtin/OTP-13034: Teach erlang:is_builtin/3 that erlang:apply/3 is built-in
2015-10-09erts: Remove vheap mature from process control blockBjörn-Egil Dahlberg
Binary vheap mature is not necessary for binary gc.
2015-10-09Teach erlang:is_builtin/3 that erlang:apply/3 is built-inBjörn Gustavsson
erlang:is_builtin(erlang, apply, 3) returns 'false'. That seems to be an oversight in the implementation of erlang:is_builtin/3 rather than a conscious design decision. Part of apply/3 is implemented in C (as a special instruction), and part of it in Erlang (only used if apply/3 is used recursively). That makes apply/3 special compared to all other BIFs. From the viewpoint of the user, apply/3 is a built-in function, since it cannot possibly be implemented in pure Erlang. Noticed-by: Stavros Aronis
2015-10-05Merge branch 'maint'Lukas Larsson
2015-10-05Fix build fail when enabling distribution debug messagesLuis Rascao
2015-09-28erts: Remove assertion that ptab is emptyLukas Larsson
Another process may already have been placed in this slot since the free och the process struct can be scheduled for later.
2015-09-17Merge branch 'maint'Henrik Nord
2015-09-17Merge branch 'goertzenator/enif_make_pid-unused_param' into maintHenrik Nord
* goertzenator/enif_make_pid-unused_param: fix unused parameter warning in enif_make_pid OTP-12989
2015-09-17Merge branch 'mikpe/erts-binary_to_integer-fix' into maintHenrik Nord
* mikpe/erts-binary_to_integer-fix: erts: fix binary_to_integer boundary case OTP-12988
2015-09-09Merge branch 'maint'Rickard Green
* maint: Add configure switch --disable-saved-compile-time Fix ethread events with timeout Improve choice of clock sources at build time
2015-09-09Merge branch 'rickard/disable-saved-compile-time/OTP-12971' into maintRickard Green
* rickard/disable-saved-compile-time/OTP-12971: Add configure switch --disable-saved-compile-time Conflicts: HOWTO/INSTALL.md
2015-09-09Merge branch 'rickard/event-tmo/OTP-12954' into maintRickard Green
* rickard/event-tmo/OTP-12954: Fix ethread events with timeout
2015-09-09Add configure switch --disable-saved-compile-timeRickard Green
2015-09-07Merge branch 'maint'Sverker Eriksson
2015-09-02Merge branch 'maint' into sverk/trace-process_dump-matchstateSverker Eriksson
Conflicts: erts/emulator/beam/erl_printf_term.c erts/emulator/beam/erl_term.c erts/emulator/beam/utils.c
2015-09-01erts: Fix bug when tracing with 'process_dump'Sverker Eriksson
If the process stack contained a match state the print function would crash the vm as it was not recognized by tag_val_def(). Add new MATCHSTATE_DEF returned by tag_val_def(). All other callers either ignore it or has a default clause to handle invalid terms.
2015-08-31Merge branch 'maint'Sverker Eriksson
2015-08-31Merge branch 'sverk/hipe-maps-merge-wrapper' into maintSverker Eriksson
* sverk/hipe-maps-merge-wrapper: erts: Fix hipe bug for maps:merge/2 erts: Beautify hipe wrapper macro OTP-12965
2015-08-28erts: Fix hipe bug for maps:merge/2Sverker Eriksson
Add forgotten HIPE_WRAPPER_BIF_DISABLE_GC which could lead to stack-heap overrun if unlucky with the yielding during maps:merge when called by native hipe code.
2015-08-27Fix ethread events with timeoutRickard Green
Lots of pthread platforms unnecessarily falled back on the pipe/select solution. This since we tried to use the same monotonic clock source for pthread_cond_timedwait() as used by OS monotonic time. This has been fixed on most platforms by using another clock source. Darwin can however not use pthread_cond_timedwait() with monotonic clock source and has to use the pipe/select solution. On darwin we now use select with _DARWIN_UNLIMITED_SELECT in order to be able to handle a large amount of file descriptors.
2015-08-25erts: bool is a reserved word, use boolean insteadLukas Larsson
2015-08-18Merge branch 'maint'Lukas Larsson
* maint: erts: Make sure to unlock status lock when setting process prio
2015-08-18Merge branch 'lukas/erts/process_priority_unlock/OTP-12943' into maintLukas Larsson
* lukas/erts/process_priority_unlock/OTP-12943: erts: Make sure to unlock status lock when setting process prio
2015-08-13erts: Make sure to unlock status lock when setting process prioLukas Larsson
2015-08-11fix unused parameter warning in enif_make_pidDaniel Goertzen
2015-08-10Merge branch 'maint'Lukas Larsson
* maint: erts: Don't abort when a system process is terminated
2015-08-10Merge branch 'lukas/erts/system_process_core/OTP-12934' into maintLukas Larsson
* lukas/erts/system_process_core/OTP-12934: erts: Don't abort when a system process is terminated