aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.c
AgeCommit message (Collapse)Author
2017-07-17erts: Replace usage of all erts_smp prefixes to just ertsLukas Larsson
2017-07-17erts: Remove ERTS_SMP and USE_THREAD definesLukas Larsson
This refactor was done using the unifdef tool like this: for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done where defile contained: #define ERTS_SMP 1 #define USE_THREADS 1 #define DDLL_SMP 1 #define ERTS_HAVE_SMP_EMU 1 #define SMP 1 #define ERL_BITS_REENTRANT 1 #define ERTS_USE_ASYNC_READY_Q 1 #define FDBLOCK 1 #undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT #define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0 #define ERTS_POLL_USE_WAKEUP_PIPE 1 #define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1 #undef ERTS_HAVE_PLAIN_EMU #undef ERTS_SIGNAL_STATE
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-05-04Update copyright yearRaimo Niskanen
2017-04-28Merge PR1413 from g-andrade/feature/phash2_nifSverker Eriksson
Support hashing terms from NIF code
2017-04-22erts: Support custom salt in enif_hashGuilherme Andrade
2017-04-12erts: Introduce struct binary_internalsSverker Eriksson
to replace macro ERTS_INTERNAL_BINARY_FIELDS as header in Binary and friends.
2017-03-28Fix use of uninitialized variable 'ret'Sverker Eriksson
DID_TRAP will read 'ret' even when error is returned. Found by valgrind.
2017-03-24Fix double hit bug of select/3 with bound keySverker Eriksson
2017-03-23Remove redundant variable initializationsGuilherme Andrade
2017-03-22Use ETS table id references on select_replaceGuilherme Andrade
2017-03-22erts: Optimize ets:select_replace to not use heapSverker Eriksson
for temporary matchspec results. ToDo: Would be even nicer if PAM could allocate and build the ETS objects without extra copy_struct needed.
2017-03-22Cleanup some unnecessary variable initializationSverker Eriksson
2017-03-22Fix typo that broke debug buildsGuilherme Andrade
2017-03-22Reject unsafe matchspecs on ets:select_replace/2Guilherme Andrade
Preemptively fail operation with badarg if the replacement object might have a different key.
2017-03-22Use magic refs on revamped ETS codeGuilherme Andrade
2017-03-22Deduplicate select* code on ETS hash tablesGuilherme Andrade
Refactor existing solution into a common iteration loop parameterized using stateful callbacks.
2017-03-22Disable ets:select_replace/2 for bagsGuilherme Andrade
The existing implementation presented both semantic inconsistencies and performance issues.
2017-03-22ETS: Allow for matchspec-based replacementGuilherme Andrade
2017-03-22erts: Improve reduction count during table cleanupSverker Eriksson
2017-03-22erts: Remove meta_main_tabSverker Eriksson
\o/ O / \ Also removed the body for CHECK_TABLES enabled by HARDDEBUG. Removed quite useless check for hash, but kept dead check code for tree.
2017-03-22erts: Pass tid argument down to trapping functionsSverker Eriksson
to get rid of meta table lookup by integer (tb->common.id)
2017-03-22erts: Replace meta_pid_to{_fixed}_tab with linked listsSverker Eriksson
from process psd through all owned/fixed tables. As meta_pid_to{_fixed}_tab maps to slot in meta_main_tab which is planned for destruction. In this commit we no longer seize table lock while freeing the table (free_table_cont) as it's not needed and makes the code a bit simpler. Any concurrent operation on the table will only access lock, owner and status and then bail out.
2017-02-06Use magic refs for compiled match specsRickard Green
2016-11-22Merge branch 'maint'Sverker Eriksson
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