aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
AgeCommit message (Collapse)Author
2015-04-10Merge branch 'bjorn/stdlib/cuddle-with-tests'Björn Gustavsson
* bjorn/stdlib/cuddle-with-tests: Eliminate deprecated now/0 used as timestamp Eliminate use of now/0 for creating a unique filename Eliminate use of deprecated now/0 for measuring time Eliminate use of deprecated now/0 for random number generation Speed up timer_simple_SUITE:timer_perf/1 Speed up timer_SUITE Optimize gen_server_SUITE:hibernate/1 Optimize gen_event_SUITE:hibernate/1 Optimize gen_fsm_SUITE:hibernate/1 Optimize unicode_SUITE:ex_binaries_errors* test cases Optimize unicode_SUITE:binaries_errors/1 binary_module_SUITE: Remove unnecessary calls to the binref module Optimize binary_module:random_ref_comp/1 Optimize io_proto_SUITE:unicode_options_gen/1
2015-04-10Eliminate deprecated now/0 used as timestampBjörn Gustavsson
Rewrite the code to measure and print elapsed time instead of just printing timestamps for the start and stop of each operation.
2015-04-10Eliminate use of now/0 for creating a unique filenameBjörn Gustavsson
Use erlang:unique_integer/1 instead.
2015-04-10Eliminate use of deprecated now/0 for measuring timeBjörn Gustavsson
Use erlang:monotonic_time/1 instead of now/0.
2015-04-10Eliminate use of deprecated now/0 for random number generationBjörn Gustavsson
Use erlang:timestamp/0 instead now/0 when seeding the random number generator.
2015-04-10Speed up timer_simple_SUITE:timer_perf/1Björn Gustavsson
In big_test/1, there is 9 seconds sleep before spawning any timers. Why? Before the sleep nrev processes are started, but they are likely to finish running before the 9 seconds have elapsed. Since I see no reason at all for the sleep, I will remove it.
2015-04-10Speed up timer_SUITEBjörn Gustavsson
The single test case in timer_SUITE is annoyingly slow. On average, its running time is about 4 minutes (estimated by a back-of-the-envelope calculation). Scale down the delay times in the main loop and the length of timers started. The running average time should now be around 80 seconds.
2015-04-10Optimize gen_server_SUITE:hibernate/1Björn Gustavsson
The running time for gen_server_SUITE:hibernate/1 is about 12 seconds because of 1000 ms sleeps in the test case. Introduce a helper function to avoid sleeping more than necessary. While we are it, also remove all ?line macros in the test case.
2015-04-10Optimize gen_event_SUITE:hibernate/1Björn Gustavsson
The running time for gen_event_SUITE:hibernate/1 is about 20 seconds because of 1000 ms sleeps in the test case. Introduce helper functions to avoid sleeping more than necessary. While we are it, also remove all ?line macros in the test case.
2015-04-10Optimize gen_fsm_SUITE:hibernate/1Björn Gustavsson
The running time for gen_fsm_SUITE:hibernate/1 is almost 30 seconds because of 1000 ms sleeps in the test case. Introduce helper functions to avoid sleeping more than necessary. While we are it, also remove all ?line macros in the test case.
2015-04-10Optimize unicode_SUITE:ex_binaries_errors* test casesBjörn Gustavsson
Refactor the code so that the error test cases for utf16 can share the code for big and little endian. Do the same for utf32. The major optimization is the observation that the following code: byte_size(unicode:characters_to_binary(List, unicode, {utf16,big}) can be replaced with: 2*length(List) which is much faster. (That optimization is not safe in general, but for the lists used in the error tests cases, it is.)
2015-04-10Optimize unicode_SUITE:binaries_errors/1Björn Gustavsson
unicode_SUITE:binaries_errors/1 is the slowest test case in unicode_SUITE. Its running time is about 50 seconds on my computer. Break apart unicode_SUITE:binaries_errors/1 into several test cases that can run in parallel.
2015-04-10binary_module_SUITE: Remove unnecessary calls to the binref moduleBjörn Gustavsson
The compile_pattern/1 function in the binref module is a dummy function. Therefore, calling binref:match/2 once with the plain pattern and once with a "pre-compiled" pattern will take twice as long, but will not help us find more errors. I shaved off one fourth of the running time for random_ref_comp/1 by eliminating the unnecessary calls to the binref module.
2015-04-08Merge branch 'sverk/ets-grow-faulty-assert/OTP-12647'Sverker Eriksson
* sverk/ets-grow-faulty-assert/OTP-12647: erts: Fix ets bug in debug VM
2015-04-08erts: Fix ets bug in debug VMSverker Eriksson
Symptom: ASSERT(segtab[seg_ix] == NULL) in alloc_seg() fails. Remedy: Make sure we set segment pointer to NULL in free_seg() even when we switch to smaller segtab.
2015-04-07Fix a qlc testcaseHans Bolinder
2015-04-01Merge tag 'OTP-17.5'Henrik Nord
=== OTP-17.5 === Changed Applications: - asn1-3.0.4 - common_test-1.10 - compiler-5.0.4 - crypto-3.5 - debugger-4.0.3 - dialyzer-2.7.4 - diameter-1.9 - eldap-1.1.1 - erts-6.4 - hipe-3.11.3 - inets-5.10.6 - kernel-3.2 - mnesia-4.12.5 - observer-2.0.4 - os_mon-2.3.1 - public_key-0.23 - runtime_tools-1.8.16 - ssh-3.2 - ssl-6.0 - stdlib-2.4 - syntax_tools-1.6.18 - test_server-3.8 - tools-2.7.2 - wx-1.3.3 Unchanged Applications: - cosEvent-2.1.15 - cosEventDomain-1.1.14 - cosFileTransfer-1.1.16 - cosNotification-1.1.21 - cosProperty-1.1.17 - cosTime-1.1.14 - cosTransactions-1.2.14 - edoc-0.7.16 - erl_docgen-0.3.7 - erl_interface-3.7.20 - et-1.5 - eunit-2.2.9 - gs-1.5.16 - ic-4.3.6 - jinterface-1.5.12 - megaco-3.17.3 - odbc-2.10.22 - orber-3.7.1 - ose-1.0.2 - otp_mibs-1.0.10 - parsetools-2.0.12 - percept-0.8.10 - reltool-0.6.6 - sasl-2.4.1 - snmp-5.1.1 - typer-0.9.8 - webtool-0.8.10 - xmerl-1.3.7 Conflicts: OTP_VERSION erts/vsn.mk lib/ssl/vsn.mk
2015-03-31Prepare releaseErlang/OTP
2015-03-27Merge branch 'maint'Sverker Eriksson
Conflicts: lib/stdlib/src/stdlib.appup.src
2015-03-26Optimize binary_module:random_ref_comp/1Björn Gustavsson
The most expensive part of random_ref_comp/1 is do_matches_loop_comp/4. The running time was reduced from roughly 80 seconds to roughly 40 seconds on my computer when I modified the caller to pre-compile the pattern.
2015-03-26Optimize io_proto_SUITE:unicode_options_gen/1Björn Gustavsson
The time to run io_proto_SUITE:unicode_options_gen/1 on my computer was about 110 seconds. After modifying the test case so that it does several file operations in parallel the time was reduced to about 60 seconds.
2015-03-26stdlib: Support upgrading from and to stdlib-2.3Björn Gustavsson
2015-03-20Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ... Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_asm.beam bootstrap/lib/compiler/ebin/compile.beam bootstrap/lib/kernel/ebin/auth.beam bootstrap/lib/kernel/ebin/dist_util.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/inet_db.beam bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/kernel/ebin/inet_res.beam bootstrap/lib/kernel/ebin/os.beam bootstrap/lib/kernel/ebin/pg2.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/erl_tar.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/file_sorter.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/random.beam bootstrap/lib/stdlib/ebin/supervisor.beam bootstrap/lib/stdlib/ebin/timer.beam erts/aclocal.m4 erts/emulator/beam/bif.c erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_db_hash.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_thr_progress.c erts/emulator/beam/utils.c erts/emulator/sys/unix/sys.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/init.beam erts/preloaded/src/erts_internal.erl lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl lib/diameter/src/base/diameter_lib.erl lib/kernel/src/os.erl lib/ssh/test/ssh_basic_SUITE.erl system/doc/efficiency_guide/advanced.xml
2015-03-20Replace usage of erlang:now() with usage of new APIRickard Green
2015-03-20Introduce a new time APIRickard Green
The old time API is based on erlang:now/0. The major issue with erlang:now/0 is that it was intended to be used for so many unrelated things. This tied these unrelated operations together and unnecessarily caused performance, scalability as well as accuracy, and precision issues for operations that do not need to have such issues. The new API spreads different functionality over multiple functions in order to improve on this. The new API consists of a number of new BIFs: - erlang:convert_time_unit/3 - erlang:monotonic_time/0 - erlang:monotonic_time/1 - erlang:system_time/0 - erlang:system_time/1 - erlang:time_offset/0 - erlang:time_offset/1 - erlang:timestamp/0 - erlang:unique_integer/0 - erlang:unique_integer/1 - os:system_time/0 - os:system_time/1 and a number of extensions of existing BIFs: - erlang:monitor(time_offset, clock_service) - erlang:system_flag(time_offset, finalize) - erlang:system_info(os_monotonic_time_source) - erlang:system_info(time_offset) - erlang:system_info(time_warp_mode) - erlang:system_info(time_correction) - erlang:system_info(start_time) See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
2015-03-19Merge branch 'egil/maps/hamt/OTP-12585'Björn-Egil Dahlberg
* egil/maps/hamt/OTP-12585: (113 commits) erts: Fix bug in ESTACK and WSTACK kernel: Add spec for erts_debug:map_info/1 mnesia: Update mnesia tests to reflect new ETS hash erts: Ensure maps uses _rel functions in halfword erts: Do not treat errors as fatal in erl_printf_term erts: Update preloaded erts_internal.beam erts: Add map decomposition wrappers erts: Ensure halfword has correct temp-heap for maps hipe: Handle separate hashmap tag correctly erts: Fix map bug in dec_term for 32-bit debug VM stdlib: Update qlc tests to reflect new ETS hash stdlib: Remove obsolete hashmap references in io_lib erts: Enhance maps ordering tests hipe: Fix maps sort order testcase erts: Remove unused variable in crashdump creation erts: Fix typo in copy_struct for halfword emulator erts: Restrict GCC intrinsics by compiler version erts: Fix windows bug in hashmap_info erts: Fix typo in make_hash2 for 32-bit arch Fix beam_load assert ... Conflicts: erts/emulator/beam/bif.tab
2015-03-19stdlib: Update qlc tests to reflect new ETS hashBjörn-Egil Dahlberg
2015-03-19stdlib: Remove obsolete hashmap references in io_libBjörn-Egil Dahlberg
2015-03-19Merge branch 'essen/ssl-alpn'Zandra Hird
* essen/ssl-alpn: ssl: Add TLS-ALPN support OTP-12580
2015-03-18Merge branch 'maint'Zandra Hird
2015-03-18Merge branch 'wmalik/minor-fixes' into maintZandra Hird
* wmalik/minor-fixes: Fix proc_lib doc Remove commented out code Fix make_hash description
2015-03-17Merge branch 'zandra/fix-zip-handle-link'Zandra Hird
* zandra/fix-zip-handle-link: add handle data type in zip.xml to fix broken link
2015-03-17Merge branch 'danielwhite/zip-port-leak-fix'Zandra Hird
OTP-12566 * danielwhite/zip-port-leak-fix: Describe zip handles an opaque type Document the termination semantics of a zip handle Prevent zip:zip_open/1,2 from leaking ports
2015-03-17ssl: Add TLS-ALPN supportLoïc Hoguin
This commit adds support for RFC7301, application-layer protocol negotiation. ALPN is the standard based approach to the NPN extension, and is required for HTTP/2. ALPN lives side by side with NPN and provides an equivalent feature but in this case it is the server that decides what protocol to use, not the client. When both ALPN and NPN are sent by a client, and the server is configured with both ALPN and NPN options, ALPN will always take precedence. This behavior can also be found in the OpenSSL implementation of ALPN. ALPN and NPN share the ssl:negotiated_protocol/1 function for retrieving the negotiated protocol. The previously existing function ssl:negotiated_next_protocol/1 still exists, but has been deprecated and removed from the documentation. The tests against OpenSSL require OpenSSL version 1.0.2+.
2015-03-16Merge branch 'nox/ets-update_counter-4'Zandra Hird
* nox/ets-update_counter-4: Create new BIF ets:update_counter/4 Allow 4-ary BIFs OTP-12563
2015-03-13add handle data type in zip.xml to fix broken linkZandra Hird
2015-03-12stdlib: Enable io_lib:format/* for hamt mapsBjörn-Egil Dahlberg
This is a commit to enable printouts of hashmaps during development and will be enhanced once hashmaps are in place.
2015-03-12Merge branch 'nox/maps-match_specs-fixes/OTP-12270'Björn-Egil Dahlberg
* nox/maps-match_specs-fixes/OTP-12270: erts: Strengthen maps match spec compilation tests Properly collect variables in match specs with maps Fix compilation of match specs with maps
2015-03-12Create new BIF ets:update_counter/4Anthony Ramine
Conflicts: erts/emulator/beam/bif.tab lib/stdlib/src/ets.erl
2015-03-11Properly collect variables in match specs with mapsAnthony Ramine
2015-03-11Merge branch 'hb/pr/357'Hans Bolinder
* hb/pr/357: Make the scanned form of the io_lib format strings available for processing
2015-03-10Merge branch 'maint'Zandra Hird
2015-03-10Merge branch 'josevalim/jv-binary-ets' into maintZandra Hird
* josevalim/jv-binary-ets: Support binary standard input in ets:i/1 OTP-12550
2015-03-10Make the scanned form of the io_lib format strings available for processingRichard Carlsson
This adds three new functions to io_lib - scan_format/2, unscan_format/1, and build_text/1 - which expose the parsed form of the format control sequences to make it possible to easily modify or filter the input to io_lib:format/2. This can e.g. be used in order to replace unbounded-size control sequences like ~w or ~p with corresponding depth-limited ~W and ~P before doing the actual formatting.
2015-02-27Merge branch 'maint'Henrik Nord
2015-02-27Merge branch 'nox/docs-re-unicode' into maintHenrik Nord
* nox/docs-re-unicode: Fix documentation about character types in unicode mode OTP-12521
2015-02-27Describe zip handles an opaque typeDaniel White
These are not intended to be treated as processes by consumers, and the type specs for the related functions have been updated accordingly.
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-23Merge branch 'josevalim/stdlib/dict'Björn Gustavsson
* josevalim/stdlib/dict: Short-circuit common dict operations