aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_bif_list.m4
AgeCommit message (Collapse)Author
2018-01-03Fix bug in hipe primop bs_put_utf8Sverker Eriksson
by preventing it from doing GC, which generated code relies on.
2017-11-03Fix bug in hipe for <<X/utf32>>Sverker Eriksson
by introducing new primop 'is_unicode' with no exception (ab)use and no GC. Replaces bs_validate_unicode which is kept for backward compat for now.
2017-11-03Prevent hipe_bs_validate_unicode from doing GCSverker Eriksson
Fix for x86_64 only. The calling native code can not handle a GC as it has a raw pointer where to write the binary data. If a GC happens the data (utf32) will be written to the old deallocated heap.
2017-01-12Perform potentially long GC on dirty schedulers if availableRickard Green
2017-01-12Support for dirty BIFsRickard Green
2016-08-31Remove old purge strategyRickard Green
2016-06-30hipe: Fix bug in trap frame allocation wrappersMagnus Lång
The trap frame allocation wrappers occasionally call the garbage collector, even though built-in functions are not supposed to. On non-{x86,amd64} platforms, HiPE was optimising the BIF wrapper interface on the basis that BIFs do not GC. So, when hipe_reserve_beam_trap_frame called the garbage collector, the state in the PCB was stale and corruption happened. Now, these particular BIFs are reclassified as GC BIFs. Unfortunately, in order to do that we needed to introduce a gc_bif_interface_3 macro in every hipe_$ARCH_bifs.m4 file.
2016-03-15update copyright-yearHenrik Nord
2015-11-27hipe: test unit size match in bs_appendMagnus Lång
This feature was previously missing and expressions such as <<<<1:1>>/binary>> would succeed construction when compiled with HiPE. A primop is_divisible is introduced to handle the case when the unit size is not a power of two.
2015-08-28erts: Fix hipe bug for maps:merge/2Sverker Eriksson
Add forgotten HIPE_WRAPPER_BIF_DISABLE_GC which could lead to stack-heap overrun if unlucky with the yielding during maps:merge when called by native hipe code.
2015-08-28erts: Beautify hipe wrapper macroSverker Eriksson
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-06Merge branch 'sverk/hipe_match_wbin/OTP-12667'Sverker Eriksson
* sverk/hipe_match_wbin/OTP-12667: erts: Add debug assertions for match state sanity hipe: Add test for matching of writable binary erts,hipe: Optimize away calls to emasculate_binary erts,hipe: Fix bug in binary matching of writable binary Conflicts: erts/emulator/hipe/hipe_bif0.c
2015-04-20erts,hipe: Fix bug in binary matching of writable binarySverker Eriksson
Seen symptom: Hipe compiled code with <<C/utf8, ...>> = Bin does sometimes not match even though Bin contains a valid utf8 character. There might be other possible binary matching symptoms, as the problem is not utf8 specific. Problem: A writable binary was not "emasculated" when the matching started (as it should) by the hipe compiled code. Fix: Add a new primop emasculate_binary(Bin) that is called when a matchstate is created. ToDo: There are probably room for optimization. For example only call emasculate_binary if ProcBin.flags is set.
2014-08-29erts: Implement yielding for distributed send of large messagesSverker Eriksson
Use same mechanism as term_to_binary to yield while encoding large messages for distributed send.
2014-06-05Replace erlang:binary_to_term() Erlang wrappersRickard Green
Replace the 'erlang:binary_to_term/1' and 'erlang:binary_to_term/2' Erlang wrappers taking care of failure after yield with management of this in the hidden yield BIF.
2014-05-22Make binary BIFs converting from lists yield on large inputRickard Green
- erlang:list_to_binary/1 - erlang:iolist_to_binary/1 - erlang:list_to_bitstring/1 - binary:list_to_bin/1
2014-05-22Make binary BIFs converting to lists yield on large inputRickard Green
- erlang:binary_to_list/1 - erlang:binary_to_list/3 - erlang:bitstring_to_list/1
2014-02-25erts: Fix heap overwrite by hipe "trap frames" when GC is disabledSverker Eriksson
by trapping BIFs like term_to_binary and binary_to_term.
2013-11-18Execution of system tasks in context of another processRickard Green
A process requesting a system task to be executed in the context of another process will be notified by a message when the task has executed. This message will be on the form: {RequestType, RequestId, Pid, Result}. A process requesting a system task to be executed can set priority on the system task. The requester typically set the same priority on the task as its own process priority, and by this avoiding priority inversion. A request for execution of a system task is made by calling the statically linked in NIF erts_internal:request_system_task(Pid, Prio, Request). This is an undocumented ERTS internal function that should remain so. It should *only* be called from BIF implementations. Currently defined system tasks are: * garbage_collect * check_process_code Further system tasks can and will be implemented in the future. The erlang:garbage_collect/[1,2] and erlang:check_process_code/[2,3] BIFs are now implemented using system tasks. Both the 'garbage_collect' and the 'check_process_code' operations perform or may perform garbage_collections. By doing these via the system task functionality all garbage collect operations in the system will be performed solely in the context of the process being garbage collected. This makes it possible to later implement functionality for disabling garbage collection of a process over context switches. Newly introduced BIFs: * erlang:garbage_collect/2 - The new second argument is an option list. Introduced option: * {async, RequestId} - making it possible for users to issue asynchronous garbage collect requests. * erlang:check_process_code/3 - The new third argument is an option list. Introduced options: * {async, RequestId} - making it possible for users to issue asynchronous check process code requests. * {allow_gc, boolean()} - making it possible to issue requests that aren't allowed to garbage collect (operation will abort if gc should be needed). These options have been introduced as a preparation for parallelization of check_process_code operations when the code_server is about to purge a module.
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-03Use ptab functionality also for portsRickard Green
2012-11-23Merge branch 'maint'Björn-Egil Dahlberg
2012-11-23Update copyright yearsBjörn-Egil Dahlberg
2012-11-14Merge remote branch 'upstream/maint'Ingela Anderton Andin
Conflicts: lib/ssl/src/ssl_connection.erl
2012-11-13erts: Fix compile error on solaris in generated hipe_amd64_bifs.SSverker Eriksson
2012-02-09hipe,erts: Debug support for native call traceSverker Eriksson
2011-11-17hipe,erts: Allow hipe without floating point exceptionsSverker Eriksson
2011-11-13Merge branch 'rickard/alloc-opt/OTP-7775'Rickard Green
* rickard/alloc-opt/OTP-7775: Optimize memory allocation Conflicts: erts/aclocal.m4 erts/emulator/hipe/hipe_bif_list.m4 erts/preloaded/ebin/erl_prim_loader.beam erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/init.beam erts/preloaded/ebin/otp_ring0.beam erts/preloaded/ebin/prim_file.beam erts/preloaded/ebin/prim_inet.beam erts/preloaded/ebin/prim_zip.beam erts/preloaded/ebin/zlib.beam
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-10-26erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0Sverker Eriksson
2011-10-26erts-hipe: Make some primops use new BIF calling conventionSverker Eriksson
These primops use the standard_bif_interface_X macros in hipe_bif_list.m4 and must therefor be implemented as bifs for things to work. Maybe there is room for optimization here to call the primops more directly with arguments in registers without having to push them on stack to emulate bif calls.
2011-02-14Cleanup tagsKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP