aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2012-08-22Fix assembler comments for hipe on ppcSverker Eriksson
Change to preprocessor comments to work on all OS.
2012-08-21Fix init:restart with hipelibsSverker Eriksson
This is a workaround for init:restart. The root problem is that delete/purge_module does not clean up internal hipe bookkeeping (hipe_mfa_info's) properly. Symptom: Execution of deallocated beam code.
2012-08-21Fix bug in ets:test_ms/2.Sverker Eriksson
copy_shallow was called when using '$_'
2012-08-20Merge branch 'pan/unicode_home/OTP-10160' into maintPatrik Nyblom
* pan/unicode_home/OTP-10160: Teach release_handler_SUITE about file:native_name_encoding/0 Add documetation about Unicode in environment Make get/putenv and erlexec understand Unicode
2012-08-20Merge branch 'pan/werl_caret/OTP-10181' into maintPatrik Nyblom
* pan/werl_caret/OTP-10181: Teach caret to appear correctly after focus loss
2012-08-20Merge branch 'slf/slf-relocate-dtrace-N-probes/OTP-10189' into maintFredrik Gustafsson
* slf/slf-relocate-dtrace-N-probes/OTP-10189: Relocate bodies of DTrace probes to the statically-linked VM.
2012-08-20Merge branch 'psi/fix-clever-mktime/OTP-10187' into maintFredrik Gustafsson
* psi/fix-clever-mktime/OTP-10187: Fix use of "clever" mktime
2012-08-17Relocate bodies of DTrace probes to the statically-linked VM.Scott Lystig Fritchie
Due to various operating systems (in both the DTrace and SystemTap worlds) not fully supporting DTrace probes (or SystemTap-compatibility mode probes) in shared libraries, we relocate those probes to the statically-linked virtual machine. This could be seen as pollution of the pristine VM by a (yet) experimental feature. However: 1. This code can be eliminated completely by the C preprocessor. 2. Leaving the probes in the dyntrace NIF shared library simply does not work correctly on too many platforms. *Many* thanks to Macneil Shonle at Basho for assisting when my RSI-injured fingers gave out. Tested on: * CentOS 5, SystemTap 1.3 * Solaris 10 (note) * Solaris 11 * OpenIndiana 151 * SmartOS 20120809T221258Z * FreeBSD 9.0-RELEASE (note) I had hoped to be able to test CentOS 6 + SystemTap 1.7, but the details of dealing with all dependencies for a 2.6.32-279.5.1.el6.x86_64 kernel are too time consuming right now. (note: Solaris 10 and FreeBSD 9.0-RELEASE can take a long time to compile)
2012-08-16Allow mixed IPv4 and IPv6 addresses to sctp_bindxTomas Abrahamsson
Also allow mixed address families to bind, since the first address on a multihomed sctp socket must be bound with bind, while the rest are to be bound using sctp_bindx. At least Linux supports adding address of mixing families. Make inet_set_faddress function available also when HAVE_SCTP is not defined, since we use it to find an address for bind to be able to mix ipv4 and ipv6 addresses.
2012-08-16Add checks for in6addr_any and in6addr_loopbackTomas Abrahamsson
These variables are normally declared by <netinet/in.h>, but for instance not on Windows 7, SDK 7.1. Work around that by using IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT if present, fallback to using :: and ::1.
2012-08-16Fix SCTP multihomingTomas Abrahamsson
Setting several ip addresses for an SCTP socket worked only for IPv4 on Linux. For IPv6 and for other for instance Solaris and FreeBSD, it failed with badarg for both IPv4 and IPv6. For the first address specified to gen_sctp:open, bind is now called, while for any following addresses, sctp_bindx is called, repeatedly, with one address at a time. Previously, sctp_bindx was called for all addresses in one go, with the addresses in reverse order, and bind was not called at all if more than one address was specified. Both Solaris and FreeBSD requires bind to have been called before calling sctp_bindx, and FreeBSD additionally allows at most one address at a time in the call to sctp_bindx. For some versions of Linux, for instance SuSE 10, the port can be 0 only for the call to bind but not for subsequent calls to sctp_bindx, so replace with the port number assigned by the operating system.
2012-08-14Teach caret to appear correctly after focus lossPatrik Nyblom
Incorrect window was used to calculate x position.
2012-08-14Make get/putenv and erlexec understand UnicodePatrik Nyblom
Putenv and getenv needs to convert to the proper environment strings in Unicode depending on platform and user settings for filename encoding. Also erlexec needs to pass environment strings in an appropriate way for kernel to pick up. All environment strings on the command line, as well as home directory, is now passed in UTF8 on windows and in whatever encoding you have on Unix, kernel tries to convert all parameters and environments from UTF8 before making strings.
2012-08-14Fix corrupted binaries in compressed ETS tablesSverker Eriksson
2012-08-14Make ETS compile with #define DEBUG_CLONESverker Eriksson
2012-08-01Fix support for leap seconds-aware timezonesPiotr Sikora
erlang:universaltime_to_localtime is leap seconds-aware (since 2008), however erlang:localtime_to_universaltime is not, which gives surprising results on systems configured with leap seconds-aware timezones: 1> erlang:universaltime_to_localtime({{2012,1,1},{0,0,0}}). {{2012,1,1},{0,0,0}} 2> erlang:localtime_to_universaltime({{2012,1,1},{0,0,0}}). {{2012,1,1},{0,0,24}} and completely breaks calendar:local_time_to_universal_time_dst: 3> calendar:local_time_to_universal_time_dst({{2011,1,1},{0,0,0}}). [] Signed-off-by: Piotr Sikora <[email protected]>
2012-08-01Fix use of "clever" mktimePiotr Sikora
Commit 1eef765 introduced regression (conditional _always_ evaluates to true) in which erlang:localtime_to_universaltime/2 stopped working on systems configured with timezone without DST (i.e. UTC) on *BSD platforms: 1> erlang:localtime_to_universaltime({{2012,1,1},{0,0,0}}, true). ** exception error: bad argument Signed-off-by: Piotr Sikora <[email protected]>
2012-07-31Merge branch 'rickard/proc-lock-queues/OTP-10163' into maintRickard Green
* rickard/proc-lock-queues/OTP-10163: Use static allocation of process lock queues
2012-07-31Merge branch 'rickard/dealloc/OTP-10162' into maintRickard Green
* rickard/dealloc/OTP-10162: Improve the enqueue operation of delayed dealloc Implement delayed aux work wake up
2012-07-31erlsrv: gracefully stop emulator on Windows shutdownJan Kloetzke
Windows will send the SERVICE_CONTROL_SHUTDOWN event to the service control handler when shutting down the system. Instead of ignoring the event, erlsrv will now invoke the stop action. Likewise, the Erlang emulator (and it's port drivers) must not quit upon reception of the CTRL_SHUTDOWN_EVENT event in the console control handler.
2012-07-31Use static allocation of process lock queuesRickard Green
By using statically allocated lock queues there is no longer any need for locking corresponding pix lock when process locks have been transferred after a wait. This costs us 3 words extra in process structure, but improves performance during contention.
2012-07-31Improve the enqueue operation of delayed deallocRickard Green
The enqueue operation have been re-written to behave better during heavy contention by spreading writes over multiple locations. This enqueue operation also take advantage of the delayed aux work wake up functionality and can by this omit one memory barrier.
2012-07-31Implement delayed aux work wake upRickard Green
By using a delayed aux work wake up approach, a memory barrier can be omitted in the delayed dealloc enqueue operation. The amount of operations, on the potentially contended, wake up structure is also reduced.
2012-07-18Merge branch 'ms/correct-formating-in-exit' into maintHenrik Nord
* ms/correct-formating-in-exit: Correct formating in exit error messages OTP-10148
2012-07-17Add test for floating-point output to float_SUITE.Mike Sperber
This catches endianness problems, such as recently reported for ARMs.
2012-07-06Merge branch 'sz/dtrace-message-send-fix' into maintHenrik Nord
* sz/dtrace-message-send-fix: DTrace bug in message-send OTP-10142
2012-07-05Fix various code typos for R15B02Tuncer Ayaz
2012-07-04Merge branch 'sverk/hipe-arm-fix' into maintSverker Eriksson
* sverk/hipe-arm-fix: hipe_arm.c: remove dead code Workaround gcc bug affecting ARM debug build Fix compile error of HIPE enabled DEBUG emulator for ARM Fix hipe bif calling bug on ARM Add armv7l and armv5tejl as a recognized ARM architectures OTP-10137
2012-06-25hipe_arm.c: remove dead codeMikael Pettersson
erts/emulator/hipe/hipe_arm.c started out as a clone of hipe_ppc.c, with #ifdefs to select ARM-specific code. Somehow those #ifdefs never got cleaned out, resulting in fairly ugly-looking code. This eliminates the #ifdefs, deletes dead PowerPC-specific code, and keeps only the ARM-specific code. I've verified that the exact same assembly code is generated for hipe_arm.c before and after this patch (if you compile without -g, with -g there are unavoidable changes to the debug data). Signed-off-by: Mikael Pettersson <[email protected]>
2012-06-25Workaround gcc bug affecting ARM debug buildSverker Eriksson
2012-06-25Fix compile error of HIPE enabled DEBUG emulator for ARMSverker Eriksson
2012-06-25Fix hipe bif calling bug on ARMSverker Eriksson
Bug introduced in R15.
2012-06-20Merge branch 'rickard/thr-prgr-use/OTP-10116' into maintRickard Green
* rickard/thr-prgr-use/OTP-10116: Fix faulty use of thread progress in handle_aux_work()
2012-06-18Fix faulty use of thread progress in handle_aux_work()Rickard Green
As an optimization old thread progress data was kept and used in handle_aux_work() in erl_process.c. This could cause memory to be deallocated at a later time than intended, which is quite harmless. This has, however, now been fixed.
2012-06-08Merge branch 'lukas/otp/install_with_whitespace/OTP-10107' into maintLukas Larsson
* lukas/otp/install_with_whitespace/OTP-10107: Update to work with space in include path Update to work with whitespace in exec path
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-06-04Merge branch 'bjorn/remove-hybrid-heap/OTP-10105' into maintLukas Larsson
* bjorn/remove-hybrid-heap/OTP-10105: 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
2012-05-31inet_drv.c: Set sockaddr lengths in inet_set_[f]addressTomas Abrahamsson
Set appropriate values for the sockaddr length fields---sai.sin_len and sai6.sin6_len---if those fields exist; rely on the NO_SA_LEN configure check to see if they exist. The length field exists on at least FreeBSD, and there it needs to have a proper value for instance in the call to sctp_bindx, or else that will fail with EINVAL.
2012-05-25Merge branch 'sverk/valgrind-async-thr-suppression' into maintSverker Eriksson
* sverk/valgrind-async-thr-suppression: erts: Add valgrind suppression for async thread bound data
2012-05-25Correct valgrind suppression for putenvSverker Eriksson
2012-05-11DTrace bug in message-sendzheng siyao
dtrace doesn't print sender pid and receiver pid in message related probe correctly, it truncates pid string to 7 characters on 64bit platform(or 3 characters on 32bit platform). The dtrace related code did not set the string length correctly, it sets the string length to the length of a pointer rather than the buffer length.
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-05-10Remove the hipe_bifs:show_message_area/0 BIFBjörn Gustavsson
2012-05-10Remove support for erlang:system_info(global_heaps_size)Björn Gustavsson
2012-05-10Remove the erlang:garbage_collect_message_area/0 BIFBjörn Gustavsson
2012-05-10Remove workarounds for hybrid and shared heaps in test suitesBjörn Gustavsson
2012-05-09Correct formating in exit error messagesMichael Santos
Ensure displayed sizes are not negative.
2012-05-04gen_tcp: Make setopts(S,[{active,once}]) try a readPatrik Nyblom
This significantly reduces latency for tcp servers with high load, as we need not go into poll to get the next message. Maximum throughput may increase between 4 to 6 times compared to R15B.
2012-04-30Merge branch 'egil/fix-port-io-statistics/OTP-10073' into maintBjörn-Egil Dahlberg
* egil/fix-port-io-statistics/OTP-10073: erts: Add port-I/O statistics for active once/true
2012-04-27erts: Remove unused variableBjörn-Egil Dahlberg