aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2014-02-27erts: Fix Map cmp exact equal of an empty mapBjörn-Egil Dahlberg
The expression, #{} =:= M where M was any Map, would always result in 'true'. This commit fixes this issue by first comparing sizes for both terms and then checking for size zero.
2014-02-25Merge branch 'sverk/hipe-disable-gc-bug'Sverker Eriksson
* sverk/hipe-disable-gc-bug: erts: Fix heap overwrite by hipe "trap frames" when GC is disabled ASSERT that GC is not tried with "need" when GC is disabled
2014-02-25erts: Fix heap overwrite by hipe "trap frames" when GC is disabledSverker Eriksson
by trapping BIFs like term_to_binary and binary_to_term.
2014-02-24Merge branch 'lukas/erts/float_encoding/OTP-11738'Lukas Larsson
* lukas/erts/float_encoding/OTP-11738: erts: Set default external enc to use new float scheme
2014-02-24Merge branch 'lukas/ose/master/OTP-11334'Lukas Larsson
* lukas/ose/master/OTP-11334: (71 commits) erts: Fix unix efile assert ose: Use -O2 when building ose: Expand OSE docs ose: Add dummy ttsl driver ose: Cleanup cleanup of mutex selection defines ose: Polish mmap configure checks ose: Add ose specific x-compile flags ose: Updating fd_driver and spawn_driver for OSE ose: Updating event and signal API for OSE ose: Cleanup of mutex selection defines win32: Compile erl_log.exe ose: Remove uneccesary define ose: Fix ssl configure test for osx erts: Fix sys_msg_dispatcher assert ose: Fix broken doc links ose: Thread priorities configurable from lmconf ose: Yielding the cpu is done "the OSE" way ose: Start using ppdata for tse key ose: Do not use spinlocks on OSE ose: Fix support for crypto ... Conflicts: lib/crypto/c_src/crypto.c
2014-02-24ose: Updating event and signal API for OSEJonas Karlsson
2014-02-24erts: Fix sys_msg_dispatcher assertLukas Larsson
Schedulers is too restrictive. Managed threads should be able to clean this up.
2014-02-24ose: Thread priorities configurable from lmconfLukas Larsson
The pattern used for getting the priority from the lmconf is based on the name of the process created. The pattern is: ERTS_%%PROCESS_NAME%%_PRIO with the %%PROCESS_NAME%% replaced by the prefix of the process the priority applies to. eg: ERTS_SCHEDULER_PRIO=24 applies to processes with name SCHEDULER_1, SCHEDULER_2 etc.
2014-02-24ose: Cleanup POLL_SCHED_1 codeLukas Larsson
Now schedulers 2..N make sure to wake sched 1 if they find that all io has been consumed and sched 1 is sleeping. Before sched 1 was spinning in sys_schedule waiting for sched 2..N to finish consuming io jobs
2014-02-24ose: Add fair scheduling yieldsLukas Larsson
This is needed on OSs that do not do round robin scheduling of threads.
2014-02-24ose: Rewrite resolve_signal API for ose driversLukas Larsson
This new API has less impact on the check_io code and also removes the callback from ErlDrvEntry. The downside is that you have to give the resolve function when creating each event. Also the mode if the resolve was removed as this mimics the win32 code and decreases complexity.
2014-02-24ose,erts: Specify name for tsd keysLukas Larsson
This simplified debugging on OSE and also limits the number of ppdata keys that are created when beam is restarted.
2014-02-24erts: configure number of write_concurrency locksLukas Larsson
Make it possible to change the number of write_concurrency locks to use. This is usefull to change when you for some reason want to use more/less locks per write_concurrency ets table. eg. OSs with a limit on how many mutexes can exist at once.
2014-02-24ose: Force atleast one async thread for oseLukas Larsson
This is needed because a file has to be opened and operated on in the same process at all times. Using async threads guarantee this.
2014-02-24erts: Make source file info available in lcLukas Larsson
2014-02-24Added support for ENEA OSELukas Larsson
This port has support for both non-smp and smp. It contains a new way to do io checking in which erts_poll_wait receives the payload of the polled entity. This has implications for all linked-in drivers.
2014-02-24Merge branch 'egil/maps/fix-cerl-inlining'Björn-Egil Dahlberg
* egil/maps/fix-cerl-inlining: compiler: Update map_SUITE to handle inlining erts: Maps src instructions can't be literals compiler: Fix map inlining compiler: Add variable coverage of map in cerl
2014-02-24Merge branch 'rickard/assumed-cacheline-size/OTP-11742'Rickard Green
* rickard/assumed-cacheline-size/OTP-11742: Introduce configure option --with-assumed-cache-line-size=SIZE
2014-02-24Merge branch 'vinoski/ds2'Rickard Green
* vinoski/ds2: further enhancements for dirty schedulers allow optional whitespace in dirty scheduler erl options
2014-02-24further enhancements for dirty schedulersSteve Vinoski
Add support for setting the number of dirty CPU schedulers online via erlang:system_flag/2. Assuming the emulator is built with dirty schedulers enabled, the number of dirty CPU schedulers online may not be less than 1, nor greater than the number of dirty CPU schedulers available, nor greater than the number of normal schedulers online. Dirty CPU scheduler threads that are taken offline via system_flag/2 are suspended. The number of dirty CPU schedulers online may be adjusted independently of the number of normal schedulers online, but if system_flag/2 is used to set the number of normal schedulers online to a value less than the current number of normal schedulers online, the number of dirty CPU schedulers online is decreased proportionally. Likewise, if the number of normal schedulers online is increased, the number of dirty CPU schedulers online is increased proportionally. For example, if 8 normal schedulers and 4 dirty CPU schedulers are online, and system_flag/2 is called to set the number of normal schedulers online to 4, the number of dirty CPU schedulers online is also decreased by half, to 2. Subsequently setting the number of normal schedulers online back to 8 also sets the number of dirty CPU schedulers online back to 4. Augment the system_flag/2 documentation in the erlang man page to explain this relationship between schedulers_online and dirty_cpu_schedulers_online. Also ensure that all dirty CPU and I/O schedulers are suspended when multi-scheduling is blocked via system_flag/2, and brought back online when multi-scheduling is unblocked. Add Rickard Green's rewritten check_enqueue_in_prio_queue() function that inspects process state more thoroughly to determine if to enqueue it and if so on what queue, including dirty queues when appropriate. Make sure dirty NIF jobs do not trigger erlang:system_monitor long_schedule messages. Add more dirty scheduler testing to the scheduler test suite. Remove the erts_no_dirty_cpu_schedulers_online global variable, since it's no longer needed. Execute dirty NIFs on a normal scheduler thread while multi-scheduling blocking is in effect. Evacuate any dirty jobs residing in the dirty run queues over to a normal run queue when multi-scheduling is blocked. Allow dirty schedulers to execute aux work. Set the dirty run queues halt_in_progress flag when halting the normal schedulers. Change dirty scheduler numbers to a structure including both scheduler number and type, either dirty CPU or dirty I/O. Add some assertions to ensure that dirty CPU schedulers operate only on dirty CPU scheduler process flags, and the same for dirty I/O schedulers.
2014-02-24erts: Set default external enc to use new float schemeLukas Larsson
This change was triggered by the OSE float printing function not working exactly the same way as linux/win32. But it is also a good one in general as it cuts size in more than half for floats.
2014-02-23Introduce configure option --with-assumed-cache-line-size=SIZERickard Green
2014-02-21erts: Maps src instructions can't be literalsBjörn-Egil Dahlberg
Move src to a register if it is a literal.
2014-02-21Merge branch 'bjorn/erts/restore-cmp-arguments'Björn Gustavsson
* bjorn/erts/restore-cmp-arguments: beam/utils.c: Change back cmp() to only take two arguments
2014-02-21Merge branch 'egil/compiler/maps-get_map_elements'Björn-Egil Dahlberg
* egil/compiler/maps-get_map_elements: compiler: Strengthen Maps compile tests compiler: Remove dead warning erts: Fix erts_debug:disassemble/1 compiler: Transform list of Args to exact literal type compiler: Test Maps aliasing compiler: Use aliasing in map pair patterns compiler: Check literal order in beam_validator erts: Introduce new instructions for combined key fetches compiler: Change map instructions for fetching values
2014-02-21Merge branch 'rickard/otp_version/OTP-11615'Rickard Green
* rickard/otp_version/OTP-11615: Misc adjustments of OTP version
2014-02-20ASSERT that GC is not tried with "need" when GC is disabledSverker Eriksson
2014-02-19erts: Fix erts_debug:disassemble/1Björn-Egil Dahlberg
Now handles map instructions correctly.
2014-02-19Merge branch 'sverk/ets-all-race'Sverker Eriksson
OTP-11726 * sverk/ets-all-race: erts: Fix faulty asserts in erts_sys_aligned_alloc/free erts: Fix harmless (?) typo in beam_load.c erts: Fix race bug in ets:all/0
2014-02-19erts: Fix harmless (?) typo in beam_load.cSverker Eriksson
2014-02-19erts: Fix race bug in ets:all/0Sverker Eriksson
causing recently created/deleted tables to not be included/excluded.
2014-02-19Merge branch 'sverk/crypto/hmac-context-reuse-bug'Sverker Eriksson
OTP-11722 OTP-11724 * sverk/crypto/hmac-context-reuse-bug: crypto: Fix bug when using old hmac context erts: Fix NIF bug when load/upgrade fails after enif_open_resource_type Conflicts: erts/emulator/test/nif_SUITE.erl
2014-02-19erts: Introduce new instructions for combined key fetchesBjörn-Egil Dahlberg
2014-02-19Misc adjustments of OTP versionRickard Green
2014-02-19beam/utils.c: Change back cmp() to only take two argumentsBjörn Gustavsson
Commit d5c238473b9cec819d93faaef4ccc00ddb60465f added a third argument to the cmp() function, but did not change the code generation of native code that called cmp(). Name the new functions with an "erts_" prefix, and reinstate the old cmp() function with two arguments. We don't have to keep a cmp() function in the halfword emulator, since HiPE does not support the halfword emulator.
2014-02-17allow optional whitespace in dirty scheduler erl optionsSteve Vinoski
The +SDcpu, +SDPcpu, and +SDio options did not properly handle having their arguments immediately following them without intervening whitespace, e.g. +SDio20 was treated as an error. Fix all the dirty scheduler command line options so they handle optional whitespace between them and their associated arguments.
2014-02-14Merge branch 'rickard/default_acul_mod/OTP-11604'Rickard Green
* rickard/default_acul_mod/OTP-11604: Fix +Mea config
2014-02-07erts: Maps must fail on exact updates of empty MapsBjörn-Egil Dahlberg
Exact updates on empty Maps must fail directly.
2014-02-05erts: Fix NIF bug when load/upgrade fails after enif_open_resource_typeSverker Eriksson
..has been successfully called. Opened resource types (created or taken-over) were left "hanging" leading both to memory leakage and other more strange and serious behavior. Now a proper rollback is done.
2014-02-05erts: Fix Maps for beam_loadBjörn-Egil Dahlberg
Map source may be anything, not only registers.
2014-02-03erts: Fix bug in binary_to_term for mapsSverker Eriksson
'maps_head' was not restored when yielding. Risk for crash increases with size and number of maps in term.
2014-01-31Fix +Mea configRickard Green
2014-01-29Make it easier to revert +M<S>acul defaultRickard Green
2014-01-29erts: Fixup enif_make_map_put on windowsBjörn-Egil Dahlberg
2014-01-29erts: Add map construction to driver APISverker Eriksson
erl_drv_output_term() and erl_drv_send_term() can send messages containing maps with the use of the new ERL_DRV_MAP. The driver API minor version is updated as new functionality is added.
2014-01-29erts: Change 'size' argument of enif_get_map_size from int* to size_t*Sverker Eriksson
2014-01-29erts: Fix compile error for halfword emulatorSverker Eriksson
2014-01-29erts: Optimize struct ErlNifMapIteratorSverker Eriksson
No need to use 64bit integers on 32bit machines.
2014-01-29erts: Fix map iterator bug when reverting from end of map positionSverker Eriksson
and simplify code by ignoring h_limit which is always zero.
2014-01-29erts: Simplify some map iterator codeSverker Eriksson