aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src
AgeCommit message (Collapse)Author
2018-06-18Update copyright yearHenrik Nord
2018-05-23make: Don't call mkdir with empty argumentLukas Larsson
2018-04-09Fix makefile mkdir warningLukas Larsson
2018-02-13Merge branch 'maint'John Högberg
2018-02-13Fix size of fmt_double()'s format_str[] bufferMikael Pettersson
fmt_double() may write up to 8 characters into its format_str[] buffer, which however only has room for 7 characters. This case could be triggered by a call to erts_printf_format() with any floating-point format that also includes #, and + or a space, which may be uncommon, but a nif or driver could issue it.
2018-01-24Merge branch 'maint'Sverker Eriksson
2018-01-15erts: Fix buffer overflow bug in erts_printf %fSverker Eriksson
Sign character was not accounted for. Ex: float_to_list(-3.1265538967899625e+69, [{decimals,16}]).
2017-10-20Merge branch 'maint'Björn Gustavsson
* maint: Bump version of crash dumps to 0.4 Verify that binaries of different sizes are dumped correctly Don't dump literal areas that are not referenced at all Dump literals separately to avoid incomplete heap data Implement dumping of maps in crash dumps Buffer writing of crash dumps Conflicts: erts/emulator/beam/erl_alloc.types
2017-10-18Buffer writing of crash dumpsBjörn Gustavsson
Writing of crash dumps were done using unbuffered IO. This is slow since many small writes are done. Use a FILE* with an allocated buffer to obtain buffered IO. I wrote a small test program that created 50000 binaries of 200 bytes each and then created a crash dump. The crash dumping was an order of magnitude faster with buffered IO than without.
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-27erts: Fix debug emulator on windowsSverker Eriksson
Clear ethr_not_inited__ early (like on unix) to not get assertion in ethr_tsd_key_create("stacklimit")
2017-04-20erts: Fix erlexec to handle mismatch in sysconf and proc fsLukas Larsson
This behaviour has been seen when using docker together with --cpuset-cpus.
2017-04-07Stack guard for PCRERickard Green
2016-12-20Workaround for buggy android implementation of PTHREAD_STACK_MINRickard Green
2016-11-17erts: Add cbprintf for Callback PrintingSverker Eriksson
2016-06-22Improve accuracy of timeouts using premature timeoutsRickard Green
Improve accuracy of timeouts using a premature timeout then return to sleep with a shorter timeout just before requested timeout. This approach is only used on certain platforms where we know it improves the accuracy of the timeouts, e.g. MacOS X.
2016-05-10Remove conditional dirty schedulers APIRickard Green
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-04Merge tag 'OTP-18.3.1'Henrik Nord
=== OTP-18.3.1 === Changed Applications: - erts-7.3.1 - inets-6.2.1 - mnesia-4.13.4 Unchanged Applications: - asn1-4.0.2 - common_test-1.12 - compiler-6.0.3 - cosEvent-2.2 - cosEventDomain-1.2 - cosFileTransfer-1.2 - cosNotification-1.2.1 - cosProperty-1.2 - cosTime-1.2.1 - cosTransactions-1.3.1 - crypto-3.6.3 - debugger-4.1.2 - dialyzer-2.9 - diameter-1.11.2 - edoc-0.7.18 - eldap-1.2.1 - erl_docgen-0.4.2 - erl_interface-3.8.2 - et-1.5.1 - eunit-2.2.13 - gs-1.6 - hipe-3.15 - ic-4.4 - jinterface-1.6.1 - kernel-4.2 - megaco-3.18 - observer-2.1.2 - odbc-2.11.1 - orber-3.8.1 - os_mon-2.4 - ose-1.1 - otp_mibs-1.1 - parsetools-2.1.1 - percept-0.8.11 - public_key-1.1.1 - reltool-0.7 - runtime_tools-1.9.3 - sasl-2.7 - snmp-5.2.2 - ssh-4.2.2 - ssl-7.3 - stdlib-2.8 - syntax_tools-1.7 - test_server-3.10 - tools-2.8.3 - typer-0.9.10 - webtool-0.9.1 - wx-1.6.1 - xmerl-1.3.10 Conflicts: OTP_VERSION erts/emulator/test/save_calls_SUITE.erl erts/vsn.mk
2016-03-16Fix premature timeouts for ethread events on LinuxRickard Green
2016-03-15update copyright-yearHenrik Nord
2016-02-02erts: Add power saving cpu feature tests and use themLukas Larsson
2016-02-02erts: Add rdtscp instruction checkLukas Larsson
2015-09-09Merge branch 'maint'Rickard Green
* maint: Add configure switch --disable-saved-compile-time Fix ethread events with timeout Improve choice of clock sources at build time
2015-08-27Fix ethread events with timeoutRickard Green
Lots of pthread platforms unnecessarily falled back on the pipe/select solution. This since we tried to use the same monotonic clock source for pthread_cond_timedwait() as used by OS monotonic time. This has been fixed on most platforms by using another clock source. Darwin can however not use pthread_cond_timedwait() with monotonic clock source and has to use the pipe/select solution. On darwin we now use select with _DARWIN_UNLIMITED_SELECT in order to be able to handle a large amount of file descriptors.
2015-07-10ose: Remove all code related to the OSE portLukas Larsson
The OSE port is no longer supported and this commit removed it and any changes related to it. The things that were general improvements have been left in the code.
2015-06-24erts: Remove halfword relative printfBjörn-Egil Dahlberg
2015-06-24erts: Remove halfword in lib_srcBjörn-Egil Dahlberg
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-16erts: Do not preallocate too large event poolBjörn-Egil Dahlberg
A pool size of 4000 is too excessive for the common case. Change ERTS_TS_EV_ALLOC_DEFAULT_POOL_SIZE to 2048 Change ERTS_TS_EV_ALLOC_POOL_SIZE to 32
2015-03-20Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ... Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_asm.beam bootstrap/lib/compiler/ebin/compile.beam bootstrap/lib/kernel/ebin/auth.beam bootstrap/lib/kernel/ebin/dist_util.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/inet_db.beam bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/kernel/ebin/inet_res.beam bootstrap/lib/kernel/ebin/os.beam bootstrap/lib/kernel/ebin/pg2.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/erl_tar.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/file_sorter.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/random.beam bootstrap/lib/stdlib/ebin/supervisor.beam bootstrap/lib/stdlib/ebin/timer.beam erts/aclocal.m4 erts/emulator/beam/bif.c erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_db_hash.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_thr_progress.c erts/emulator/beam/utils.c erts/emulator/sys/unix/sys.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/init.beam erts/preloaded/src/erts_internal.erl lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl lib/diameter/src/base/diameter_lib.erl lib/kernel/src/os.erl lib/ssh/test/ssh_basic_SUITE.erl system/doc/efficiency_guide/advanced.xml
2015-03-20Implement ethread events with timeoutRickard Green
2014-12-19Merge branch 'lukas/erts/crashdump_improvements/OTP-12377'Lukas Larsson
* lukas/erts/crashdump_improvements/OTP-12377: erts: Make main thread safe from pipe closed event erts: Improve crash dumps erts: Rename sys_sigset to sys_signal erts: Introduce thread suspend functions erts: Remove usage of QUANTIFY signal erts: Add support for thread names ets: Increase data available in crash dumps and ets:info erts: Start compilation of beam_emu earlier
2014-12-19erts: Introduce thread suspend functionsLukas Larsson
These functions allow any thread to suspend any other thread immediately and then resume all threads. This is useful when doing a crash dump in order to get a more accurate picture of what state the system is in.
2014-12-19erts: Add support for thread namesLukas Larsson
2014-12-16Merge branch 'lukas/erts/non-blocking-shell'Lukas Larsson
* lukas/erts/non-blocking-shell: erts: Fix big-endian issue with printf_putc
2014-12-15erts: Fix big-endian issue with printf_putcLukas Larsson
On little-endian machines, doing &int will give the smallest byte which is what we want to give to write. But on big-endian it will give the highest byte, which will always be \000 here which results in write never doing any writes. So we have to cast c to an unsigned char before passing it to write.
2014-12-12Merge branch 'lukas/erts/non-blocking-shell'Lukas Larsson
* lukas/erts/non-blocking-shell: erts: Make sure IOV_MAX is enforced for writev erts: Make erts_printf work with non-blocking
2014-11-04erts: Make erts_printf work with non-blockingLukas Larsson
Now that stdout can be set as non-blocking by the ttsl driver we can no longer use putc and friends for the stdout/stderr streams. Therefore we fallback on write. OTP-12239
2014-10-28Merge branch 'maint'Bruce Yinhe
2014-10-19Fix bug in FreeBSD topology detection codePaul Guyot
Code incorrectly relied on undefined C behavior. Clang and gcc 4.9 do not behave as code expected. This affected cores and processors detection on FreeBSD.
2014-09-17erts: Add icount build type for opcode counterBjörn-Egil Dahlberg
Enables ERTS_OPCODE_COUNTER_SUPPORT.
2014-06-30erts: Separate ethread inlining from ethread.hBjörn-Egil Dahlberg
The commit adb5dc0090bc419e2c4c1250653badbddeb6263b (ETHR_FORCE_INLINE) broke some platforms without adequate thread support.
2014-06-13Merge branch 'sverk/ethr_aux-cache-align-bug' into maintSverker Eriksson
* sverk/ethr_aux-cache-align-bug: erts: Fix cache line alignment bug for ts_event_pool
2014-06-06Merge branch 'jjhoo/mingw_compile_fix_forceinline/OTP-11945' into maintRickard Green
* jjhoo/mingw_compile_fix_forceinline/OTP-11945: Do not use __always_inline__ attribute unless gcc vsn >= 3.1.1 Add ETHR_FORCE_INLINE define to hide compiler specific directives
2014-06-04erts: Fix cache line alignment bug for ts_event_poolSverker Eriksson
2014-03-21Raspberry PI / Android a minimal cross-compile configurationDmitry Kolesnikov
Enable a cross compile Erlang/OTP platform to Android or Raspberry PI using Android NDK. Port emulator and core application to support target HW platform. Exclude any add-on services required for OTP platform deployment into target hardware due to device fragmentation and jail-break requirements. * fix erts/emulator/beam/sys.h Disable redefinition of __noreturn macro * port erts/emulator/sys/unix/erl_child_setup.c Use techniques proposed by https://code.google.com/p/erlang4android to access system properties * fix erts/emulator/sys/unix/erl_unix_sys_ddll.c The static linking of emulator cannot find dlerror(), dlopen() symbols * port erts/emulator/sys/unix/sys.c make path to shell configurable at build time * port erts/etc/common/Makefile.in disable librt for *-linux-androideabi * port erts/lib_src/pthread/ethread.c Use techniques proposed by https://code.google.com/p/erlang4android to disable emulator crash if kernel threads are on. Replace unreliable pthread_sigmask() by sigprocmask() * port lib/erl_interface/src/connect/ei_connect.c Disable call to undefined gethostid() * port lib/erl_interface/src/connect/ei_resolve.c Use gethostbyname_r() on Android platform
2014-02-28Add ETHR_FORCE_INLINE define to hide compiler specific directivesJani Hakala
Some win32 specific code does not compile with gcc (mingw-w64) since '__forceinline' is not supported by gcc. This can be avoided by defining a new macro ETHR_FORCE_INLINE similar to ETHR_INLINE.