aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2016-10-14erts: Replace unsafe Module.first_hipe_refSverker Eriksson
with hash table mod2mfa_tab
2016-10-14erts: Disable DBG_TRACE_MFA for debug buildSverker Eriksson
2016-10-14erts: Cleanup hipe trampoline codeSverker Eriksson
2016-10-14erts: Remove dead alloc stats in hipe_amd64.cSverker Eriksson
erlang:system_info({allocator, exec_alloc}) have stats if we need it.
2016-10-14erts: Remove code_SUITE:make_stub and make_stub_many_funsSverker Eriksson
Hard to unit test now when it takes a magic HipeLoaderState as argument. All hipe testing should be enough exercise for code:make_stub_module.
2016-10-14erts: Let code:make_stub_module raise 'notsup'Sverker Eriksson
if hipe is disabled. Makes the code simpler to just ifdef away a lot of hipe stuff.
2016-10-14erts: Fix bug in stack walk on riscSverker Eriksson
Symptom: Got ra==NULL at nsp==nsp_end when running basic_SUITE:basic_arith on arm why has this not been detected before?
2016-10-14erts: Fix old leak for ppc hipe codeSverker Eriksson
* Use erts_alloc(ERTS_ALC_T_HIPE_EXEC,_) * Each module has its own trampolines
2016-10-14erts: Fix old leak for arm hipe codeSverker Eriksson
* Use erts_alloc(ERTS_ALC_T_HIPE_EXEC,_) * Each module has its own trampolines * Stubs do not use trampolines, they do their own long jumps.
2016-10-14erts: Fix old leak of sparc hipe codeSverker Eriksson
2016-10-14erts: Fix old leak of hipe code on x86 32-bitSverker Eriksson
2016-10-14erts: Enable exec_alloc for all hipe architecturesSverker Eriksson
For non-amd64 it's a "normal" allocator with a wrapper around mseg_alloc to call mprotect(PROT_EXEC).
2016-10-14erts: Remove debug printout for hipe loader stateSverker Eriksson
creation and destruction.
2016-10-14erts: Free hipe_refs and hipe_sdesc of a failed loadSverker Eriksson
2016-10-14erts: Refactor out hipe_purge_refs/sdescSverker Eriksson
from hipe_purge_module.
2016-10-14erts: Refactor hipe_loader_state_dtor into a true destructorSverker Eriksson
that is only called once. Basically switch hipe_free_loader_state and hipe_loader_state_dtor.
2016-10-14hipe,erts: Remove cached fun 'native_address'Sverker Eriksson
Did not work with purge and made worse by new purge strategy. Did yield terrible performance when fun thing is created *before* fun code is loaded. Like when receiving not yet loaded fun from other node. The cached 'native_address' in ErlFunThing will not be updated leading to mode switch and error_handler being called for every call to the fun from native code.
2016-10-14erts: Fix early hipe patch loadingSverker Eriksson
by introducing hipe_bifs:commit_patch_load/1 that creates the HipeModule.
2016-10-14erts: Move new hipe ref and sdesc lists to loader stateSverker Eriksson
2016-10-14erts: Use hipe_free_moduleSverker Eriksson
2016-10-14erts: Fill freed EXEC memory with illegal instructions on DEBUGSverker Eriksson
to get a nice SIGILL crash. For x86 and x86_64 only.
2016-10-14erts: Check hipe stack in check_process_codeMagnus Lång
This is part of commit 1bd508921dd93086b05e7d0038b816b36c421d86. I did not include the fun-checking as we have a new purge strategy for funs in OTP 20. That remains to be solved some other way for hipe.
2016-10-14Add a loader state for HiPE code loadingMagnus Lång
Just like the BEAM loader state (as returned by erlang:prepare_loading/2), the HiPE loader state is contained in a magic binary. Eventually, we will separate HiPE loading into a prepare and a finalise phase, like the BEAM loader, where the prepare phase will be implemented by hipe_unified_loader and the finalise phase be implemented in C by hipe_load.c and beam_load.c, making prepare side-effect free and finalise atomic. The finalise phase will be exposed through the erlang:finish_loading/1 API, just like the BEAM loader, as this will allow HiPE and BEAM modules to be mixed in the same atomic "commit". The usage of a loader state makes it easier to keep track of all resources allocated during loading, and will not only make it easy to prevent leaks when hipe_unified_loader crashes, but also paves the way for proper, leak-free, unloading of HiPE modules.
2016-10-10erts: Remove unused hipe_bifs:code_sizeSverker Eriksson
and hipe_bifs:update_code_size
2016-10-10erts: Improve hipe load/upgrade/purge machinerySverker Eriksson
A step toward better integration of hipe load and purge Highlights: * code_server no longer needs to call hipe_unified_loader:post_beam_load/1 Instead new internal function hipe_redirect_to_module() is called by loading BIFs to patch native call sites if needed. * hipe_purge_module() is called by erts_internal:purge_module/2 to purge any native code. * struct hipe_mfa_info redesigned and only used for exported functions that are called from or implemented by native code. A list of native call sites (struct hipe_ref) are kept for each hipe_mfa_info. * struct hipe_sdesc used by hipe_find_mfa_from_ra() to build native stack traces.
2016-10-10erts: Refactor module_start_stagingSverker Eriksson
with a copy_module() function.
2016-10-10erts: Refactor hipe_sdesc.summary into bit fieldsSverker Eriksson
2016-10-10erts: Refactor rename struct hipe_sdescSverker Eriksson
2016-10-10erts: Refactor rename structs hipe_mfa and hipe_refSverker Eriksson
2016-10-03Merge branch 'maint'Lukas Larsson
2016-09-27erts: Rename __errno in order to avoid conflict on openbsdLukas Larsson
2016-09-23Merge branch 'sverker/remove-nif-reload/OTP-13908'Sverker Eriksson
* sverker/remove-nif-reload: erts: Cuddle nif_SUITE:consume_timeslice erts: Remove old doc note for erlang:load_nif erts: Remove deprecated nif 'reload' feature erts: Fix trace_nif_SUITE to load nif lib only once
2016-09-22Merge branch 'sverker/include-erl_nif/PR-1171'Sverker Eriksson
* sverker/include-erl_nif/PR-1171: Use more correct delimiters for erl_nif.h include
2016-09-21Merge branch 'sverker/ets-load-factor/OTP-13903'Sverker Eriksson
* sverker/ets-load-factor: erts: Unify reduction count for ets:select stdlib: Cuddle ets_SUITE for valgrind stdlib: Fix ets_SUITE:smp_select_delete erts: Tweak ets grow/shrink to keep up at contention erts: Fix ets_SUITE:memory erts: Suppress failed ETS memory checks erts: Reduce ets hash load factor erts: Enable a smaller first hash segment for ets erts: Redesign ets with separate segment tables erts: Remove unnecessary access of 'is_resizing' erts: Add ErtsSizeofMember macro erts: Add ErtsContainerStruct_ for array members
2016-09-19Use more correct delimiters for erl_nif.h includeTuncer Ayaz
Anywhere but the beam sources we shouldn't #include "erl_nif.h", because what "erl_nif.h" does is: (1) fail to find it outside of -I dirs, (2) then treat it as if it was written like <erl_nif.h>. Using <erl_nif.h> skips (1). More information can be found in 6.10.2 of the C standard. Because the examples use "erl_nif.h", NIF projects in the Erlang ecosystem copy this verbatim and make the same mistake.
2016-09-19erts: Unify reduction count for ets:selectSverker Eriksson
to be per object as the other select-variants and not per table slot.
2016-09-19erts: Tweak ets grow/shrink to keep up at contentionSverker Eriksson
2016-09-19erts: Fix ets_SUITE:memorySverker Eriksson
by simply asking for the size of struct ext_segtab
2016-09-19erts: Suppress failed ETS memory checksSverker Eriksson
due to the grow/shrink hysteresis of the meta tables
2016-09-19erts: Reduce ets hash load factorSverker Eriksson
for faster lookup/insert/delete at the expense of about one word per object.
2016-09-19erts: Enable a smaller first hash segment for etsSverker Eriksson
2016-09-19erts: Redesign ets with separate segment tablesSverker Eriksson
* Keep it simple(r) * To prepare for both dynamic sized segments and segtabs
2016-09-19erts: Remove unnecessary access of 'is_resizing'Sverker Eriksson
in tables without write_concurrency and remove it totally #ifndef ERTS_SMP
2016-09-19erts: Add ErtsSizeofMember macroSverker Eriksson
(in case it matters)
2016-09-19erts: Cuddle nif_SUITE:consume_timesliceSverker Eriksson
2016-09-19erts: Remove deprecated nif 'reload' featureSverker Eriksson
and instead let erlang:load_nif/2 return {error, {reload, _}} before even trying to load the library if a NIF library has already been successfully loaded for the calling module instance.
2016-09-15Merge branch 'maint'Raimo Niskanen
2016-09-15Merge branch 'raimo/diffserv-socket-option/OTP-13582' into maintRaimo Niskanen
* raimo/diffserv-socket-option/OTP-13582: Tune 'tclass' semantics Implement IPV6_TCLASS
2016-09-15erts: Fix trace_nif_SUITE to load nif lib only onceSverker Eriksson
2016-09-15Merge branch 'maint'Björn Gustavsson
* maint: erts: Add nif_SUITE:t_on_load erts: Improve nif_SUITE:upgrade test Don't leak old code when loading a modules with an on_load function Conflicts: erts/preloaded/ebin/erts_code_purger.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/src/erts_code_purger.erl