aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
AgeCommit message (Collapse)Author
2017-09-12Merge branch 'sverker/valgrind-fixes/OTP-14609' into maintSverker Eriksson
* sverker/valgrind-fixes/OTP-14609: erts: Suppress false memory leak for dlerror [ct] Cleanup and rename purify related functions as valgrind Revert "remove unused purify functions" erts: Fix memory leak when sending to terminating port erts: Fix harmless use of uninitialised value
2017-09-11Fix unused-functions warningsLukas Larsson
2017-08-28erts: Fix harmless use of uninitialised valueSverker Eriksson
Conditional jump or move depends on uninitialised value(s): erts_msgq_update_internal_pointers:487 (-> 0x5A7AF9) [erl_message.h] erts_msgq_replace_msg_ref:496 (-> 0x5A7B4C) [erl_message.h] move_msgq_to_heap:2487 (-> 0x5AED4F) [erl_gc.c] minor_collection:1380 (-> 0x5AB3F4) [erl_gc.c]
2017-08-16Merge branch 'lukas/erts/fix_dirty_trace_message_flush/OTP-14538' into maintLukas Larsson
* lukas/erts/fix_dirty_trace_message_flush/OTP-14538: erts: Must have main lock when flushing trace messages
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-06-15erts: Must have main lock when flushing trace messagesLukas Larsson
If we don't have the main lock, multiple threads may come in and do the flush at the same time which will lead to all kinds of strang problems.
2017-06-08Merge branch 'rickard/purge-hibernated-20'Rickard Green
* rickard/purge-hibernated-20: Update testcase to check that purge handle hibernated process correct Do not GC hibernated process from other processes Fix check_process_code() on hibernated process
2017-06-01Merge branch 'rickard/purge-hibernated-19' into rickard/purge-hibernated-20Rickard Green
* rickard/purge-hibernated-19: Do not GC hibernated process from other processes Fix check_process_code() on hibernated process Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h
2017-06-01Merge branch 'rickard/purge-hibernated' into rickard/purge-hibernated-19Rickard Green
* rickard/purge-hibernated: Do not GC hibernated process from other processes Fix check_process_code() on hibernated process Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_gc.c erts/emulator/beam/erl_process.h
2017-06-01Do not GC hibernated process from other processesRickard Green
2017-05-31Make sure that asynchronous replies are not lostBjörn Gustavsson
(First attempt to fix in 23f132d9ab776a.) 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 that cleanup_sys_tasks() is never called if there are dirty tasks, but no other active system tasks. Also shorten the long waiting times in the test case binary_SUITE:trapping/1 to make it much more likely that the GC have not already finished when the process is killed.
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-19Merge branch 'rickard/ds-runqs'Rickard Green
OTP-14152 * rickard/ds-runqs: Make statistics/1 aware of dirty run-queues and tasks
2017-05-19Make statistics/1 aware of dirty run-queues and tasksRickard 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-24Merge branch 'lukas/erts/fix_non-smp_scheduler_data_init/OTP-14152'Lukas Larsson
* lukas/erts/fix_non-smp_scheduler_data_init/OTP-14152: erts: Initialize esdp->type in non-smp to normal
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-20erts: Initialize esdp->type in non-smp to normalLukas Larsson
The previous code worked through luck because the memory returned from erts_alloc was zero:ed and SCHED_NORMAL is 0. But if you run with +Meamin that is not always the case which is how this error was detected.
2017-04-20Merge branch 'lukas/erts/20_minor_fixes'Lukas Larsson
* lukas/erts/20_minor_fixes: erts: Rebuild etc executables if config.h changes erts: Fix new gcc warning in check io kernel: Add mem check to prim_file:large_write tc erts: Fix two compiler warnings on OS X erts: Fix erts_debug:df function info output erts: Get rid of some unused function warnings on os x
2017-04-18Remove unnecessary cancel callback from timer-wheel timersRickard Green
2017-04-18Use magic refs for BIF timersRickard Green
2017-04-18Remove accessor BIF timer implementationRickard Green
2017-04-18Fix aux-work timer implementationRickard Green
2017-04-12Merge branch 'rickard/ds-fixes'Rickard Green
* rickard/ds-fixes: Fix dirty GC implementation Fix multi-scheduling with only one normal scheduler Fix +SDPcpu
2017-04-11Suggested stack size options for dirty schedulersRickard Green
2017-04-11Merge branch 'rickard/sched_type_tests'Rickard Green
* rickard/sched_type_tests: Fix dirty scheduler type tests
2017-04-11Fix multi-scheduling with only one normal schedulerRickard Green
2017-03-28erts: Fix two compiler warnings on OS XLukas Larsson
2017-03-28erts: Get rid of some unused function warnings on os xLukas Larsson
2017-03-24Fix dirty scheduler type testsRickard Green
Old test for dirty schedulers didn't work with Visual C++
2017-03-22erts: Replace meta_pid_to{_fixed}_tab with linked listsSverker Eriksson
from process psd through all owned/fixed tables. As meta_pid_to{_fixed}_tab maps to slot in meta_main_tab which is planned for destruction. In this commit we no longer seize table lock while freeing the table (free_table_cont) as it's not needed and makes the code a bit simpler. Any concurrent operation on the table will only access lock, owner and status and then bail out.
2017-03-02Implement ets:all() using scheduler specific dataRickard Green
2017-02-20Merge branch 'master' into sverker/enif_selectSverker Eriksson
Conflicts: erts/emulator/beam/erl_binary.h erts/emulator/beam/erl_monitors.c erts/emulator/beam/erl_nif.c erts/emulator/beam/global.h erts/emulator/test/nif_SUITE_data/nif_SUITE.c
2017-02-14Fixed typos in ertsAndrew Dryga
2017-02-09erts: Add enif_monitor_process and enif_demonitor_processSverker Eriksson
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: Dirty schedulers should not touch scheduler data pointed to by process struct
2017-02-06Merge branch 'rickard/ds-fix' into maintRickard Green
OTP-14122 * rickard/ds-fix: Dirty schedulers should not touch scheduler data pointed to by process struct Conflicts: erts/emulator/beam/erl_process.c
2017-02-02Dirty schedulers should not touch scheduler data pointed to by process structRickard Green
2017-01-19Fix unused warningRickard Green
2017-01-17Merge branch 'rickard/ds-features-20'Rickard Green
OTP-14152 * rickard/ds-features-20: Remove experimental disclaimer on dirty schedulers Scheduler wall time support for dirty schedulers Always return info from system_info(dirty_[cpu|io]_schedulers*) Improve etp-commands Switch between scheduler types when multi-scheduling is blocked Perform potentially long GC on dirty schedulers if available Return and exception trace for nif-export scheduled BIFs Optimize handling of BIF errors Support for dirty BIFs Reduction counting on non-tail return
2017-01-17Merge branch 'maint'Rickard Green
* maint: Fix memory leak of temporary heap
2017-01-17Merge branch 'rickard/abandoned-heap-bugs' into maintRickard Green
OTP-14135 * rickard/abandoned-heap-bugs: Fix memory leak of temporary heap
2017-01-17Scheduler wall time support for dirty schedulersRickard Green
2017-01-13Switch between scheduler types when multi-scheduling is blockedRickard Green