Age | Commit message (Collapse) | Author |
|
* sverk/hipelibs-code_server-crash-maint:
Fix init:restart with hipelibs
kernel: Disable hipe compilation for hipe_unified_loader
|
|
Change to preprocessor comments to work on all OS.
|
|
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.
|
|
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]>
|
|
|
|
Bug introduced in R15.
|
|
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.
|
|
|
|
|
|
* sverk/hipe-hibernate-sparc-bug:
erts: Make GC tolerate hibernated process without hipe stack
|
|
|
|
Seen causing segv on sparc with hibernate_native_SUITE:basic:
nstack_walk_frame_ra (nsp=0x0, sdesc=0x6c8f2c) at hipe_risc_gc.h:105
gensweep_nstack (p=0x6a6930, ptr_old_htop=0xffbfea50, ptr_n_htop=0xffbfea4c) at hipe/hipe_gc.c:224
do_minor (p=0x6a6930, new_sz=233, objv=0x6a6984, nobj=3) at beam/erl_gc.c:949
minor_collection (p=0x6a6930, need=3, objv=0x6a6984, nobj=3, recl=0xffbfece4) at beam/erl_gc.c:811
erts_garbage_collect (p=0x6a6930, need=3, objv=0x6a6984, nobj=3) at beam/erl_gc.c:379
erts_send_message (sender=0x6a6048, receiver=0x6a6930, receiver_locks=0xffbfedf8, message=6132762, flags=0) at beam/erl_message.c:922
do_send (p=0x6a6048, to=515, msg=6132762, suspend=1) at beam/bif.c:2052
erl_send (p=0x6a6048, to=515, msg=6132762) at beam/bif.c:2151
send_2 (A__p=0x6a6048, BIF__ARGS=0x6a609c) at beam/bif.c:2146
nbif_send_2 ()
|
|
Fixes alignment warning from ld on 64bit platforms with gcc 4.6.1
|
|
* sverk/ppc-hibernate-fix:
erts: Fix hipe bug in hibernate on PowerPC
|
|
Can still not setup -a, but cerl works.
|
|
Seems to apply to Sparc and ARM as well (even if not observed).
|
|
|
|
* 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
|
|
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.
|
|
Normally hipe assumes that generated native code will be executed
on the same emulator as the hipe compiler is running on.
This commit allows you to build a hipe "cross-compiler"
for a different configured emulator (but for same architecture).
Example:
> cd lib/hipe
> make clean
> make XCOMP=yes FLAVOR=smp TYPE=debug
This hipe compiler will generate code to be executed
on the debug compiled smp-emulator at $ERL_TOP.
|
|
This is a work-around as there are hipe BIFs that return untagged
integers that may be intepreted as THE_NON_VALUE (24).
Hipe bifs that return offsets as untagged integers:
hipe_bs_put_utf8
hipe_bs_put_utf16be
hipe_bs_put_utf16le
Hipe bifs that return raw pointers:
hipe_find_na_or_make_stub
hipe_nonclosure_address
|
|
Add hipe_debug_bif_wrapper() as a wrapper for every BIF
called by native code.
|
|
|
|
|
|
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.
|
|
x86 and amd64: Push BIF__ARGS array on C-stack.
ppc, sparc and arm: Write BIF__ARGS array to P->def_arg_reg[]
Just the simplest solution with limited assembler knowledge,
probably room for improvements.
|
|
No semantic change.
Just easier to debug when jumps are spelled out
and not obscured by yet another layer of macros.
|
|
A first step to adapt hipe to the new BIF calling convention.
|
|
Conflicts:
erts/aclocal.m4
erts/emulator/beam/erl_db.c
erts/emulator/sys/win32/sys.c
erts/include/internal/ethread_header_config.h.in
|
|
In the half-word emulator, smp emulator, and non-smp emulator
the X register and float register arrays were allocated in
different ways.
Always allocate the registers and store the pointers to the
allocated register arrays in the scheduler data.
|
|
This commit is a preparation for introducing location information
(filename/line number) in stacktraces in exceptions. Currently
a stack trace looks like:
[{Mod1,Function1,Arity1},
.
.
.
{ModN,FunctionN,ArityN}]
Add a forth element to each tuple that can be used indication
the filename and line number of the source file:
[{Mod1,Function1,Arity1,Location1},
.
.
.
{ModN,FunctionN,ArityN,LocationN}]
In this commit, the fourth element will just be an empty list,
and we will change all code that look at or manipulate stacktraces.
|
|
|
|
* pg/fix-hibernate-scheduling-with-hipe:
Fix bug related to hibernate and HiPE (clear F_HIBERNATE_SCHED flag)
OTP-9452
|
|
All uses of the old deprecated atomic API in the runtime system
have been replaced with the use of the new atomic API. In a lot of
places this change imply a relaxation of memory barriers used.
|
|
F_HIBERNATE_SCHED flag that was introduced in b7ecdcd1ae9e11b8f75e must
be cleared in hipe_mode_switch as well. Otherwise, processes running
HiPE code that hibernate, wake up and then trap into a BIF will not be
rescheduled.
|
|
|
|
|
|
|
|
* sverker/erts_printf-halfword:
erts_printf %be to print integers of size Eterm
Fix use of type BeamInstr in hipe_debug.c
Conflicts:
erts/emulator/hipe/hipe_debug.c
|
|
* ks/hipe-ppc64:
Enable HiPE by default when compiling for PPC64
Translate RTL to PPC code on PPC64 too
Changes in ppc files for PPC64
Additions for the PPC64 backend
Changes for the PPC64 backend
Added loader for ppc64
New files for the 64-bit backends
Cleanup tags
OTP-9198
|
|
Existing %bp to print pointer size integers does not work in halfword
emulator to print Eterm size integers.
|
|
|
|
|
|
* pg/hipe-remove-constants-pool:
Remove hipe constants pool
OTP-9128
|
|
|
|
|
|
|
|
|
|
|
|
Hipe constants used to be allocated within a single, fixed-size pool for
interaction with the garbage collector. However, the garbage collector
no longer depends on constants being allocated within a single pool, and
the fixed size of the pool both meant unnecessary allocations on most
deployments and crashes on deployments requiring more constants.
The code was simplified to directly invoke erts_alloc.
Debugging and undocumented function hipe_bifs:show_literals/0 was
removed (it returned true and output text to the console), and
debugging and undocumented function hipe_bifs:constants_size/0 was
rewritten with a global to count the size of allocated constants.
|