aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2017-05-17Merge pull request #1463 from bjorng/bjorn/simplify-building-lcnt/OTP-14407Björn Gustavsson
Simplify building a lock-counting emulator
2017-05-16Merge branch 'lukas/erts/trace_recv_esdp_bug/OTP-14411'Lukas Larsson
* lukas/erts/trace_recv_esdp_bug/OTP-14411: erts: the esdp is not always available in matchspec
2017-05-16Merge PR-1457 from goertzenator/enif_monitor_typesSverker Eriksson
enif_monitor_process() typo
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-16Merge pull request #1435 from SalikhovDinislam/static_funcLukas Larsson
erts: Make erts_schedule_proc2port_signal static
2017-05-16Teach erlexec the -emu_type optionBjörn Gustavsson
Add the option -emu_type to start an emulator of a certain type. For exampe, "-emu_type lcnt" will start beam.lcnt.smp. Any string will be accepted after -emu_type. If there is no corresponding emulator, there will be an error similar to: erlexec: The emulator '.../bin/x86_64-unknown-linux-gnu/beam.foo.smp' does not exist. On Windows, there is an undocumented option "-debug". Remove that option, because -emu_type can be used instead.
2017-05-16Let --enable-lock-counter build an additional emulatorBjörn Gustavsson
"./configure --enable-lock-counter" would modify the behavior of the default emulator (usually SMP). To make lock counting more accessible, change --enable-lock-counter to build an additional emulator in the same way as: (cd erts/emulator && make lcnt) (The next commit will make it easier to start the built lock-counter emulator.)
2017-05-12use ErlNifMonitor instead of ErlDrvMonitor for enif_monitor/demonitorDaniel Goertzen
2017-05-12Warn for potentially unsafe use of get_stacktrace/0Björn Gustavsson
erlang:get_stacktrace/0 returns the stacktrace for the latest exception. The problem is that the stacktrace is kept until the next exception occurs. If the last exception was a 'function_clause' or a 'badarg', the arguments for the call are also kept forever. The arguments can be terms of any size (potentially huge). In a future release, we would like to only allow erlang:get_stacktrace/0 from within a 'try' expression. That would make it possible to clear the stacktrace when the 'try' expression is exited. The 'catch' expression has no natural end where the stacktrace could be cleared. The stacktrace could be cleared at the end of the function that the 'catch' occurs in, but that would cause problems in the following scenario (from real life, but simplified): try ... catch _:_ -> io:format(...), io:format("~p\n", [erlang:get_stacktrace()]) end. %% In io.erl. format(Fmt, Args) -> Res = case ... of SomePattern -> catch... ...; SomeOtherPattern -> %% Output the formatted string here ... end, clear_stacktrace(), %% Inserted by compiler. Res. The call to io:format() would always clear the stacktrace before it could be retrieved. That problem could be solved by tightning the scope in which the stacktrace is kept, but the rules for how long erlang:get_stacktrace/0 would work would become complicated. Therefore, the solution we suggest for a future major release of OTP is that erlang:get_stacktrace/0 will return [] if it is called outside the 'catch' part of a 'try' expression. To help users prepare, introduce a warning when it is likely that erlang:get_stacktrace/0 will always return an empty list, for example in this code: catch error(foo), Stk = erlang:get_stacktrace() or in this code: try Expr catch _:_ -> ok end, Stk = erlang:get_stacktrace()
2017-05-11Merge branch 'sverker/fix-lc-with-lcnt'Sverker Eriksson
* sverker/fix-lc-with-lcnt: erts: Add minor lock optimization for lcnt erts: Unbreak --enable-lock-checking --enable-lock-counter
2017-05-10Merge branch 'maint'Rickard Green
* maint: Updated OTP version Prepare release
2017-05-10Merge branch 'maint-18' into maintRickard Green
* maint-18: Updated OTP version Prepare release Conflicts: erts/doc/src/notes.xml
2017-05-10Merge tag 'OTP-18.2.4.0.1' into maint-18Rickard Green
=== OTP-18.2.4.0.1 === Changed Applications: - erts-7.2.1.1 Unchanged Applications: - asn1-4.0.1 - common_test-1.11.2 - compiler-6.0.2 - cosEvent-2.2 - cosEventDomain-1.2 - cosFileTransfer-1.2 - cosNotification-1.2 - cosProperty-1.2 - cosTime-1.2 - cosTransactions-1.3 - crypto-3.6.2 - debugger-4.1.1 - dialyzer-2.8.2 - diameter-1.11.1 - edoc-0.7.17 - eldap-1.2 - erl_docgen-0.4.1 - erl_interface-3.8.1 - et-1.5.1 - eunit-2.2.12 - gs-1.6 - hipe-3.14 - ic-4.4 - inets-6.1.1 - jinterface-1.6.1 - kernel-4.1.1 - megaco-3.18 - mnesia-4.13.2 - observer-2.1.1 - odbc-2.11.1 - orber-3.8 - os_mon-2.4 - ose-1.1 - otp_mibs-1.1 - parsetools-2.1.1 - percept-0.8.11 - public_key-1.1 - reltool-0.7 - runtime_tools-1.9.2 - sasl-2.6.1 - snmp-5.2.1 - ssh-4.2.1 - ssl-7.2 - stdlib-2.7 - syntax_tools-1.7 - test_server-3.9.1 - tools-2.8.2 - typer-0.9.10 - webtool-0.9 - wx-1.6 - xmerl-1.3.9 * tag 'OTP-18.2.4.0.1': Updated OTP version Prepare release Conflicts: OTP_VERSION erts/vsn.mk otp_versions.table
2017-05-10Prepare releaseRickard Green
2017-05-10Merge branch 'rickard/rq-len/OTP-13201'Rickard Green
* rickard/rq-len/OTP-13201: Fix testcase Light weight statistics of run queue lengths
2017-05-10Merge branch 'siri/system/testcuddle'Siri Hansen
* siri/system/testcuddle: Add typer to excluded applications in upgrade_SUITE
2017-05-10Merge branch 'sverker/ets-select-replace-const'Sverker Eriksson
* sverker/ets-select-replace-const: stdlib: Add examples for ets:select_replace docs erts: Fix ets:select_replace with {const, NewTuple}
2017-05-10erts: Fix ets:select_replace with {const, NewTuple}Sverker Eriksson
Enable ets:select_replace to do a generic single object compare-and-swap operation of any ets-tuple using a matchspec like this: [{Old, [], [{const, New}]}] The only exception when this does not work is if the key contains maps or atoms looking like variables (like '$1').
2017-05-08Merge branch 'sverker/is_module_native-trace-bug/OTP-14390'Sverker Eriksson
* sverker/is_module_native-trace-bug/OTP-14390: erts: Fix code:is_module_native for local trace erts: Move and rename erts_is_native_break()
2017-05-05erts: Add minor lock optimization for lcntSverker Eriksson
2017-05-05erts: Unbreak --enable-lock-checking --enable-lock-counterSverker Eriksson
both together. Broken in OTP-20.0-rc1 by 7d161f5b475575bd79bd90977b3a79334a8ec658.
2017-05-05erts: the esdp is not always available in matchspecLukas Larsson
This happens for instance when a receive_trace is run in the sys_msg_dispatcher thread when the trace_delivered trace message is traced.
2017-05-05Revert "Prepare release"Raimo Niskanen
This reverts commit dc57404252c47520f352834ad9be45ad684f96c9.
2017-05-05Clear p->fvalue when handling a try/catchBjörn Gustavsson
p->fvalue will be set by BIFs that generate exceptions (such as throw/1), and it will not be cleared before another exception is generated. Potentially, p->fvalue may contain a huge term (e.g. after throw(HugeTerm)) which will be kept in the heap. We can shorten the lifetime of f->value by clearing it in the instructions that handle catches: catch_end and try_end. That is safe because BEAM code will never access p->fvalue. If BEAM code needs to rethrow an exception it will use a reference to the value passed in an X register. The reason that p->fvalue must not be cleared already in handle_error() is that native code trap handlers will use it. (See the comment before handle_error() and the comment at the end of handle_error() in beam_emu.c for some more information about exception handling.)
2017-05-05Extend hipe_SUITE to test exceptions and try/catchBjörn Gustavsson
2017-05-04Prepare releaseErlang/OTP
2017-05-04erts: Fix code:is_module_native for local traceSverker Eriksson
Local trace on first function in module made code:is_module_native/1 return true. Use new erts_is_function_native() to make a proper check.
2017-05-04erts: Move and rename erts_is_native_break()Sverker Eriksson
2017-05-04Update copyright yearRaimo Niskanen
2017-05-04Add typer to excluded applications in upgrade_SUITESiri Hansen
When removing typer as application, it was also removed from the list of applications to exclude from upgrade tests. However, since typer still exist in older OTP releases, it must remain in the exclude list as long as these releases are used in the test.
2017-05-04Update preloaded modulesBjörn Gustavsson
2017-05-02Merge branch 'hm/escript-doc'Rickard Green
* hm/escript-doc: Improvements of escript documentation
2017-05-02Merge branch 'maint'Hans Bolinder
* maint: Updated OTP version Prepare release inets: Add missing release note dialyzer: Fix a bug regarding unknown types erl_mseg.c: don't use invalid indices in - > cache_powered_node[] Fix release note for OTP-14290 Conflicts: OTP_VERSION erts/emulator/sys/common/erl_mseg.c erts/vsn.mk lib/dialyzer/src/dialyzer_analysis_callgraph.erl
2017-04-30Make a function staticSalikhov Dinislam
2017-04-28Prepare releaseErlang/OTP
2017-04-28Merge branch 'rickard/relnote-fix/OTP-14363' into maint-19Erlang/OTP
* rickard/relnote-fix/OTP-14363: Fix release note for OTP-14290
2017-04-28Merge PR1413 from g-andrade/feature/phash2_nifSverker Eriksson
Support hashing terms from NIF code
2017-04-28Merge PR-1431 from richcarl/mseg-debruijn-usageSverker Eriksson
Rename macro and add clarifying comment
2017-04-28Merge branch 'sverker/internal-hash-opt'Sverker Eriksson
2017-04-28Merge branch 'sverker/fix-debug-vm-windows'Sverker Eriksson
2017-04-28Improvements of escript documentationHåkan Mattsson
2017-04-28Merge branch 'dgud/erts/erlscript_name'Dan Gudmundsson
* dgud/erts/erlscript_name: Rename argv[0] from beam to invoking program name OTP-14381
2017-04-27erts: Optimize make_internal_hash for mapsSverker Eriksson
No need for the xor-trick, to be order independent, as both flatmaps and hashmaps have a constant key-value order internally.
2017-04-27erts: Fix debug emulator on windowsSverker Eriksson
Clear ethr_not_inited__ early (like on unix) to not get assertion in ethr_tsd_key_create("stacklimit")
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-27Merge branch 'rickard/debug-timer-fix'Rickard Green
OTP-14356 * rickard/debug-timer-fix: Fix assert in dbg_verify_empty_later_slots()
2017-04-27Rename macro and add clarifying commentRichard Carlsson
The macro previously named 'LOG2' is in fact computing the LSB (not the MSB) of its input, and can only be used to compute log2(n) when n is is a power of 2, that is, when its LSB is also its MSB.
2017-04-27Move enif_hash last to not break WindowsSverker Eriksson
2017-04-26Merge pull request #1367 from josevalim/jv-dbgi-chunkBjörn Gustavsson
Introduce new "Dbgi" chunk OTP-14369