aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_init.c
AgeCommit message (Collapse)Author
2017-07-06Merge branch 'john/erts/runtime-lcnt' into maintJohn Högberg
* john/erts/runtime-lcnt: Document rt_mask and add warnings about copy_save Add an emulator test suite for lock counting Break erts_debug:lock_counters/1 into separate BIFs Allow toggling lock counting at runtime Move lock flags to a common header Enable register_SUITE for lcnt builds Enable lcnt smoke test on all builds that have lcnt enabled Make lock counter info independent of the locks being counted OTP-14412 OTP-13170 OTP-14413
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-05-29Enable off-heap message queue for code purger, et. al.Rickard Green
2017-05-16Merge pull request #1436 from garazdawi/lukas/erts/remove_unused_functionsLukas Larsson
erts: Remove old unused functions
2017-05-16erts: Remove old unused functionsLukas Larsson
The functions have been found using: https://github.com/caolanm/callcatcher
2017-05-04Update copyright yearRaimo Niskanen
2017-04-27Merge branch 'rickard/ds-stack-size'Rickard Green
OTP-14380 * rickard/ds-stack-size: Suggested stack size options for dirty schedulers
2017-04-18Fix aux-work timer implementationRickard Green
2017-04-11Suggested stack size options for dirty schedulersRickard Green
2017-04-11Fix +SDPcpuRickard Green
2017-04-11Merge branch 'rickard/pcre-8.40'Rickard Green
OTP-14331 * rickard/pcre-8.40: Update documentation Update README.pcre_update.md Stack guard for PCRE Adjust for incompatibility between PCRE 8.40 and perl 5.22.1 Generate re replacement and split tests with perl vsn 5.22.1 Fix re_SUITE:pcre_compile_workspace_overflow/1 Skip line with lockout of modifiers in PCRE tests Update tests for PCRE version 8.40 Update PCRE to version 8.40 Conflicts: erts/emulator/beam/beam_debug.c
2017-04-07Stack guard for PCRERickard Green
2017-03-10Update copyright yearRickard Green
2017-03-02Implement ets:all() using scheduler specific dataRickard Green
2017-02-06Implement magic referencesRickard Green
Magic references are *intentionally* indistinguishable from ordinary references for the Erlang software. Magic references do not change the language, and are intended as a pure runtime internal optimization. An ordinary reference is typically used as a key in some table. A magic reference has a direct pointer to a reference counted magic binary. This makes it possible to implement various things without having to do lookups in a table, but instead access the data directly. Besides very fast lookups this can also improve scalability by removing a potentially contended table. A couple of examples of planned future usage of magic references are ETS table identifiers, and BIF timer identifiers. Besides future optimizations using magic references it should also be possible to replace the exposed magic binary cludge with magic references. That is, magic binaries that are exposed as empty binaries to the Erlang software.
2017-02-06Merge branch 'maint'Rickard Green
* maint: Use a hole-marker that cannot be mistaken for a valid term on the heap
2017-02-06Merge branch 'rickard/hole-marker' into maintRickard Green
* rickard/hole-marker: Use a hole-marker that cannot be mistaken for a valid term on the heap
2017-02-03Use a hole-marker that cannot be mistaken for a valid term on the heapRickard Green
2017-02-03Merge branch 'maint'Björn-Egil Dahlberg
2017-02-03Fix merge commitBjörn-Egil Dahlberg
This fixes commit f0867aa2ccbbf5677e0577bba08f8b7bc53ec0ed
2017-02-03erge branch 'maint'Hans Nilsson
Conflicts: OTP_VERSION
2017-02-03Merge branch 'maint-18' into maintHans Nilsson
Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/emulator/sys/unix/erl_unix_sys.h erts/emulator/sys/unix/sys.c erts/vsn.mk lib/crypto/c_src/crypto.c lib/crypto/doc/src/notes.xml lib/crypto/vsn.mk lib/inets/doc/src/notes.xml lib/inets/vsn.mk lib/ssh/doc/src/notes.xml lib/ssh/src/ssh.app.src lib/ssh/src/ssh_connection_handler.erl lib/ssh/vsn.mk otp_versions.table
2017-02-01Merge branch 'egil/erts/fix_scheduler_suspend/ERL-94/PR-978/OTP-13425' into ↵Erlang/OTP
maint-18 * egil/erts/fix_scheduler_suspend/ERL-94/PR-978/OTP-13425: erts: Fix install of suspend handler
2017-01-25Merge branch 'maint'Björn-Egil Dahlberg
2017-01-20erts: Fix thread suspend in crashdumpBjörn-Egil Dahlberg
* move signal handler setup
2016-11-25Merge branch 'maint'Rickard Green
* maint: Fix initialization dependencies between time, lock-check and lcnt
2016-11-25Merge branch 'rickard/init-bug/OTP-13911' into maintRickard Green
* rickard/init-bug/OTP-13911: Fix initialization dependencies between time, lock-check and lcnt Conflicts: erts/emulator/sys/unix/sys.c
2016-11-22Merge branch 'maint'Sverker Eriksson
2016-11-22erts: Add env variable ERL_CRASH_DUMP_BYTESSverker Eriksson
to limit crash dump size
2016-09-26Fix initialization dependencies between time, lock-check and lcntRickard Green
2016-09-05Merge branch 'bjorn/erts/help-clang'Björn Gustavsson
* bjorn/erts/help-clang: Slightly reduce code size of process_main()
2016-09-01Slightly reduce code size of process_main()Björn Gustavsson
clang will generate smaller code if we avoid reassigning the reg and freg arrays. That can be easily arranged by passing them as arguments to process_main().
2016-08-31erts: Fix install of suspend handlerLukas Larsson
This commit makes sure to setup the suspend handler to matter what +B option is given at the command line.
2016-08-31Remove old purge strategyRickard Green
2016-08-29Merge branch 'rickard/ds-purge-module/OTP-13808' into maintRickard Green
* rickard/ds-purge-module/OTP-13808: Perform check_process_code while process is executing dirty Conflicts: erts/doc/src/erl_nif.xml
2016-08-29Merge branch 'rickard/fun-purge-bug/OTP-13809' and ↵Rickard Green
'rickard/new-purge-strategy/OTP-13833' into maint * rickard/fun-purge-bug/OTP-13809: Fix purge of code Reclaim literal area after purge has completed Separate literal area from code Conflicts: erts/doc/src/erlang.xml erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_init.c erts/preloaded/ebin/init.beam
2016-08-29Perform check_process_code while process is executing dirtyRickard Green
2016-08-29Fix purge of codeRickard Green
Ensure that we cannot get any dangling pointers into code that has been purged. This is done by a two phase purge. At first phase all fun entries pointing into the code to purge are marked for purge. All processes trying to call these funs will be suspended and by this we avoid getting new direct references into the code. When all processes has been checked, these processes are resumed. The new purge strategy now also completely ignore the existence of indirect references to the code (funs). If such exist, they will cause bad fun exceptions to the caller, but will not prevent a soft purge or cause a kill of a process having such live references during a hard purge. This since it is impossible to give any guarantees that no processes in the system have such indirect references. Even when the system is completely clean from such references, new ones can appear via distribution and/or disk.
2016-08-26Reclaim literal area after purge has completedRickard Green
2016-08-12Merge branch 'maint-19' into maintRickard Green
* maint-19: Updated OTP version Prepare release Avoid segfault when printing slogan after crashdumping Fix race causing lost wakeup on receive-after timeout
2016-08-11Merge branch 'rickard/erl-crash-dump-bug/OTP-13799' into maint-18Erlang/OTP
* rickard/erl-crash-dump-bug/OTP-13799: Avoid segfault when printing slogan after crashdumping
2016-08-11Merge branch 'rickard/erl-crash-dump-bug/OTP-13799' into maint-19Erlang/OTP
* rickard/erl-crash-dump-bug/OTP-13799: Avoid segfault when printing slogan after crashdumping
2016-08-11Avoid segfault when printing slogan after crashdumpingRickard Green
2016-07-14hipe: Remove performance profiling codeLukas Larsson
This type of statistics is now available through the microstate accounting API.
2016-05-25Remove the 'message_queue_data' option 'mixed'Rickard Green
2016-05-10erts: Implement max_heap_size process flagLukas Larsson
The max_heap_size process flag can be used to limit the growth of a process heap by killing it before it becomes too large to handle. It is possible to set the maximum using the `erl +hmax` option, `system_flag(max_heap_size, ...)`, `spawn_opt(Fun, [{max_heap_size, ...}])` and `process_flag(max_heap_size, ...)`. It is possible to configure the behaviour of the process when the maximum heap size is reached. The process may be sent an untrappable exit signal with reason kill and/or send an error_logger message with details on the process state. A new trace event called gc_max_heap_size is also triggered for the garbage_collection trace flag when the heap grows larger than the configured size. If kill and error_logger are disabled, it is still possible to see that the maximum has been reached by doing garbage collection tracing on the process. The heap size is defined as the sum of the heap memory that the process is currently using. This includes all generational heaps, the stack, any messages that are considered to be part of the heap and any extra memory the garbage collector may need during collection. In the current implementation this means that when a process is set using on_heap message queue data mode, the messages that are in the internal message queue are counted towards this value. For off_heap, only matched messages count towards the size of the heap. For mixed, it depends on race conditions within the VM whether a message is part of the heap or not. Below is an example run of the new behaviour: Eshell V8.0 (abort with ^G) 1> f(P),P = spawn_opt(fun() -> receive ok -> ok end end, [{max_heap_size, 512}]). <0.60.0> 2> erlang:trace(P, true, [garbage_collection, procs]). 1 3> [P ! lists:duplicate(M,M) || M <- lists:seq(1,15)],ok. ok 4> =ERROR REPORT==== 26-Apr-2016::16:25:10 === Process: <0.60.0> Context: maximum heap size reached Max heap size: 512 Total heap size: 723 Kill: true Error Logger: true GC Info: [{old_heap_block_size,0}, {heap_block_size,609}, {mbuf_size,145}, {recent_size,0}, {stack_size,9}, {old_heap_size,0}, {heap_size,211}, {bin_vheap_size,0}, {bin_vheap_block_size,46422}, {bin_old_vheap_size,0}, {bin_old_vheap_block_size,46422}] flush(). Shell got {trace,<0.60.0>,gc_start, [{old_heap_block_size,0}, {heap_block_size,233}, {mbuf_size,145}, {recent_size,0}, {stack_size,9}, {old_heap_size,0}, {heap_size,211}, {bin_vheap_size,0}, {bin_vheap_block_size,46422}, {bin_old_vheap_size,0}, {bin_old_vheap_block_size,46422}]} Shell got {trace,<0.60.0>,gc_max_heap_size, [{old_heap_block_size,0}, {heap_block_size,609}, {mbuf_size,145}, {recent_size,0}, {stack_size,9}, {old_heap_size,0}, {heap_size,211}, {bin_vheap_size,0}, {bin_vheap_block_size,46422}, {bin_old_vheap_size,0}, {bin_old_vheap_block_size,46422}]} Shell got {trace,<0.60.0>,exit,killed}
2016-05-04Merge branch 'rickard/reds-fix/master/OTP-13512'Rickard Green
* rickard/reds-fix/master/OTP-13512: Ensure correct reduction counting
2016-05-04Ensure correct reduction countingRickard Green
2016-04-26erts: Rename erl flag +xmqd to +hmqdLukas Larsson
Flags that control the heap should all fall under the +h flag
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year