Age | Commit message (Collapse) | Author |
|
* pan/binary_match_scope/OTP-9701:
Remove remaining gcc 4.6 assigned-but-not-used warnings from erts
Remove GCC 4.6 set-but-not-used warning from erl_bif_binary
Make binary:match with scope return correct values
|
|
* sverk/hipe-without-fpe/OTP-9724:
otp_build: Disable FPE by default on Linux
stdlib: Make sure qlc_SUITE:otp_6964 restores backtrace_depth
erts: Add test for inf/NaN intermediate float results
hipe,erts: Allow hipe without floating point exceptions
hipe: Fix bug in hipe_rtl_lcm:calc_killed_expr_bb
erts: Rename macros used by float instructions without FPE
|
|
* rickard/sched-compact-load/OTP-9695:
Add switch that can disable scheduler compaction of load
|
|
* bjorn/erts/refc-binary-literals/OTP-9486:
external.c: Remove the option to create over-sized heap binaries
Allow refc binaries in literal pools
code_SUITE clean-up: Remove experimental 'constant_pool' option
|
|
* sverker/valgrind-fixing:
erts: valgrind suppressions for prebuilt terms in os_info_init
Fix dlopen-leak of drivers with incorrect version
erts: Add valgrind suppression files
erts: Remove valgrind limit for erts_alloc_permanent_cache_aligned
erts: Fix write-after-free bug in inet driver
ETS: Fix faulty size calculation SIZEOF_EXTSEG
ETS: Fix valgrind PossiblyLost in ETS hash tables
|
|
|
|
No semantic change, just code clarification.
Use unique macro names instead of redefining the original ones.
|
|
Since refc binaries are now supported in literal pools, there is no
longer any need to allow the creation of over-sized heap binaries.
|
|
To simplify the implementation of literal pools (constant pools)
for the R12 release, a shortcut was taken regarding binaries --
all binaries would be stored as heap binaries regardless of size.
To allow a module containing literals to be unloaded, literal
terms are copied when sent to another process. That means that
huge literal binaries will also be copied if they are sent to
another process, which could be surprising.
Another problem is that the arity field in the header for the heap
object may not be wide enough to handle big binaries.
Therefore, bite the bullet and allow refc binaries to be stored
in literal pools. In short, the following need to be changed:
* Each loaded module needs a MSO list, linking all refc binaries
in the literal pool.
* When check_process_code/2 copies literals to a process heap,
it must link each referenced binary into the MSO list for the
process and increment the reference counter for the binary.
* purge_module/1 must decrement the reference counter for each
refc binary in the literal pool.
|
|
* bjorn/erts/code-loading/OTP-9720:
BEAM loader: Don't stop other schedulers until truly needed
BEAM loader: Refactor code loading into separate functions
beam_load.c: Factor out cleaning up of the loader state into free_state()
BEAM loader: Clean up handling of error reasons
Remove the useless -l option
beam_load.c: Simplify handling of the bs_put_string_II instruction
beam_load.c: Remove the unused struct LoadedCode
|
|
The erlang:module_load/2 BIF will stop all other schedulers
before it starts to process the BEAM file. That is not a problem
when starting the Erlang/OTP system, since the start-up is mostly
sequential. It is a problem, however, when big BEAM files are
loaded in an already running system.
After the refactoring in the previous commits, we can now do most
of the processing of the BEAM file before we stop the other schedulers,
so that we can minimize the time when only one scheduler will be
running.
Suggested-by: Bob Ippolito
|
|
|
|
|
|
|
|
|
|
Break apart code loading into the three functions:
erts_alloc_loader_state()
erts_prepare_loading()
erts_finish_loading()
The erts_alloc_loader_state() and erts_prepare_loading() can be
executed with all schedulers running. Only erts_finish_loading()
needs to be run in a single-scheduling system.
|
|
|
|
There is no reason to have erts_load_module() return integer values,
only to have the caller convert the values to atoms. Return the
appropriate atom directly from the place where the error is generated
instead. Return NIL if the module was successfully loaded.
|
|
* egil/reallocating-catches/OTP-9692:
erts: Teach VM to reallocate beam catch table
|
|
The -l option used to print information about modules being loaded,
but now it prints very little information.
|
|
Remove the special-case handling of the bs_put_string_II
instruction; simply use the string patch mechanism that is already
used for the i_bs_match_string_* instructions.
|
|
|
|
* rickard/multi-exit-bug/OTP-9705:
Make sure only one thread exits the runtime system
|
|
* rickard/win-cs-mutex/OTP-9671:
Use critical sections as mutex implementation on Windows
|
|
* rickard/generic-thr-queue/OTP-9632:
Use generic lock-free queue for async threads
Use generic lock-free queue for misc aux work
Implement generic lock-free queue
|
|
* rickard/thr-progress-block/OTP-9631:
Replace system block with thread progress block
|
|
* rickard/alloc-opt/OTP-7775:
Optimize memory allocation
Conflicts:
erts/aclocal.m4
erts/emulator/hipe/hipe_bif_list.m4
erts/preloaded/ebin/erl_prim_loader.beam
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/init.beam
erts/preloaded/ebin/otp_ring0.beam
erts/preloaded/ebin/prim_file.beam
erts/preloaded/ebin/prim_inet.beam
erts/preloaded/ebin/prim_zip.beam
erts/preloaded/ebin/zlib.beam
|
|
The runtime system crashed if more than one thread tried to exit
the runtime system at the same time.
|
|
Windows native critical sections are now used internally in the
runtime system as mutex implementation. This since they perform
better under extreme contention than our own implementation.
|
|
Queues used for communication between async threads and scheduler threads
have been replaced with lock-free queues.
Drivers using the driver_async functionality are not automatically locked
to the system anymore, and can be unloaded as any dynamically linked in
driver.
Scheduling of ready async jobs is now also interleaved in between other
jobs. Previously all ready async jobs was performed at once.
|
|
|
|
The implementation of an ERTS internal, generic, many to one, lock-free
queue for communication between threads. The many to one scenario is
very common in ERTS, so it can be used in a lot of places in the future.
Changing to this queue from a lock based queue, however, often requires
some redesigning. This since we have often used the lock of the queue
to protect other information too.
|
|
The ERTS internal system block functionality has been replaced by
new functionality for blocking the system. The old system block
functionality had contention issues and complexity issues. The
new functionality piggy-backs on thread progress tracking functionality
needed by newly introduced lock-free synchronization in the runtime
system. When the functionality for blocking the system isn't used
there is more or less no overhead at all. This since the functionality
for tracking thread progress is there and needed anyway.
|
|
A number of memory allocation optimizations have been implemented. Most
optimizations reduce contention caused by synchronization between
threads during allocation and deallocation of memory. Most notably:
* Synchronization of memory management in scheduler specific allocator
instances has been rewritten to use lock-free synchronization.
* Synchronization of memory management in scheduler specific
pre-allocators has been rewritten to use lock-free synchronization.
* The 'mseg_alloc' memory segment allocator now use scheduler specific
instances instead of one instance. Apart from reducing contention
this also ensures that memory allocators always create memory
segments on the local NUMA node on a NUMA system.
|
|
Previously this table were statically allocated to 16*1024 entries.
Now the default size is 1024 entries but that is doubled each time
the limit is reached.
Theoretical upper limit is 2^26 entries (the remaining bits on a
catch datatype) in a 32 bit system.
|
|
* sverk/bif-args/OTP-9662:
erts,hipe: Limited support for hipe cross compilation
erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulator
erts-hipe: Enable debug compiled hipe-VM with lock checker
erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0
erts-hipe: Deliberate leak of native fun entries
erts-hipe: Fix new trap conventions for x86, amd64 and ppc
Store the trap address in p->i
Store the trap arguments in the X register array
erts-hipe: Make some primops use new BIF calling convention
erts-hipe: Adapt generated BIF wrappers for new calling convention
erts-hipe: Remove obscuring macros in generated assembler code
erts-hipe: Make hipe enabled emulator compile with new BIF calls
Simplify the instructions for calling BIFs
Change the calling convention for BIFs
Use the proper macros in all BIFs
Conflicts:
erts/emulator/beam/bif.h
erts/emulator/beam/erl_bif_info.c
|
|
* sverk/enif_inspect-memleak/OTP-9668:
erts: Fix memory leak of enif_inspect_* on independent environment
|
|
* bjorn/create-less-garbage:
Optimize filename:basename/1 to produce less garbage
Optimize filename:extension/1 to produce less garbage
sys.c for Unix: Undo caching of utsname in os_flavor()
Pre-build the tuples returned by os:type/0 and os:version/0
|
|
* egil/fix-compiler-warnings:
erts: Remove unused variable in enif_make_binary
erts: Remove debug variable in list_to_binary
erts: Remove cp on exiting and trapping processes
erts: Remove debug variables in erl_db
erts: Remove dead code in efile_drv
erts: Remove lock_check debug variables
erts: Remove unused variable in ttsl_drv
erts: "initialized" is only used with CHLDWTHR
erts: remove debug variables in beam_bp
|
|
OTP-9675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A future release of the compiler might want to treat external
funs as literals. Make sure that the loader can cope with an
export entry being created from both an entry in the literal
pool and from the export table (i.e. if an external fun refers
to an exported function in the same module).
|
|
Make it clear for the user what has happened and how to fix it when
an attempt is made to load a BEAM file containing new instructions
that the current run-time system cannot handle.
Suggested-by: Thomas Lindgren
|
|
* lukas/erts/large_float_cmp/OTP-9497:
Update documentation after changes in integer and float comparison
Do small optimisation on platforms with 32 bit Eterm
Add tests for equality checking
Optimize comparison of huge floats and smaller bignums
Add tests for comparing large floats and small bignums
Cleanup double_to_bignum conversion code
Update size of tmp cmp bignum buffer
Expand tests for float and number comparison
Update heauristic to work on halfword
Add heauristics bignum vs float checks
Optimise bugnum and small comparison
Add float vs integer comparison tests
Update integer and floating point number comparisons
|
|
Affects enif_inspect_iolist_as_binary() on iolists
and enif_inspect_binary() on byte-unaligned binaries.
Also need to allocate inspection buffers in ERTS_ALC_T_NIF for
process independent environments, as we don't know when and where
the environment will be freed.
|