aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.c
AgeCommit message (Collapse)Author
2017-03-10Update copyright yearRickard 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-05-11erts: Only allow remove from trace_status callbackLukas Larsson
Make it so that it is only possible to remove a tracer via returning remove from an erl_tracer. This limition is put in place in order to avoid a lot of lock checking and taking in various places, especially in regards to trace events happening on dirty schedulers.
2016-05-11Add better support for communication with a process executing dirty NIFRickard Green
- Termination of a process... - Modify trace flags of process... - Process info on process... - Register/unregister of name on process... - Set group leader on process... ... while it is executing a dirty NIF.
2016-05-04erts: Fix bug in trace_pattern for 'on_load'Sverker Eriksson
'on_load' is a call trace.
2016-05-04erts: Fix PAM to be callable from non-scheduler threadSverker Eriksson
also simplified the interface to to run PAM from trace
2016-05-04erts: Add Sender in 'receive' trace matchspecSverker Eriksson
All 'EXIT' and monitor messages are sent from 'system' Timeouts are "sent" from 'clock_service'
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-05-04erts: Remove multi scheduler blocking in match specsSverker Eriksson
for enable_trace and disable_trace operations. Instead seize needed locks while updating trace flags.
2016-04-15erts: Implement tracer modulesLukas Larsson
Add the possibility to use modules as trace data receivers. The functions in the module have to be nifs as otherwise complex trace probes will be very hard to handle (complex means trace probes for ports for example). This commit changes the way that the ptab->tracer field works from always being an immediate, to now be NIL if no tracer is present or else be the tuple {TracerModule, TracerState} where TracerModule is an atom that is later used to lookup the appropriate tracer callbacks to call and TracerState is just passed to the tracer callback. The default process and port tracers have been rewritten to use the new API. This commit also changes the order which trace messages are delivered to the potential tracer process. Any enif_send done in a tracer module may be delayed indefinitely because of lock order issues. If a message is delayed any other trace message send from that process is also delayed so that order is preserved for each traced entity. This means that for some trace events (i.e. send/receive) the events may come in an unintuitive order (receive before send) to the trace receiver. Timestamps are taken when the trace message is generated so trace messages from differented processes may arrive with the timestamp out of order. Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer module tracers and also the backwards compatible arguments. OTP-10267
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-11-19Refactor have seq_trace token testBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword bases in ETSBjörn-Egil Dahlberg
2015-06-24erts: Reinstate copy_object over-allocation optimizationBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword copy_object_relBjörn-Egil Dahlberg
Near duplication of copy_object but with base ptr that is no longer used.
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-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-05-08erts: Make hashmap_get halfword safeBjörn-Egil Dahlberg
2015-05-07erts: Fix ETS db_has_variable check for large MapsBjörn-Egil Dahlberg
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-04-10erts: Fix building of Map result from match_specsBjörn-Egil Dahlberg
A faulty "box-value" entered into the heap which could cause a segmentation fault in the garbage collector if it was written on a heap fragment.
2015-03-25erts: Combine flat and hash maps under one unifying tagBjörn-Egil Dahlberg
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-16Merge branch 'nox/ets-update_counter-4'Zandra Hird
* nox/ets-update_counter-4: Create new BIF ets:update_counter/4 Allow 4-ary BIFs OTP-12563
2015-03-12erts: Make hashmap iterator more flexibleSverker Eriksson
to allow mixing of 'next' and 'prev' operations.
2015-03-12erts: Reintroduce is_map macroSverker Eriksson
as shorthand for is_flatmap || is_hashmap
2015-03-12erts: Refactor maps naming conventionSverker Eriksson
flatmap: Small map hashmap: Large map map: flatmap or hashmap
2015-03-12erts: Teach hashmaps to match spec compilerBjörn-Egil Dahlberg
2015-03-12Create new BIF ets:update_counter/4Anthony Ramine
Conflicts: erts/emulator/beam/bif.tab lib/stdlib/src/ets.erl
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
2014-11-26erts: Use internal stack for ets db_has_variableBjörn-Egil Dahlberg
2014-08-20Properly support maps in match_specsAnthony Ramine
2014-02-24ose,erts: Specify name for tsd keysLukas Larsson
This simplified debugging on OSE and also limits the number of ppdata keys that are created when beam is restarted.
2014-01-28erts,stdlib: Teach matchspec compiler map guardsBjörn-Egil Dahlberg
2014-01-28erts: Initial Map instructions, type and structureBjörn-Egil Dahlberg
2014-01-23erts: Fix faulty assert in match spec engine.Sverker Eriksson
2013-08-08erts: Do not enable TRACE_SILENT when testing a msLukas Larsson
2013-02-20erts: Correct some printf type formattingSverker Eriksson
Using %p, %bpx and %bex for pointers, UWords and Uint.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-23Merge branch 'sverk/r16/utf8-atoms'Sverker Eriksson
* sverk/r16/utf8-atoms: erl_interface: Fix bug when transcoding atoms from and to UTF8 erl_interface: Changed erlang_char_encoding interface erts: Testcase doing unicode atom printout with ~w erl_interface: even more utf8 atom stuff erts: Fix bug in analyze_utf8 causing faulty latin1 detection Add UTF-8 node name support for epmd workaround... Fix merge conflict with hasse UTF-8 atom documentation test case erl_interface: utf8 atoms continued Add utf8 atom distribution test cases atom fixes for NIFs and atom_to_binary UTF-8 support for distribution Implement UTF-8 atom support for jinterface erl_interface: Enable decode of unicode atoms stdlib: Fix printing of unicode atoms erts: Change internal representation of atoms to utf8 erts: Refactor rename DFLAG(S)_INTERNAL_TAGS for conformity Conflicts: erts/emulator/beam/io.c OTP-10753
2013-01-16UTF-8 support for distributionRickard Green
2012-12-20Teach VM not to dump core on faulty seq_trace in msPatrik Nyblom