aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2017-03-28Merge branch 'lukas/kernel/gen_tcp_close_docs'Lukas Larsson
* lukas/kernel/gen_tcp_close_docs: kernel: Expand gen_tcp:close docs with send text
2017-03-28kernel: Expand gen_tcp:close docs with send textLukas Larsson
This commit attempts to clarify some of the guarantees given by the TCP standard when issuing close. This is quite a complex topic so there are probably corner cases still left, but this at least tells the user that things can go wrong when doing a close.
2017-03-27Merge PR-1386 from kostis/hipe-const-alignment OTP-14302Sverker Eriksson
hipe: Fix alignment of byte-sized constants
2017-03-27Merge pull request #1387 from margnus1/hipe-spilllimit-fixSverker Eriksson
HiPE: Fix off-by-one bug in register allocators Fix for PR-1380
2017-03-24Remove inets from runtime dependencies in toolsJosé Valim
Commit d8ff1e3 removed cover_web and therefore tools no longer depends on inets.
2017-03-24Merge branch 'egil/compiler/is_tagged_tuple/OTP-12148'Björn-Egil Dahlberg
* egil/compiler/is_tagged_tuple/OTP-12148: Update primary bootstrap compiler: Cover beam_record in tests hipe: Transform is_tagged_tuple instruction compiler: Add is_tagged_tuple instruction
2017-03-24compiler: Cover beam_record in testsBjörn-Egil Dahlberg
2017-03-24hipe: Transform is_tagged_tuple instructionBjörn-Egil Dahlberg
2017-03-24compiler: Add is_tagged_tuple instructionBjörn-Egil Dahlberg
Rewrite the instruction stream on tagged tuple tests. Tagged tuples means a tuple of any arity with an atom as its first element. Typically records, ok-tuples and error-tuples. from: ... {test,is_tuple,Fail,[Src]}. {test,test_arity,Fail,[Src,Sz]}. ... {get_tuple_element,Src,0,Dst}. ... {test,is_eq_exact,Fail,[Dst,Atom]}. ... to: ... {test,is_tagged_tuple,Fail,[Src,Sz,Atom]}. ...
2017-03-23HiPE: Fix off-by-one in register allocatorsMagnus Lång
hipe_regalloc_loop considers SpillLimit to be an inclusive lower bound, the allocators considered it to be an exclusive lower bound. The allocators are changed to also consider it an inclusive lower bound. This caused the register allocators to occasionally spill the first "unspillable" temporary. This caused a failure in a newly added assertion when hipe-compiling dets_v9 on x86.
2017-03-23Merge branch 'ingela/ssl/make-cert-test-data/OTP-14294'Ingela Anderton Andin
* ingela/ssl/make-cert-test-data/OTP-14294: ssl, public_key: Add functionality for generating X509 cert test data
2017-03-23ssl, public_key: Add functionality for generating X509 cert test dataIngela Anderton Andin
For now this functionality is located in ssl. And existing public_key function is extended. However some of the functionality may be moved to public_key in a later stage.
2017-03-23Merge branch 'ingela/ssl/dtls-frag'Ingela Anderton Andin
* ingela/ssl/dtls-frag: dtls: Handle overlapping fragments
2017-03-23dtls: Handle overlapping fragmentsIngela Anderton Andin
Fragment reassembling needs to handle that a smaller fragment then sent originally might overlap an earlier received fragment.
2017-03-23ssh: disable problematic crypto in ssh_bench_SUITEHans Nilsson
2017-03-23ssh: new benchmark suite: ssh_bench_SUITEHans Nilsson
2017-03-23ssh: remove old ssh_benchmark_SUITEHans Nilsson
Seem to draw much resources (time & prim mem)
2017-03-23Remove ctab_array since apparently is not usedKostis Sagonas
2017-03-23Remove (now) unnecessary argument of pack_constantsKostis Sagonas
2017-03-22Merge margnus1/hipe-range-split-rebase/PR-1380/OTP-14293Sverker Eriksson
HiPE: Range splitting register allocation
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-22observer: Polish crashdump viewer for ETSSverker Eriksson
Replaced "Id" column with "Is Named". Removed "Slot" column. Sort by name instead if id. Use name in right-click menu instead of id.
2017-03-22observer: Polish Table Viewer tabSverker Eriksson
to adapt to new ref table identifiers. I moved the "Table Id" column last.
2017-03-22stdlib: Remove ets_SUITE:memory_check_summarySverker Eriksson
and let each test case fail, like it was before. Seems growing/shrinking meta tables was causing the sporadic failed memory checks.
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-22Merge pull request #1383 from shezarkhani/patch-1Björn Gustavsson
Minor document fix for proplists
2017-03-21Fix alignment of byte-sized constantsKostis Sagonas
2017-03-21ssl: Add connection information itemsIngela Anderton Andin
Add session_id and remove undocumented ssl:session_info/1 Add client_random, server_random and master_secret, they will not be included in ssl:connection_information/1 as they may affect the connections security if used recklessly.
2017-03-21Merge branch 'ingela/ssl/remove-deprecated'Ingela Anderton Andin
* ingela/ssl/remove-deprecated: ssl: Remove deprecated functions
2017-03-21Merge branch 'ingela/crypto/deprecate/rand_uniform'Ingela Anderton Andin
* ingela/crypto/deprecate/rand_uniform: crypto: Deprecate crypto:rand_uniform/2 as it is not cryptographically strong
2017-03-21Merge branch 'ingela/corrct-otp-internal'Ingela Anderton Andin
* ingela/corrct-otp-internal: ssl, public_key, crypto: Change deprecated to removed
2017-03-21compiler tests: Eliminate creation of untracked filesBjörn Gustavsson
Two dummy .erl files are created while releasing the tests for the compiler. Remove the files after they have been copied to the release directory to avoid that they show up as untracked files in the output of "git status".
2017-03-20Minor document fix for proplistsSasan Hezarkhani
2017-03-20crypto: Deprecate crypto:rand_uniform/2 as it is not cryptographically strongIngela Anderton Andin
rand module should be used if not cryptographically strong is required. If cryptographically strong is required, new cryptographically strong functions should be added to crypto.
2017-03-20Merge pull request #1378 from ↵Björn Gustavsson
bjorng/bjorn/disallow-unicode-module-names/OTP-14285 Don't allow module names with non-latin1 characters
2017-03-20ssl, public_key, crypto: Change deprecated to removedIngela Anderton Andin
2017-03-17ssh: remove from testHans Nilsson
2017-03-17ssh: remove from docHans Nilsson
2017-03-17ssh: remove from codeHans Nilsson
2017-03-17Update the documentation regarding Unicode atomsBjörn Gustavsson
2017-03-17Merge branch 'bjorn/asn1/clean-up'Björn Gustavsson
* bjorn/asn1/clean-up: Remove default clauses that cause exceptions for internal errors Clean up comments Clean up asn1ct_gen:emit/1 Remove unused clauses in asn1ct_gen:emit/1 Clean up use of asn1ct_gen:emit/1 Remove the 'debug' option Only generate needed single quotes around function names asn1ct_gen_ber_bin_v2: Remove unused code asn1ct_gen_per: Fix broken dialyzer suppression function asn1_erl_nif.c: Correct handling of tags >= 16384
2017-03-17Merge pull request #1362 from vladdu/patch-1Björn Gustavsson
use normal file names for eunit reports OTP-14287
2017-03-16hipe_spillmin_color: cleanup exit callsMagnus Lång
2017-03-16hipe_spillmin_color: Move coalescingMagnus Lång
2017-03-16hipe: Add pseudo_spill_f?move instructionsMagnus Lång
These pseudo instructions are added to all backends and allow spill slot to spill slot move coalescing in a clean way. They have regular move semantics, but contain an additional scratch register to be used if both source and destination are spilled, and can not be move coalesced. Additionally, a register allocator callback Target:is_spill_move(Instr, Context) is added which allows the spill slot allocators to check for these instructions and try to coalesce the spill slots the two temporaries are allocated to.
2017-03-16hipe: Add range splitter range_splitMagnus Lång
hipe_range_split is a complex live range splitter, more sophisticated thatn hipe_restore_reuse, but still targeted specifically at temporaries forced onto stack by being live over call instructions. hipe_range_split partitions the control flow graph at call instructions, like hipe_regalloc_prepass. Splitting decisions are made on a per partition and per temporary basis. There are three different ways in which hipe_range_split may choose to split a temporary in a program partition: * Mode1: Spill the temp before calls, and restore it after them * Mode2: Spill the temp after definitions, restore it after calls * Mode3: Spill the temp after definitions, restore it before uses To pick which of these should be used for each temp×partiton pair, hipe_range_split uses a cost function. The cost is simply the sum of the cost of all expected stack accesses, and the cost for an individual stack access is based on the probability weight of the basic block that it resides in. This biases the range splitter so that it attempts moving stack accesses from a functions hot path to the cold path. hipe_bb_weights is used to compute the probability weights. mode3 is effectively the same as what hipe_restore_reuse does. Because of this, hipe_restore_reuse reuses the analysis pass of hipe_restore_reuse in order to compute the minimal needed set of spills and restores. The reason mode3 was introduced to hipe_range_split rather than simply composing it with hipe_restore_reuse (by running both) is that such a composition resulted in poor register allocation results due to insufficiently strong move coalescing in the register allocator. The cost function heuristic has a couple of tuning knobs: * {range_split_min_gain, Gain} (default: 1.1, range: [0.0, inf)) The minimum proportional improvement that the cost of all stack accesses to a temp must display in order for that temp to be split. * {range_split_mode1_fudge, Factor} (default: 1.1, range: [0.0, inf)) Costs for mode1 are multiplied by this factor in order to discourage it when it provides marginal benefits. The justification is that mode1 causes temps to be live for longest, thus leading to higher register pressure. * {range_split_weight_power, Factor} (default: 2, range: (0.0, inf)) Adjusts how much effect the basic block weights have on the cost of a stack access. A stack access in a block with weight 1.0 has cost 1.0, a stack access in a block with weight 0.01 has cost 1/Factor. Additionally, the option range_split_weights chooses whether the basic block weights are used at all. In the case that the input is very big, hipe_range_split automatically falls back to hipe_restore_reuse only in order to keep compile times under control. Note that this is not only because of hipe_range_split being slow, but also due to the resulting program being slow to register allocate, and is not as partitionable by hipe_regalloc_prepass. hipe_restore_reuse, on the other hand, does not affect the programs partitionability. The hipe_range_split pass is controlled by a new option ra_range_split. ra_range_split is added to o2, and ra_restore_reuse is disabled in o2.
2017-03-16hipe: Add module computing basic blocks weightsMagnus Lång
hipe_bb_weights computes basic block weights by using the branch probability predictions as the coefficients in a linear equation system. This linear equation system is then solved using Gauss-Jordan Elimination. The equation system representation is picked to be efficient with highly sparse data. During triangelisation, the remaining equations are dynamically reordered in order to prevent the equations from growing in the common case, preserving the benefit of the sparse equation representation. In the case that the input is very big, hipe_bb_weights automatically falls back to a rough approximation in order to keep compile times under control.
2017-03-16hipe: Add branch prediction accessor ra callbacksMagnus Lång
Adds a new register allocator callback Target:branch_preds(Instr, Context) which, for a control flow instruction Instr, returns a list of tuples {Target, Probability} for each label name Target that Instr may branch to. Probability is a float between 0.0 and 1.0 and corresponds to the predicted probability that control flow branches to the corresponding target. The probabilities may sum to at most 1.0 (rounding errors aside). Note that a sum less than 1.0 is valid.
2017-03-16hipe: Add range splitter restore_reuseMagnus Lång
hipe_restore_reuse is a simplistic range splitter that splits temps that are forced onto the stack by being live over call instructions. In particular, it attempts to avoid cases where there are several accesses to such stack allocated temps in straight-line code, uninterrupted by any calls. In order to achieve this it splits temps between just before the first access(es) and just after the last access(es) in such straight-line code groups. The hipe_restore_reuse pass is controlled by a new option ra_restore_reuse. ra_restore_reuse is added to o1.
2017-03-16hipe: Add basic range splitting ra callbacksMagnus Lång
In addition to the temporary name rewriting that hipe_regalloc_prepass does, range splitters also need to be able to insert move instructions, as well as inserting new basic blocks in the control flow graph. The following four callbacks are added for that purpose: * Target:mk_move(Src, Dst, Context) Returns a move instruction from the temporary (not just register number) Src to Dst. * Target:mk_goto(Label, Context) Returns a unconditional control flow instruction that branches to the label with name Label. * Target:redirect_jmp(Instr, ToOld, ToNew, Context) Modifies the control flow instruction Instr so that any control flow that would go to a label with name ToOld instead goes to the label with name ToNew. * Target:new_label(Context) Returns a fresh label name that does not belong to any existing block in the current function, and is to be used to create a new basic block in the control flow graph by calling Target:update_bb/4 with this new name.