Age | Commit message (Collapse) | Author |
|
into union with actual usage types.
|
|
Old test for dirty schedulers didn't work with Visual C++
|
|
|
|
|
|
|
|
Conflicts:
erts/emulator/beam/erl_binary.h
erts/emulator/beam/erl_monitors.c
erts/emulator/beam/erl_nif.c
erts/emulator/beam/global.h
erts/emulator/test/nif_SUITE_data/nif_SUITE.c
|
|
# Conflicts:
# erts/emulator/test/nif_SUITE_data/nif_SUITE.c
|
|
|
|
* sverker/enif_send-noproc-fix:
erts: Fix enif_send from noproc and no msg_env
|
|
A magic destructor can return 0 and thereby take control
and prolong the lifetime of a magic binary.
|
|
|
|
|
|
|
|
Magic references are *intentionally* indistinguishable from ordinary
references for the Erlang software. Magic references do not change
the language, and are intended as a pure runtime internal optimization.
An ordinary reference is typically used as a key in some table. A
magic reference has a direct pointer to a reference counted magic
binary. This makes it possible to implement various things without
having to do lookups in a table, but instead access the data directly.
Besides very fast lookups this can also improve scalability by
removing a potentially contended table. A couple of examples of
planned future usage of magic references are ETS table identifiers,
and BIF timer identifiers.
Besides future optimizations using magic references it should also
be possible to replace the exposed magic binary cludge with magic
references. That is, magic binaries that are exposed as empty
binaries to the Erlang software.
|
|
as it's not part of the API
|
|
A magic destructor can return 0 and thereby take control
and prolong the lifetime of a magic binary.
|
|
|
|
* rickard/ds-20-fix:
Fix unused warning
Change exception for enif_schedule_nif() with dirty flags
Remove double check of NifExport when checking process code
|
|
* sverker/ASSERT_IN_ENV:
erts: Add macro ERTS_PROC_LOCKS_HIGHER_THAN
erts: Cleanup and extra assertions in nif_SUITE.c
erts: Cleanup enif_make_reverse_list
erts: Add assertions for correct ErlNifEnv
erts: Make erts_dbg_within_proc available
# Conflicts:
# erts/emulator/beam/erl_gc.h
|
|
|
|
|
|
Only try direct allocation on receiver heap when called
in a real process context to avoid trylock on our own main lock.
|
|
|
|
when constructing container terms.
|
|
The support is somewhat primitive, since it is determined at
call time if trace on return or exception should be sent.
|
|
|
|
|
|
Can't use HAlloc as it might consume part of callers 'need'.
|
|
|
|
|
|
to be declared once in beam_load.h
and get rid of #ifdef kludge.
|
|
* sverker/nif-entry-abi-compat:
erts: Fix code_SUITE:api_2_0,upgrade crash on win64
erts: Add tests of nif API 2.0
erts: Change nif_SUITE to use binaries for raw pointers
erts: Use test groups to repeat for different APIs
erts: Add testing of old nif API
erts: Secure abi backward compat for tracer nifs
erts: Mend broken checks in nif_SUITE
|
|
and simplify the code by handling the compatibility stuff
at loading by creating modern struct copies in create_lib().
|
|
* maint:
Update etp-commands for dirty schedulers
Fix scheduling of system tasks on processes executing dirty
Fix call time tracing with dirty schedulers
Fix send of exit signal to process executing dirty
Fix dirty scheduler process priority
Fix alloc-util hard-debug
Silence debug warning when no beam jump table is used with dirty schedulers
Fix check_process_code() when NifExport is in use
Fix GC when NifExport is in use
Fix saving of original arguments when rescheduling via NifExport
Conflicts:
erts/emulator/beam/beam_bif_load.c
erts/emulator/beam/erl_nif.c
|
|
* rickard/nif-scheduling-fixes:
Fix check_process_code() when NifExport is in use - OTP-14048
Fix GC when NifExport is in use - OTP-14049
Fix saving of original arguments when rescheduling via NifExport - OTP-14050
|
|
|
|
|
|
|
|
* sverker/erts/crash-dump-limit:
erts: Add env variable ERL_CRASH_DUMP_BYTES
erts: Add ErtsStrToSint64
erts: Refactor crash dumping with cbprintf
erts: Add cbprintf for Callback Printing
erts: Remove unused erl_crash_dump()
|
|
Instead of passing around a file descriptor
use a function pointer to facilitate more advanced
backend write logic such as size limitation or compression.
|
|
|
|
* 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
|
|
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.
|
|
|
|
in Text part of error tuple, like
{error, {load, "Library load-call unsuccessful (606)}}
|
|
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.
|
|
* 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
|
|
Normally, calling code:delete/1 before re-loading the code for a
module is unnecessary but causes no problem.
But there will be be problems if the new code has an on_load function.
Code with an on_load function will always be loaded as old code
to allowed it to be easily purged if the on_load function would fail.
If the on_load function succeeds, the old and current code will be
swapped.
So in the scenario where code:delete/1 has been called explicitly,
there is old code but no current code. Loading code with an
on_load function will cause the reference to the old code to be
overwritten. That will at best cause a memory leak, and at worst
an emulator crash (especially if NIFs are involved).
To avoid that situation, we will put the code with the on_load
function in a special, third slot in Module.
ERL-240
|