aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2016-10-26Merge branch 'master' into sverker/hipe-fun-purgeSverker Eriksson
2016-10-26erts: Avoid delayed fun undef raceSverker Eriksson
Avoid suspending fun caller not just if purge is already done but also if purge of another module has started. Another purge of the same module again cannot happen as making current to old transition includes thread progress.
2016-10-25Merge branch 'maint'Sverker Eriksson
2016-10-25erts: Correct docs for driver_selectSverker Eriksson
2016-10-21erts: Use mprotect for hipe on all arch except x86_64Sverker Eriksson
Only x86_64 needs to reserve low virtual memory for its amd64 small code model.
2016-10-20erts: Refactor hipe config testSverker Eriksson
Just merge the two if's
2016-10-20Merge branch 'kostis/hipe_bifs-add_ref/PR-1205'Sverker Eriksson
2016-10-19Merge branch 'maint'Raimo Niskanen
2016-10-19Merge branch ↵Raimo Niskanen
'raimo/erts/fix-configure-to-check-in-libsct-for-sctp-funcs/ERL-262/OTP-13956' into maint * raimo/erts/fix-configure-to-check-in-libsct-for-sctp-funcs/ERL-262/OTP-13956: Configure enable libsctp dependency Revert "Check libsctp for sctp funcs in configure.in"
2016-10-19Merge branch 'gsantomaggio/erts/system_info_atoms/PR-1198/OTP-13976'Lukas Larsson
* gsantomaggio/erts/system_info_atoms/PR-1198/OTP-13976: erts: Fix some system_info docs inconsistencies Add system_info(atom_limit)
2016-10-18Change the return type of hipe_bifs:add_ref/2Kostis Sagonas
2016-10-18Merge branch 'maint'Lukas Larsson
2016-10-18erts: Add etp-disasm gdb macroLukas Larsson
2016-10-17Merge branch 'sverker/hipe-code-loadnpurge/OTP-13968'Sverker Eriksson
* sverker/hipe-code-loadnpurge: (35 commits) erts: Cleanup dead code kernel,hipe: Fix dialyzer warnings erts: Replace unsafe Module.first_hipe_ref erts: Disable DBG_TRACE_MFA for debug build kernel: Fix code_SUITE:upgrade for non-hipe erts: Cleanup hipe trampoline code erts: Remove dead alloc stats in hipe_amd64.c erts: Remove code_SUITE:make_stub and make_stub_many_funs erts: Let code:make_stub_module raise 'notsup' erts: Fix bug in stack walk on risc erts: Fix old leak for ppc hipe code erts: Fix old leak for arm hipe code erts: Fix old leak of sparc hipe code erts: Fix old leak of hipe code on x86 32-bit erts: Enable exec_alloc for all hipe architectures erts: Remove debug printout for hipe loader state erts: Free hipe_refs and hipe_sdesc of a failed load erts: Refactor out hipe_purge_refs/sdesc erts: Refactor hipe_loader_state_dtor into a true destructor hipe: TRY fix llvm external calls to own module ...
2016-10-17erts: Cleanup dead codeSverker Eriksson
2016-10-17Configure enable libsctp dependencyRaimo Niskanen
2016-10-14Merge branch 'sverker/proc-dict-atom-hash/PR-1194'Sverker Eriksson
* sverker/proc-dict-atom-hash: kernel: Add test pdict_SUITE:literals erts: Refactor process dict hash pre-calculation Use atom value as hash value in process dictionary
2016-10-14Merge branch 'sverker/fix-alloc-asserts'Sverker Eriksson
2016-10-14Merge branch 'master' into sverker/hipe-code-loadnpurgeSverker Eriksson
Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/beam_load.c and added macro DBG_TRACE_MFA_P in beam_load.h
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-14erts: Fix some system_info docs inconsistenciesLukas Larsson
2016-10-13Add system_info(atom_limit)Gabriele Santomaggio
Add system_info(atom_limit) to provide a way to retrieve the maximum number of atoms allowed. Add tests and documentation for it too. Also split system_info_SUITE:start_node/2 to start_node_ets/2 and start_node_atm/2 to avoid code duplication.
2016-10-13Revert "Check libsctp for sctp funcs in configure.in"Raimo Niskanen
This reverts commit 52fae83743a6e84d719f4f82fe45e6e0efdbd6f0: Check libsctp for sctp funcs in configure.in Call AC_CHECK_LIB before calling AC_CHECK_FUNCS to check for functions in libsctp. Otherwise AC_CHECK_FUNCS will not link with libsctp to see if function exists. Reverting to the old behaviour of not checking for libsctp before checking for sctp functions. Then it works on Linux by loading libsctp and looking up the symbols i runtime, and it works on FreeBSD since there is no separate libsctp to link against - the functions are part of the default system libraries.
2016-10-12Merge branch 'lukas/erts/beam_func_info_struct/OTP-13821'Lukas Larsson
* lukas/erts/beam_func_info_struct/OTP-13821: erts: Fix some dtrace related compile issues erts: Refactor rename Export.code[] to Export.beam[] erts: Improve printouts for some etp commands erts: Fix erts_debug:df with new func_info erts: Refactor find_function_from_pc to return MFA erts: Refactor out func_info into struct
2016-10-12erts: Add strict size assert to fix allocSverker Eriksson
and remove outdated min size adjustment. The is similar to lost commit 31bc414dc9639ccf94f9011ed32 except we now assume and assert strict size equality.
2016-10-12erts: Fix some dtrace related compile issuesLukas Larsson
2016-10-12erts: Refactor rename Export.code[] to Export.beam[]Sverker Eriksson
to avoid scary merge errors.
2016-10-12erts: Improve printouts for some etp commandsLukas Larsson
Specifically etp-stacktrace/stackdump/process-info have been changed