aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_node_tables.c
AgeCommit message (Collapse)Author
2017-05-04Update copyright yearRaimo Niskanen
2017-03-22Fix node_container_SUITERickard Green
2017-02-20Merge branch 'master' into sverker/enif_selectSverker Eriksson
Conflicts: erts/emulator/beam/erl_binary.h erts/emulator/beam/erl_monitors.c erts/emulator/beam/erl_nif.c erts/emulator/beam/global.h erts/emulator/test/nif_SUITE_data/nif_SUITE.c
2017-02-09erts: Add enif_monitor_process and enif_demonitor_processSverker Eriksson
2017-02-06Use magic refs for compiled match specsRickard 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-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-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-07erts: Support 32-bit creation for external pid,port,refsSverker Eriksson
from future nodes.
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-12-15Merge branch 'lukas/erts/forker'Lukas Larsson
* lukas/erts/forker: (28 commits) erts: Never abort in the forked child erts: Mend ASSERT makro for erl_child_setup erts: Allow enomem failures in port_SUITE erts: iter_port sleep longer on freebsd erts: Allow one dangling fd if there is a gethost port erts: Only use forker StackAck on freebsd erts: It is not possible to exit the forker driver erts: Add forker StartAck for port start flowcontrol erts: Fix large open_port arg segfault for win32 erts: Fix memory leak at async open port kernel: Remove cmd server for unix os:cmd erts: Add testcase for huge port environment erts: Move os_pid to port hash to child setup erts: Handle all EINTR and EAGAIN cases in child setup erts: Make child_setup work with large environments erts: Fix forker driver ifdefs for win32 erts: Fix uds socket handling for os x erts: Fix dereferencing of unaligned integer for sparc erts: Flatten too long io vectors in uds write erts: Add fd count test for spawn_driver ... Conflicts: erts/emulator/beam/erl_node_tables.c erts/preloaded/src/erts_internal.erl
2015-12-15erts: Refactor out erts functions from hashLukas Larsson
2015-12-14Merge branch 'maint'Ingela Anderton Andin
2015-12-11erts: Fix correct node name for DTRACESverker Eriksson
broken by 949de78331b9c4ecb9.
2015-11-26Merge branch 'maint'Sverker Eriksson
2015-11-12Fragmented young heap generation and off_heap_message_queue optionRickard Green
* The youngest generation of the heap can now consist of multiple blocks. Heap fragments and message fragments are added to the youngest generation when needed without triggering a GC. After a GC the youngest generation is contained in one single block. * The off_heap_message_queue process flag has been added. When enabled all message data in the queue is kept off heap. When a message is selected from the queue, the message fragment (or heap fragment) containing the actual message is attached to the youngest generation. Messages stored off heap is not part of GC.
2015-11-10erts: Fix bug in setnode/2Sverker Eriksson
that could lead strange things to happen when renaming a node with a name that already exist in node and dist tables. Problem: erts_set_this_node() is a bit brutal and does not handle the case when an old remote node name is reused as the new local node name. Solution: Treat erts_this_node and erts_this_dist_entry as all the others with correct reference counting.
2015-11-02erts: Remove ERTS_PSD_DIST_ENTRYSverker Eriksson
Not needed as it is always set to erts_this_dist_entry (on net_kernel).
2015-06-24erts: Remove HALFWORD_HEAP definitionBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-10Merge branch 'rickard/delayed-delete-node/OTP-12802'Rickard Green
* rickard/delayed-delete-node/OTP-12802: Delayed node table GC
2015-06-10Merge branch 'rickard/node-table-read-lock/OTP-12777'Rickard Green
* rickard/node-table-read-lock/OTP-12777: Only read lock node table when reading info
2015-06-10Delayed node table GCRickard Green
2015-06-09Only read lock node table when reading infoRickard Green
2015-05-26Merge branch 'jlouis/cocci-noderef-fixes'Henrik Nord
* jlouis/cocci-noderef-fixes: Correct usage of sizeof() for pointer types OTP-12771
2015-05-12Correct usage of sizeof() for pointer typesJesper Louis Andersen
Given some pointer *x, calling sizeof(x) will give us the size of the pointer (4/8 bytes) not the size fo the underlying dereferenced structure. Use coccinelle to search for these occurrences in the source code, and correct them one by one. In the case of erl_node_tables.c, the erts_snprintf() calls used a much too small buffer. - run_erl.c: Use the size of the signal type, not its pointer. - erl_node_tables.c: Use the size of the _BUFFER in erts_snprintf() to make sure we can use the full space.
2015-05-08Optimized timer implementationRickard Green
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-04-29Do not treat port_set_data/port_get_data as signalsRickard Green
2012-12-07Merge branch 'rickard/port-optimizations/OTP-10336' into ↵Rickard Green
rickard/r16/port-optimizations/OTP-10336 * rickard/port-optimizations/OTP-10336: Change annotate level for emacs-22 in cerl Update etp-commands Add documentation on communication in Erlang Add support for busy port message queue Add driver callback epilogue Implement true asynchronous signaling between processes and ports Add erl_drv_[send|output]_term Move busy port flag Use rwlock for driver list Optimize management of port tasks Improve configuration of process and port tables Remove R9 compatibility features Use ptab functionality also for ports Prepare for use of ptab functionality also for ports Atomic port state Generalize process table implementation Implement functionality for delaying thread progress from unmanaged threads Conflicts: erts/doc/src/erl_driver.xml erts/doc/src/erlang.xml erts/emulator/beam/beam_bif_load.c erts/emulator/beam/beam_bp.c erts/emulator/beam/beam_emu.c erts/emulator/beam/bif.c erts/emulator/beam/copy.c erts/emulator/beam/erl_alloc.c erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_bif_port.c erts/emulator/beam/erl_bif_trace.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_message.c erts/emulator/beam/erl_port_task.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_process_lock.c erts/emulator/beam/erl_trace.c erts/emulator/beam/export.h erts/emulator/beam/global.h erts/emulator/beam/io.c erts/emulator/sys/unix/sys.c erts/emulator/sys/vxworks/sys.c erts/emulator/test/port_SUITE.erl erts/etc/unix/cerl.src erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/src/prim_inet.erl lib/hipe/cerl/erl_bif_types.erl lib/kernel/doc/src/inet.xml lib/kernel/src/inet.erl
2012-12-03Move busy port flagRickard Green
2012-12-03Use ptab functionality also for portsRickard Green
2012-12-03Prepare for use of ptab functionality also for portsRickard Green
2012-12-03Atomic port stateRickard Green
2012-12-03Generalize process table implementationRickard Green
2012-08-31Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: lib/diameter/autoconf/vxworks/sed.general xcomp/README.md
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-03Merge branch 'rickard/tab-unref-thr-prgr/OTP-10167'Rickard Green
* rickard/tab-unref-thr-prgr/OTP-10167: Use thread progress instead of scheduling misc aux work were possible Conflicts: erts/emulator/beam/erl_process.h
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-06-04Merge branch 'maint'Lukas Larsson
* maint: Remove stale code for hybrid heap and incremental GC Remove the hipe_bifs:show_message_area/0 BIF Remove support for erlang:system_info(global_heaps_size) Remove the erlang:garbage_collect_message_area/0 BIF Remove workarounds for hybrid and shared heaps in test suites Conflicts: erts/doc/src/erlang.xml erts/emulator/beam/erl_message.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/hipe/hipe_bif2.tab lib/hipe/cerl/erl_bif_types.erl
2012-05-10Remove stale code for hybrid heap and incremental GCBjörn Gustavsson
The hybrid heap emulator was last working in the non-SMP R11B run-time system. When the constant pools were introduced in R12B, the hybrid heap emulator was not updated to handle them. At this point, the harm from reduced readability of the code is greater than any potential usefulness of keeping the code.
2012-04-16Optimize process table accessRickard Green
2012-03-22Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4Scott Lystig Fritchie
Add probes to the virtual machine, except (mostly) the efile_drv.c driver and other file I/O-related source files.
2011-11-13Replace system block with thread progress blockRickard Green
The ERTS internal system block functionality has been replaced by new functionality for blocking the system. The old system block functionality had contention issues and complexity issues. The new functionality piggy-backs on thread progress tracking functionality needed by newly introduced lock-free synchronization in the runtime system. When the functionality for blocking the system isn't used there is more or less no overhead at all. This since the functionality for tracking thread progress is there and needed anyway.
2011-06-14Use new atomic API in runtime systemRickard Green
All uses of the old deprecated atomic API in the runtime system have been replaced with the use of the new atomic API. In a lot of places this change imply a relaxation of memory barriers used.
2010-12-15Use new atomic types in emulatorRickard Green
2010-11-02Be less eager to set dist entry in busy stateRickard Green
The runtime system is now less eager to suspend processes sending messages over the distribution. The default value of the distribution buffer busy limit has also been increased from 128 KB to 1 MB. This in order to improve throughput.