aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-08-09erts: Introduce hash_fetch as an optimized hash_getLukas Larsson
2019-08-09erts: Change the default hash implementation to use fibonacci hashLukas Larsson
Fibonacci hashing is a variant of multiplicative hashing that uses a constant based on the golden ratio.
2019-08-09erts: Use hash_foreach instead of manual loopLukas Larsson
2019-08-09erts: Add typedef for hash_foreach function ptrLukas Larsson
2019-08-09erts: Remove unused process_reg_size functionLukas Larsson
2019-08-07Merge branch 'maint'Lukas Larsson
2019-08-07Merge branch 'lukas/os_mon/sscanf_Lu/OTP-15974' into maintLukas Larsson
* lukas/os_mon/sscanf_Lu/OTP-15974: os_mon: Fix sscanf to use %llu instead of gnu specific %Lu
2019-08-07Merge branch 'john/compiler/validator-improve-try_case-handling'John Högberg
* john/compiler/validator-improve-try_case-handling: beam_validator: Disallow jumps to try_case handlers
2019-08-07Merge branch 'john/compiler/explicit-call-exceptions'John Högberg
* john/compiler/explicit-call-exceptions: compiler: Simplify set_tuple_element optimization compiler: Make 'succeeded' optimization more general compiler: Simplify call type optimization compiler: All calls may throw, so they all need success checks erts_debug: Turn off unsafe optimizations in test case
2019-08-06os_mon: Fix sscanf to use %llu instead of gnu specific %LuLukas Larsson
For instance musl does not recognize the %L modifier.
2019-08-06Merge branch 'lukas/otp/add-dialyzer-make-target/OTP-15915'Lukas Larsson
* lukas/otp/add-dialyzer-make-target/OTP-15915: otp: Add make dialyzer and make xmllint documentation Add 'make dialyzer' target to top and apps
2019-08-06otp: Add make dialyzer and make xmllint documentationLukas Larsson
2019-08-06Merge branch 'maint'Lukas Larsson
2019-08-06Merge pull request #2319 from shionryuu/fix_logger_disk_log_h_docLukas Larsson
Fix syntax error in logger_disk_log_h.xml
2019-08-06Fix syntax error in logger_disk_log_h.xmlShion Ryuu
2019-08-06beam_validator: Disallow jumps to try_case handlersJohn Högberg
By keeping track of the tag types in the exception handler list, we can reject direct jumps to try_case handlers such as those provoked by OTP-15945.
2019-08-06compiler: Simplify set_tuple_element optimizationJohn Högberg
By removing 'succeeded' tests on setelement/3 when we know it succeeds, all sequences that are eligible for set_tuple_element will be nicely bundled in the same block, so we won't need to bother with special try/catch handling. The new version is slightly worse in the case where the first setelement/3 is used to infer the tuple size as that call will remain in its own block, but in practice this only occurs when the user manually spells them out and I couldn't find any examples of this in OTP or Elixir. It's equivalent for record updates.
2019-08-06compiler: Make 'succeeded' optimization more generalJohn Högberg
2019-08-06compiler: Simplify call type optimizationJohn Högberg
2019-08-06compiler: All calls may throw, so they all need success checksJohn Högberg
Only adding them when in try/catch worked, but made the exceptions implicit and forced all later optimization passes to keep them in mind. Making them explicit lets us simplify later passes.
2019-08-06erts_debug: Turn off unsafe optimizations in test caseJohn Högberg
The test case alters the return value of a function that the compiler expects will never return, resulting in undefined behavior. Note that the debugger (which may change variables/return values) is unaffected since the affected module is purged and "replaced" with an interpreted variant.
2019-08-05Merge branch 'maint'Lukas Larsson
2019-08-05Merge pull request #2333 from matwey/fix_ethr_x86_cpuid_asm/OTP-15971Lukas Larsson
erts: Do not use named no_cpuid label in asm
2019-08-05Merge branch 'maint'Björn Gustavsson
* maint: Ensure that the stack slots are initialized when matching maps
2019-08-05Merge branch 'bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968' into maintBjörn Gustavsson
* bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968: Ensure that the stack slots are initialized when matching maps
2019-08-05Ensure that the stack slots are initialized when matching mapsBjörn Gustavsson
When matching a map, the compiler could fail to generate code that would initialize all stack slots (Y registers) properly. Here is a general outline of code that *could* cause this problem: foo(Key, Map) -> Res = case Map of #{Key := Val} -> %% Do something with Val here. . . . #{} -> [] end, %% The stack slot for Val might not have been initialized %% here if the key was not present in the map. . . . %% Use Res. . . . The code generator would wrongly assume that the map matching would always initialize the stack slot, and if nothing else happened to force that stack slot to be initialized, it would remain uninitialized, which would likely crash the runtime system at the next garbage collection. `beam_validator` is supposed to find these kind of problems, but a bug in `beam_validator` prevented it from detecting this problem. https://bugs.erlang.org/browse/ERL-1017
2019-08-05Merge branch 'maint'John Högberg
* maint: beam_validator: Values referenced by other values must be merged
2019-08-05Merge branch 'john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995' ↵John Högberg
into maint * john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995: beam_validator: Values referenced by other values must be merged
2019-08-02Merge pull request #2327 from josevalim/jv-faster-cerl-setsBjörn Gustavsson
Optimize is_subset and is_disjoint in cerl_sets
2019-08-02Merge branch 'maint'Björn Gustavsson
* maint: Avoid extremely long compilation times for huge functions
2019-08-02Merge pull request #2336 from ↵Björn Gustavsson
bjorng/bjorn/compiler/fix-slow-beam_ssa_dead/ERL-1014/OTP-15966 Avoid extremely long compilation times for huge functions
2019-08-02Merge branch 'maint'Björn Gustavsson
* maint: Fix compiler crash when compiling with +no_type_opt Eliminate a crash in the type optimizer pass
2019-08-02Merge branch 'bjorn/compiler/length-misuse/ERL-1013' of ↵Björn Gustavsson
https://github.com/bjorng/otp into maint OTP-15970 * 'bjorn/compiler/length-misuse/ERL-1013' of https://github.com/bjorng/otp: Eliminate a crash in the type optimizer pass
2019-08-02Merge branch 'bjorn/compiler/fix-no_type_opt/ERL-997' of ↵Björn Gustavsson
https://github.com/bjorng/otp into maint OTP-15969 * 'bjorn/compiler/fix-no_type_opt/ERL-997' of https://github.com/bjorng/otp: Fix compiler crash when compiling with +no_type_opt
2019-08-01Merge branch 'maint'Micael Karlberg
2019-08-01Merge branch 'bmk/snmp/20190731/correct_top_sup_stop' into maintMicael Karlberg
2019-08-01Merge branch 'maint'Micael Karlberg
2019-08-01Merge branch 'bmk/erts/esock/20190730/select_info/OTP-15958' into maintMicael Karlberg
2019-08-01Avoid extremely long compilation times for huge functionsBjörn Gustavsson
Compiling this example takes less than a second for OTP 21: -define(B, {?A,?A,?A,?A,?A}). -define(C, {?B,?B,?B,?B,?B}). -define(D, {?C,?C,?C,?C,?C}). -define(E, {?D,?D,?D}). f() -> ?E = foo:bar(). The compilation time for OTP 22 is about 10 seconds. Most of the time is spent in `beam_ssa_dead`. This commit introduces several optimizations to bring the compilation time down to about a second. The most important of those optimizations is limiting the effort spent searching forward for a joining point for the success and failure labels for a two-way branch. This change is helped by the change of representation of variable sets from `ordsets` to `cerl_sets`. https://bugs.erlang.org/browse/ERL-1014
2019-08-01Merge branch 'maint'Micael Karlberg
2019-08-01Merge branch 'bmk/megaco/20190710/test_tweaking' into maintMicael Karlberg
2019-08-01Merge branch 'maint'Björn Gustavsson
* maint: Fix unsafe code sharing
2019-08-01Merge pull request #2329 from bkolobara/crypto/add_ed25519_ed448_to_generate_keyHans Nilsson
Add ed25519 & ed448 support to crypto:generate_key OTP-15967
2019-08-01Merge branch 'bjorn/compiler/fix-unsafe-sharing/OTP-15963' into maintBjörn Gustavsson
* bjorn/compiler/fix-unsafe-sharing/OTP-15963: Fix unsafe code sharing
2019-07-31[snmp] Fixed agent|manager top supervisor stopMicael Karlberg
2019-07-31Merge branch 'maint'Raimo Niskanen
* maint: The linger option is not transferred on *BSD
2019-07-31Merge branch 'raimo/inherit-listen-options/OTP-15824' into maintRaimo Niskanen
* raimo/inherit-listen-options/OTP-15824: The linger option is not transferred on *BSD
2019-07-31Merge branch 'maint'Micael Karlberg
2019-07-31Merge branch 'bmk/snmp/manager/20190729/test_tweaking' into maintMicael Karlberg
2019-07-31[megaco|test] Add an event list to the test MGC/MGMicael Karlberg
To provide more info when analyzing failed test cases an "event" queue (of max size 10) is added to both the test MG and MGC. This event queue is printed when the process exist. Also, the multi_ack_timeout is wonky, so add anther platform (sunos) to the skip list...