aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_message.c
AgeCommit message (Collapse)Author
2018-03-05Remove ERTS_PSFLG_ON_HEAP_MSGQRickard Green
2017-10-02Merge branch 'maint'Sverker Eriksson
2017-10-02Merge branch 'sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661' into maintSverker Eriksson
2017-10-02erts: Fix bug when detecting bad dist messageSverker Eriksson
We can't just leave it in queue with dist_ext=NULL. Two symptoms seen: 1. 'receive' trying to deref dist_ext as NULL. 2. GC think it's a term and put THE_NON_VALUE in root set.
2017-07-17erts: Replace usage of all erts_smp prefixes to just ertsLukas Larsson
2017-07-17erts: Cleanup removal of non-smp emulatorsLukas 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-11erts: Introduce erts_bin_releaseSverker Eriksson
2017-03-10Update copyright yearRickard Green
2017-02-06Implement magic referencesRickard Green
Magic references are *intentionally* indistinguishable from ordinary references for the Erlang software. Magic references do not change the language, and are intended as a pure runtime internal optimization. An ordinary reference is typically used as a key in some table. A magic reference has a direct pointer to a reference counted magic binary. This makes it possible to implement various things without having to do lookups in a table, but instead access the data directly. Besides very fast lookups this can also improve scalability by removing a potentially contended table. A couple of examples of planned future usage of magic references are ETS table identifiers, and BIF timer identifiers. Besides future optimizations using magic references it should also be possible to replace the exposed magic binary cludge with magic references. That is, magic binaries that are exposed as empty binaries to the Erlang software.
2017-02-06Merge branch 'maint'Rickard Green
* maint: Atomic reference count of binaries also in non-SMP Conflicts: erts/emulator/beam/erl_fun.c
2017-02-06Merge branch 'rickard/binary-refc' into maintRickard Green
OTP-14202 * rickard/binary-refc: Atomic reference count of binaries also in non-SMP Conflicts: erts/emulator/beam/beam_bp.c
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()
2017-01-23Merge branch 'sverker/ASSERT_IN_ENV'Sverker Eriksson
* sverker/ASSERT_IN_ENV: erts: Add macro ERTS_PROC_LOCKS_HIGHER_THAN erts: Cleanup and extra assertions in nif_SUITE.c erts: Cleanup enif_make_reverse_list erts: Add assertions for correct ErlNifEnv erts: Make erts_dbg_within_proc available # Conflicts: # erts/emulator/beam/erl_gc.h
2017-01-12erts: Add macro ERTS_PROC_LOCKS_HIGHER_THANSverker Eriksson
to safeguard against bugs due to future proc lock changes. The two places now using ERTS_PROC_LOCKS_HIGHER_THAN were kind of bugs as BTM and TRACE locks were missing. But there was probably no way to get there with BTM or TRACE locked.
2017-01-11Merge branch 'maint'Rickard Green
* maint: Fix issues with abandoned heap Conflicts: erts/emulator/beam/beam_bif_load.c
2017-01-10Fix issues with abandoned heapRickard Green
2016-08-31Merge branch 'maint'Rickard Green
* maint: Ensure correct mbuf_sz value in process structure
2016-08-30Ensure correct mbuf_sz value in process structureRickard Green
2016-08-01erts: Refactor literal purge area argumentsBjörn-Egil Dahlberg
2016-08-01erts: Remove the need for copying of literalsBjörn-Egil Dahlberg
* Literals are not copied between processes for messages or spawn Increases performance of message sent and processes spawned when literals are involved in messages or arguments.
2016-07-14hipe: Remove performance profiling codeLukas Larsson
This type of statistics is now available through the microstate accounting API.
2016-05-31Fix bad assertionRickard Green
2016-05-31Properly close message factories in erts_factory_trim_and_close()Rickard Green
2016-05-27Merge branch 'rickard/on_heap-fix/OTP-13366'Rickard Green
* rickard/on_heap-fix/OTP-13366: Improve message allocation in enif_send() Fix message queue update on replacement and removal of message
2016-05-26Fix message queue update on replacement and removal of messageRickard Green
2016-05-25Remove the 'message_queue_data' option 'mixed'Rickard Green
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: 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 to 'receive' traceSverker Eriksson
2016-04-15erts: Extend process and port tracingLukas Larsson
This commit completes the tracing for processes so that all messages sent by a process (via nifs or otherwise) will be traced. The commit also adds tracing of all types of events from ports. When enabling tracing using erlang:trace, the 'all' flag now also enables tracing on all ports. OTP-13496
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-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-06Refactor and fix dtrace define in erl_messageBjörn-Egil Dahlberg
2016-03-15update copyright-yearHenrik Nord
2016-01-21erts: Fix faulty assert for non-smpSverker Eriksson
2015-12-18Merge branch 'lv/fix-compilation-with-vm-probes/OTP-13209'Björn-Egil Dahlberg
* lv/fix-compilation-with-vm-probes/OTP-13209: Fix compilation with `--enable-vm-probes`
2015-12-09Merge branch 'sverk/dist-ctrl-msg-overflow-master' into masterSverker Eriksson
* sverk/dist-ctrl-msg-overflow-master: erts: Tweak hashmap heap size estimation erts: Fix bug for remote control message containing fat maps erts: Add test for remote exit signal with fat map erts: Fix bug in heap_factory_undo for FACTORY_HEAP_FRAGS mode
2015-12-08Merge branch 'rickard/ohmq-fixup/OTP-13047'Rickard Green
* rickard/ohmq-fixup/OTP-13047: Replace off_heap_message_queue option with message_queue_data option Always use literal_alloc Distinguish between GC disabled by BIFs and other disabled GC Fix process_info(_, off_heap_message_queue) Off heap message queue test suite Remove unused variable Fix memory leaks
2015-12-08Merge branch 'sverk/dist-ctrl-msg-overflow' into ↵Sverker Eriksson
sverk/dist-ctrl-msg-overflow-master
2015-12-08Replace off_heap_message_queue option with message_queue_data optionRickard Green
The message_queue_data option can have the values - off_heap - on_heap - mixed
2015-12-08Fix compilation with `--enable-vm-probes`Luca Favatella
... broken by 3ac08f9b. Compilation error: ``` beam/erl_message.c: In function 'erts_send_message': beam/erl_message.c:753:56: error: macro "copy_struct" requires 4 arguments, but only 3 given utag = copy_struct(DT_UTAG(sender), dt_utag_size, ohp); ^ beam/erl_message.c:753:10: error: 'copy_struct' undeclared (first use in this function) utag = copy_struct(DT_UTAG(sender), dt_utag_size, ohp); ^ beam/erl_message.c:753:10: note: each undeclared identifier is reported only once for each function it appears in ```
2015-12-07erts: Fix bug for remote control message containing fat mapsSverker Eriksson
that could cause the static factory to overflow Fix: Introduce a new factory mode FACTORY_TMP
2015-12-03erts: Fix bug in heap_factory_undo for FACTORY_HEAP_FRAGS modeSverker Eriksson
Make sure a heap fragment is not deallocated before all off_heap terms have been cleared. The fix assumes/asserts that the off_heap-lists of all additional heap fragments are empty. I think this bug has been harmless as hashmap nodes, which is only ones (?) that can cause a factory to produce more heap, are not linked in off_heap-list.
2015-11-19Refactor have seq_trace token testBjörn-Egil Dahlberg
2015-11-18Use sharing preserving copy error messages and exceptionsBjörn-Egil Dahlberg
2015-11-18Refactor sharing preserved copy flagsBjörn-Egil Dahlberg
The TMPBUF option is no longer needed due to is_literal test and NONE was only used for initial debugging. So we remove the entire option.
2015-11-18Fix rebase of SHCOPY seq_tokensBjörn-Egil Dahlberg
2015-11-17Add -debug +vc flag for debuging SHCOPYNikolaos S. Papaspyrou
This is very verbose, you have been warned. It should work with the copy-spy.py script, which may be a bit outdated.