aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.h
AgeCommit message (Collapse)Author
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: Cleanup ets codeSverker Eriksson
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.
2017-09-12Merge branch 'maint'Sverker Eriksson
2017-09-05erts: Fix faulty ASSERT of table fixation counterSverker Eriksson
Cannot read fix->counter safely without table lock.
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-05-04Update copyright yearRaimo Niskanen
2017-04-12erts: Introduce struct binary_internalsSverker Eriksson
to replace macro ERTS_INTERNAL_BINARY_FIELDS as header in Binary and friends.
2017-03-22Use ETS table id references on select_replaceGuilherme 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-22ETS: Allow for matchspec-based replacementGuilherme Andrade
2017-03-22erts: Improve reduction count during table cleanupSverker Eriksson
2017-03-22erts: Cleanup table status bitsSverker Eriksson
2017-03-22erts: Remove now redundant 'id' from DbTableCommonRickard Green
'the_name' keeps name of all tables. 'type' & DB_NAMED_TABLE mark tables as named. table ref id is built from magic bin when needed.
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-03-02Implement ets:all() using scheduler specific dataRickard Green
2017-03-02Rename fixation count in ets table to avoid confusionRickard Green
2017-03-02Introduce references as table identifiersRickard Green
2017-02-14erts: Add deallocation veto for magic destructorsSverker Eriksson
A magic destructor can return 0 and thereby take control and prolong the lifetime of a magic binary.
2017-02-06Use magic refs for compiled match specsRickard Green
2017-02-06Atomic reference count of binaries also in non-SMPRickard Green
NIF resources was not handled in a thread-safe manner in the runtime system without SMP support. As a consequence of this fix, the following driver functions are now thread-safe also in the runtime system without SMP support: - driver_free_binary() - driver_realloc_binary() - driver_binary_get_refc() - driver_binary_inc_refc() - driver_binary_dec_refc()
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-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-05-04erts: Add matchspec restrictions for 'receive' traceSverker Eriksson
and non-call-trace. This is the easy way out to avoid difficult locking scenarios when accessing tracing flags on another process.
2016-05-04erts: Add matchspec to 'receive' traceSverker Eriksson
2016-03-15update copyright-yearHenrik Nord
2016-02-02Merge branch 'maint'Rickard Green
* maint: Introduce time management in native APIs Introduce time warp safe replacement for safe_fixed option Introduce time warp safe trace timestamp formats Conflicts: erts/emulator/beam/erl_bif_trace.c erts/emulator/beam/erl_driver.h erts/emulator/beam/erl_nif.h erts/emulator/beam/erl_trace.c erts/preloaded/ebin/erlang.beam
2016-01-20Introduce time warp safe replacement for safe_fixed optionRickard Green
The new time warp safe option is safe_fixed_monotonic_time which gives erlang:monotonic_time(). The safe_fixed option was also slightly changed. It now gives erlang:timestamp() instead of erlang:now(). This has however not been documented, so it is considered a compatible change. The above effects both ets, and dets. This commit also include the bugfix OTP-13239 for dets:info(Tab, safe_fixed). The timestamp in the result returned by dets:info(Tab, safe_fixed) was unintentionally broken as a result of the time API rewrites in OTP 18.0.
2015-06-24erts: Remove halfword bases in ETSBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword object manipulationBjörn-Egil Dahlberg
* Remove macros size_object_rel, copy_struct_rel and copy_shallow_rel
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-05-07erts: ETS ordered_set cannot use it's optimization with MapsBjörn-Egil Dahlberg
The optimization cannot be used due to that the pattern cannot be ordered.
2015-03-12Create new BIF ets:update_counter/4Anthony Ramine
Conflicts: erts/emulator/beam/bif.tab lib/stdlib/src/ets.erl
2014-05-30Implement ets:take/2Anthony Ramine
This new ETS BIF returns and deletes objects from tables.
2013-09-30erts: Remove ASSERT_EXPR macroSverker Eriksson
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2012-12-03Prepare for use of ptab functionality also for portsRickard Green
2012-08-02Use thread progress instead of scheduling misc aux work were possibleRickard Green
Functionality for scheduling operations at thread progress later has been introduced. Deallocation of ETS table structures were previously done by scheduling misc aux work. Deallocation of process structures (not released yet) was also implemented this way. Instead of using the misc aux work functionality these implementation now use the newly introduced functionality for scheduling operations at thread progress later. By using this new functionaliy we reduce the amount of memory allocation/deallocation operations needed.
2012-04-16Optimize process table accessRickard Green
2011-10-26Use the proper macros in all BIFsBjörn Gustavsson
As a preparation for changing the calling convention for BIFs, make sure that all BIFs use the macros. Also, eliminate all calls from one BIF to another, since that also breaks the calling convention abstraction.
2011-02-03HALFWORD ETS removed eheap and improved test case t_match_spec_runSverker Eriksson
2011-02-03HALFWORD ETS Further match spec optimization to minimize copying and garbageSverker Eriksson
2011-02-03HALFWORD ETS nicer update_elementSverker Eriksson