aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_hash.c
AgeCommit message (Collapse)Author
2019-03-07Merge branch 'sverker/ets-no-mbuf-trapping/OTP-15660'Sverker Eriksson
into sverker/maint/ets-no-mbuf-trapping/OTP-15660
2019-03-07erts: Remove ets traversal yielding if heap fragmentSverker Eriksson
Many heap fragments do no longer make the GC slow. Even worse, we are not guaranteed that a yield will provoke a GC removing the fragments, which might lead to a one-yield-per-bucket scenario if the heap fragment(s) still remains after each yield.
2018-09-03erts: Refactor ets FixedDeletion allocationsSverker Eriksson
2018-09-03erts: Fix ets memstat false leak of FixedDeletionSverker Eriksson
causing erlang:memory to report too much ets memory.
2018-06-18Update copyright yearHenrik Nord
2018-05-08erts: Rename untrapping db_free_*empty*_tableSverker Eriksson
as it's now only used for empty tables by ets:new/2.
2018-05-08erts: Make ets:delete_all_objects yield on fixed tableSverker Eriksson
2018-05-08erts: Optimize ets delete all in fixed tableSverker Eriksson
by only allocating one FixedDeletion with the new "all" flag instead of one FixedDeletion per slot.
2018-05-08erts: Refactor ets select iteration codeSverker Eriksson
* Remove all "mtraversal_" prefixes. * Rename all local context variables as "ctx". * Changed callbacks from function arguments to members of new base context struct "match_callbacks_t" * Remove unnecessary struct initializations "= {0}"
2018-05-08erts: Cleanup ets codeSverker Eriksson
2018-05-08erts: Optimize ets hash object deallocactionsSverker Eriksson
to be done after lock has been released.
2018-05-08erts: Refactor pseudo deleted ets objectsSverker Eriksson
Separate pseudo-deleted-flag from the hash value.
2018-05-08erts: Make atomic ets:delete_all_objects yieldSverker Eriksson
by using a cooperative strategy that will make any process accessing the table execute delelete_all_objects_continue until the table is empty. This is not an optimal solution as concurrent threads will still block on the table lock, but at least thread progress is made.
2018-04-20erts: Use table ref for select continuationSverker Eriksson
and not the name. For more sane named table semantics. Applies to both select/1 continuation and trap context.
2018-04-20erts: Refactor erl_db_hash next() into next_live()Sverker Eriksson
where argument 'list' is the first candidate (not list->next). Also simplified db_first_hash().
2018-04-20erts: Change wrong alloc_fnfSverker Eriksson
There is no NULL check here !?
2017-09-11Merge branch 'maint'John Högberg
2017-09-07Replace ad-hoc MIN/MAX macros with common onesJohn Högberg
Besides being noisy, they were already defined by a global Unix- specific header, causing the Windows build to fail if one forgot to define them.
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.