aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.c
AgeCommit message (Collapse)Author
2016-11-17erts: Refactor crash dumping with cbprintfSverker Eriksson
Instead of passing around a file descriptor use a function pointer to facilitate more advanced backend write logic such as size limitation or compression.
2016-09-21Merge branch 'sverker/ets-load-factor/OTP-13903'Sverker Eriksson
* sverker/ets-load-factor: erts: Unify reduction count for ets:select stdlib: Cuddle ets_SUITE for valgrind stdlib: Fix ets_SUITE:smp_select_delete erts: Tweak ets grow/shrink to keep up at contention erts: Fix ets_SUITE:memory erts: Suppress failed ETS memory checks erts: Reduce ets hash load factor erts: Enable a smaller first hash segment for ets erts: Redesign ets with separate segment tables erts: Remove unnecessary access of 'is_resizing' erts: Add ErtsSizeofMember macro erts: Add ErtsContainerStruct_ for array members
2016-09-19erts: Unify reduction count for ets:selectSverker Eriksson
to be per object as the other select-variants and not per table slot.
2016-09-19erts: Tweak ets grow/shrink to keep up at contentionSverker Eriksson
2016-09-19erts: Fix ets_SUITE:memorySverker Eriksson
by simply asking for the size of struct ext_segtab
2016-09-19erts: Suppress failed ETS memory checksSverker Eriksson
due to the grow/shrink hysteresis of the meta tables
2016-09-19erts: Reduce ets hash load factorSverker Eriksson
for faster lookup/insert/delete at the expense of about one word per object.
2016-09-19erts: Enable a smaller first hash segment for etsSverker Eriksson
2016-09-19erts: Redesign ets with separate segment tablesSverker Eriksson
* Keep it simple(r) * To prepare for both dynamic sized segments and segtabs
2016-09-19erts: Remove unnecessary access of 'is_resizing'Sverker Eriksson
in tables without write_concurrency and remove it totally #ifndef ERTS_SMP
2016-08-07Correct spelling of atomicityMahesh Baheti
2016-07-11erts: Fix deadlock in ets:update_counter/4Sverker Eriksson
in 'set' with 'write_concurrency' when inserting default object causes table to grow and the bucket to split is protected by same lock as the key.
2016-07-11erts: Optimize db_finalize_dbterm_hashSverker Eriksson
Always free term after WUNLOCK_HASH
2016-06-08Revert "erts: Change ETS hash load factor"Sverker Eriksson
This reverts commit 7c133fb1094ad1cabbb5cfc157483a43c816c6a9.
2016-06-08Revert "erts: Remove unnecessary access of 'is_resizing'"Sverker Eriksson
This reverts commit f4bdac18cb9dd45185e911308a5ebd95ff10d7fd.
2016-06-01erts: Remove unnecessary access of 'is_resizing'Sverker Eriksson
in tables without write_concurrency and remove it totally #ifndef ERTS_SMP
2016-06-01erts: Change ETS hash load factorSverker Eriksson
from 700% to 200%
2016-03-15update copyright-yearHenrik Nord
2016-02-24Merge branch 'master' into sverk/master/halt-INT_MINSverker Eriksson
2016-02-24erts: Change erl_exit into erts_exitSverker Eriksson
This is mostly a pure refactoring. Except for the buggy cases when calling erlang:halt() with a positive integer in the range -(INT_MIN+2) to -INT_MIN that got confused with ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT. Outcome OLD erl_exit(n, ) NEW erts_exit(n, ) ------- ------------------- ------------------------------------------- exit(Status) n = -Status <= 0 n = Status >= 0 crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0 The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and ERTS_DUMP_EXIT are the same as before (even though their values have changed).
2015-07-01Merge branch 'egil/remove-halfword/OTP-12883'Björn-Egil Dahlberg
* egil/remove-halfword/OTP-12883: (21 commits) erts: Remove halfword etp-commands erts: Remove halfword MemKind mseg erts: Remove halfword bases in ETS erts: Remove halfword CHECK_POINTER_MASK erts: Remove halfword relative printf erts: Remove halfword valgrind suppress file erts: Remove halfword specific tests erts: Remove halfword specific allocator types erts: Remove halfword BINARY RELs erts: Remove halfword is_same bases macro erts: Reinstate copy_object over-allocation optimization erts: Remove halfword copy_object_rel erts: Remove halfword object manipulation erts: Remove halfword heap relative comparisions erts: Remove halfword pointer compression erts: Remove halfword basic relative heap operations erts: Remove halfword from configure erts: Remove halfword in lib_src erts: Remove halfword in erl_nif.h erts: Remove halfword in erl_driver.h ...
2015-06-26erts: Fix ETS race between object deleter and table unfixerSverker Eriksson
causing the delete marked object to be left in the table after safe_fixtable(_,false) has returned. This is not super serious as the delete marked object is quite benign and will be deleted at the next unfix operation.
2015-06-24erts: Remove halfword relative printfBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword heap relative comparisionsBjörn-Egil Dahlberg
* Removed cmp_rel, cmp_rel_term and eq_rel
2015-06-24erts: Remove halfword basic relative heap operationsBjörn-Egil Dahlberg
2015-06-24erts: Remove HALFWORD_HEAP definitionBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-15Merge branch 'rickard/+zebwt/OTP-12830'Rickard Green
* rickard/+zebwt/OTP-12830: ETS busy wait option
2015-06-15ETS busy wait optionRickard Green
Conflicts: erts/emulator/beam/erl_init.c erts/etc/common/erlexec.c
2015-06-15erts: Remove hashmap probabilistic heap overestimationSverker Eriksson
by adding a dynamic heap factory. "binary_to_term" is now a hybrid solution with both a call to decoded_size() to calculate needed heap space AND possible dynamic allocation of more heap space if needed for big maps. The heap size returned from decoded_size() is guaranteed to be sufficient for all term heap data except for hashmap nodes. All hashmap nodes are created at the end of dec_term() by invoking the heap factory interface that may allocate more heap space on process heap or in fragments. With this commit it is no longer guaranteed that a message is confined to only one heap fragment.
2015-04-08Merge branch 'sverk/ets-grow-faulty-assert/OTP-12647'Sverker Eriksson
* sverk/ets-grow-faulty-assert/OTP-12647: erts: Fix ets bug in debug VM
2015-04-08erts: Fix ets bug in debug VMSverker Eriksson
Symptom: ASSERT(segtab[seg_ix] == NULL) in alloc_seg() fails. Remedy: Make sure we set segment pointer to NULL in free_seg() even when we switch to smaller segtab.
2015-03-19Merge branch 'egil/maps/hamt/OTP-12585'Björn-Egil Dahlberg
* egil/maps/hamt/OTP-12585: (113 commits) erts: Fix bug in ESTACK and WSTACK kernel: Add spec for erts_debug:map_info/1 mnesia: Update mnesia tests to reflect new ETS hash erts: Ensure maps uses _rel functions in halfword erts: Do not treat errors as fatal in erl_printf_term erts: Update preloaded erts_internal.beam erts: Add map decomposition wrappers erts: Ensure halfword has correct temp-heap for maps hipe: Handle separate hashmap tag correctly erts: Fix map bug in dec_term for 32-bit debug VM stdlib: Update qlc tests to reflect new ETS hash stdlib: Remove obsolete hashmap references in io_lib erts: Enhance maps ordering tests hipe: Fix maps sort order testcase erts: Remove unused variable in crashdump creation erts: Fix typo in copy_struct for halfword emulator erts: Restrict GCC intrinsics by compiler version erts: Fix windows bug in hashmap_info erts: Fix typo in make_hash2 for 32-bit arch Fix beam_load assert ... Conflicts: erts/emulator/beam/bif.tab
2015-03-12erts: Add make_internal_hashSverker Eriksson
2015-03-12Create new BIF ets:update_counter/4Anthony Ramine
Conflicts: erts/emulator/beam/bif.tab lib/stdlib/src/ets.erl
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-19ets: Increase data available in crash dumps and ets:infoLukas Larsson
OTP-12376
2014-11-13erts: Optimize ets:lookup and ets:take for bagsSverker Eriksson
by reducing number of iterations through objects with matching key
2014-05-30Implement ets:take/2Anthony Ramine
This new ETS BIF returns and deletes objects from tables.
2013-09-16erts: Remove space in 'Buckets' printoutBjörn-Egil Dahlberg
Fix to ease parsing of information.
2012-04-04Merge branch 'rickard/no_ets_write_concurrency/OTP-10048' into ↵Rickard Green
rickard/no_ets_write_concurrency-r15b01/OTP-10048 Conflicts: erts/emulator/beam/erl_db_hash.c
2012-04-04Remove unnecessary memory barriers in ETS when no write_concurrency is usedRickard Green
2012-02-19Misc memory barrier fixesRickard Green
- Document barrier semantics - Introduce ddrb suffix on atomic ops - Barrier macros for both non-SMP and SMP case - Make the thread progress API a bit more intuitive
2011-10-06ETS: Fix faulty size calculation SIZEOF_EXTSEGSverker Eriksson
Probably not a bug in reallity, but it's simpler and safer to use offsetof for dynamic sizeof calculations.
2011-10-06ETS: Fix valgrind PossiblyLost in ETS hash tablesSverker Eriksson
Add an extra pointer to start of segment with the active segment table to get rid of PossiblyLost errors without the need of a too general suppression that may hide real memory leaks in ETS.
2011-06-14Use new atomic API in runtime systemRickard Green
All uses of the old deprecated atomic API in the runtime system have been replaced with the use of the new atomic API. In a lot of places this change imply a relaxation of memory barriers used.
2011-05-13Merge branch 'rickard/barriers/OTP-9281' into devRickard Green
* rickard/barriers/OTP-9281: Silence warnings Fix build with hipe on amd64 Reduce number of atomic ops Use 32-bit atomic for port snapshot Remove pointless erts_ports_alive variable Ensure quick break Ensure that all rehashing information are seen when done Ensure that stack updates are seen when stack is released Add needed barriers for write_concurrency tables Homogenize memory barriers on atomics
2011-05-13Add needed barriers for write_concurrency tablesRickard Green
Ets tables using the write_concurrency option could potentially get into an internally inconsistent state.
2011-05-06ETS usage of erts_printf %RSverker Eriksson
2011-02-03HALFWORD ETS Further match spec optimization to minimize copying and garbageSverker Eriksson