aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-02-27Merge branch 'bjorn/cover'Björn Gustavsson
* bjorn/cover: test_server: Sort cover-analysed modules cover: Optimize file operations
2015-02-27Merge branch 'maint'Björn Gustavsson
* maint: Ensure dbg tracer exits when dbg is stopped
2015-02-27Merge branch 'fishcakez/runtime_tools/dbg/OTP-12517' into maintBjörn Gustavsson
* fishcakez/runtime_tools/dbg/OTP-12517: Ensure dbg tracer exits when dbg is stopped
2015-02-26Merge branch 'maint'Peter Andersson
2015-02-26Merge branch 'peppe/common_test/missing_start_flag_in_doc' into maintPeter Andersson
* peppe/common_test/missing_start_flag_in_doc: Add missing -group flag in ct_run help text OTP-12433
2015-02-26Ensure dbg tracer exits when dbg is stoppedJames Fish
Previously the tracer might receive an 'EXIT' message in the trace receive loop and treat it as garbage. Test uses a custom dbg process handler to reliably recreate the race condition, i.e. the message order {trace, ..}, {'EXIT, ..}.
2015-02-25Fix error matching in traffic suiteAnders Svensson
Clause matching error for specific test cases was harmless since the subsequent clause also matched. Errors detected by the server result in Failed-AVP being sent, which should not lead to a decode error in the client.
2015-02-25Don't discard outgoing answers with Result-Code/E-bit errorsAnders Svensson
Outgoing answers missing a Result-Code AVP or setting an E-bit inappropriately were discarded, but there's no particular reason for doing so if the answer can be encoded, and the sender has no way of knowing that their answer has been discarded. It's also inappropriate that the message be discarded in the relay case. Answers are now sent, and an error counter incremented.
2015-02-25Merge branch 'sverk/crypto-aes_ecb_crypt-dialyzer-fix'Sverker Eriksson
* sverk/crypto-aes_ecb_crypt-dialyzer-fix: crypto: Fix dialyzer error for aes_ecb_crypt/3
2015-02-25test_server: Sort cover-analysed modulesBjörn Gustavsson
'cover' has changed so that the analyzed results are returned in random order, which is annyoying. Sort the list so that modules appear in alphabetical order.
2015-02-25cover: Optimize file operationsBjörn Gustavsson
Use the 'raw', 'delayed_write', and 'read_head' options to speed up file operations. The analysis at the end of: ts:run(compiler, [batch,cover]). is now roughly twice as fast.
2015-02-25Merge branch 'nox/stdlib/erl_lint-maps/OTP-12515'Björn Gustavsson
* nox/stdlib/erl_lint-maps/OTP-12515: Properly lint map expressions in erl_lint
2015-02-25Merge branch 'nox/stdlib/erl_lint-expr_list'Björn Gustavsson
* nox/stdlib/erl_lint-expr_list: Remove a few superfluous vt operations in erl_lint
2015-02-24Merge branch 'maint'Zandra Hird
2015-02-24Merge branch 'nifoc/inet_doc_fixes' into maintZandra Hird
* nifoc/inet_doc_fixes: Fix typos ("received to the socket")
2015-02-24Fix SCTP match blunder in suitesAnders Svensson
More than an incoming message can contain ancillary data, which the gen_sctp and transport suites did not expect. On FreeBSD 10, an sctp_assoc_change event appears always to contain ancillary data.
2015-02-23Merge branch 'richcarl/syntax_tools-remove-mnemosyne'Zandra Hird
* richcarl/syntax_tools-remove-mnemosyne: Remove Mnemosyne rules support from EDoc Remove support for Mnemosyne rules Remove support for mnemosyne-style record field access OTP-12511
2015-02-23Merge branch 'maint'Peter Andersson
2015-02-23Merge remote-tracking branch ↵Peter Andersson
'origin/peppe/common_test/include_file_problems' into maint * origin/peppe/common_test/include_file_problems: Fix failing test case Add valid include path to epp in erl2html2 and fix crashing code OTP-12419
2015-02-23Merge branch 'bjorn/compiler/beam_jump-share'Björn Gustavsson
* bjorn/compiler/beam_jump-share: beam_jump: Don't jump into the middle of a 'try'
2015-02-23Merge branch 'bjorn/compiler/sys_core_fold'Björn Gustavsson
* bjorn/compiler/sys_core_fold: sys_core_fold: Fix non-tail-recursive list comprehensions
2015-02-23Merge branch 'josevalim/stdlib/dict'Björn Gustavsson
* josevalim/stdlib/dict: Short-circuit common dict operations
2015-02-22Remove a few superfluous vt operations in erl_lintAnthony Ramine
Given any Vt1 and Vt2 values, vtmerge(vtnew(Vt1, Vt2), vtold(Vt1, Vt2)) is always equal to Vt1.
2015-02-20Merge branch 'siri/cover-perf/OTP-12330'Siri Hansen
* siri/cover-perf/OTP-12330: [test_server] Use new, more efficient functions in cover [cover] Improve performance
2015-02-20[test_server] Use new, more efficient functions in coverSiri Hansen
2015-02-20[cover] Improve performanceSiri Hansen
Add functions for cover compilation and analysis on multiple files. This allows for more parallelisation. All functions for cover compilation can now take a list of modules/files. cover:analyse/analyze and cover:analyse_to_file/analyze_to_file can be called without the Modules arguement in order to analyse all cover compiled and imported modules, or with a list of modules. Also, the number of lookups in ets tables is reduced, which has also improved the performance when analysing and resetting cover data.
2015-02-20Merge branch 'raimo/infinite-loop-gethostbyname/OTP-12133' into maintRaimo Niskanen
* raimo/infinite-loop-gethostbyname/OTP-12133: Remove infinite loop in inet:gethostbyname_tm/4
2015-02-20Document kernel inet_dist_{listen,connect}_optionsRaimo Niskanen
2015-02-20Test kernel inet_dist_{listen,connect}_optionsRaimo Niskanen
2015-02-20Fix documentation about character types in unicode modeAnthony Ramine
Behaviour of character types \d, \w and \s has always been to not match characters with value above 255, not 128, i.e. they are limited to ISO-Latin-1 and not ASCII.
2015-02-20Merge branch 'bjorn/compiler/beam_jump'Björn Gustavsson
* bjorn/compiler/beam_jump: beam_jump: Eliminate pathologically slow compilation
2015-02-20Merge branch 'bjorn/compiler/beam_validator'Björn Gustavsson
* bjorn/compiler/beam_validator: beam_validator: Exit immediately on crashes beam_validator: Remove the file/1 and files/1 functions beam_validator: Remove support for all other unsupported instructions beam_validator: Remove support for unsupported bit syntax instructions
2015-02-20Merge branch 'bjorn/compiler/maps'Björn Gustavsson
* bjorn/compiler/maps: beam_validator: Tighten and simplify map validation code beam_utils: Correct test for has_map_fields in is_pure_test/1 map_SUITE: Cover comparisons of 'nil' in v3_codegen
2015-02-20sys_core_fold: Fix non-tail-recursive list comprehensionsBjörn Gustavsson
649d6e73 simplified opt_simple_let_2/6 a little bit too much, so that some list comprehensions in effect context were not properly tail-recursive.
2015-02-20beam_jump: Eliminate pathologically slow compilationBjörn Gustavsson
José Valim noticed that code such as: match(1) -> 1; match(2) -> 2; match(3) -> 3; ... match(1000) -> 1000. would compile very slowly. The culprit is opt/3 in beam_jump. What happens is that opt/3 will rewrite this code: select_val ... label 1 jump 1000 label 2 jump 1000 ... label 999 jump 1000 label 1000 return very slowly to this code: select_val ... label 1 label 2 ... label 999 label 1000 return The reason for the slowness is that when opt/3 sees this sequence: label 1 jump 1000 ... it will remove the label (storing it in a dictionary), and pick up the previously processed instruction from the accumulator: select_val ... jump 1000 label 2 jump 1000 ... That is done in order to process all labels before the jump and also to get rid of the jump instruction if the previous instruction is an "unreachable after". In this case, re-processing the sequence will remove the now unreachable jump instruction: select_val ... label 2 jump 1000 ... The problem is that re-processing the select_val instruction is expensive. The instruction has a list of 1000 labels, all of which will be added (again) to the set of referenced labels. The select_val instruction will be re-processed again and again until all labels and jumps have been gobbled up. In the original version of beam_jump, opt/3 was not called repeatedly until a fixpoint was found, but was expected to do all its optimizations in one pass. The fixpoint iteration was added later. Since we now have the fixpoint iteration, there is no need to do everything in a single pass. When we encounter a jump, we will collect all previously seen labels and put them into the dictionary, and then we will move on. As a further optimization, we will look for sequences like this: jump X label ... jump X and replace them with: label ... jump X In the example above, that will avoid 1000 updates of the dictionary. After applying this optimization, compilation of the pattern went from roughly 55 s to 0.1 s for the example above but with 10000 clauses. Reported-by: José Valim
2015-02-20Merge branch 'maint'Zandra Hird
2015-02-20Merge branch 'ethercrow/export_gen_udp_socket' into maintZandra Hird
* ethercrow/export_gen_udp_socket: Export type gen_udp:socket/0
2015-02-20beam_jump: Don't jump into the middle of a 'try'Björn Gustavsson
The code sharing optimization could produce a jump into the middle of a 'try' block. beam_validator would reject the code. Reported-by: Ulf Norell
2015-02-20Use new time api in test suitesAnders Svensson
Where it's less important to do so, but it has to be done at some point since erlang:now/0 is deprecated. As in the parent commit, continue to use the old api if the new one is unavailable.
2015-02-20Use new time api in implementationAnders Svensson
In particular, deal with the deprecation of erlang:now/0 in OTP 18. Be backwards compatible with older releases: the new api is only used when available. The test suites have not been modified.
2015-02-20Be backwards compatible with diameter_sctp listener stateAnders Svensson
Commit 24993fc2 modified the state even in the case that the new pool_size option the change was introduced to support was not used. Doing so made downgrade impossible since old code would not be prepared for the modified state. Retain a compatible state, so that simple code replacement is enough.
2015-02-20Add gen_tcp testcase that fails sporadicallyAnders Svensson
On OS X at least. The testcase opens a listening socket, spawns 8 processes that call gen_tcp:accept/1, waits a couple of seconds, and then spawns 8 processes that call gen_tcp:connect/3. Some of these occasionally return {error, econnreset}.
2015-02-20Simplify transport suiteAnders Svensson
Using the fact that transport processes can now be started concurrently. The suite serialized starts itself when pretending to be diameter starting a transport process.
2015-02-20Remove (ancient) dead codeAnders Svensson
Commit 9a671bf0 removed the need for diameter_sctp to send outgoing messages through the listening process. That was prior to R5B02, so the clause isn't need for any upgrade case.
2015-02-20Don't orphan slave nodes in example suiteAnders Svensson
Stops were aborted at the first failure.
2015-02-20Refresh example codeAnders Svensson
Which hasn't received any attention for some time. Clean it up, rename the poorly named peer.erl (it's Diameter *nodes* that are implemented), and make the it possible to specify arbitrary transport configuration.
2015-02-20Improve language consistency in diameter(1)Anders Svensson
In particular, do away with unnecessary articles in the first sentence of item lists.
2015-02-20Add pool suite to test transport_opt() pool_sizeAnders Svensson
With testcases that uses restrict_connections and pool_size config to establish multiple connections between two Diameter nodes, checking for the expected number of transport processes using diameter:service_info/2.
2015-02-20Adapt tcp/sctp transport modules for pool_size > 1Anders Svensson
In particular, that starts for the same transport reference can now be concurrent. Looking up a listener process and starting a new one if not found did handle this (more than one process could find no listener), and diameter_sctp assumed there could only be one transport process waiting for an association.
2015-02-20Add transport_opt() pool_sizeAnders Svensson
Transport processes are started by diameter one at a time. In the listening case, a transport process accepts a connection, tells the peer_fsm process, which tells its watchdog process, which tells its service process, which then starts a new watchdog, which starts a new peer_fsm, which starts a new transport process, which (finally) goes about accepting another connection. In other words, not particularly aggressive in accepting new connections. This behaviour doesn't do particularly well with a large number of concurrent connections: with TCP and 250 connecting peers we see connections being refused. This commit adds the possibilty of configuring a pool of accepting processes, by way of a new transport option, pool_size. Instead of diameter:add_transport/2 starting just a single process, it now starts the configured number, so that instead of a single process waiting for a connection there's now a pool. The option is even available for connecting processes, which provides an alternate to adding multiple transports when multiple connections to the same peer are required. In practice this also means configuring {restrict_connections, false}: this is not implicit. For backwards compatibility, the form of diameter:service_info(_,transport) differs in the connecting case, depending on whether or not pool_size is configured. Note that transport processes for the same transport_ref() can be started concurrently when pool_size > 1. This places additional requirements on diameter_{tcp,sctp}, that will be dealt with in a subsequent commit.