aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/time.c
AgeCommit message (Collapse)Author
2017-05-04Update copyright yearRaimo Niskanen
2017-04-24Fix assert in dbg_verify_empty_later_slots()Rickard Green
2017-04-18Fix of later timer wheelRickard Green
2017-04-18Minimum timeout position in each timer wheelRickard Green
Minimum known timeout position is saved in bot far and near wheel. This information is used to avoid scanning from current position in the cases were we know the minimum timeout position.
2017-04-18Manage timers to trigger at once in a slot similar to other timersRickard Green
2017-04-18Introduce timer slot range countersRickard Green
Timer counters for ranges of slots in order to be able to avoid inspecting large ranges of slots without timers.
2017-04-18Timer wheel divided into a "soon wheel" and a "later wheel"Rickard Green
The old single wheel implementation handled about 65 seconds. The new dual wheel implementation handles more than 37 hours. The dual wheels have also been shrunk compared to the single wheel, so the total memory consumption for timer wheels have been cut in half.
2017-04-18Remove unnecessary cancel callback from timer-wheel timersRickard Green
2017-04-18Rearrange timer struct fields in order to simplifyRickard Green
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).
2016-02-02erts: Add microstate accountingLukas Larsson
Microstate accounting is a way to track which state the different threads within ERTS are in. The main usage area is to pin point performance bottlenecks by checking which states the threads are in and then from there figuring out why and where to optimize. Since checking whether microstate accounting is on or off is relatively expensive if done in a short loop only a few of the states are enabled by default and more states can be enabled through configure. I've done some benchmarking and the overhead with it turned off is not noticible and with it on it is a fraction of a percent. If you enable the extra states, depending on the benchmark, the ovehead when turned off is about 1% and when turned on somewhere inbetween 5-15%. OTP-12345
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-09Callback timerRickard Green
2015-05-12Timer fixes, documentation, and test casesRickard Green
2015-05-08Optimized timer implementationRickard Green
2015-05-06Misc time improvementsRickard Green
- Possibility to chose different clock sources - Improved mach clock usage - Improved linux clock_gettime() usage - ...
2015-03-26Misc fixesRickard Green
2015-03-24Fix zero timout timersRickard Green
2015-03-20Multiple timer wheelsRickard Green
2015-03-20Introduce a new time APIRickard Green
The old time API is based on erlang:now/0. The major issue with erlang:now/0 is that it was intended to be used for so many unrelated things. This tied these unrelated operations together and unnecessarily caused performance, scalability as well as accuracy, and precision issues for operations that do not need to have such issues. The new API spreads different functionality over multiple functions in order to improve on this. The new API consists of a number of new BIFs: - erlang:convert_time_unit/3 - erlang:monotonic_time/0 - erlang:monotonic_time/1 - erlang:system_time/0 - erlang:system_time/1 - erlang:time_offset/0 - erlang:time_offset/1 - erlang:timestamp/0 - erlang:unique_integer/0 - erlang:unique_integer/1 - os:system_time/0 - os:system_time/1 and a number of extensions of existing BIFs: - erlang:monitor(time_offset, clock_service) - erlang:system_flag(time_offset, finalize) - erlang:system_info(os_monotonic_time_source) - erlang:system_info(time_offset) - erlang:system_info(time_warp_mode) - erlang:system_info(time_correction) - erlang:system_info(start_time) See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2012-07-05erts: Fixate timer wheel resultion at compile time if possibleSverker Eriksson
2011-12-02Fix time typesRickard Green
2011-11-13Optimize memory allocationRickard Green
A number of memory allocation optimizations have been implemented. Most optimizations reduce contention caused by synchronization between threads during allocation and deallocation of memory. Most notably: * Synchronization of memory management in scheduler specific allocator instances has been rewritten to use lock-free synchronization. * Synchronization of memory management in scheduler specific pre-allocators has been rewritten to use lock-free synchronization. * The 'mseg_alloc' memory segment allocator now use scheduler specific instances instead of one instance. Apart from reducing contention this also ensures that memory allocators always create memory segments on the local NUMA node on a NUMA system.
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.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2010-12-29Teach timer-wheel slots to use double linked listsBjörn-Egil Dahlberg
Conflicts: erts/emulator/beam/erl_time.h
2010-12-20Remove timer-thread implementationBjörn-Egil Dahlberg
2010-12-20Refactor timer interfaceBjörn-Egil Dahlberg
2010-12-20Teach timer-wheel to keep min timeBjörn-Egil Dahlberg
Increases the speed of the timer-wheel
2010-12-15Use new atomic types in emulatorRickard Green
2010-09-10Use mutex instead of rwlockRickard Green
Use mutex instead of rwlock since the read lock is more or less unused and it can be quite contended.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP