aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2015-04-30emulator: Use module erl_annoHans Bolinder
2015-04-29Merge branch 'JeromeDeBretagne/fix_android_build'Zandra Hird
OTP-12693
2015-04-29Merge branch 'mikpe/hipe-unbreak-arity-4-bifs'Zandra Hird
* mikpe/hipe-unbreak-arity-4-bifs: erts/hipe: unbreak arity 4 BIFs
2015-04-28Merge branch 'egil/opt-instructions/OTP-12690'Björn-Egil Dahlberg
* egil/opt-instructions/OTP-12690: erts: Specialize minus and plus instruction erts: Add move2 specialization for common move patterns erts: Specialize rem instruction for common case erts: Specialize band instruction for common case erts: Batch loads and stores for move_window erts: Fix loader increment from minus instruction erts: Add move window instruction erts: Add instruction move3 for xy and xx erts: Specialize compare instructions kernel: Add instruction_count helper to erts_debug
2015-04-27Fix cross compilation for AndroidJérôme de Bretagne
2015-04-27Merge branch 'sverk/maximmai-pr640-autoconf/OTP-12646'Sverker Eriksson
* sverk/maximmai-pr640-autoconf/OTP-12646: Update config.guess and config.sub to latest versions
2015-04-27Merge branch 'vinoski/dirty-sched-wakeup'Zandra Hird
OTP-12685
2015-04-27erts: Specialize minus and plus instructionBjörn-Egil Dahlberg
Seen on SSL application where substraction with x registers were prevalent: * i_minus specialization on x registers * i_plus specialization on x registers
2015-04-27erts: Add move2 specialization for common move patternsBjörn-Egil Dahlberg
Common pattern seen in SSL: move y x | move r x -> move2 move r x | move y x -> move2 Common pattern seen in SSL and Compiler: move x r | move x x -> move2
2015-04-24Merge branch 'egil/core-on-heart-tmo/OTP-12613'Björn-Egil Dahlberg
* egil/core-on-heart-tmo/OTP-12613: kernel: Document heart environment HEART_KILL_SIGNAL erts: Enable different abort signal from heart
2015-04-24Merge branch 'egil/opt-float-cmp'Björn-Egil Dahlberg
* egil/opt-float-cmp: erts: Brute force float comparisons as well
2015-04-24erts: Specialize rem instruction for common caseBjörn-Egil Dahlberg
* i_rem specialization on x registers
2015-04-24erts: Specialize band instruction for common caseBjörn-Egil Dahlberg
* i_band specialization on x registers and constants
2015-04-23erts: Batch loads and stores for move_windowBjörn-Egil Dahlberg
May lessen load/store latency.
2015-04-23erts: Fix loader increment from minus instructionBjörn-Egil Dahlberg
A type error caused the optimization to never kick in.
2015-04-23erts: Add move window instructionBjörn-Egil Dahlberg
Move an entire region of x registers to the stack. This reduces the dispatch pressure of move instructions. Also introduce a move2 specialization for some common move patterns: move r y | move x y -> move2 : As above, moving regions to the stack move x r | move x y -> move2 : A seemingly common pattern
2015-04-23erts: Add instruction move3 for xy and xxBjörn-Egil Dahlberg
2015-04-23erts: Specialize compare instructionsBjörn-Egil Dahlberg
* i_is_lt for r, x registers and constants * i_is_ge for x registers and constants * i_is_exact_eq for r and x registers
2015-04-22erts/hipe: unbreak arity 4 BIFsMikael Pettersson
This fixes arity 4 BIF support in HiPE, following its introduction on master (OTP 18) via the nox/ets-update_counter-4 merge. - define standard_bif_interface_4, nbif_4_gc_after_bif, and nbif_4_simple_exception on ARM: unbreaks the build on ARM - remove bogus stack re-alignment from standard_bif_interface_4 on AMD64: for 4-arg BIFs the stack is already aligned, and the code would misalign the C stack which violates the ABI and may cause alignment faults in vectorized code - the nbif_4_simple_exception OPD name on PPC64 was incorrectly using the nbif_3_simple_exception OPD name: this would have caused a multiple definition error in the assembler or linker In addition there are a few cleanups: - fix standard_bif_interface_N comment on x86 - fix standard_bif_interface_4 comment on SPARC - separate nbif_N_simple_exception blocks by empty lines on PPC, like on ARM, to clearly show which things belong together - fix standard_bif_interface_N comment on ARM - fix standard_bif_interface_4 on AMD64 to match the indentation and spacing conventions of the rest of that file
2015-04-22Merge branch 'sverk/pr632/prevent-illegal-nif-terms/OTP-12655'Sverker Eriksson
* sverk/pr632/prevent-illegal-nif-terms/OTP-12655: erts: Reject non-finite float terms in erl_drv_output_term erts: Remove old docs about experimental NIF versions. erts: Add enif_has_pending_exception erts: Clearify erl_nif documentation about badarg exception erts: Fix compile warning in enif_make_double erts: Fix divide by zero compile error in nif_SUITE.c erts: Fix isfinite for windows Ensure NIF term creation disallows illegal values
2015-04-22erts: Brute force float comparisons as wellBjörn-Egil Dahlberg
Increases float comparison speed by ~120%
2015-04-21Merge branch 'sverk/etp-map'Sverker Eriksson
* sverk/etp-map: erts: Add map support to gdb etp command erts: Add etp_the_non_value
2015-04-21Merge branch 'mikpe/configure-linux-spelling'Zandra Hird
* mikpe/configure-linux-spelling: erts/configure.in: handle more 'linux' spellings
2015-04-20erts: Enable different abort signal from heartBjörn-Egil Dahlberg
By using environment variable HEART_KILL_SIGNAL, heart can now use a different signal to kill the old running Erlang. By default the signal is SIGKILL but SIGABRT may also be used by setting environment variable: HEART_KILL_SIGNAL=SIGABRT
2015-04-20erts/configure.in: handle more 'linux' spellingsMikael Pettersson
The configuration code which canonicalizes the operating system name into OPSYS requires Linux to be spelled 'linux' or 'Linux'. This is a problem in some build environments, e.g. RPM, which supply --build and --host using the longer 'linux-gnu' spelling. The effect is that OPSYS becomes 'noopsys' and some checks in erts/configure.in do not work as expected, e.g. the auto-enabling of HiPE may not happen. Fixed by matching on 'linux*' not just 'linux'. On ARM there are even longer variants such as 'linux-gnueabi' and 'linux-gnueabihf': these are also correctly mapped to 'linux' now.
2015-04-20erts: Fix halfword compareBjörn-Egil Dahlberg
2015-04-17Merge branch 'egil/cmp-immediate-optimization/OTP-12663'Björn-Egil Dahlberg
* egil/cmp-immediate-optimization/OTP-12663: erts: Optimize comparison operator for frequent immediates
2015-04-16erts: Assume counting opcodes are correctly generatedBjörn-Egil Dahlberg
* Assertion is only removed because we are in icount mode.
2015-04-16erts: Remove instruction_count command optionBjörn-Egil Dahlberg
* We use compile directive icount instead
2015-04-16Merge branch 'egil/maps-refactor'Björn-Egil Dahlberg
* egil/maps-refactor: erts: Use make_small for size terms on flat maps Conflicts: erts/emulator/beam/erl_bif_guard.c
2015-04-16Merge branch 'bjorn/maps'Björn Gustavsson
* bjorn/maps: Document the new {badmap,Term} and {badkey,Key} exceptions Raise more descriptive error messages for failed map operations erl_term.h: Add is_not_map() macro Tigthen code for the i_get_map_elements/3 instruction Pre-compute hash values for the general get_map_elements instruction Teach the loader to pre-compute the hash value for single-key lookups Optimize use of i_get_map_element/4 beam_emu: Slightly optimize update_map_{assoc,exact} v3_codegen: Don't sort map keys in map creation/update beam_validator: No longer require strict literal term order Sort maps keys in the loader De-optimize the has_map_fields instructions erts/map_SUITE.erl: Add a test case that tests has_map_fields Fully evaluate is_map/1 for literals at load-time map_SUITE: Add tests of is_map/1 with literal maps Run a clone of map_SUITE without optimizations Remove the fail label operand of the new_map instruction Correct transformation of put_map_assoc to new_map Remove support for put_map_exact without a source map
2015-04-16Merge branch 'egil/refactor-message-queue-probes'Björn-Egil Dahlberg
* egil/refactor-message-queue-probes: erts: Refactor dtrace call probes erts: Refactor erts_queue_message
2015-04-15Merge branch 'sverk/nlmills-pr653/efile-union-pwritev/OTP-12653'Sverker Eriksson
* sverk/nlmills-pr653/efile-union-pwritev/OTP-12653: erts: Cleanup code in invoke_pwritev Use the correct union member inside efile_drv
2015-04-15erts: Reject non-finite float terms in erl_drv_output_termSverker Eriksson
2015-04-15erts: Remove old docs about experimental NIF versions.Sverker Eriksson
2015-04-15erts: Add enif_has_pending_exceptionSverker Eriksson
2015-04-15erts: Clearify erl_nif documentation about badarg exceptionSverker Eriksson
Also state that maximum atom length is 255 characters.
2015-04-15erts: Fix compile warning in enif_make_doubleSverker Eriksson
2015-04-15erts: Fix divide by zero compile error in nif_SUITE.cSverker Eriksson
2015-04-15erts: Fix isfinite for windowsSverker Eriksson
Add macro erts_isfinite as an OS independent way to check if a float is finite.
2015-04-15erts: Optimize comparison operator for frequent immediatesBjörn-Egil Dahlberg
* small integers * atoms
2015-04-15Raise more descriptive error messages for failed map operationsBjörn Gustavsson
According to EEP-43 for maps, a 'badmap' exception should be generated when an attempt is made to update non-map term such as: <<>>#{a=>42} That was not implemented in the OTP 17. José Valim suggested that we should take the opportunity to improve the errors coming from map operations: http://erlang.org/pipermail/erlang-questions/2015-February/083588.html This commit implement better errors from map operations similar to his suggestion. When a map update operation (Map#{...}) or a BIF that expects a map is given a non-map term, the exception will be: {badmap,Term} This kind of exception is similar to the {badfun,Term} exception from operations that expect a fun. When a map operation requires a key that is not present in a map, the following exception will be raised: {badkey,Key} José Valim suggested that the exception should be {badkey,Key,Map}. We decided not to do that because the map could potentially be huge and cause problems if the error propagated through links to other processes. For BIFs, it could be argued that the exceptions could be simply 'badmap' and 'badkey', because the bad map and bad key can be found in the argument list for the BIF in the stack backtrace. However, for the map update operation (Map#{...}), the bad map or bad key will not be included in the stack backtrace, so that information must be included in the exception reason itself. For consistency, the BIFs should raise the same exceptions as update operation. If more than one key is missing, it is undefined which of keys that will be reported in the {badkey,Key} exception.
2015-04-14erts: Add map support to gdb etp commandSverker Eriksson
2015-04-14erts: Use make_small for size terms on flat mapsBjörn-Egil Dahlberg
2015-04-14Merge branch 'egil/fix-maps-match_spec-return/OTP-12656'Björn-Egil Dahlberg
* egil/fix-maps-match_spec-return/OTP-12656: erts: Fix building of Map result from match_specs
2015-04-14erts: Refactor dtrace call probesBjörn-Egil Dahlberg
2015-04-14erts: Refactor erts_queue_messageBjörn-Egil Dahlberg
2015-04-13erl_term.h: Add is_not_map() macroBjörn Gustavsson
For consistency with other data types, add the is_not_map() macro.
2015-04-13Tigthen code for the i_get_map_elements/3 instructionBjörn Gustavsson
2015-04-13Pre-compute hash values for the general get_map_elements instructionBjörn Gustavsson
See the previous commit for justification and use cases.