aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2015-03-12erts: Add PSTACKSverker Eriksson
A lightweight stack that can be used to store any type. PUSH and POP return pointers into stack slots.
2015-03-12erts: Cleanup hashmap_merge_2Sverker Eriksson
2015-03-12erts: Add term_to_binary for hashmapSverker Eriksson
2015-03-12erts: Add RESERVE and FAST_PUSH for ESTACK & WSTACKSverker Eriksson
2015-03-12erts: Add hashmap:update/3Sverker Eriksson
2015-03-12erts: Add hashmap:find/2Sverker Eriksson
2015-03-12erts: Refactor hashmap_to_list to use hashmap_do_foreachSverker Eriksson
2015-03-12erts: Refactor hashmap_do_foreachSverker Eriksson
to use a common struct hashmap_doer_state.
2015-03-12erts: Add missing parenthesis in MAKE_MAP_HEADERSverker Eriksson
2015-03-12First non-recursive version of hashmap:merge/2Sverker Eriksson
2015-03-12erts: First recursive version of hashmap:mergeSverker Eriksson
2015-03-12erts: Add matching of hashmapsSverker Eriksson
2015-03-12erts: Fix bug in _make_header macroSverker Eriksson
Called with a signed int 'sz' argument on 64 bit would cause sign extension 'sz' was larger than 33554431.
2015-03-12hashmap: is_key/2, keys/1 and values/1Sverker Eriksson
2015-03-12Don't use modulus for power of 2Björn-Egil Dahlberg
2015-03-12Refactor hashmap_shiftBjörn-Egil Dahlberg
2015-03-12Add hashmap:remove/2Björn-Egil Dahlberg
2015-03-12Add hashmap:info/1Björn-Egil Dahlberg
2015-03-12Initial Persistent HAMT - Map frameworkBjörn-Egil Dahlberg
Conflicts: erts/emulator/Makefile.in erts/emulator/beam/bif.tab erts/emulator/beam/erl_gc.c erts/emulator/beam/erl_gc.h erts/emulator/beam/erl_printf_term.c erts/emulator/beam/erl_term.c erts/emulator/beam/erl_term.h
2015-03-12Merge branch 'nox/maps-match_specs-fixes/OTP-12270'Björn-Egil Dahlberg
* nox/maps-match_specs-fixes/OTP-12270: erts: Strengthen maps match spec compilation tests Properly collect variables in match specs with maps Fix compilation of match specs with maps
2015-03-12Merge branch 'maint'Henrik Nord
Conflicts: erts/emulator/hipe/hipe_bif0.c
2015-03-12Merge branch 'mikpe/avoid-oversize-bignums' into maintHenrik Nord
* mikpe/avoid-oversize-bignums: don't leave a heap hole in erts_bs_get_integer_2 don't create oversize bignums in binary matching OTP-12556
2015-03-12Merge branch 'egil/beam/select_val/OTP-12555'Björn-Egil Dahlberg
* egil/beam/select_val/OTP-12555: erts: Use linear search for small select_val arrays
2015-03-12Merge branch 'egil/process_dictionary-initial-size/OTP-12535'Björn-Egil Dahlberg
* egil/process_dictionary-initial-size/OTP-12535: erts: Document option 'hpds' erts: Enable command line argument for initial pd size
2015-03-11Properly collect variables in match specs with mapsAnthony Ramine
2015-03-11Fix compilation of match specs with mapsAnthony Ramine
The previous compilation was just plain wrong with push/pop mismatches. Reported-by: Björn-Egil Dahlberg
2015-03-06Merge branch 'maint'Zandra Hird
2015-03-06Merge branch 'leoliu/master' into maintZandra Hird
* leoliu/master: Two minor fixes OTP-12545
2015-03-05Merge branch 'maint'Björn-Egil Dahlberg
2015-03-04erts: Enable command line argument for initial pd sizeBjörn-Egil Dahlberg
Use '+hpds size' to set initial process dictionary size for spawned processes.
2015-02-27Two minor fixesLeo Liu
* Fix documentation on $char for unicode * Remove duplicate declaration for erts_encode_ext_dist_header_size
2015-02-20erts: Fix erroneous printout in crashdumpBjörn-Egil Dahlberg
An extra '}' were printed in remote links.
2015-02-19remove perfctr supportMikael Pettersson
Perfctr is a Linux kernel extension that allows programmatic access to the performance monitoring counters found in most current CPUs. However, development of perfctr ceased after 2010, and it cannot be used with Linux kernels newer than 2.6.32. Therefore the perfctr support code in the Erlang VM is effectively dead code, so this patch removes it.
2015-02-14don't leave a heap hole in erts_bs_get_integer_2Mikael Pettersson
Reset p->htop in the oversize bignum error case to avoid leaving a hole in the heap, which would crash the debug emulator.
2015-02-04don't create oversize bignums in binary matchingMikael Pettersson
Bignums are artifically restricted in size. Arithmetic and logical operations check the sizes of resulting bignums, and turn oversize results into system_limit exceptions. However, this check is not performed when bignums are constructed by binary matching. The consequence is that such matchings can construct oversize bignums that satisfy is_integer/1 yet don't work. Performing arithmetic such as Term - 0 fails with a system_limit exception. Worse, performing a logical operation such as Term band Term results in []. The latter occurs because the size checking (e.g. in erts_band()) is a simple ASSERT(is_not_nil(...)) on the result of the bignum operation, which internally is [] (NIL) in the case of oversize results. However, ASSERT is a no-op in release builds, so the error goes unnoticed and [] is returned as the result of the band/2. This patch addresses this by preventing oversize bignums from entering the VM via binary matching: - the internal bytes_to_big() procedure is augmented to return NIL for oversize results, just like big_norm() - callers of bytes_to_big() are augmented to check for NIL returns and signal errors in those cases - erts_bs_get_integer_2() can only fail with badmatch, so that is the Erlang-level result of oversize bignums from binary matches - big_SUITE.erl is extended with a test case that fails without this fix (no error signalled) and passes with it (badmatch occurs) Credit goes to Nico Kruber for the initial bug report.
2015-02-03Merge branch 'maint'Zandra Hird
Conflicts: OTP_VERSION erts/emulator/sys/unix/sys.c erts/vsn.mk
2015-02-03Merge branch 'maint-17' into maintZandra Hird
2015-01-23erts: Check driver version before assigning callbackBjörn-Egil Dahlberg
2015-01-23erts: Don't lookup invalid port for crashdump handlingBjörn-Egil Dahlberg
2015-01-23erts: Use emergency close to close epmdBjörn-Egil Dahlberg
Closes all open socket before writing crashdump to file.
2015-01-14Add math:log2/1Olivier Girondel
2015-01-13erts: Extend driver interface with emergency_closeBjörn-Egil Dahlberg
The intention of this callback is to close all sockets associated to a port. It is closed only on crashdumps. This will currently only be used for the epmd port.
2014-12-19Merge branch 'lukas/erts/crashdump_improvements/OTP-12377'Lukas Larsson
* lukas/erts/crashdump_improvements/OTP-12377: erts: Make main thread safe from pipe closed event erts: Improve crash dumps erts: Rename sys_sigset to sys_signal erts: Introduce thread suspend functions erts: Remove usage of QUANTIFY signal erts: Add support for thread names ets: Increase data available in crash dumps and ets:info erts: Start compilation of beam_emu earlier
2014-12-19erts: Improve crash dumpsLukas Larsson
This commit improves crash dumps in several ways: * Suspends schedulers to get a current snapshot * Dumps information about scheduler * Dumps stack trace of current running process (including Garbing processes)
2014-12-19erts: Introduce thread suspend functionsLukas Larsson
These functions allow any thread to suspend any other thread immediately and then resume all threads. This is useful when doing a crash dump in order to get a more accurate picture of what state the system is in.
2014-12-19erts: Add support for thread namesLukas Larsson
2014-12-19ets: Increase data available in crash dumps and ets:infoLukas Larsson
OTP-12376
2014-12-16Merge branch 'sverk/ets-take-2/OTP-12309'Sverker Eriksson
* sverk/ets-take-2/OTP-12309: erts: Optimize ets:lookup and ets:take for bags Implement ets:take/2
2014-12-16Merge branch 'sverk/ct-assert'Sverker Eriksson
* sverk/ct-assert: erts: Add compile time assert ERTS_CT_ASSERT
2014-12-12Merge branch 'lukas/erts/cpu_timestamp_linux/OTP-12366'Lukas Larsson
* lukas/erts/cpu_timestamp_linux/OTP-12366: erts: Allow cpu_timestamp tracing for Linux