aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-04-25Merge branch 'lukas/erts/poll-thread/OTP-14346'Lukas Larsson
* lukas/erts/poll-thread/OTP-14346: erts: nif resource stop from poll-thread is a indirect call
2018-04-25Merge branch 'lukas/erts/dump_SUITE_fix'Lukas Larsson
* lukas/erts/dump_SUITE_fix: erts: Increase file read timeout for signal_abort test
2018-04-24Merge branch 'john/erts/fix-lcnt-toggle-test'John Högberg
* john/erts/fix-lcnt-toggle-test: Disregard locks that can't be toggled in lcnt_SUITE
2018-04-24Merge pull request #1790 from jhogberg/john/erts/more-alloc-info/OTP-14961John Högberg
Improve memory instrumentation OTP-15024 OTP-14961
2018-04-24mikpe/erts-logger-integer-truncation/PR-1795/OTP-15032Lukas Larsson
fix integer truncation bugs in error logger path
2018-04-24erts: nif resource stop from poll-thread is a indirect callLukas Larsson
2018-04-23Merge branch 'sverker/valgrind-uninit-run_queue-ptr'Sverker Eriksson
* sverker/valgrind-uninit-run_queue-ptr: erts: Fix run queue pointer in proxy process
2018-04-23Merge branch 'sverker/ets-cherries/OTP-15031'Sverker Eriksson
* sverker/ets-cherries/OTP-15031: erts: Use table ref for select continuation erts: Refactor erl_db_hash next() into next_live() erts: Change wrong alloc_fnf
2018-04-23erts: Rewrite memory instrumentationJohn Högberg
This commit replaces the old memory instrumentation with a new implementation that scans carriers instead of wrapping erts_alloc/erts_free. The old implementation could not extract information without halting the emulator, had considerable runtime overhead, and the memory maps it produced were noisy and lacked critical information. Since the new implementation walks through existing data structures there's no longer a need to start the emulator with special flags to get information about carrier utilization/fragmentation. Memory fragmentation is also easier to diagnose as it's presented on a per-carrier basis which eliminates the need to account for "holes" between mmap segments. To help track allocations, each allocation can now be tagged with what it is and who allocated it at the cost of one extra word per allocation. This is controlled on a per-allocator basis with the +M<S>atags option, and is enabled by default for binary_alloc and driver_alloc (which is also used by NIFs).
2018-04-23erts: Increase file read timeout for signal_abort testLukas Larsson
2018-04-23Merge branch 'lukas/erts/seq_tracer_nif/OTP-15029'Lukas Larsson
* lukas/erts/seq_tracer_nif/OTP-15029: Fix seq_trace erl_tracer bug Fix makefile mkdir warning
2018-04-23Merge branch 'john/erts/fix-sbwt-links'John Högberg
* john/erts/fix-sbwt-links: Fix seealso tags for +sbwt/+swt
2018-04-21fix integer truncation bugs in error logger pathMikael Pettersson
Sending a large term to the error logger has two problems related to the size and sign of the variables used to represent lengths: - the API functions (erts_send_error_term_to_logger() et al) perform an unchecked narrowing conversion from size_t to int when passing dsbufp->str_len to the internal functions; this may both truncate the length and make it negative - do_send_term_to_logger() and do_send_to_logger() multiply the int-typed length by 2 before widening it to Uint and adding a few more values; the intermediate product may overflow causing loss of high bits and a change of sign; if the intermediate product is negative the final size will be an extremely large positive value The end result is that the computed buffer size can be arbitrarily wrong, either too small or too large. While reviewing this code I also found and fixed a potential narrowing bug in erts_set_hole_marker().
2018-04-20erts: Use table ref for select continuationSverker Eriksson
and not the name. For more sane named table semantics. Applies to both select/1 continuation and trap context.
2018-04-20erts: Refactor erl_db_hash next() into next_live()Sverker Eriksson
where argument 'list' is the first candidate (not list->next). Also simplified db_first_hash().
2018-04-20erts: Change wrong alloc_fnfSverker Eriksson
There is no NULL check here !?
2018-04-20Merge PR-1792 from saleyn/float_to_listSverker Eriksson
Optimize performance of float_to_list/2
2018-04-20Fix seealso tags for +sbwt/+swtJohn Högberg
2018-04-20erts: Fix run queue pointer in proxy processSverker Eriksson
proc->run_queue detected as uninitialized by valgrind but seems harmless in practice as it's not used for proxy processes. "Bug" introduced in OTP-17 by ca0425c6ff85262bc15367f5fd9cbc51cde52b20 and made worse (but still harmless) in master for OTP-21 at fbb10ebc4a37555c7ea7f99e14286d862993976a.
2018-04-20Merge pull request #1783 from bjorng/bjorn/deprecate-get_stacktrace/OTP-14692Björn Gustavsson
Deprecate erlang:get_stacktrace/1
2018-04-20Merge branch 'sverker/master/optimize-atom-enc-dec/ERIERL-150'Sverker Eriksson
2018-04-20Merge pull request #1791 from bjorng/bjorn/erts/backtrace_depth/OTP-15026Björn Gustavsson
Make stacktraces consistent when backtrace_depth is 0
2018-04-19erts,erl_interface: Refactor common config of ARCHSverker Eriksson
into aclocal.m4 as LM_HARDWARE_ARCH
2018-04-19Optimize performance of float_to_list/2Serge Aleynikov
2018-04-19Make stacktraces consistent when backtrace_depth is 0Björn Gustavsson
It is allowed to set the backtrace depth to 0, but when an exception is catched the stacktrace will still contain one element: 1> erlang:system_flag(backtrace_depth, 0). 8 2> catch error(badarg). {'EXIT',{badarg,[{shell,apply_fun,3, [{file,"shell.erl"},{line,908}]}]}} However, when an exception is raised using `erlang:raise/3`, there will be no elements in the stacktrace: 3> catch erlang:raise(error, badarg, [{fake,name,[arg],[]}]). {'EXIT',{badarg,[]}} Since the `error_handler` module uses `erlang:raise/3` to raise an exception when an undefined function is called, there will not be any stacktrace when calling an undefined function: 4> catch undef_module:undef_name(some_argument). {'EXIT',{undef,[]}} Fix this inconsistency by changing `erlang:raise/3` so that it always includes one element in the stacktrace: 3> catch erlang:raise(error, badarg, [{fake,name,[arg],[]}]). {'EXIT',{badarg,[{fake,name,[arg],[]}]}} 4> catch undef_module:undef_name(some_argument). {'EXIT',{undef,[{undef_module,undef_name,[some_argument],[]}]}}
2018-04-19Merge pull request #1789 from ↵Lukas Larsson
christhekeele/remove-trace-terms-from-table-types-in-match-docs Remove trace-specific terms from docs for table-oriented matchspecs
2018-04-19Remove trace-specific terms from docs for table-oriented matchspecsChris Keele
This removes the matchspec instructions `is_seq_trace` and `get_tcw/0` from the documentation for table-oriented matchspecs. This is likely correct as both are already documented under "Functions Allowed Only for Tracing", despite appearing in the list of possible options for table specs. The following observations further back this change up: ```erl erlang:match_spec_test([whatever], [{'_', [], [{is_seq_trace}]}], trace). %=> {ok,true,[],[]} erlang:match_spec_test({whatever}, [{'_', [], [{is_seq_trace}]}], table). %=> {error,[{error,"Special form 'is_seq_trace' used in wrong %dialect."}]} erlang:match_spec_test([whatever], [{'_', [], [{get_tcw}]}], trace). %=> {ok,true,[],[]} erlang:match_spec_test({whatever}, [{'_', [], [{get_tcw}]}], table). %=> {error,[{error,"Function get_tcw/0 cannot be called in this context."}]} ```
2018-04-18Merge branch 'sverker/lock-check-matrix'Sverker Eriksson
2018-04-18erts: Fix rare deadlock in realloc when +ramv is enabledJohn Högberg
OTP-15024
2018-04-16Disregard locks that can't be toggled in lcnt_SUITEJohn Högberg
2018-04-16erts: Keep track of which NIF a scheduler is executingJohn Högberg
This may be of interest in crash dumps and allows the upcoming allocation tagging feature to track allocations on a per-NIF basis. Note that this is only updated when user code calls a NIF; it's not altered when the emulator calls NIFs during code upgrades or tracing.
2018-04-16erts: Always keep a copy of driver names as an atomJohn Högberg
2018-04-16erts: Update esdp->current_port on immediate port callsJohn Högberg
This increases the accuracy of crash dumps and the upcoming allocation tagging feature.
2018-04-16Deprecate erlang:get_stacktrace/0Björn Gustavsson
2018-04-16Merge branch 'rickard/process_info/OTP-14966'Rickard Green
* rickard/process_info/OTP-14966: Fix deadlock in HiPE gc after receive
2018-04-16Fix deadlock in HiPE gc after receiveRickard Green
2018-04-16Fix seq_trace erl_tracer bugLukas Larsson
2018-04-13Add zzz_SUITE with erts_debug:lc_graph last in testsSverker Eriksson
for erts, stdlib, kernel and runtime_tools.
2018-04-13erts: Make locked checker allocations thread specificSverker Eriksson
Also removed unused ERTS_LC_STATIC_ALLOC.
2018-04-13erts: Add erts_debug:lc_graph/0Sverker Eriksson
Run debug VM or config with --enable-lock-checking. Exercise VM and then run erts_debug:lc_graph(). to create a file "lc_graph.<pid>" in current working directory.
2018-04-13erts: Refactor erl_lock_check.cSverker Eriksson
with just lots of renaming, nothing else. erts_lc_locked_locks_t -> lc_thread_t create_locked_locks -> create_thread_data l_lcks -> thr l_lck -> ll And dropped erts_ prefix on some file scope types.
2018-04-13Merge branch 'rickard/monotonic_time_1_fix/OTP-15008'Rickard Green
* rickard/monotonic_time_1_fix/OTP-15008: Teach erlang:monotonic_time/1 the perf_counter time unit
2018-04-13Merge branch 'rickard/process_info/OTP-14966'Rickard Green
* rickard/process_info/OTP-14966: New process_info() implementation using signals
2018-04-13Merge branch 'rickard/signals/OTP-14589'Rickard Green
* rickard/signals/OTP-14589: Fix VM probes compilation Conflicts: erts/emulator/beam/erl_message.c
2018-04-12Merge PR-1770 from sverker/float_to_list-tweak/OTP-15015Sverker Eriksson
Improve float_to_list(F, [{decimals,D}])
2018-04-12Merge branch 'lukas/erts/init_restart_flush_messages/OTP-15013'Lukas Larsson
* lukas/erts/init_restart_flush_messages/OTP-15013: erts: Flush messages before doing init restart
2018-04-12Merge branch 'lukas/erts/fix_openbsd_eof_poll/OTP-14346'Lukas Larsson
* lukas/erts/fix_openbsd_eof_poll/OTP-14346: erts: Break etp-processes/ports when all found erts: Don't use EV_DISPATCH on openbsd
2018-04-12erts: Remove obsolete locks from lock checkerSverker Eriksson
2018-04-12New process_info() implementation using signalsRickard Green
2018-04-12Merge branch 'lukas/erl_docgen/add_github_contrib_link/OTP-14979'Lukas Larsson
* lukas/erl_docgen/add_github_contrib_link/OTP-14979: erl_docgen: Remove git dependency in github link script stdlib: Fix timer monotonic time link erl_docgen: Use name based anchors where possible erl_docgen: Change ghlink icon to pencil erl_docgen: Fix ghlinks to .xmlsrc erl_docgen: Add hover links for ghlink erl_docgen: Add ghlink step for all non-generated doc xml files Fix erlang:abs/2 type docs Tickets missed in 9033a41375f3a31a18eb0cba3ea OTP-14651: temp_alloc disabling OTP-14652: msacc bugs