Age | Commit message (Collapse) | Author |
|
|
|
start_link/0 and friends are too convoluted for me.
|
|
Move all functions meant to be called from other modules before
the internal functions. Comment them to make it clearer what their
purpose are.
|
|
|
|
* siri/appups-19.0:
Update appups in kernel, stdlib and sasl for OTP-19
|
|
|
|
* msantos/epmd-IPv6-node-reg2/PR-864/OTP-13364:
epmd: support IPv6 node registration
|
|
|
|
|
|
* siri/appups-18.3:
Update appups in kernel, stdlib and sasl for OTP-18.3
|
|
* bjorn/multiple-load/OTP-13111:
code: Add functions that can load multiple modules
Refactor post_beam_load handling
Simplify and robustify code_server:all_loaded/1
Update preloaded modules
Add erl_prim_loader:get_modules/3
Add has_prepared_code_on_load/1 BIF
Allow erlang:finish_loading/1 to load more than one module
beam_load.c: Add a function to check for an on_load function
|
|
Conflicts:
erts/emulator/beam/erl_alloc.types
erts/emulator/beam/erl_bif_info.c
erts/emulator/beam/erl_process.c
erts/preloaded/ebin/erts_internal.beam
|
|
|
|
Change scheduler responsiveness to 'check_schedulers'.
|
|
|
|
Add functions to 'code' to allow loading of multiple modules
at once.
code:atomic_load(Modules) will load all modules at once, or fail
having loaded none of them. Since we cannot guarantee the atomicity if
there are modules with -on_load functions, the list of modules must
not contain any modules with an -on_load function.
Also, to make it possible to put an application into an inactive state
for as short time as possible, also add code:prepare_loading/1 and
code:finish_loading/1. They are used like this:
{ok,Prepared} = code:prepare_loading(Modules)
.
.
.
ok = code:finish_loading(Prepared)
code:ensure_modules_loaded/1 is useful as a pure optimization to
ensure that modules that will be needed soon have indeed been
loaded. It will not reload modules that have already been loaded and
it *will* accept modules that have an on_load function. Therefore, it
does not make sense to give any atomicity guarantees.
I did consider overloading the existing code:ensure_loaded/1
function, but rejected it because the return value is very
different. Having different forms of return values depending
on the types of arguments is confusing.
|
|
After loading a module without native code, it is still necessary
to call hipe_unified_loader:post_beam_load() to ensure that any
native calls to the module is done to the newly loaded module
(and not to a previous version of the module in native code).
Unfortunately, hipe_unified_loader:post_beam_load() can be slow
and most of the time it doesn't do anything because no previous
native code was loaded. Therefore, ad2962278f added a kludge using
the process dictionary to avoid calling post_beam_load() if no
native code at all has been loaded.
Remove the kludge by keeping track exactly of which modules that
have native code in the existing ets table. Also generalize
post_beam_load() to handle severals modules at once, since we
will soon need that functionality.
|
|
The main ets table kept by code_server contains several pieces
of information. Therefore, code_server:all_loaded/1 need to
filter the information in the table.
code_server:all_loaded/1 can be simplified if we use
ets:select/2. Currently, the filtering is done by filtering
away unwanted stuff ({sticky_dir,Mod} tuples). It is more
robust to filter on the stuff that we want to keep
({Mod,Path} tuples, where Mod is an atom) in case that we'll
add more auxiliary records to the table later.
|
|
|
|
* bernardd/gen_tcp_export_socket:
Export gen_tcp:socket() type
OTP-13380
|
|
In addition, the heart API is extended with the following functions:
* heart:set_options/1
* heart:get_options/0
If heart:set_options([scheduler]) is set, heart will check
scheduler responsiveness before every heartbeat to the heart port.
|
|
* legoscia/prettier-default-error-logger/OTP-13325:
Prettify default error_logger output somewhat
|
|
* maint:
kernel: Correct contract for inet:getifaddrs/1
|
|
See also http://bugs.erlang.org/browse/ERL-95.
|
|
* maint:
xmerl: Remove 'no_return' Dialyzer warnings
xmerl: Add suppression of Dialyzer warnings
eunit: Add suppression of Dialyzer warnings
debugger: Add suppression of Dialyzer warnings
kernel: Add suppression of Dialyzer warnings
mnesia: Add suppression of Dialyzer warnings
observer: Add suppression of Dialyzer warnings
runtime_tools: Add suppression of Dialyzer warnings
stdlib: Add suppression of Dialyzer warnings
test_server: Add suppression of Dialyzer warnings
tools: Add suppression of Dialyzer warnings
Conflicts:
lib/stdlib/src/erl_lint.erl
lib/stdlib/src/otp_internal.erl
|
|
|
|
|
|
Before a heartbeat to the port program a responsiveness check of
the schedulers is performed. If the responsiveness check fails,
stalls, the heartbeat will not be performed (as intended).
|
|
* heart:set_callback/2
* heart:get_callback/0
* heart:clear_callback/0
The callback is called before every heartbeat to the heart port.
The callback needs to return 'ok' if the validation is correct.
|
|
|
|
The default error logger, the one in use before a more sophisticated
error logger can be installed, has rather terse output, in part because
it cannot rely on io:format. This patch attempts to improve the error
logger within that constraint:
- Print timestamps as YYYY-MM-DD HH:MM:SS
- For error reports with format strings, just print the format string
and the format arguments on separate lines
- For error reports with tuple lists, print each pair on a separate line
|
|
Allow IPv6 nodes to register with and query epmd. On systems with
IPv6 support:
* epmd listens on both the IPv4 and IPv6 ANY or loopback sockets
* the epmd cli client connects to epmd over the IPv6 loopback
* distributed nodes started with "-proto_dist inet6_tcp" will register
with epmd over IPv6
To work on IPv6 capable systems that have IPv6 support disabled,
epmd ignores errors opening the socket if the protocol is not
supported. Similarly, the epmd client will fall back to IPv4 if the IPv6
socket is not available.
Update the minimum supported version of Windows to Windows Vista to
support IPv6.
|
|
When handling a gen_tcp socket, it's handy to be able to give it its proper type
and have dialyzer be able to validate it, rather than falling back on using
port(). The gen_udp equivalent is already exported.
|
|
The perf_counter is a very very cheap and high resolution timer
that can be used to timestamp system events. It does not have
monoticity guarantees, but should on most OS's expose a monotonous
time.
A special instruction has been created for this counter to further
speed up fetching it.
OTP-12908
|
|
* maint:
Introduce time management in native APIs
Introduce time warp safe replacement for safe_fixed option
Introduce time warp safe trace timestamp formats
Conflicts:
erts/emulator/beam/erl_bif_trace.c
erts/emulator/beam/erl_driver.h
erts/emulator/beam/erl_nif.h
erts/emulator/beam/erl_trace.c
erts/preloaded/ebin/erlang.beam
|
|
* rickard/monotonic-time-improvements/OTP-13222:
Introduce time management in native APIs
Introduce time warp safe replacement for safe_fixed option
Introduce time warp safe trace timestamp formats
|
|
* bjorn/kernel/clean-up-code_server:
code_server: Add specs for all exported functions
code_server: Add types to the state record
code_server: Don't export internal system_* functions
Simplify starting of code server
Remove first argument of code_server:call()
|
|
|
|
* maint:
Update documentation for code-loading functions
code: Correct the types for error returns
Eliminate run-time system crash in code:load_abs/1
|
|
The specifications for functions that load code in the 'code'
module (e.g. code:load_file/1) have some problems:
* The specs claim that the functions can return {error,on_load}, but
they never do. However, they can return {error,on_load_failure} if
the -on_load function in a module fails.
* The specs claim that the functions can return {error,native_code},
but they never do.
While we are it, also extend the on_load_errors/1 test case to test
that the load functions return {error,on_load_failure} when an
-on_load function fails.
|
|
|
|
There is no reason to export system_continue/3 and system_terminate/4
from code_server. Servers that use proc_lib and 'sys' to handle system
message do need those functions exported, but code_server contains a
modified copy of the system message handling code from 'sys', and that
code only make local calls to system_continue/3 and
system_terminate/4.
|
|
There is unnecessary knowledge about the -nostick option
in the 'kernel' module. -nostick can be handled entirely
in the 'code' module.
There is no need to have both code:start_link/0 and
code:start_link/1. code:start_link/0 is sufficient.
Also get rid of error handling for things that cannot happen:
The 'init' module has made sure that init:get_argument(root)
can't fail, so there is no need for any error-reporting code.
(See e1dc0aa4.)
We also don't need to test the return value from
code_server:start_link/1, because it will always return {ok,Pid}
(or crash).
|
|
Remove the first argument for code_server:call(). It makes no
sense. The only caller is 'code'.
Note that the code_server module is undocumented and that
code_server:call() is an internal helper function.
|
|
The run-time system would terminate if code:load_abs/1 was
called with a filename containing any non-latin1 characters.
The reason is that code_server would attempt to construct a
module name from the filename using list_to_atom/1 and that
atoms currently are limited to the latin1 character set.
But how should the error be reported?
I have decided to that the simplest and least confusing way
is to move the call to list_to_atom/1 to 'code' module and
let it crash the calling process. The resulting stack back
trace will make it clear what the reason for the crash was.
|
|
For some reason, there is a test in code_server that
hipe_unified_loader is loaded before trying to call it. The test was
added in R9B, but it is not clear why. Before starting the code
server, the 'code' module would always load hipe_unified_loader;
thus there is now way that the test can ever fail.
|
|
|
|
The following functions in the 'code' module only allow the
module argument to an atom:
load_file/1
load_binary/3
ensure_loaded/1
delete/1
purge/1
soft_purge/1
get_object_code/1
Therefore, there is no reason that the corresponding implementation in
code_server should allow the module to be either an atom or a
string. Only accept an atom and remove the helper functions to_atom/1
and do_mod_call/4.
|
|
New timestamp options for trace, sequential trace, and
system profile:
- monotonic_timestamp
- strict_monotonic_timestamp
|
|
by moving code from code_server to erts_code_purger.
This is more or less a copy-paste from code_server.erl
to erts_code_purger.erl. All the inner mechanics of
code:purge/1 and code:soft_purge/1 are unchanged.
|