| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
erts: Modernize K&R-style functions
|
| |
| |
| |
| |
| |
| | |
Clang 16 now warns about functions using K&R syntax. Instead of
juggling with compiler warning options, it is better to just bite the
bullet and modernize the source code.
|
| |
| |
| |
| | |
since it propagates to ps, pgrep, etc.
|
|\ \
| |/
|/|
| |
| | |
Avoid truncating thread names for better runtime observability
OTP-18552
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Erlang runtime gives many of its threads descriptive names. When
those threads are part of a logical group, a unique ID is added to the
name for disambiguation. After construction, many thread names in
Erlang have a string length greater than 16 characters. To fit within
operating system limits, Erlang then truncates them from right to
left. To minimize confusion after truncation, the unique ID is always
placed at the left of a thread name so its information is not likely
to be lost.
The convention used by Erlang presents challenges to the use of thread
names as keys when reporting on thread activity at the operating
system level. The more common convention, used by other runtimes, is
to have the description followed by a unique ID. When followed,
sorting threads by name places like workers next to each other and the
unique ID can be dropped to create a grouping key. Placing the unique
ID first, as Erlang does, means that a different strategy needs to be
used for sorting the threads of an Erlang process. Furthermore, the
truncation necessitates a complicated strategy for analyzing the
description to identify a possible common substring to be used as a
grouping key.
This change switches the Erlang runtime to use the more common
convention in order to make reporting on the thread usage in an Erlang
process easier for tooling. To do so, it shortens the content of the
initial printf(3) format strings to ensure their output is always 16
or fewer characters so the name is never truncated. It also moves the
unique ID in the format string to the right of the description, so the
names of worker threads appear next to each other after sorting
alphabetically from left to right.
To prevent the accidental creation of long thread names in the future,
the silent truncation has been eliminated from the lowest-layer of
thread functionality. It now returns an EINVAL when given a long name
which will be caught when the runtime is started. This would break
the NIF and driver libraries so the silent truncation has moved up to
a higher layer in order to preserve compatibility. New unit tests have
been added to test setting and getting thread names.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Introduce a local external term format with an unspecified encoding. This
external term format is used for supporting the 'local' option of
term_to_binary/2 and term_to_iovec/2. Terms encoded on this format is only
to be decoded by the same runtime system instance that encoded it.
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Seen symptom:
Failed assert
DEBUG_PRINT_FD("executed ready_input", state);
ASSERT(!(state->active_events & ERTS_POLL_EV_IN));
with state->type == ERTS_EV_TYPE_NIF
that is, the fd already closed and then reused by a NIF.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Linux 5.15.0 has an extra line with `ino` before `tfd`, which
needs to be skipped before parsing the latter.
Cherry picked fc3295b1ebeed1235d12983184ba806f2ce2f525
|
| | |
| | |
| | |
| | |
| | | |
Linux 5.15.0 has an extra line with `ino` before `tfd`, which
needs to be skipped before parsing the latter.
|
|\ \ \
| |/ / |
|
| |\ \
| | | |
| | | |
| | | | |
OTP-18345
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
* maint:
Updated OTP version
Prepare release
Update copyright year
|
| |/ / |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
This reverts commit df450823fcdb1657743c94023318abe3731366bb.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* maint:
Updated OTP version
Prepare release
Update copyright year
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Not clearing it triggered the assert below when stdin
was deselected.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the cleanup code in sys_tty_reset is never run it can leave
the terminal in a broken state. The cleanup code is not executed
if erts receives a SIGKILL or if Ctrl-C is pressed when +B is started.
Closes #3150
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit re-implements the entire tty driver for both Unix
and Windows to use a common nif instead of two seperate drivers.
The Unix implementation works pretty much as it did before only that
a lot more of the terminal logic has been moved from Erlang to C.
The windows implementation now uses Windows Terminal Sequences, i.e.
the same sequences as most Unixes to control the terminal. This means
that werl.exe is no longer needed and erl.exe will have the "newshell"
with all the features normally only found on Unix.
The new implementation also uses dirty I/O threads for all I/O which
means that it can leave the FDs in blocking mode. This fixes problems
when the Erlang tty is interacting with other systems such as bash.
Closes #3150
Closes #3390
Closes #4343
|
| |
| |
| |
| |
| | |
Mac OS X 10.6 and earlier produced a segmentation fault due to
a condition mismatch between calls to host_get_clock_service and
mach_clock_getres.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
* maint:
Updated OTP version
Prepare release
Update copyright year
|
| | | |
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
* lukas/erts/remove-child-setup-assert:
erts: Remove faulty child setup assert
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
* lukas/22/erts/fix-localtime-tz-change/OTP-18076:
erts: Fix localtime_r summer/winter-time change bug
|
|\ \ \ \ \ |
|
| |\ \ \ \ \
| | | |/ / /
| | |/| | |
| | | | | |
| | | | | | |
* lukas/22/erts/fix-localtime-tz-change/OTP-18076:
erts: Fix localtime_r summer/winter-time change bug
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
According to POSIX, localtime_r does not have to update the process
internal tz data when called. So if time went from winter to
summertime erts is running localtime_r may return an incorrect time.
So we need to make sure to call tzset before each call to localtime_r.
localtime is guaranteed to update the tz information, so no need to
call it when using localtime.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add option +IOs to disable scheduler thread polling
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Enabled (true) by default.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When calling read it may return a partial result. So we make
sure that all the data is read before returning.
The problem has been observed when reading the ACK message,
but we use the new routine for all reads in the child so that
we know that it will work everywhere.
|
|\ \ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
|
| |\ \ \ \ \ \
| | |_|_|/ / /
| |/| | | / /
| | | |_|/ /
| | |/| | | |
* lukas/erts/remove-child-setup-assert:
erts: Remove faulty child setup assert
|
| | | |/ /
| | |/| | |
|
| |_|/ /
|/| | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | | |
* maint:
Requote for plain spawn
Fix erlang:open_port({spawn_executable,_},_) on Windows
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use the looked up absolute program name instead of (incorrectly)
spawning the pre-lookup command from the path.
Remove redundant incorrect command line quoting.
|
| | | | |
|
| | | | |
|