Age | Commit message (Collapse) | Author |
|
* gsantomaggio/erts/system_info_atoms/PR-1198/OTP-13976:
erts: Fix some system_info docs inconsistencies
Add system_info(atom_limit)
|
|
* 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
...
|
|
|
|
* 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
|
|
|
|
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
|
|
with hash table mod2mfa_tab
|
|
|
|
|
|
erlang:system_info({allocator, exec_alloc})
have stats if we need it.
|
|
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.
|
|
if hipe is disabled.
Makes the code simpler to just ifdef away
a lot of hipe stuff.
|
|
Symptom: Got ra==NULL at nsp==nsp_end
when running basic_SUITE:basic_arith on arm
why has this not been detected before?
|
|
* Use erts_alloc(ERTS_ALC_T_HIPE_EXEC,_)
* Each module has its own trampolines
|
|
* 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.
|
|
|
|
|
|
For non-amd64 it's a "normal" allocator with a
wrapper around mseg_alloc to call mprotect(PROT_EXEC).
|
|
creation and destruction.
|
|
|
|
from hipe_purge_module.
|
|
that is only called once.
Basically switch hipe_free_loader_state and hipe_loader_state_dtor.
|
|
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.
|
|
by introducing hipe_bifs:commit_patch_load/1
that creates the HipeModule.
|
|
|
|
|
|
to get a nice SIGILL crash.
For x86 and x86_64 only.
|
|
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.
|
|
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.
|
|
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.
|
|
* 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
|
|
and remove outdated min size adjustment.
The is similar to lost commit 31bc414dc9639ccf94f9011ed32
except we now assume and assert strict size equality.
|
|
|
|
to avoid scary merge errors.
|
|
|
|
|
|
This commit adds two new structs to be used to represent
erlang code in erts.
ErtsCodeInfo is used to describe the i_func_info header
that is part of all Export entries and the prelude of
each function. This replaces all the BeamInstr * that
were previously used to point to these locations.
After this change the code should never use BeamInstr *
with offsets to figure out different parts of the
func_info header.
ErtsCodeMFA is a struct that is used to descripe a
MFA in code. It is used within ErtsCodeInfo and also
in Process->current.
All function that previously took Eterm * or BeamInstr *
to identify a MFA now use the ErtsCodeMFA or ErtsCodeInfo
where appropriate.
The code has been tested to work when adding a new field to the
ErtsCodeInfo struct, but some updates are needed in ops.tab to
make it work.
|
|
with new function erts_pd_make_hx()
|
|
In the origin implementation, the hash value of atom term is retrieved
from the atom table. Reading the atom table is expensive since it is in
memory and leads to more cache missing.
The size of a process dictionary is usually small. The atom value (the
index) is unique and can be hash value for it. Using the atom value
directly should be more efficient.
|
|
and hipe_bifs:update_code_size
|
|
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.
|
|
with a copy_module() function.
|
|
|
|
|
|
|
|
|
|
in Text part of error tuple, like
{error, {load, "Library load-call unsuccessful (606)}}
|
|
|
|
|
|
* 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
|