Age | Commit message (Collapse) | Author |
|
* maint:
Fix encoding of filenames in stacktraces
|
|
* rickard/file-encoding-stacktraces/OTP-14847/ERL-544:
Fix encoding of filenames in stacktraces
|
|
|
|
* maint:
Do not add -lz to LIBS; keep it in Z_LIB
|
|
* rickard/libs-libz/ERL-529/OTP-14840:
Do not add -lz to LIBS; keep it in Z_LIB
|
|
|
|
The call "erlang:get_stacktrace()" is not handled explicitly. If there
are issues, they can probably be ignored since erlang:get_stacktrace/1
will be deprecated and removed.
|
|
The reduction cost of sending messages is now constant and will no
longer scale according to the length of the receiving process'
message queue.
|
|
|
|
|
|
Fix GC bug for HiPE primop bs_put_utf8
|
|
in order to detect incompatible changes in primop interface
(which we just did for bs_put_utf8) and refuse hipe loading.
|
|
by preventing it from doing GC, which generated code relies on.
|
|
This is *ONLY* relevant for drivers/NIFs, so it's probably counter-
productive to document it elsewhere.
|
|
Previously we accepted trailing NULs, which was backwards compatible
as such usage never resulted in misbehavior in the first place. The
downside is that it prevented erts_native_filename_need from
returning an accurate number of *actual characters*, needlessly
complicating encoding-agnostic code like erts_osenv.
|
|
The standard search order does not include the directory that the
loaded DLL resides in, requiring dirty $PATH hacks to get things
working, which is not an option now that os:putenv/2 is divorced
from the OS environment.
|
|
putenv(3) and friends aren't thread-safe regardless of how you slice
it; a global lock around all environment operations (like before)
keeps things safe as far as our own operations go, but we have
absolutely no control over what libc or a library dragged in by a
driver/NIF does -- they're free to call getenv(3) or putenv(3)
without honoring our lock.
This commit solves this by setting up an "emulated" environment which
can't be touched without going through our interfaces. Third-party
libraries can still shoot themselves in the foot but benign uses of
os:putenv/2 will no longer risk crashing the emulator.
|
|
|
|
|
|
|
|
* dgud/kernel/refc_sched_wall_time/OTP-11694:
test: spawn scheduler_wall_time flag holder
Turn on scheduler_wall_time in an alive process
Redirect system_flag(scheduler_wall_time,_) to kernel_refc
kernel: add a resource reference counter
|
|
|
|
|
|
Add -MMD option to erlc
OTP-14830
|
|
|
|
|
|
Symptom: "Closing pipe in state Waiting. Event lost?"
Snake oil:
Do erlang:yield() instead of busy spinning in "Waiting" state.
|
|
|
|
|
|
|
|
Add syntax in try/catch to retrieve the stacktrace directly
|
|
|
|
When a dirty NIF is executed a "schedule in" trace event is
generated, which may in turn result in a generic system task being
created, causing the process to be scheduled out as it can't run
dirty with pending tasks.
This is usually fine since said system task is seldom created, but
ERTS_FORCE_ENIF_SEND_DELAY was de-facto always on for debug builds,
causing the process to bounce between dirty and normal schedulers
forever.
This commit is not a complete fix and it can go off the rails even
on normal builds; if there's a lot of dirty jobs lined up and the
receiver's msgq lock happens to be busy at the wrong time, the
additional trace messages generated through this will hammer the
lock and keep everything bouncing.
|
|
Most functions return this if they're given an invalid path, eg. if
they contain "<" or ">". ENOENT may seem like a strange translation,
but that's what open(2) returns when fed garbage, so we'll roll with
that.
|
|
The compile option makedep_side_effect, erlc -MMD, instructs
the compiler to emit dependencies and continue to compile
as normal.
|
|
|
|
erlexec adds $ROOT/erts-<vsn>/bin and $ROOT/bin first in $PATH on
startup, but didn't do so if they were in the $PATH already, which
meant that the bindir didn't point to the current release after a
downgrade.
|
|
|
|
|
|
|
|
* maint:
fix output formatting in several HiPE debug BIFs
|
|
fix output formatting in several HiPE debug BIFs
OTP-14804
|
|
* bjorn/compiler/clean-up-codegen:
bs_match_SUITE: Cover more clauses in v3_codegen:bs_rename_ctx/4
Clean up and comment code generation for basic blocks
Stop trying to maximize the use of x(0)
Clean up collection of basic blocks
|
|
|
|
efile_drv is gone and so is the need for file-specific DTrace. The
new implementation works fine with the normal tracing mechanism so
there's nothing preventing anyone from making an erl_tracer nif
that forward these events to DTrace.
|
|
|
|
There doesn't seem to be any science behind the long delays, and
the (newly introduced) dry run forces us to eat them twice, so
they've been shortened to more reasonable values.
|
|
Code loading is done through dirty IO now, causing the
dirty_scheduler_exit tests to fail as they block their own progress
by invoking erts_debug:dirty_io(wait, _); the spawned processes
will exit normally before we have a chance to kill them.
To get around this, we perform a dry run to ensure that all required
code is loaded. It isn't particularly pretty (or fast) but it saves
us the hassle of maintaining a module list (cf. embedded mode).
|
|
This test is irrelevant as the new implementation doesn't use async
threads.
|
|
This improves the latency of file operations as dirty schedulers
are a bit more eager to run jobs than async threads, and use a
single global queue rather than per-thread queues, eliminating the
risk of a job stalling behind a long-running job on the same thread
while other async threads sit idle.
There's no such thing as a free lunch though; the lowered latency
comes at the cost of increased busy-waiting which may have an
adverse effect on some applications. This behavior can be tweaked
with the +sbwt flag, but unfortunately it affects all types of
schedulers and not just dirty ones. We plan to add type-specific
flags at a later stage.
sendfile has been moved to inet_drv to lessen the effect of a nasty
race; the cooperation between inet_drv and efile has never been
airtight and the socket dying at the wrong time (Regardless of
reason) could result in fd aliasing. Moving it to the inet driver
makes it impossible to trigger this by closing the socket in the
middle of a sendfile operation, while still allowing it to be
aborted -- something that can't be done if it stays in the file
driver.
The race still occurs if the controlling process dies in the short
window between dispatching the sendfile operation and the dup(2)
call in the driver, but it's much less likely to happen now.
A proper fix is in the works.
--
Notable functional differences:
* The use_threads option for file:sendfile/5 no longer has any
effect.
* The file-specific DTrace probes have been removed. The same
effect can be achieved with normal tracing together with the
nif__entry/nif__return probes to track scheduling.
--
OTP-14256
|