aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc
AgeCommit message (Collapse)Author
2017-04-25Merge branch 'lukas/erts/deprecate-non-smp/OTP-14272'Lukas Larsson
* lukas/erts/deprecate-non-smp/OTP-14272: erts: Fix testcases for smp +S 1:1 erts: Deprecate the non-smp emulators
2017-04-21Merge branch 'rickard/timer-improvements'Rickard Green
OTP-14356 * rickard/timer-improvements: Fix of later timer wheel Minimum timeout position in each timer wheel Manage timers to trigger at once in a slot similar to other timers Introduce timer slot range counters Timer wheel divided into a "soon wheel" and a "later wheel" Remove unnecessary cancel callback from timer-wheel timers Rearrange timer struct fields in order to simplify Use timer wheel for short BIF timers Use magic refs for BIF timers Remove accessor BIF timer implementation Fix aux-work timer implementation
2017-04-21erts: Deprecate the non-smp emulatorsLukas Larsson
2017-04-21Merge branch 'bjorn/dialyzer/add-typer/OTP-14336' into run-travisBjörn Gustavsson
* bjorn/dialyzer/add-typer/OTP-14336: Add smoke test for TypER Add back TypEr to the main OTP repository
2017-04-20Add back TypEr to the main OTP repositoryBjörn Gustavsson
It turned out that the dependencies between Dialyzer and TypEr makes it impractical to have TypEr in a separate repository. Add it back to the OTP repository, but put the Erlang module 'typer' in the dialyzer application.
2017-04-20erts: Rebuild etc executables if config.h changesLukas Larsson
2017-04-18Minimum timeout position in each timer wheelRickard Green
Minimum known timeout position is saved in bot far and near wheel. This information is used to avoid scanning from current position in the cases were we know the minimum timeout position.
2017-03-28erts: Fix two compiler warnings on OS XLukas Larsson
2017-03-28Merge branch 'lukas/erts/hide-debug-consoles'Lukas Larsson
* lukas/erts/hide-debug-consoles: erts: Only show debug consoles if ERL_CONSOLE_MODE is defined
2017-03-08Remove typer applicationSiri Hansen
The application now has an own repo, https://github.com/erlang/typer
2017-03-06erts: Only show debug consoles if ERL_CONSOLE_MODE is definedLukas Larsson
2017-02-14Fixed typos in ertsAndrew Dryga
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 'hm/escript-emulator'Rickard Green
OTP-14201 * hm/escript-emulator: escript: Handle symbolic link to a standalone escript
2017-01-13Improve etp-commandsRickard Green
2017-01-13Switch between scheduler types when multi-scheduling is blockedRickard Green
2016-12-22escript: Handle symbolic link to a standalone escriptHåkan Mattsson
The code has been rearranged to make use of the actual path "get_default_emulator(scriptname)" to the escript instead of the given one "get_default_emulator(argv[0])". TL;DR Assume a source system with some Erlang applications (app1, app2 etc.) and an escript called "mytool". When generating a standalone target system (with reltool for example), the escript(s) are located in the same top bin directory as "erl". See mytool* below. In such a system the original "mytool" escript is given the extension ".escript" and the file with the same name as the original escript is a copy of the "escript" executable. One purpose of the escript executable is to determine which "erl" to use to start the system. In a standalone system we want it to find the runtime system bundled with the escript(s). This is done by analyzing the path in order to find the "erl" located in the same directory as the escript. A dilemma here is that we do not want to put the top bin directory in the execution path (PATH env var) as we then would cause other Erlang applications to make use of our bundled run-time system. One way of solving this is to choose some suitable bin directory in the execution path (such as /user/local/bin) and put a symbolic link there to our mytool executable. Unfortunately this did not work as the escript executable (in this case called mytool) would try to find "erl" in /usr/local/bin and when it did not find such a file it resorted to use the command "erl" which would find some (unwanted) "erl" in the execution path. My fix solves that problem. ├── bin/ │   ├── erl* (dyn_erl.c) │   ├── mytool* (escript.c) │   ├── mytool.escript* (original mytool escript) │   └── start_clean.boot ├── erts-vsn/ │   └── bin/ │   ├── beam* │   ├── beam.smp* │   ├── erl* │   ├── erl_child_setup* │   ├── erlexec* │   └── inet_gethost* └── lib/ ├── app1-vsn ├── app2-vsn └── ...
2016-12-19Merge branch 'maint'Björn-Egil Dahlberg
2016-12-19Merge branch 'legoscia/remove-watchdog-vestiges/PR-1255/OTP-14112' into maintBjörn-Egil Dahlberg
* legoscia/remove-watchdog-vestiges/PR-1255/OTP-14112: Remove vestiges of watchdog support in heart
2016-12-19Fix stactrace for apply on error/[1,2], exit/1, or throw/1Rickard Green
2016-12-07Merge branch 'maint'Dan Gudmundsson
* maint: Update copyright-year Conflicts: lib/dialyzer/src/dialyzer.hrl lib/dialyzer/src/dialyzer_options.erl lib/dialyzer/test/opaque_SUITE_data/src/recrec/dialyzer.hrl lib/dialyzer/test/opaque_SUITE_data/src/recrec/dialyzer_races.erl lib/hipe/icode/hipe_icode.erl lib/hipe/main/hipe.erl lib/hipe/main/hipe.hrl.src lib/hipe/main/hipe_main.erl
2016-12-07Update copyright-yearErlang/OTP
2016-11-23Merge branch 'maint'Rickard Green
* maint: Update etp-commands for dirty schedulers Fix scheduling of system tasks on processes executing dirty Fix call time tracing with dirty schedulers Fix send of exit signal to process executing dirty Fix dirty scheduler process priority Fix alloc-util hard-debug Silence debug warning when no beam jump table is used with dirty schedulers Fix check_process_code() when NifExport is in use Fix GC when NifExport is in use Fix saving of original arguments when rescheduling via NifExport Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_nif.c
2016-11-23Merge branch 'rickard/dirty-scheduling-fixes' into maintRickard Green
OTP-14051 * rickard/dirty-scheduling-fixes: Update etp-commands for dirty schedulers Fix scheduling of system tasks on processes executing dirty Fix call time tracing with dirty schedulers Fix send of exit signal to process executing dirty Fix dirty scheduler process priority Fix alloc-util hard-debug Silence debug warning when no beam jump table is used with dirty schedulers Conflicts: erts/etc/unix/etp-commands.in
2016-11-22Update etp-commands for dirty schedulersRickard Green
2016-11-21Remove vestiges of watchdog support in heartMagnus Henoch
Hardware watchdog support was removed from heart in R13A, but there were still some vestiges in the code and the documentation. - Remove mentions of the HW_WD_DISABLE variable, as it's no longer used. - Remove the HEART_BEAT_BOOT_DELAY variable, as it was only used for the hardware watchdog.
2016-11-17erts: Fix all -Wundef errorsSverker Eriksson
2016-10-18Merge branch 'maint'Lukas Larsson
2016-10-18erts: Add etp-disasm gdb macroLukas Larsson
2016-10-12erts: Improve printouts for some etp commandsLukas Larsson
Specifically etp-stacktrace/stackdump/process-info have been changed
2016-10-12erts: Refactor out func_info into structLukas Larsson
This commit adds two new structs to be used to represent erlang code in erts. ErtsCodeInfo is used to describe the i_func_info header that is part of all Export entries and the prelude of each function. This replaces all the BeamInstr * that were previously used to point to these locations. After this change the code should never use BeamInstr * with offsets to figure out different parts of the func_info header. ErtsCodeMFA is a struct that is used to descripe a MFA in code. It is used within ErtsCodeInfo and also in Process->current. All function that previously took Eterm * or BeamInstr * to identify a MFA now use the ErtsCodeMFA or ErtsCodeInfo where appropriate. The code has been tested to work when adding a new field to the ErtsCodeInfo struct, but some updates are needed in ops.tab to make it work.
2016-09-23erts: Make cerl -dump core work on macSverker Eriksson
2016-09-06doc: Use groff with -Tutf8Hans Bolinder
2016-08-10Merge branch 'sverker/run_erl-pty-race/OTP-13795' into maintSverker Eriksson
2016-08-10run_erl: Add sleepy_child test caseSverker Eriksson
with run_erl option -sleepy-child to provoke race when slave pty is late
2016-07-05run_erl: Fix failing run_erl invokation on OpenBSDSverker Eriksson
Symptom: run_erl does exit(0) and child program (erl) does not seem to start. Running run_erl again however brings the previous child program to life. Problem: A race causing run_erl to read 0 from master pty and exit because the child has not yet opened its corresponding slave pty. Solution: Use the non standard openpty() function instead that does not expose this race as the slave fd is opened in the parent. Question: Is there a race free way to do this with posix_openpt on OpenBSD?
2016-07-05run_erl: Beautify #ifdef jungleSverker Eriksson
2016-06-22erts: Fix etp-carrier-blocks for non smpSverker Eriksson
2016-06-14erts: Make etp-*-info take any value as inputLukas Larsson
2016-06-14erts: Add etp commands to re-compile erlangLukas Larsson
2016-06-14Merge branch 'dotsimon/erts/heart_no_kill/OTP-13650'Lukas Larsson
* dotsimon/erts/heart_no_kill/OTP-13650: erts: Fix HEART_NO_KILL logic
2016-06-10erts: Fix HEART_NO_KILL logicLukas Larsson
2016-06-07Merge branch 'dotsimon/erts/heart_no_kill/OTP-13650'Lukas Larsson
* dotsimon/erts/heart_no_kill/OTP-13650: erts: make HEART_NO_KILL have to be set to TRUE Don't kill old erlang if HEART_NO_KILL is set Conflicts: lib/kernel/doc/src/heart.xml
2016-06-03erts: make HEART_NO_KILL have to be set to TRUELukas Larsson
2016-06-01Don't kill old erlang if HEART_NO_KILL is setSimon Cornish
If the environment variable HEART_NO_KILL is set then heart won't kill the old erlang process. This is desirable if the command executed by heart takes care of this.
2016-05-31Update process state flags in etp-commandsRickard Green
2016-05-25Add -start_epmd command line optionMagnus Henoch
Add a command line option that lets you disable automatic starting of epmd when starting a distributed node. This differs from the undocumented setting -no_epmd, in that it does not affect the starting of an erl_epmd process within erl_distribution: the newly started node will expect an epmd instance to have been started previously.
2016-05-11Merge branch 'rickard/ds-proc-exit/OTP-13123'Rickard Green
* rickard/ds-proc-exit/OTP-13123: Add dirty_heap_access test case Add dirty_call_while_terminated test case Move dirty nif test cases into dirty_nif_SUITE Add better support for communication with a process executing dirty NIF Remove conditional dirty schedulers API
2016-05-10Remove conditional dirty schedulers APIRickard 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}