Age | Commit message (Collapse) | Author |
|
|
|
* 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
|
|
|
|
|
|
When we are going to implement functions that can load many modules
at once, we don't the erl_prim_loader server to become a bottleneck.
Therefore, we need erl_prim_loader:get_modules/3 that can read many
BEAM files in parallel.
Note that we will not bother making reading from archive files
or using the inet loader efficient. That can be done later if it
turns out to be important.
|
|
|
|
The BIFs prepare_loading/2 and finish_loading/1 have been
designed to allow fast loading in parallel of many modules.
Because of the complications with on_load functions,
the initial implementation of finish_loading/1 only allowed
a single element in the list of prepared modules.
finish_loading/1 does not suspend other processes, but it must wait
for all schedulers to pass a write barrier ("thread progress"). The
time for all schedulers to pass the write barrier is highly variable,
depending on what kind of code they are executing. Therefore, allowing
finish_loading/1 to finish the loading for more than one module before
passing the write barrier could potentially be much faster than
calling finish_loading/1 multiple times.
The test case many/1 run on my computer shows that with "heavy load",
finish loading of 100 modules in parallel is almost 50 times faster
than loading them sequentially. With "light load", the gain is still
almost 10 times.
Here follows an actual sample of the output from the test case on
my computer (an 2012 iMac):
Light load
==========
Sequential: 22361 µs
Parallel: 2586 µs
Ratio: 9
Heavy load
==========
Sequential: 254512 µs
Parallel: 5246 µs
Ratio: 49
|
|
* maint:
Do not wait for main lock when looking up process not running
|
|
* rickard/proc-not-running/OTP-13365:
Do not wait for main lock when looking up process not running
|
|
* maint:
Update preloaded module
typos
Conflicts:
erts/preloaded/ebin/prim_file.beam
|
|
|
|
|
|
|
|
* maint:
Improve cmpxchg8b/cmpxchg16b inline asm
Improve cmpxchg8b inline asm configure test
|
|
* rickard/dw-cmpxchg-clang/OTP-13336:
Improve cmpxchg8b/cmpxchg16b inline asm
|
|
* rickard/gcc5-pic-cmpxchg8b/OTP-13326:
Improve cmpxchg8b inline asm configure test
|
|
|
|
* sverk/proc-lock-check-fix:
erts: Fix lock checker for process locks
|
|
* maint:
Fix a few dialyzer warnings
|
|
|
|
We will need a way to check whether an prepared BEAM modules has
an on_load function.
|
|
* rickard/rq-state-bug/OTP-13298:
Fix bug causing run-queue mask to become inconsistent
|
|
Do lock order check *before* trying to seize lock... duh!
|
|
OTP-13341
* sverk/erts-hipe_x86_signal-cleanups:
hipe_sigaltstack: correct initialization of ss.ss_flags
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
hipe_x86_signal: cleanups
|
|
Clang didn't like that ecx/rcx was mapped to input and output
variables of different types.
|
|
* sverk/fix-list-length-int/OTP-13288:
erts: Fix error cases in enif_get_list_length
erts: Use Sint instead of int for list lengths
|
|
* bjorn/remove-test_server/OTP-12705:
Remove test_server as a standalone application
Erlang mode for Emacs: Include ct.hrl instead test_server.hrl
Remove out-commented references to the test_server applications
Makefiles: Remove test_server from include path and code path
Eliminate use of test_server.hrl and test_server_line.hrl
|
|
|
|
* sverk/nif-test-cuddle:
erts: Fix wobbling test failure in nif_SUITE
|
|
|
|
* msantos/ms/typo-windows-build-script:
Fix typo in Windows build scripts
OTP-13337
|
|
* jv/erts/optimize-cmp:
Unify comparison macros in erl_utils.h
Avoid erts_cmp jump in atom, int and float comparisons
|
|
|
|
|
|
Since no test suites includede test_server.hrl, there is no need
to have test_server in the include path or code path.
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
|
|
|
|
This commit implements erts_internal:system_check(schedulers) with the
intent of a basic responsiveness test check of the schedulers.
|
|
This removes the duplication in having both `cmp_eq`
and `CMP_EQ` and normalizes their name to uppercase.
|
|
Given the function definition below:
check(X) when X >= 0, X <= 20 -> true.
@nox has originally noticed that perfoming lt and ge
guard tests were performing slower than they should be.
Further investigation revealed that most of the cost
was in jumping to the erts_cmp function. This patch
brings the operations already inlined in erts_cmp
into the emulator, removing the jump cost.
After applying these changes, invoking the check/1
function defined above 30000 times with different
values from 0 to 20 has fallen from 367us to 213us
(measured as average of 3 runs). This is a
considerably improvement over Erlang 18 which takes
556us on average.
Floats have also dropped their time from 1126us
(on Erlang 18) to 613us.
|
|
* rickard/ds-fixes:
Fix unique_SUITE for dirty schedulers
Add dirty scheduler process termination test
Ensure that work is done on the correct type of schedulers
Conflicts:
erts/emulator/beam/erl_process.c
erts/emulator/beam/erl_process.h
erts/emulator/beam/erl_process_dump.c
|
|
|
|
In scheduler_SUITE add a new test that runs a single dirty I/O
scheduler and launches a number of dirty I/O NIF calls that each sleep
for 3 seconds. Given the single scheduler, the first of these will run
while the rest queue up. Then start killing these processes, and
verify they call exit correctly.
|
|
Only the actual call to the dirty nif is allowed to execute on
dirty schedulers. The dirty nif is not allowed to execute on
normal schedulers if dirty schedulers are available.
Arrival of exit signals and system tasks, while a process was
scheduled for execution on a dirty scheduler, could mess up the
process internal state.
Preparation for dirty system task has been made, but is currently
unused.
|
|
ResA may have been GC'd after its last use.
|
|
SS_ONSTACK may be set in oss, but it's not supposed to be set
in ss, and some systems correctly reject that; current Linux
kernels accept but ignore it in ss
|
|
* sverk/thread-unsafe-alloc:
erts: Fix faulty assert for non-smp
erts: Add checks for thread safe allocation
|
|
* sverk/safe-purging/OTP-13122:
erts: Fix harmless dialyzer warnings
|