aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.h
AgeCommit message (Collapse)Author
2017-09-11Fix unused-functions warningsLukas Larsson
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-01Fix check_process_code() on hibernated processRickard Green
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-18Remove accessor BIF timer implementationRickard Green
2017-04-18Fix aux-work timer implementationRickard Green
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-03-24Fix dirty scheduler type testsRickard Green
Old test for dirty schedulers didn't work with Visual C++
2017-03-22Merge branch 'sverker/ets-table-identifiers/OTP-14094'Sverker Eriksson
* sverker/ets-table-identifiers: observer: Polish crashdump viewer for ETS observer: Polish Table Viewer tab stdlib: Remove ets_SUITE:memory_check_summary erts: Improve reduction count during table cleanup erts: Cleanup table status bits erts: Remove now redundant 'id' from DbTableCommon erts: Remove meta_main_tab erts: Pass tid argument down to trapping functions erts: Print table id as ref in crashdump and break menu erts: Replace meta_pid_to{_fixed}_tab with linked lists erts: Correct erl_rbtree comments about yielding erts: Add ERTS_RBT_YIELD_STAT_INIT to erl_rbtree Fix node_container_SUITE list_to_ref/1 Implement ets:all() using scheduler specific data Rename fixation count in ets table to avoid confusion Introduce references as table identifiers
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-19erts: Drop workarounds for ErLLVM w/ LLVM < 3.9Magnus Lång
2017-01-17Scheduler wall time support for dirty schedulersRickard Green
2017-01-13Switch between scheduler types when multi-scheduling is blockedRickard Green
2017-01-12Perform potentially long GC on dirty schedulers if availableRickard Green
2017-01-12Support for dirty BIFsRickard Green
2017-01-02Merge branch 'maint'Rickard Green
* maint: Multi scheduling block bug-fixes Fix VM global GC info for dirty schedulers Leave dirty work in dirty run-queues on multi scheduling block Fix premature removal of process struct Fix crash due to GC of node entry on dirty scheduler
2016-12-30Multi scheduling block bug-fixesRickard Green
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-23Merge branch 'rickard/nif-scheduling-fixes' into maintRickard Green
* rickard/nif-scheduling-fixes: Fix check_process_code() when NifExport is in use - OTP-14048 Fix GC when NifExport is in use - OTP-14049 Fix saving of original arguments when rescheduling via NifExport - OTP-14050
2016-11-22Fix call time tracing with dirty schedulersRickard Green
2016-11-22Fix check_process_code() when NifExport is in useRickard Green
2016-11-22Merge branch 'maint'Sverker Eriksson
2016-11-17erts: Fix all -Wundef errorsSverker Eriksson
2016-11-17erts: Refactor crash dumping with cbprintfSverker Eriksson
Instead of passing around a file descriptor use a function pointer to facilitate more advanced backend write logic such as size limitation or compression.
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-08-31Merge branch 'rickard/mbuf_sz/OTP-13851' into maintRickard Green
* rickard/mbuf_sz/OTP-13851: Ensure correct mbuf_sz value in process structure
2016-08-30Fix is-dirty-cpu/is-dirty-io scheduler predicatesRickard Green
2016-08-30Ensure correct mbuf_sz value in process structureRickard Green
2016-08-30Merge branch 'rickard/ds-win-32bit/OTP-13759' into maintRickard Green
* rickard/ds-win-32bit/OTP-13759: Fix dirty schedulers build on windows
2016-08-29Merge branch 'rickard/ds-trace/OTP-13822' into maintRickard Green
* rickard/ds-trace/OTP-13822: Fix tracing of processes executing dirty
2016-08-29Fix tracing of processes executing dirtyRickard Green
2016-07-20Fix dirty schedulers build on windowsRickard Green
2016-07-14erts: Fix msacc for dirty scheduler and heap_limitLukas Larsson
2016-05-31Update process state flags in etp-commandsRickard Green
2016-05-31Move dirty reduction count to erts_dirty_process_main()Rickard Green
2016-05-17Merge branch 'mikpe/otp-19-erts-integer-truncation-bugs/PR-1045/OTP-13606'Lukas Larsson
* mikpe/otp-19-erts-integer-truncation-bugs/PR-1045/OTP-13606: erl_unicode.c: fix integer truncation problems do not limit heap fragments to 4 giga-words erts_new_mso_binary(): do not truncate len Conflicts: erts/emulator/beam/erl_nif.c
2016-05-17erts: Move max_heap_size field so that ErLLVM works againLukas Larsson
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-11Add better support for communication with a process executing dirty NIFRickard Green
- Termination of a process... - Modify trace flags of process... - Process info on process... - Register/unregister of name on process... - Set group leader on process... ... while it is executing a dirty NIF.
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-05do not limit heap fragments to 4 giga-wordsMikael Pettersson
- struct erl_heap_fragment: use Uint for sizes - erl_nif.c: use size_t for sizes - erts_heap_frag_shrink(): remove now redundant cast