summaryrefslogtreecommitdiff
path: root/erts/lib_src
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright yearErlang/OTP2023-04-111-1/+1
|
* Merge pull request #6973 from lexprfuncall/runtime-thread-name-truncation-fixRickard Green2023-04-061-16/+6
|\ | | | | | | | | Avoid truncating thread names for better runtime observability OTP-18552
| * Avoid truncating thread names for better runtime observabilitylexprfuncall2023-04-061-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | erts: Filter out -fsanitize for when building YCFSverker Eriksson2023-03-291-5/+7
| | | | | | | | | | YCF is a short lived source-to-source compile tool which deliberately leaks memory.
* | Update copyright yearErlang/OTP2023-02-141-1/+1
| |
* | Merge branch 'john/erts/instruction-synchronization-barriers/OTP-18418' into ↵John Högberg2023-02-011-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | john/erts/merge-isb-26 * john/erts/instruction-synchronization-barriers/OTP-18418: jit: Clear instruction cache ourselves jit: Refactor breakpoints jit: Issue ISBs on all schedulers when modifying code jit: Remove an eyesore
| * jit: Issue ISBs on all schedulers when modifying codeJohn Högberg2023-02-011-1/+3
| |
* | erts: Add correct frame-pointer flags to erts_internalLukas Larsson2022-10-051-9/+4
|/
* Update copyright yearErlang/OTP2022-02-152-2/+2
|
* Fix typos (repeated words) [doc] [ci skip]Marc-André Lafortune2022-02-051-1/+1
|
* [erts, tools] remove "emem" completelyMaxim Fedorov2022-01-192-2009/+7
| | | | | | Test suites for the tool were lost long ago. Removing "liberts.a" library as well, for it is now empty and AR on MacOS/Windows does not like empty libraries.
* Merge pull request #5494 from ↵Lukas Larsson2021-12-221-0/+27
|\ | | | | | | | | garazdawi/lukas/erts/fix-ets-read_concurrency-memory/OTP-17832 erts: Fix ets memory calculation for read_concurrency
| * erts: Fix ets memory calculation for read_concurrencyLukas Larsson2021-12-221-0/+27
| | | | | | | | | | | | | | The amount of memory used for reader groups can be very large on systems with many cores, so it needs to be part of the ets table's memory utilization. We use that memory to calculate how many tables can be created when testing.
* | Update copyright yearRickard Green2021-12-166-6/+6
| |
* | Merge branch 'maint'Rickard Green2021-12-1321-21/+21
|\ \ | |/ |/| | | | | * maint: Update copyright year
| * Update copyright yearRickard Green2021-12-1321-21/+21
| |
* | Merge branch 'plux/skip-read-topology' into ↵Rickard Green2021-11-181-3/+6
|\ \ | | | | | | | | | | | | | | | | | | rickard/merge/plux/skip-read-topology * plux/skip-read-topology: Enable possibility to skip reading CPU topology at startup
| * | Enable possibility to skip reading CPU topology at startupHakan Nilsson2021-09-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading CPU topology slows down startup when starting many parallel instances of ERTS on systems with large amount of cores, this commit adds the possibility to skip it. Use new emulator flag +ssrct to skip reading CPU topology. Reading CPU topology will also be skipped if a user defined topology is set using the +sct flag.
* | | Fix typos in erts/lib_srcKian-Meng, Ang2021-11-1715-19/+19
| | |
* | | Merge branch 'maint'Rickard Green2021-11-111-2/+24
|\ \ \ | | |/ | |/| | | | | | | * maint: Limit timeout value in calls to select()
| * | Merge branch 'rickard/select-timeout-fix/GH-5339/OTP-17735' into maintRickard Green2021-11-111-2/+24
| |\ \ | | | | | | | | | | | | | | | | * rickard/select-timeout-fix/GH-5339/OTP-17735: Limit timeout value in calls to select()
| | * | Limit timeout value in calls to select()Rickard Green2021-11-031-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously did not limit the timeout value when calling select() which could cause select() to fail when passed a huge timeout value causing a runtime system crash. We currently only use select() on Darwin which accepts a timeout value of up to 100 million seconds. However, according to posix, select() implementations are only required to provide 31 days as max timeout value. We therefore limit the timeout value to 31 days.
* | | | Merge branch 'maint'Dan Gudmundsson2021-11-011-0/+1
|\ \ \ \ | |/ / /
| * | | Fix win versionsDan Gudmundsson2021-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | OTP version number can contain -rcNUM Also fixup .gitignore files..
* | | | Merge branch 'maint'Kjell Winblad2021-10-211-0/+1
|\ \ \ \ | |/ / /
| * | | Fix false positive code checker warning in debug buildKjell Winblad2021-10-201-0/+1
| | | |
* | | | Add upgrade note to erts/lib_src/yielding_c_fun/lib/tiny_regex_cKjell Winblad2021-09-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Add upgrade note to the regexp library that is used by Yielding C Fun with information about things to be aware of when upgrading the library.
* | | | Merge branch 'maint'Kjell Winblad2021-09-288-2782/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Remove unused test scripts and files from lib used by YCFKjell Winblad2021-09-288-2782/+0
| | |
* | | Merge branch 'maint'Kjell Winblad2021-09-011-4/+7
|\ \ \ | |/ /
| * | Add documentation about how to use YCF in ERTSKjell Winblad2021-09-011-4/+7
| | | | | | | | | | | | Add text explaineing some best practices for using YCF for ERTS.
* | | Adapt configure scripts to autoconf 2.71 (step 1)Rickard Green2021-06-142-17/+5
|/ / | | | | | | Replace obsolete macros and fix warnings
* | YCF: Don't do unnecessary transformations of special code sectionsKjell Winblad2021-03-094-19/+27
| |
* | erts: Silence CodeChecker on ycf_unused_ret_valueSverker Eriksson2021-02-231-1/+1
| |
* | Merge branch 'lukas/erts/clang-sanatizer'Sverker Eriksson2021-02-182-3/+3
|\ \
| * | erts: Add asserts to suppress false positives found by clang saLukas Larsson2021-02-183-4/+4
| | |
* | | YCF: Error exit if unable to transform call to yieldable functionKjell Winblad2021-02-127-81/+264
| | |
* | | YCF: suppress warning about uninitialized return valueKjell Winblad2021-02-121-1/+1
| | |
* | | YCF: Fix variable substitution bug in YCF_CONSUME_RES(x) statementsKjell Winblad2021-02-1211-54/+119
| | |
* | | YCF: Improve error information when detecting pointer to stackKjell Winblad2021-02-121-7/+62
| | | | | | | | | | | | | | | | | | | | | This commit makes sure that when debug mode (activated with the flag -debug) detects a pointer in a yield state to the call stack, all the fields in the yield state struct will be printed so it easy to find the variable that contains the bad pointer.
* | | YCF: Add function prototypes for debug functionsKjell Winblad2021-02-123-1/+26
| | | | | | | | | | | | | | | | | | This commit adds function prototypes for debug functions to avoid compiler warnings when compiling with options that gives warnings for functions without prototypes.
* | | YCF: better debug support for checking nested yielding functionsKjell Winblad2021-02-125-9/+58
| | | | | | | | | | | | | | | Add support for checking for pointers to any of the stack frames belonging to nested yielding functions.
* | | YCF: Zero variables declared inside yielding function in debug modeKjell Winblad2021-02-121-3/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | YCF's debug mode detected a lot of false positives (pointers allocated on the function stack for a yielding function that points to the function stack) because uninitialized variables sometimes happens to contain addresses to the stack. This commit fixes this issue by automatically writing zeros to these variables when debug mode is activated.
* | | YCF: Correct print modifierKjell Winblad2021-02-121-4/+4
| | |
* | | YCF: Abort when debug mode detects pointer to stackKjell Winblad2021-02-121-2/+3
| | |
* | | YCF: Fix error when combining -debug with -only_yielding_funsKjell Winblad2021-02-124-3/+84
| | | | | | | | | | | | | | | | | | One of the generated functions got the wrong name when the -debug flag was combined with the -only_yielding_funs flag. This commit fixes the bug and adds a test case to prevent similar bugs in the future.
* | | YCF: Change type of destroy functionKjell Winblad2021-02-121-1/+2
| | | | | | | | | | | | | | | | | | This function changes the type of the generated destroy function so that it takes a parameter of type void*. The public interface does not include the type of a generated struct after this change.
* | | YCF: Make YCF_STACK_ALLOC pad to word boundaries and fix YCF_STACK_ALLOC bugKjell Winblad2021-02-123-42/+47
| | |
* | | YCF: support for externally yielded funsKjell Winblad2021-02-122-2/+16
|/ /
* | Merge branch 'maint'John Högberg2021-01-151-35/+62
|\ \ | | | | | | | | | | | | * maint: erts: Support cgroup2 CPU quotas