Age | Commit message (Collapse) | Author |
|
Move sendfile data to invoke data instead of file_descr.
Remove usage of ready_output when doing a send.
If told to send 0 bytes, file_sendfile now sends the entire file
for linux.
|
|
Move the command handling to outputv in preparation for
header and trailer inclusion in the sendfile api.
Use the standard efile communication functions for sendfile.
|
|
Created erlang fallback for sendfile in gen_tcp and
moved sendfile from file to gen_tcp. Also created testcases
for testing all different options to sendfile.
For info about how sendfile should work see the BSD man pages
as they contain a more complete API than other *nixes.
|
|
Allow Erlang code to use sendfile() where available by wrapping it as
file:sendfile/4 and file:sendfile/2.
sendfile(2) - Linux man page:
"sendfile() copies data between one file descriptor and another.
Because this copying is done within the kernel, sendfile() is more
efficient than the combination of read(2) and write(2), which would
require transferring data to and from user space."
|
|
On my Linux computer, building the entire Erlang/OTP system
with hipe disabled took about 8 minutes. With hipe enabled,
but without any native code, the build took about 23 minutes,
i.e. more than 3 times slower. (The computer has 4 cores, and
I used 'make -j6'.)
On my eight-core Mac (running 'make -j10') there was only a slight
slowdown when hipe was enabled.
The culprit is hipe_unified_loader:post_beam_load/1, which will be
called every time a module is loaded (even if the module contains no
native code). If post_beam_load/1 is called in a hipe-enabled
emulator, it will block multi-scheduling, even if no work needs to be
done. Apparently the cost for blocking multi-scheduling can vary
greatly, depending on the operating system and system load.
As a quick and conservative fix, don't call post_beam_load/1 unless
some native code has been previously loaded.
|
|
* siri/sasl/upgrade-erts/OTP-9438:
Fix bug in erts upgrade on windows
Add release vsn info to erts_vsn_changed warning
Check for sasl application in systools:make_script and make_relup
Add syntax check of relup to check_install_release and install_release
Add documentation for upgrade from pre R15 to post R15 sasl
Handle upgrade from pre R15 to post R15 sasl
Step version of sasl to 2.2 for R15
Document upgrade instructions restart_new_emulator and restart_emulator
Wait for two restarts in upgrade_restart test
Add restart_new_emulator instruction to kernel, stdlib and sasl appups
Distinguish restart_new_emulator from restart_emulator in upgrade instructions
Upgrade erts: merge sys.config for tmp release instead of using old
Allow regexp for version in .appup
Restart emulator before running upgrade script when erts is upgraded
Conflicts:
lib/sasl/src/release_handler.erl
lib/sasl/test/release_handler_SUITE.erl
|
|
The appup files for kernel, stdlib and sasl did not contain any
UpFromVsn and DownToVsn. This means that it was not possible to create
a relup file with systool:make_relup if any of these applications had
changed.
This commit adds entries in the appup files for a maximum of two major
releases back - all with only one upgrade instruction:
restart_new_emulator. The point is to allow relups to be generated,
but ensure that no soft upgrade is done for these three applications -
i.e. they will always cause a restart of the emulator prior to all
other upgrade instructions from other applications.
Test cases (appup_test) are added to kernel_SUITE, stdlib_SUITE and
sasl_SUITE. These all check that expected versions are matched in the
appups, and illegal versions (older than two major releases, or in any
other way illegal) do not match. The test is written in a general way
where it is assumed that the version of these applications are stepped
according the the rule that major releases step the second number,
maintenance releases step the third number and patches step the fourth
number.
|
|
* siri/kernel/application-shutdown-timeout/OTP-9540:
Add documentation and test for kernel env var shutdown_timeout
Add env var shutdown_timeout to kernel to avoid deadlock on node shutdown
|
|
On some platforms (FreeBSD) the #sctp_assoc_change{state=comm_up}
event arriving during gen_sctp:connect/4,5 contains ancillary
data #sctp_sndrcvinfo{}. That was not expected by the code.
|
|
|
|
|
|
|
|
When a node is shutting down, application_controller will do
exit(Pid,shutdown) on all application masters, and wait for
{'EXIT',Pid,_}. If, for some reason, the application master does not
terminate then application_controller will hang forever waiting for
this 'EXIT' message.
To overcome this problem, a configurable timer is added to kernel -
the enviroment variable 'shutdown_timeout'. If this variable is set to
a positive integer T, application_controller will do exit(Pid,kill)
after T milli seconds if no 'EXIT' message is received.
|
|
|
|
Calls to global:whereis_name/1 have been substituted for calls to
global:safe_whereis_name/1 since the latter is not safe at all.
The reason for not doing this earlier is that setting a global lock
masked out a bug concerning the restart of supervised children. The
bug has now been fixed by a modification of global:whereis_name/1.
(Thanks to Ulf Wiger for code contribution.)
|
|
OTP-9673
|
|
* hb/kernel/fix_disk_log/OTP-9508:
Fix two minor disk_log bugs
|
|
|
|
* dev:
Update copyright years
|
|
|
|
Conflicts:
erts/aclocal.m4
erts/include/internal/ethread_header_config.h.in
|
|
|
|
* pan/move-dist-headers/OTP-9510:
Update bootstrap (manually)
Move distribution headers from kernel/src to kernel/include
|
|
* dev:
Fix a couple of minor bugs with hook priority
Update to reflect addition of CTH priority addition
Update CTH priority default to be 0
Update to reflect new cth callback api
Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} instead of NewState.
Add priority functionality and tests for ct hooks
Update internal hooks state to use a record instead of tuples
Improve and correct types and specifications in Kernel and STDLIB
|
|
* hb/spec_improvements/OTP-9485:
Improve and correct types and specifications in Kernel and STDLIB
|
|
|
|
|
|
disk_log:reopen/2,3 and disk_log:breopen/3 could return
the error reason from file:rename/2 rather than the reason
{file_error, Filename, Reason}.
The message {disk_log, Node, {error, disk_log_stopped}} which
according the documentation is sent upon failure to truncate or reopen
a disk log was sometimes turned into a reply.
|
|
Running Dialyzer on the test suites revealed a few type errors.
|
|
The type is marked as a binary() or a string() but in practice it can
be an iodata(). The test suite was updated to confirm the gen_tcp/2
and gen_udp:send/4 functions accept iodata() (iolists) packets.
|
|
* dev:
Improve types and specifications of the inet modules
|
|
* hb/inet_types_and_specs/OTP-9260:
Improve types and specifications of the inet modules
|
|
* dev:
code: Optimize purge/1 and soft_purge/1 using check_old_code/1
Add erlang:check_old_code/1
check_process_code/2: Quickly return 'false' if there is no old code
|
|
While at it, eliminate an unnecessary use of throw/catch in the
implementation of soft_purge/1.
|
|
|
|
|
|
In the location information tables in the run-time system, source
filenames that are the same as the module name plus ".erl" extension
are not stored explicitly, thus saving memory.
To take advantage of that optimization, avoid complicating the names of
files in the current working directory; specifically, make sure that
"./" is not prepended to the name.
|
|
This commit is a preparation for introducing location information
(filename/line number) in stacktraces in exceptions. Currently
a stack trace looks like:
[{Mod1,Function1,Arity1},
.
.
.
{ModN,FunctionN,ArityN}]
Add a forth element to each tuple that can be used indication
the filename and line number of the source file:
[{Mod1,Function1,Arity1,Location1},
.
.
.
{ModN,FunctionN,ArityN,LocationN}]
In this commit, the fourth element will just be an empty list,
and we will change all code that look at or manipulate stacktraces.
|
|
An incorrect spec, rpc:yield/1, has been fixed.
|
|
|
|
Two opaque types that could cause warnings when running Dialyzer have
been modified.
|
|
|
|
|
|
|
|
|
|
|
|
* mk/net-kernel-epmd-return-list:
Fix list returned by net_kernel:epmd_module
OTP-9215
|
|
* ks/hipe-ppc64:
Enable HiPE by default when compiling for PPC64
Translate RTL to PPC code on PPC64 too
Changes in ppc files for PPC64
Additions for the PPC64 backend
Changes for the PPC64 backend
Added loader for ppc64
New files for the 64-bit backends
Cleanup tags
OTP-9198
|
|
|
|
|