aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2017-05-31Fix a race condition that consistently affected lc+lcnt buildsJohn Högberg
The garbage_collect message could be received while waiting for trace messages, causing the test to crash erroneously.
2017-05-30Prepare releaseErlang/OTP
2017-05-29Merge branch 'rickard/sys-proc-off-heap-msgq'Rickard Green
OTP-14438 * rickard/sys-proc-off-heap-msgq: Enable off-heap message queue for code purger, et. al.
2017-05-29Enable off-heap message queue for code purger, et. al.Rickard Green
2017-05-29Merge branch 'bjorn/erts/fix-sys-task-cleanup'Björn Gustavsson
* bjorn/erts/fix-sys-task-cleanup: erl_process.c: Add more assertions in process termination Make sure that asynchronous replies are not lost
2017-05-29Fix WX lock check assertion on MacOSXRickard Green
The fix avoids registering the main thread as an emulator thread on MacOSX. This since WX steals the main thread for its own usage on MacOSX, and use the thread as an ordinary driver thread.
2017-05-29hipe: Fix hipe_mkliterals make recipeLukas Larsson
If a link dependency is added in LDFLAGS it should be resolved in LIBS, so we have to use LIBS and not TYPE_LIBS.
2017-05-29erl_process.c: Add more assertions in process terminationBjörn Gustavsson
Before terminating a process, add assertions to make sure that all queues for system tasks have been emptied.
2017-05-29Make sure that asynchronous replies are not lostBjörn Gustavsson
If an synchronous GC was requested by calling: erlang:garbage_collect(Pid, [{async,Ref}]) the reply message could in certain circumstances be lost. The problem is in cleanup_sys_tasks() in erl_process.c. If there were at least one dirty task, only the first dirty task would be cleaned up. All other systems tasks would not be cleaned up (that is, no replies would be sent to other processes waiting for the tasks to finish).
2017-05-29Merge branch 'sverker/crash-dump-seconds-doc'Rickard Green
OTP-14434 * sverker/crash-dump-seconds-doc: erts: Clarify ERL_CRASH_DUMP_SECONDS docs
2017-05-29Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: bs_construct_SUITE: Correct calculation of free memory
2017-05-24Identify db_hash_slot locks by their table name instead of slot indexJohn Högberg
2017-05-24Merge branch 'rickard/escript-space-path-fix/OTP-14433'Rickard Green
* rickard/escript-space-path-fix/OTP-14433: escript: Do not split path to Erlang system into multiple words
2017-05-24erts: Clarify ERL_CRASH_DUMP_SECONDS docsSverker Eriksson
especially default behavior without -heart, which is wait indefinitely for crash dump.
2017-05-24Merge pull request #1475 from rickard-green/rickard/escript-emulator-fixRickard Green
Fix erlang system lookup from escript bug introduced in PR #1293 OTP-14201
2017-05-24bs_construct_SUITE: Correct calculation of free memoryBjörn Gustavsson
free_mem/0 returned the number of free Kb, but the caller assumed that it was in Mb. Also add another clause to further scale down the size of the binaries created.
2017-05-24Merge branch 'sverker/test-cuddle'Sverker Eriksson
2017-05-24Merge branch 'dgud/erts/revert-default-process-name'Dan Gudmundsson
* dgud/erts/revert-default-process-name: Revert setting default argv0 name
2017-05-23escript: Do not split path to Erlang system into multiple wordsRickard Green
escript failed to start Erlang systems with spaces in the absolute path (when absolute path was used).
2017-05-23Fix erlang system lookup from escript bug introduced in PR #1293Rickard Green
Erlang system found in PATH was used even when explicitly pointing out the escript binary in another Erlang system.
2017-05-23erts: Reduce runtime for nif_SUITE hash testsSverker Eriksson
and base allowed hash deviation on nr of standard deviations to make it easier to fiddle with the work load.
2017-05-23Merge branch 'lukas/doc/extend-secure-distr-warn/OTP-14425'Lukas Larsson
* lukas/doc/extend-secure-distr-warn/OTP-14425: otp: Extend secure distribution docs warnings
2017-05-23otp: Extend secure distribution docs warningsLukas Larsson
Warnings have been added to the relevant documentation about not using un-secure distributed nodes in exposed environments.
2017-05-23Revert setting default argv0 nameDan Gudmundsson
Changing argv[0] from emu name to progname if ESCRIPT_NAME was not set caused to many failing scripts, revert that part of the change. See 86f6a9856
2017-05-23Merge branch 'lukas/erts/etp-processes-ports-optimization'Lukas Larsson
* lukas/erts/etp-processes-ports-optimization: erts: Optimize etp-processes and etp-ports
2017-05-23Merge branch 'sverker/enif_select-testing'Sverker Eriksson
* sverker/enif_select-testing: erts: Fix nif_SUITE:monitor_frenzy for threadless erts: Improve message flush in nif_SUITE erts: Test monitor resource destructor from thread
2017-05-23erts: Fix nif_SUITE:monitor_frenzy for threadlessSverker Eriksson
2017-05-23erts: Improve message flush in nif_SUITESverker Eriksson
Pass number of expected messages in order to wait longer for messages (for slow machines) while not wasting test time waiting for nothing.
2017-05-23erts: Test monitor resource destructor from threadSverker Eriksson
which is scheduled on non-smp VM.
2017-05-22Add enif_whereis_...() functionsTed Burghart
#### 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.
2017-05-22erts: Optimize etp-processes and etp-portsLukas Larsson
Not calculating the max, table and invalid addresses each loop speeds up iterating through the processes list by about 5x.
2017-05-21erts: Make bif's do_send() staticSalikhov Dinislam
2017-05-21erts: Make erts_align_utf8_bytes() staticSalikhov Dinislam
2017-05-21erts: Make allocator functions staticSalikhov Dinislam
2017-05-21erts: Remove unused functions from erl_cpu_topologySalikhov Dinislam
2017-05-21Update erl_msg_tracer examplePéter Gömöri
After "Move tracer SecondTraceTerm to Opts map" in commit 115f0ba7 getting the receipient has to be done on a bit different way.
2017-05-19Merge branch 'sverker/nif-docs'Sverker Eriksson
* sverker/nif-docs: erts: Improve erl_nif docs
2017-05-19Merge branch 'rickard/ds-runqs'Rickard Green
OTP-14152 * rickard/ds-runqs: Make statistics/1 aware of dirty run-queues and tasks
2017-05-19Restore sighup behaviourRickard Green
2017-05-19Merge branch 'raimo/erts/use-all-bytes-in-abstract-addresses/OTP-14305'Raimo Niskanen
* raimo/erts/use-all-bytes-in-abstract-addresses/OTP-14305: Do not zero terminate Linux abstract addresses
2017-05-19Do not zero terminate Linux abstract addressesRaimo Niskanen
2017-05-19Make statistics/1 aware of dirty run-queues and tasksRickard Green
2017-05-19Merge branch 'bjorn/erts/refactor-beam_makeops'Björn Gustavsson
* bjorn/erts/refactor-beam_makeops: Allow multiple types per argument for specific instructions Modernize subroutine calls by removing '&' Eliminate the -gen_dest macro flag
2017-05-19Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: code_SUITE: Remove unused functions Eliminate warning for variable 'Config' being unused compile_SUITE: Don't create a directory called 'core' Don't crash in end_per_testcase/2 in code_SUITE:on_load_embedded/1
2017-05-19erts: Add undocumented option to do default SIGTERMLukas Larsson
This is a stopgap measure before the release of OTP-20 where that makes it possible for the user to make the vm not do anything with SIGTERM and instead rely on the OS default. To enable this behaviour the user should set the environment variable ERL_ZZ_SIGTERM_KILL="true".
2017-05-18Allow multiple types per argument for specific instructionsBjörn Gustavsson
Inroduce syntactic sugar so that we can write: get_list xy xy xy instead of: get_list x x x get_list x x y get_list x y x get_list x y y get_list y x x get_list y x y get_list y y x get_list y y y
2017-05-18Modernize subroutine calls by removing '&'Björn Gustavsson
In Perl 5, '&' on direct subroutine calls are optional.
2017-05-18Eliminate the -gen_dest macro flagBjörn Gustavsson
Instructions that take a 'd' argument needs a -gen_dest flag in their macros. For example: %macro:put_list PutList -pack -gen_dest put_list s s d -gen_dest was needed when x(0) was stored in a register, since it is not possible to take the address of a register. Now that x(0) is stored in memory and we can take the address, we can eliminate gen_dest.
2017-05-17code_SUITE: Remove unused functionsBjörn Gustavsson
2017-05-17Eliminate warning for variable 'Config' being unusedBjörn Gustavsson