aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
AgeCommit message (Collapse)Author
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-07-06Merge branch 'john/erts/runtime-lcnt' into maintJohn Högberg
* john/erts/runtime-lcnt: Document rt_mask and add warnings about copy_save Add an emulator test suite for lock counting Break erts_debug:lock_counters/1 into separate BIFs Allow toggling lock counting at runtime Move lock flags to a common header Enable register_SUITE for lcnt builds Enable lcnt smoke test on all builds that have lcnt enabled Make lock counter info independent of the locks being counted OTP-14412 OTP-13170 OTP-14413
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-06-01Merge branch 'rickard/purge-hibernated-19' into rickard/purge-hibernated-20Rickard Green
* rickard/purge-hibernated-19: Do not GC hibernated process from other processes Fix check_process_code() on hibernated process Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h
2017-06-01Merge branch 'rickard/purge-hibernated' into rickard/purge-hibernated-19Rickard Green
* rickard/purge-hibernated: Do not GC hibernated process from other processes Fix check_process_code() on hibernated process Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_gc.c erts/emulator/beam/erl_process.h
2017-06-01Fix check_process_code() on hibernated processRickard Green
2017-05-16Merge pull request #1436 from garazdawi/lukas/erts/remove_unused_functionsLukas Larsson
erts: Remove old unused functions
2017-05-16erts: Remove old unused functionsLukas Larsson
The functions have been found using: https://github.com/caolanm/callcatcher
2017-05-04Update copyright yearRaimo Niskanen
2017-04-25Merge branch 'sverker/refactor'Sverker Eriksson
* sverker/refactor: erts: Introduce struct binary_internals erts: Introduce erts_bin_release erts: Init refc=1 in erts_bin_drv_alloc* erts: Init refc=1 in erts_bin_nrml_alloc erts: Remove deliberate leak of hipe fun entries erts: Remove hipe_bifs:remove_refs_from/1 Refactor hipe specific code to use ErtsCodeInfo erts: Refactor ErtsCodeInfo.native
2017-04-12erts: Introduce struct binary_internalsSverker Eriksson
to replace macro ERTS_INTERNAL_BINARY_FIELDS as header in Binary and friends.
2017-04-11Fix dirty GC implementationRickard Green
2017-04-11erts: Introduce erts_bin_releaseSverker Eriksson
2017-02-28erts: Refactor MOVE_CONS to inline functionBjörn-Egil Dahlberg
2017-02-28erts: Refactor MOVE_BOXED to inline functionBjörn-Egil Dahlberg
2017-02-28erts: Convert small sub-binaries to heap-binariesBjörn-Egil Dahlberg
In many cases sub-binaries costs more memory than converting them to heap-binaries. Sub-binaries also has a hidden cost of pinning larger binaries in memory. By converting binaries this cost is reduced. Byte aligned sub-binaries upto 24 bytes (64-bit) or 12 bytes (32-bit) are converted.
2017-02-14Fixed typos in ertsAndrew Dryga
2017-02-06Add binary overhead for magic ref/binariesRickard 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-17Merge branch 'maint'Sverker Eriksson
2017-01-17Merge branch 'sverker/trace_gc-bug/OTP-14154' into maintSverker Eriksson
* sverker/trace_gc-bug: erts: Fix GC tracing to use temp heap erts: Assert sufficient space need after GC
2017-01-17Merge branch 'rickard/ds-features-20'Rickard Green
OTP-14152 * rickard/ds-features-20: Remove experimental disclaimer on dirty schedulers Scheduler wall time support for dirty schedulers Always return info from system_info(dirty_[cpu|io]_schedulers*) Improve etp-commands Switch between scheduler types when multi-scheduling is blocked Perform potentially long GC on dirty schedulers if available Return and exception trace for nif-export scheduled BIFs Optimize handling of BIF errors Support for dirty BIFs Reduction counting on non-tail return
2017-01-17Merge branch 'maint'Rickard Green
* maint: Do not automatically define HARDDEBUG when DEBUG is defined
2017-01-17Merge branch 'rickard/no-harddebug' into maintRickard Green
* rickard/no-harddebug: Do not automatically define HARDDEBUG when DEBUG is defined
2017-01-17Merge branch 'maint'Rickard Green
* maint: Fix memory leak of temporary heap
2017-01-17Merge branch 'rickard/abandoned-heap-bugs' into maintRickard Green
OTP-14135 * rickard/abandoned-heap-bugs: Fix memory leak of temporary heap
2017-01-13Do not automatically define HARDDEBUG when DEBUG is definedRickard Green
2017-01-13Fix memory leak of temporary heapRickard Green
This bug was introduced in previous commit, and has never been released in an official OTP version.
2017-01-12Perform potentially long GC on dirty schedulers if availableRickard Green
2017-01-12Support for dirty BIFsRickard Green
2017-01-11Merge branch 'maint'Rickard Green
* maint: Fix issues with abandoned heap Conflicts: erts/emulator/beam/beam_bif_load.c
2017-01-11Merge branch 'rickard/abandoned-heap-bugs' into maintRickard Green
OTP-14134 OTP-14135 * rickard/abandoned-heap-bugs: Fix issues with abandoned heap
2017-01-10Fix issues with abandoned heapRickard Green
2017-01-05erts: Fix GC tracing to use temp heapSverker Eriksson
Can't use HAlloc as it might consume part of callers 'need'.
2017-01-05erts: Assert sufficient space need after GCSverker Eriksson
2017-01-04erts: Make erts_dbg_within_proc availableSverker Eriksson
for debug assertions.
2017-01-02Merge branch 'maint'Rickard Green
* maint: Multi scheduling block bug-fixes Fix VM global GC info for dirty schedulers Leave dirty work in dirty run-queues on multi scheduling block Fix premature removal of process struct Fix crash due to GC of node entry on dirty scheduler
2016-12-28Fix VM global GC info for dirty schedulersRickard Green
2016-11-23Merge branch 'maint'Rickard Green
* maint: Update etp-commands for dirty schedulers Fix scheduling of system tasks on processes executing dirty Fix call time tracing with dirty schedulers Fix send of exit signal to process executing dirty Fix dirty scheduler process priority Fix alloc-util hard-debug Silence debug warning when no beam jump table is used with dirty schedulers Fix check_process_code() when NifExport is in use Fix GC when NifExport is in use Fix saving of original arguments when rescheduling via NifExport Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_nif.c
2016-11-22Fix GC when NifExport is in useRickard Green
2016-11-17erts: Fix all -Wundef errorsSverker Eriksson
2016-09-14Merge branch 'maint'Henrik Nord
Conflicts: OTP_VERSION
2016-09-14Merge branch 'maint-19' into maintHenrik Nord
2016-09-14Ensure we dont use an invalid live heap fragment pointerRickard Green