Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
* ks/hipe_bif-remove_refs_from/OTP-10851:
Fixed test to allow for lists:foreach/2 call
Change the return value of hipe_bifs:remove_refs_from/1
|
|
|
|
In order to avoid an ummatched return warning in erts and make the code
more sane, the return value of the bif was changed from [] to 'ok'.
(Probably more hipe_bifs need such changes but they will have to wait.)
While at it, the code of various functions in hipe_unified_loader was
shortened by using lists:foreach/1 instead of explicit recursion.
|
|
|
|
Use am_undefined as it seems to be more releable to exist.
|
|
Changes in "struct process" has made native code more depenedent on if the
executing emulator is smp enabled or not.
This commit will make a default built hipe compiler (without -xcomp)
to ask the running emulator about process struct offsets. This will
make native code work (again) as long as the same emulator is used for
compilation as well as execution of the native code.
|
|
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
|
|
|
|
|
|
|
|
* egil/darwin-fixes:
erl_interface: Avoid redefinition of ALIGNBYTES
erts: Fix '#ifdef' for unused static functions
erts: Remove forgotten vxworks includes
hipe: Cast offsetof to int in hipe_arch_print_pcb
|
|
|
|
|
|
Conflicts:
lib/ssl/src/ssl_connection.erl
|
|
Previously done for ppc in c469d8ce14e9544a297d9af48c9da43137122d9a
|
|
|
|
* Silence compiler warning
* This is the same style as the rest of the debug printing in hipe.
Keeping to the same style, though changing the printing format
would probably be better. Not a critical change.
|
|
Conflicts:
lib/diameter/autoconf/vxworks/sed.general
xcomp/README.md
|
|
|
|
Conflicts:
erts/preloaded/ebin/init.beam
|
|
* sverk/hipelibs-code_server-crash-maint:
Fix init:restart with hipelibs
kernel: Disable hipe compilation for hipe_unified_loader
|
|
* maint:
Fix assembler comments for hipe on ppc
odbc: remove "-" in hostname from generated unique table name
|
|
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.
|
|
Tuple funs were deprecated in R15B (in commit a4029940e309518f5500).
|
|
|
|
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.
|
|
* maint:
Remove stale code for hybrid heap and incremental GC
Remove the hipe_bifs:show_message_area/0 BIF
Remove support for erlang:system_info(global_heaps_size)
Remove the erlang:garbage_collect_message_area/0 BIF
Remove workarounds for hybrid and shared heaps in test suites
Conflicts:
erts/doc/src/erlang.xml
erts/emulator/beam/erl_message.c
erts/emulator/beam/erl_process.c
erts/emulator/beam/erl_process.h
erts/emulator/hipe/hipe_bif2.tab
lib/hipe/cerl/erl_bif_types.erl
|
|
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.
|
|
|
|
* rickard/proc-sched/OTP-9892:
Teach etp-commands to understand new emulator internal data structures
Optimize process state changes
Optimize process table access
Implement possibility to use ordinary mutexes as process locks
Conflicts:
erts/emulator/beam/erl_alloc.types
|
|
|
|
|
|
|
|
* sverk/threadsafe-code-loading: (59 commits)
erts: Fix assert failure when code_server exits "during" commit
erts: Fix memory leak in code loading
erts: Adapt gdb etp-command for new beam_ranges
erts: Set correct default tracing when loading code
erts: Fix faulty assert in non-smp debug vm
erts: Use correct macro for "yield-return"
erts: Refactor code loading with renaming
erts: Seize code_ix lock when updating trace settings
erts: Switch order between code_ix lock and thread blocking
erts: Fix race bug in finish_after_on_load
erts: Refactor export staging lock
erts: Activate staged code in a thread safe way
erts: Suspend processes waiting for code_ix lock
erts: Fix compiler warning in inet_drv
erts: Fix single threaded fallback in new BIF finish_loading_1
erts: Fix type bug
Break apart erlang:load_module/2 into two separate BIFs
Use magic binaries in erts_prepare_loading() and erts_finish_loading()
erts: Cleanup non-blocking load
erts: Fix memory query for non-blocking module table
...
OTP-9974
|
|
|
|
|
|
Staging is a better and more general name as does not necessary need
to involve code loading (can be deletion, tracing, etc).
|
|
|
|
|
|
Still blocking code loading
|