aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
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-18erts: Fix rare deadlock in realloc when +ramv is enabledJohn Högberg
OTP-15024
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-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-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/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-12New process_info() implementation using signalsRickard Green
2018-04-11Fix VM probes compilationRickard Green
2018-04-11Merge branch 'rickard/signals/OTP-14589'Rickard Green
* rickard/signals/OTP-14589: Fix seq trace Fix bad assert
2018-04-10erts: Workaround test t_float_to_string for windowsSverker Eriksson
2018-04-10Teach erlang:monotonic_time/1 the perf_counter time unitRickard Green
2018-04-05Support dumping of external fun literals to a crash dumpBjörn Gustavsson
63e1c58d27ab (PR #1725) started to compile external funs as literals. This commit updates the dumping of literal areas to dump external fun literals to the crash dump.
2018-04-05Fix seq traceRickard Green
2018-04-04Merge branch 'sverker/monitor-frenzy-fix'Sverker Eriksson
2018-04-04erts: Fix float_to_list(F, [{decimals,D}])Sverker Eriksson
to better conform with io_lib:format("~.*f", [D,F])
2018-04-04Merge pull request #1725 from michalmuskala/fun-literalsBjörn Gustavsson
Compile external fun expressions to literals OTP-15003
2018-03-29Merge branch 'lukas/erts/tcp_send_return_closed/OTP-15001'Lukas Larsson
* lukas/erts/tcp_send_return_closed/OTP-15001: erts: tcp send should return {error,closed}
2018-03-29erts: Don't use EV_DISPATCH on openbsdLukas Larsson
Currently (OpenBSD 6.2) the kqueu implementation on opnebsd does not work properly for EOF conditions when using EV_DISPATCH, so we use the EV_ONESHOT fallback there.
2018-03-28Merge branch 'sverker/driver-taints/OTP-14960'Sverker Eriksson
* sverker/driver-taints/OTP-14960: erts: Include foreign static linked drivers in taints erts: Fix harmless bug in macro IS_DRIVER_VERSION_GE erts: Remove our own NIF modules from "taints" erts: Refactor erts_static_nif_get_nif_init erts: Add dynamic loaded drivers to list of "taints"
2018-03-28erts: Fix race in nif_SUITE:monitor_frenzySverker Eriksson
detected by valgrind. We cannot compare monitor in state MON_FREE before it's initialized. Still not really kosher to access 'state' without lock or atomic-op.
2018-03-27Merge branch 'john/erts/bwt-wt-dirty-schedulers/OTP-14959'John Högberg
* john/erts/bwt-wt-dirty-schedulers/OTP-14959: Add +sbwt/+swt analogues for dirty schedulers
2018-03-27Fix bad assertRickard Green
2018-03-27Merge pull request #1760 from ↵John Högberg
jhogberg/john/erts/any-term-as-seq_trace-label/OTP-14899 Lift the type restrictions on seq_trace token labels
2018-03-26erts: Include foreign static linked drivers in taintsSverker Eriksson
That is, driver added with config option --enable-static-drivers.
2018-03-26erts: Fix harmless bug in macro IS_DRIVER_VERSION_GESverker Eriksson
harmless until we bump major version
2018-03-26Compile external fun expressions to literalsMichał Muskała
The expressions fun M:F/A, when all elements are literals are also treated as a literal. Since they have consistent representation and don't depend on the code currently loaded in the VM, this is safe. This can provide significant performance improvements in code using such functions extensively - a full function call to erlang:make_fun/3 is replaced by a single move instruction and no register shuffling or saving registers to stack is necessary. Additionally, compound data types that contain such external functions as elements can be treated as literals too. The commit also changes the representation of external funs to be a valid Erlang syntax and adds support for literal external funs to core Erlang.
2018-03-26Merge branch 'rickard/signals/OTP-14589'Rickard Green
* rickard/signals/OTP-14589: Fix VM probes compilation
2018-03-26Fix VM probes compilationRickard Green
2018-03-26Merge branch 'raimo/type-posix-0-overhaul/ERL_550/OTP-14019'Raimo Niskanen
* raimo/type-posix-0-overhaul/ERL_550/OTP-14019: Update types for posix error codes
2018-03-26Add +sbwt/+swt analogues for dirty schedulersJohn Högberg
Sharing these settings for all schedulers can degrade performance, so it makes sense to be able to configure them separately. This also changes the default busy-wait time to "short" for both kinds of dirty schedulers.
2018-03-26Update types for posix error codesRaimo Niskanen
I have read the man pages for most socket and file operations on recent Linux, FreeBSD, OpenBSD and Solaris 10 and noted the possible error codes. Which error codes that are possible for file operations have been updated in file:posix/0. Error codes for socket operations in inet:posix/0. The latter refers to the former so it is a superset, assuming that e.g sendfile and AF_UNIX socket operations could cause socket operations to return any file error code. That is not entirely true, but could be, especially in the future. Added to file:posix/0 are: ebadmsg edeadlk edeadlock eftype emultihop enobufs enolck enolink enosr enostr enosys eopnotsupp eoverflow erange etxtbsy Added to inet:posix/0 are all but: exbadport exbadseq file:posix() These are still possible according to erl_posix_str.c, but are not in file:posix/0 nor in inet:posix/0, and many of them are not file nor inet related, but some might be: e2big eadv ealign ebade ebadfd ebadr ebadrpc ebadrqc ebadslt ebfont echild echrng ecomm edirty edom edotdot eduppkg eidrm einit eisnam elbin el2hlt el2nsync el3hlt el3rst elibacc elibbad elibexec elibmax elibscn elnrng enavail enet enoano enocsi enodata enoexec enonet enosym enotempty enotnam enotuniq eproclim eprocunavail eprogmismatch eprogunavail erefused eremchg eremdev eremote eremoteio eremoterelease erpcmismatch erremote eshutdown esrmnt esuccesss etime etoomanyrefs euclean eunatch eusers eversion exfull sysnotready vernotsupported ediscon enomore ecancelled einvalidproctable einvalidprovider eproviderfailedinit syscallfailure service_not_found type_not_found e_no_more e_cancelled unknown
2018-03-23Merge branch 'rickard/signals/OTP-14589'Rickard Green
* rickard/signals/OTP-14589: Fix VM probes compilation Fix lock counting Fix signal order for is_process_alive Fix signal handling priority elevation
2018-03-23Fix VM probes compilationJohn Högberg
2018-03-23Lift the type restrictions on seq_trace token labelsJohn Högberg
OTP-14899
2018-03-23Correct overflow in ERTS_SINT64_MIN and add macros for 16/32John Högberg
This also removes a redundant #ifdef soup that had hidden the problem on most platforms.
2018-03-23Merge branch 'john/erts/async-thread-defaults/OTP-14928'John Högberg
* john/erts/async-thread-defaults/OTP-14928: Change default async thread count to 1
2018-03-23Merge branch 'john/erts/nif-map-from-array/OTP-14954'John Högberg
* john/erts/nif-map-from-array/OTP-14954: Add enif_make_map_from_arrays
2018-03-23Merge branch 'john/erts/list-installed-nifs/OTP-14965'John Högberg
* john/erts/list-installed-nifs/OTP-14965: Add an option to ?MODULE:module_info/1 for listing NIFs Fix a misleading comment
2018-03-23Add enif_make_map_from_arraysJohn Högberg
2018-03-22Fix lock countingRickard Green
2018-03-22Merge branch 'sverker/enif-name-funcs/OTP-14994'Sverker Eriksson
2018-03-22erts: Improve NIF load incompatibility errorsSverker Eriksson
2018-03-22erts: Add enif_vfprintf and enif_vsnprintfSverker Eriksson
2018-03-22erts: Add enif_*_name functionsSverker Eriksson