aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2016-05-04Merge branch 'legoscia/dist-shutdown-reasons/PR-1028/OTP-13458'Zandra
* legoscia/dist-shutdown-reasons/PR-1028/OTP-13458: Error reasons for more distribution errors
2016-05-04Merge branch 'zandra/optimize-rpc/OTP-13518'Zandra
* zandra/optimize-rpc/OTP-13518: use maps instead of gb_trees to optimize the rpc server let the spawned processes handle rpc replies Conflicts: lib/runtime_tools/test/dbg_SUITE.erl
2016-05-04Merge branch 'zandra/erl_distribution_SUITE-cuddle'Zandra
* zandra/erl_distribution_SUITE-cuddle: update monitor_nodes_otp_6481_test-we only guarantee message order increase timeout since the old one risked flapping test remove no_msg timeout, since its not needed and cause flapping
2016-05-03Merge branch 'lukas/erts/tracing/misc_fixes/OTP-13503'Lukas Larsson
* lukas/erts/tracing/misc_fixes/OTP-13503: erts: Add test for new procs trace with spawn_link kernel: Remove seq_trace event order dep in tc erts: Add tests for set on link tracing erts: Expand trace tests for refc binaries erts: Remove erl_tracer with invalid state erts: Remove some dead code erts: Fix broken doc link to erl_tracer Conflicts: erts/emulator/beam/erl_trace.c
2016-05-02use maps instead of gb_trees to optimize the rpc serverZandra
2016-05-02let the spawned processes handle rpc repliesZandra
This decreases the load on the rex server.
2016-04-30Introduce is_dir/1 to test for a directoryBjörn Gustavsson
2016-04-30Introduce split_base/1 to split into name and version stringBjörn Gustavsson
2016-04-29Eliminate one call to filename:split/1Björn Gustavsson
2016-04-29Refactor get_name/1Björn Gustavsson
Refactor get_name/1 to facilitate an optimization in the next commit.
2016-04-29Clean up make_path()Björn Gustavsson
make_path() returns a tuple whose second element is not used by any of its caller. Eliminate the tuple. Also avoid calling filename:dirname/1 when we already have the result stored in a variable, and avoid calling filename:basename/2 on a complete path when we already have the last part of the pathname stored in a variable.
2016-04-29Avoid calling absname/1 on an absolute pathBjörn Gustavsson
absname/1 is quite expensive, so we should not call if we already have a normalized absolute path.
2016-04-29Clean up processing of archive filesBjörn Gustavsson
The same filtering of sub directories is done in archive_subdirs/1 and try_archive_subdirs/1. Actually, archive_subdirs/1 does nothing useful. It can be removed and all_archive_subdirs/1 can be renamed to archive_subdirs/1. In try_archive_subdirs/1, we can also replace filename:join/1 with the cheaper filename:append/1, since we know that pathnames have already been normalized.
2016-04-29Simplify and speed up del_ebin/1Björn Gustavsson
It is faster and easier to use filename:split/1 and filename:join/1 than use four different 'filename' operations. Each call in the original call first flattens the input list, and then traverse the entire string to the end. So there are roughly 8 complete traversals. In comparison, filename:split/1 will traverse the input string twice (once to flatten, once to split) and filename:join/1 once. For background on why this optimization is worthwhile, here is the result of profiling the start-up of the run-time system on my computer (done before this optimization): $ $ERL_TOP/bin/erl -profile_boot . . . filename:join1/4 - 13573 : 13805 us erlang:finish_loading/1 - 27 : 19963 us filename:do_flatten/2 - 29337 : 49518 us erlang:prepare_loading/2 - 49 : 52270 us Note that filename:do_flatten/2 ends up in second place, almost as expensive as erlang:prepare_loading/2. Your mileage may vary, depending on the length of $ERL_TOP and the number of extra directories added to the path using $ERL_LIBS.
2016-04-29code_SUITE: Enhance test of archive filesBjörn Gustavsson
When using a code archive for an application, it should be possible to store some directories for the application outside of the archive file (for example, shared libraries that will not work inside an archive). Make sure that we test that a directory outside of the archive file really works.
2016-04-26Update global_group_SUITE.erlxuming
2016-04-26Fix global_group.erlxuming
2016-04-26kernel: Remove seq_trace event order dep in tcLukas Larsson
2016-04-25Error reasons for more distribution errorsMagnus Henoch
Add descriptive shutdown reasons when an incoming distribution connection is rejected because it is not on the "allowed" list or because it has an incorrect cookie. These error reasons can be seen after calling net_kernel:verbose(1). Distinguishing these failures is valuable, because the log message printed is otherwise identical.
2016-04-25update monitor_nodes_otp_6481_test-we only guarantee message orderZandra
Messages can be lost, but the order is guaranteed. This change weakens the test, but does it according to our guarantees.
2016-04-15erts: Implement tracer modulesLukas Larsson
Add the possibility to use modules as trace data receivers. The functions in the module have to be nifs as otherwise complex trace probes will be very hard to handle (complex means trace probes for ports for example). This commit changes the way that the ptab->tracer field works from always being an immediate, to now be NIL if no tracer is present or else be the tuple {TracerModule, TracerState} where TracerModule is an atom that is later used to lookup the appropriate tracer callbacks to call and TracerState is just passed to the tracer callback. The default process and port tracers have been rewritten to use the new API. This commit also changes the order which trace messages are delivered to the potential tracer process. Any enif_send done in a tracer module may be delayed indefinitely because of lock order issues. If a message is delayed any other trace message send from that process is also delayed so that order is preserved for each traced entity. This means that for some trace events (i.e. send/receive) the events may come in an unintuitive order (receive before send) to the trace receiver. Timestamps are taken when the trace message is generated so trace messages from differented processes may arrive with the timestamp out of order. Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer module tracers and also the backwards compatible arguments. OTP-10267
2016-04-15Merge branch 'paulgray/inet_db_fix/PR-949/OTP-13470'Raimo Niskanen
* paulgray/inet_db_fix/PR-949/OTP-13470: Fix start timestamp instead of time check Allow to refresh resolver settings on startup
2016-04-13Merge branch 'siri/otp-19-vsns'Siri Hansen
* siri/otp-19-vsns: Update version of common_test for OTP-19 Update versions
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-07erts: Add DFLAG_BIG_CREATIONSverker Eriksson
to let future nodes know that we can handle NEW_PID_EXT, NEW_PORT_EXT and NEWER_REFERENCE_EXT.
2016-04-07Merge branch 'bjorn/kernel/rpc-pinfo/ERL-124/OTP-13460'Björn Gustavsson
* bjorn/kernel/rpc-pinfo/ERL-124/OTP-13460: Update spec for rpc:pinfo/2
2016-04-07Update spec for rpc:pinfo/2Björn Gustavsson
rpc:pinfo/2 is documented as a location-transparent version of process_info/2. Therefore, it should be expected that the spec would allow calls with an item list, for example: rpc:pinfo(Pid, [initial_call,last_calls]) Report-URL: http://bugs.erlang.org/browse/ERL-124 Reported-by: bjfish
2016-04-06Merge branch 'egil/erts/fix-file_info/OTP-13478'Björn-Egil Dahlberg
* egil/erts/fix-file_info/OTP-13478: Don't check dates before 1970 Log additional test information in prim_file_SUITE Relax file_info tests Refactor time_t in efile_drv
2016-04-06Fix start timestamp instead of time checkRaimo Niskanen
Verify with: erl -noshell -eval 'io:write(inet_res:lookup("localhost",in,a)),io:nl(),init:stop().' Prints: [{127,0,0,1}] Without this correction you will get [] on a hostname that works later after system start.
2016-04-05increase timeout since the old one risked flapping testZandra
2016-04-05remove no_msg timeout, since its not needed and cause flappingZandra
2016-04-04Merge branch 'bjorn/kernel/remove-deprecated/OTP-13449'Björn Gustavsson
* bjorn/kernel/remove-deprecated/OTP-13449: rpc: Remove functions deprecated in R12B
2016-04-04Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: inet_SUITE: Handle pointtopoint devices in getifaddrs/1 file_SUITE: Increase timetrap for large_write/1 gen_fsm_SUITE: Make abnormal1/1 stop failing gen_fsm_SUITE: Use timer:sleep/1 instead of ct:sleep/1 inet_SUITE: Handle {error,enoent} in simple_netns_open inet_SUITE: Handle missing SCTP support in simple_netns/1 asn1_SUITE: Remove temporary files file_name_SUITE: Improve handling of missing permission for link creation file_name_SUITE: Remove useless put/2 to process dictionary file_name_SUITE: Handle the case that HOMEPATH may not be set code_SUITE: Skip on_load_embedded/1 if no symlinks gen_sctp_SUITE: Skip most SCTP test cases on Solaris before 5.12 heart_SUITE: Increase timeout in restart/1 heart_SUITE: Use unique node names init_SUITE: Quote pathname that may contain a space gen_tcp_misc_SUITE: Clean up send_timeout{_active}/1 Clean up the determination of the hostname
2016-04-04Don't check dates before 1970Björn-Egil Dahlberg
2016-04-04Merge branch 'dcorbacho/dist_util_logs'Zandra
OTP-13458 * dcorbacho/dist_util_logs: Keep error reasons for some common distribution errors
2016-04-01rpc: Remove functions deprecated in R12BBjörn Gustavsson
2016-03-31Log additional test information in prim_file_SUITEBjörn-Egil Dahlberg
2016-03-31Relax file_info testsBjörn-Egil Dahlberg
2016-03-31code: Remove 'bad_path' error code from set_path/1Björn Gustavsson
code:set_path/1 no longer returns {error,bad_path} (an exception will be thrown instead).
2016-03-31Update Kernel documentationBjörn Gustavsson
Language cleaned up by technical writers from Combitech. Proofreading and corrections by Björn Gustavsson and Hans Bolinder.
2016-03-31Update versionsSiri Hansen
Update application versions for kernel, stdlib and sasl for OTP-19.
2016-03-30inet_SUITE: Handle pointtopoint devices in getifaddrs/1Björn Gustavsson
2016-03-30file_SUITE: Increase timetrap for large_write/1Björn Gustavsson
In 9870d22b2401b, the timetrap for large_write/1 was accidentally reduced from the default 30 minutes to only 1 minute. That is not enough for some older computers.
2016-03-30inet_SUITE: Handle {error,enoent} in simple_netns_openBjörn Gustavsson
Allow an open operation to fail with {error,enoent}. That will happen if the executable has compiled-in support for netns, but the computer has not been configured for netns.
2016-03-24inet_SUITE: Handle missing SCTP support in simple_netns/1Björn Gustavsson
2016-03-23file_name_SUITE: Improve handling of missing permission for link creationBjörn Gustavsson
On modern versions of Windows, creation of symlinks is supported, but our test machines usually don't have permissions for creating symlinks. Therefore, the has_links/0 that attempts to predict whether link creation will work by testing version numbers will not do any good. Refactor the code so that test cases don't fail when links cannot be created because of missing permissions.
2016-03-23file_name_SUITE: Remove useless put/2 to process dictionaryBjörn Gustavsson
There is never any corresponding get/1.
2016-03-23file_name_SUITE: Handle the case that HOMEPATH may not be setBjörn Gustavsson
Seems that it can happen on Windows.
2016-03-23code_SUITE: Skip on_load_embedded/1 if no symlinksBjörn Gustavsson
On Windows, we might not have permission to create symlinks. Skip the test case instead of failing.
2016-03-23gen_sctp_SUITE: Skip most SCTP test cases on Solaris before 5.12Björn Gustavsson
On old Solaris versions, many gen_sctp test cases fail. It is not clear whether the implementation or the test cases or both must be fixed. The number of failed test cases is a problem, as other failed test cases in the Kernel application might not be noticed. For now, skip most test gen_sctp test cases on old Solaris platforms, until the day that someone can mend the tests case and/or implementation (or test machines die). Keep a few smoke test cases.