aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-08-16Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/beam/erl_nif.c erts/emulator/beam/erl_process.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-08-16marko-turk/run_erl-errno-fix/PR1529/OTP-14537Lukas Larsson
run_erl: Fix error handling in sf_close and during pty master read
2017-08-16Merge branch 'maint'Lukas Larsson
2017-08-16Merge branch 'lukas/system/fsm-doc-broken-links' into maintLukas Larsson
* lukas/system/fsm-doc-broken-links: system: Fix broken doc links to gen_fsm design princ
2017-08-16system: Fix broken doc links to gen_fsm design princLukas Larsson
2017-08-16Update primary bootstrapBjörn Gustavsson
2017-08-16Merge pull request #1535 from bjorng/bjorn/erts/opt-map-updateBjörn Gustavsson
Slightly optimize updating of maps
2017-08-16Merge pull request #1528 from ↵Björn Gustavsson
bjorng/bjorn/compiler/improve-case-opt/ERL-452/OTP-14525 Generalize optimization of "one-armed" cases
2017-08-16Merge pull request #1511 from michalmuskala/sharing-fixpointBjörn Gustavsson
Run the sharing optimisation in beam_jump until fixpoint
2017-08-16Merge pull request #1484 from Gsantomaggio/otp_observer_add_infoDan Gudmundsson
Add more information to the Observer OTP-14536
2017-08-15Slightly optimize updating of mapsBjörn Gustavsson
The instruction put_map_assoc/5 (used for updating a map) has a failure operand, but it can't actually fail provided that its "map" argument is a map. The following code: M#{key=>value}. will be compiled to: {test,is_map,{f,3},[{x,0}]}. {line,[...]}. {put_map_assoc,{f,0},{x,0},{x,0},1,{list,[{atom,key},{atom,value}]}}. return. {label,3}. %% Code that produces a 'badmap' exception follows. Because of the is_map instruction, {x,0} always contains a map when the put_map_assoc instruction is executed. Therefore we can remove the failure operand. That will save one word, and also eliminate two tests at run-time. The only problem is that the compiler in OTP 17 did not emit a is_map instruction before the put_map_assoc instruction. Therefore, we must add an instruction that tests for a map if the code was compiled with the OTP 17 compiler. Unfortunately, there is no safe and relatively easy way to known that the OTP 17 compiler was used, so we will check whether a compiler before OTP 20 was used. OTP 20 introduced a new chunk type for atoms, which is trivial to check.
2017-08-15Merge branch 'maint'Ingela Anderton Andin
2017-08-15Merge pull request #1532 from ↵Ingela Andin
angelhof/public_key/generate_key-rsa-inconsistency-fix public_key:generate_key/1 RSA key generation inconsistency OTP-14534
2017-08-14Merge branch 'rickard/non-smp-removal-cleanup/OTP-14518'Lukas Larsson
* rickard/non-smp-removal-cleanup/OTP-14518: erts: Cleanup erl and erlang docs after non-smp removal erts: Remove unused prototypes after non-smp removal
2017-08-14erts: Cleanup erl and erlang docs after non-smp removalLukas Larsson
2017-08-14Apply the redundant test optimisation also in case of fall-throughMichał Muskała
Even though, it's not possible to have fall-throughs when entering the otp pass, it can produce them itself and we're running the pass until fixpoint.
2017-08-14Replace labels instead of inserting duplicates in beam_jumpMichał Muskała
This makes other optimisations more efficient since we have less labels overall.
2017-08-14Enhance elimination of useless tests in beam_jumpMichał Muskała
It can happen we have the following situation: {test,is_tuple,Fail,[R1]} {test,test_arity,Fail,[R1,N1]} {get_tuple_element,R1,N2,R2} {test,is_eq_exaqct,Fail,[R2,Atom]} {jump,Fail} Previously, the optimisation would eliminate the last is_eq_exact test, but we can do more. If the register R2 is not used in Fail, we can eliminate the get_tuple_element instruction as well as all the preceding tests. Ultimately, the whole sequence can be replaced by: {jump,Fail}
2017-08-14erts: Remove unused prototypes after non-smp removalRickard Green
2017-08-14Merge branch 'maint'Ingela Anderton Andin
2017-08-14Merge branch 'ingela/ssl/timeout-cuddle' into maintIngela Anderton Andin
* ingela/ssl/timeout-cuddle: ssl: Longer timeouts for test cases that do many handshakes
2017-08-14Merge branch 'bjorn/erts/beam-ops'Björn Gustavsson
* bjorn/erts/beam-ops: Make '0 bsl BigNumber' consistently succeed Break out most instructions from beam_emu.c beam_makeops: Pretty-print the generated code beam_makeops: Define ARCH_32 and ARCH_64 Introduce micro instructions Simplify specifying implementation of instructions OTP-14532
2017-08-14Merge branch 'maint'Ingela Anderton Andin
2017-08-14Merge pull request #1527 from fenollp/gen_fsm-depre-20Ingela Andin
Correct arity an function names for compiler deprecation warnings
2017-08-13Run the sharing optimisation in beam_jump until fixpointMichał Muskała
This is especially useful after inlining a function with a case. Today the compiler would most probably be able to unify all the leafs of the case during the sharing optimisation, but it would fail to unify the pattern matching itself. Naively running the optimisation multiple times wouldn't be able to find the common code either, because it would differ in jump/fail targets of various instructions. To remedy this, after doing each sharing pass we traverse the code backwards when reversing and update all the jump targets with the new targets that were discovered during the unification pass. This allows running the optimisation until fixpoint and makes sure all sharing opportunities will be discovered. This optimisation also helps with the Elixir's `with/else` construct.
2017-08-12run_erl: Fix error handling in sf_close and during pty master readMarko Turk
2017-08-12Introduce beam_utils:replace_labels/4Michał Muskała
2017-08-11Merge branch 'maint'Ingela Anderton Andin
2017-08-11Merge pull request #1509 from vances/issue-erl-398Ingela Andin
HTTP server truncates existing logs OTP-14530
2017-08-11Add System statistics / limit panelGabriele Santomaggio
Show the statistics, limits and percentage for atoms, processes,ports and ETS. Backward compatibility with old versions, In case the valuse is missing it shows the string Not available.
2017-08-11Make '0 bsl BigNumber' consistently succeedBjörn Gustavsson
'0 bsl 134217728' would fail with a system limit exception on a 32-bit BEAM machine, but not on a 64-bit BEAM machine. Smaller values on the right would always work. Make erlang:bsl(0, BigNumber) always return 0 to make for consistency. (The previous commit accidentally did that change for '0 bsl BigNumber'.)
2017-08-11Break out most instructions from beam_emu.cBjörn Gustavsson
2017-08-11Merge branch 'maint'Ingela Anderton Andin
2017-08-11Merge branch 'ingela/ssl/cert-handling' into maintIngela Anderton Andin
* ingela/ssl/cert-handling: ssl: Correct cipher suite handling ssl: Modernize DSA cert chain generation ssl: Clean ssl: Remove test of OpenSSL ssl: Use new cert generation
2017-08-10Merge branch 'maint'Björn Gustavsson
* maint: sys_core_fold: Fix unsafe optimization of non-variable apply Correct type specification in ssl:prf/5
2017-08-10Merge pull request #1526 from bjorng/bjorn/compiler/non-variable-applyBjörn Gustavsson
sys_core_fold: Fix unsafe optimization of non-variable apply OTP-14526
2017-08-10Generalize optimization of "one-armed" casesBjörn Gustavsson
A 'case' expression will force a stack frame (essentially in the same way as a function call), unless it is at the end of a function. In sys_core_fold there is an optimization that can optimize one-armed cases such as: case Expr of Pat1 -> DoSomething; Pat2 -> erlang:error(bad) end, MoreCode. Because only one arm of the 'case' can succeed, the code after the case can be move into the successful arm: case Expr of Pat1 -> DoSomething, MoreCode; Pat2 -> erlang:error(bad) end. Thus, the 'case' is at the end of the function and it will no longer need a stack frame. However, the optimization in sys_core_fold would not be applied if there were more than one failing clause such as in this code: case Expr of Pat1 -> DoSomething, MoreCode; Pat2 -> erlang:error(bad); _ -> erlang:error(case_clause) end. Generalize the optimization to handle any number of failing clauses at the end of the case. Reported-by: bugs.erlang.org/browse/ERL-452
2017-08-10Merge pull request #1507 from vances/issue-erl-442Ingela Andin
Correct type specification in ssl:prf/5
2017-08-10ssl: Longer timeouts for test cases that do many handshakesIngela Anderton Andin
2017-08-10Merge branch 'maint'Ingela Anderton Andin
2017-08-10Merge branch 'ingela/dtls/cuddle' into maintIngela Anderton Andin
* ingela/dtls/cuddle: ssl: Handle OpenSSL output correctly
2017-08-10ssl: Correct cipher suite handlingIngela Anderton Andin
This is mainly fixing the test suites so that they test the intended cipher suites, issue reported in ERL-460. Also ssl_cipher:anonymous_suites was corrected for DTLS.
2017-08-09ssl: Modernize DSA cert chain generationIngela Anderton Andin
2017-08-09Merge branch 'maint'Anders Svensson
2017-08-09Merge branch 'anders/diameter/message_cb/OTP-14486' into maintAnders Svensson
* anders/diameter/message_cb/OTP-14486: Add simple message_cb to example server Fix inappropriate message callbacks
2017-08-09Merge branch 'anders/diameter/20.0/shared_transport/OTP-14011' into maintAnders Svensson
* anders/diameter/20.0/shared_transport/OTP-14011: Don't assume nodes are eternally connected when sharing transport
2017-08-09Merge branch 'anders/diameter/transport/ERL-332' into maintAnders Svensson
* anders/diameter/transport/ERL-332: Remove irrelevant comment Add missing setopts after deferred diameter_{tcp,sctp} actions
2017-08-08gen_fsm-depre-20: fix some more redirections to unexisting functionsPierre Fenoll
2017-08-08gen_fsm-depre-20: fix gen_fsm deprecation recommendations after 20.0Pierre Fenoll