aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2015-05-27Eliminate use of erlang:now/0 for generating random numbersBjörn Gustavsson
2015-05-27Eliminate use of erlang:now/0 for measuring timeBjörn Gustavsson
2015-05-26Eliminate use of erlang:now/0 for generating unique node namesBjörn Gustavsson
Use erlang:unique_integer([positive]) when generating unique node names.
2015-05-25Merge branch 'bjorn/kernel/code-loading'Björn Gustavsson
* bjorn/kernel/code-loading: code: Eliminate dialyzer warnings for unmatched returns
2015-05-25Merge branch 'rickard/user_drv_q_bug/OTP-12239'Rickard Green
* rickard/user_drv_q_bug/OTP-12239: Fix usage of io-request queue
2015-05-22Merge branch 'richcarl/ac_tab-concurrency'Henrik Nord
* richcarl/ac_tab-concurrency: Use read_concurrency for application environment
2015-05-22code: Eliminate dialyzer warnings for unmatched returnsBjörn Gustavsson
We want to have the core applications of Erlang/OTP free from any dialyzer warnings. Eliminate the warnings for unmatched returns that were introduced in 7309ff4c3832.
2015-05-22Merge branch 'richcarl/md5-fixes'Björn Gustavsson
* richcarl/md5-fixes: code: Correct type spec for code:make_stub_module/3
2015-05-21Update runtime dependenciesRickard Green
2015-05-20Fix usage of io-request queueRickard Green
2015-05-20Revert "Map error logger warnings to warning messages by default"Zandra Hird
This reverts commit 4c4d7fa40e5fb59854724ce74b8aa3546525cb90. This pr is causing some test failures that were missed at first.
2015-05-20Merge branch 'richcarl/warnings-by-default'Zandra Hird
* richcarl/warnings-by-default: Map error logger warnings to warning messages by default OTP-12755
2015-05-20Merge branch 'MSch/patch-1'Henrik Nord
* MSch/patch-1: Remove erlang:display/1 calls
2015-05-18Map error logger warnings to warning messages by defaultRichard Carlsson
Also fix and document the broken +We option.
2015-05-13Use read_concurrency for application environmentRichard Carlsson
2015-05-13code: Correct type spec for code:make_stub_module/3Björn Gustavsson
e47490f83e561a changed the size of Info argument tuple (third argument) for code:make_stub_module/3 from 2 to 3, but did not update the spec in code.erl.
2015-05-13Revert "Prepare release"Henrik Nord
This reverts commit e09dd66dc4d89c62ddfd8c19791f9678d5d787c6.
2015-05-12Prepare releaseErlang/OTP
2015-05-11Send format and args on process exit to error_loggerJosé Valim
Previously, the emulator would generate a whole string with values and call the error_logger passing "~s~n". This commit changes it to a format string containing ~p with the respective values as arguments.
2015-05-08Merge branch 'richcarl/md5-fixes'Björn Gustavsson
* richcarl/md5-fixes: Set module_info md5 for native modules properly Add module_info entry for native code Gracefully handle empty md5 field in module_info Remove 'imports' key from spec of get_module_info()
2015-05-08Fix a typoMichael Klishin
2015-05-07code: Make load_native_code_for_all_loaded/0 comply to specBjörn Gustavsson
7309ff4c38325 introduced a mismatch between load_native_code_for_all_loaded/0 and its spec. We could just delete spec, but it is cleaner to ensure that the function always returns 'ok'. Noticed-by: Tuncer Ayaz
2015-05-07Set module_info md5 for native modules properlyRichard Carlsson
Use the md5 of the native code chunk instead of the Beam code md5.
2015-05-06Merge branch 'bjorn/kernel/code-loading'Björn Gustavsson
* bjorn/kernel/code-loading: kernel application: Start code server first code: Reduce overhead of native code checking for loaded modules
2015-05-06kernel application: Start code server firstBjörn Gustavsson
When the code server has started, it will read the .beam files for all loaded modules to see whether they contain native code that should be loaded. To make that as fast as possible when we have no native code, start the code server as early as possible to minimize the number .beam files that must be read from disk. The code server does not use the 'file' module, so it is OK to start the code server before starting the file_server process. On my computer, the time for checking the loaded modules for native code is reduced from roughly 2 ms to 1.5 ms.
2015-05-06code: Reduce overhead of native code checking for loaded modulesBjörn Gustavsson
When the code server has been started, the function load_native_code_for_all_loaded/0 will check whether the .beam files for all loaded modules contain any native code. If there is native code, it will be loaded. If there is no native code, on my computer the check will take about 10 ms. That time can be reduced to about 2 ms if we replace the call to code beam_lib:chunks/2 with a call to prim_file:read_file/1 to read the file and a call to code:get_chunk/2 to check whether the chunk for native code is present. Furthermore, the entire check can be spawned off to a separate process and done in parallel with OTP starting up.
2015-05-04Merge branch 'peppe/jcl_mode_improvements'Peter Andersson
* peppe/jcl_mode_improvements: Fix problem with unitialized edlin text buffer Fix shell crash when in switch command mode OTP-12673
2015-04-30kernel: Use module erl_annoHans Bolinder
2015-04-28Merge branch 'egil/opt-instructions/OTP-12690'Björn-Egil Dahlberg
* egil/opt-instructions/OTP-12690: erts: Specialize minus and plus instruction erts: Add move2 specialization for common move patterns erts: Specialize rem instruction for common case erts: Specialize band instruction for common case erts: Batch loads and stores for move_window erts: Fix loader increment from minus instruction erts: Add move window instruction erts: Add instruction move3 for xy and xx erts: Specialize compare instructions kernel: Add instruction_count helper to erts_debug
2015-04-23kernel: Add instruction_count helper to erts_debugBjörn-Egil Dahlberg
2015-04-22Fix problem with unitialized edlin text bufferPeter Andersson
Also make it possible to copy text buffer from current group process to the JCL mode
2015-04-22Fix shell crash when in switch command modeJonas Falkevik
The user_drv process can crash if ctrl-y is pressed when in switch command mode (ctrl-g). This is due to switch mode using edlin to parse the input. And edlin uses the process dictionary to store the kill_buffer. However the kill_buffer is undefined if not initialized by edlin:init/0 which makes the user_drv process crash since edlin is calling list:reverse/2 with undefined. Fix calles edlin:init/0 once before server_loop is entered.
2015-04-22Remove erlang:display/1 callsMartin Schürrer
2015-04-20kernel: Document heart environment HEART_KILL_SIGNALBjörn-Egil Dahlberg
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-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-19kernel: Add spec for erts_debug:map_info/1Björn-Egil Dahlberg
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 'essen/zlib-windowbits'Zandra Hird
* essen/zlib-windowbits: Update zlib:zwindowbits/0 type to accept 8 and -8 OTP-12564
2015-03-13Merge branch 'maint'Raimo Niskanen
2015-03-13Merge branch 'raimo/infinite-loop-gethostbyname/OTP-12133' into maintRaimo Niskanen
* raimo/infinite-loop-gethostbyname/OTP-12133: Restore lookup order after test
2015-03-12erts, kernel: Fix erts_debug:size/1 for hashmapsBjörn-Egil Dahlberg
This commit introduces two BIFs: * erts_internal:map_type/1 * erts_internal:map_hashmap_children/1 erts_internal:map_hashmap_children/1 is only intended for use within erts_debug:size/1 since the internal hashmap node is not allowed to leak anywhere.
2015-03-11Merge branch 'dgud/kernel/unicode_file_read/OTP-12144'Dan Gudmundsson
* dgud/kernel/unicode_file_read/OTP-12144: kernel: Add test for unicode mode in file kernel: Fix file:read_line/1 unicode error handling
2015-03-10kernel: Add test for unicode mode in fileDan Gudmundsson
2015-03-10kernel: Fix file:read_line/1 unicode error handlingDan Gudmundsson
When a file was opened with some unicode encoding, file:read_line/1 could return unicode codepoints > 255 in list mode and wrong error message in bin mode. Chose to break out 'get_line' functionality from get_chars/5 since 'get_until' handling is different (comes from io module which should return unicode lists) and seems to have its own (doc?) problems.