aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-03-06Eliminate unused i_bs_skip_bits_all2 instructionBjörn Gustavsson
Starting in OTP 19 (in commit 9504c0dd71d0), the compiler emits a test_unit instruction instead of a skip instruction at the end of binary. We can do the same replacement in the loader to get rid of the i_bs_skip_bits_all2 instruction.
2019-03-06Optimize field size calculation on a 64-bit architectureBjörn Gustavsson
On a 64-bit architecture, the size of any binary that would fit in the memory must fit in a small, so we can fail immediately if the size term is not a small.
2019-03-06Reduce code size for binary matching instructionsBjörn Gustavsson
The new compiler required adding support for Y register for all binary matching instructions. That was (intentionally) done in a naive way that simplicated duplicated the entire body of each instruction. Now it's time to be less naive. Rewrite the binary matching instructions using micro instructions. Because some of the binary instructions are huge, that will significantly decrease the size of process_main(). When compiling with clang, a huge process_main() would mess up profile-guide optimization resulting in a significant performance degradation. On my Mac, profile-guide optimzation would decrease the estone benchmark by 100K estones (about 20 percent). This commit gives me back the lost estones.
2019-03-06Deoptimize obsoleted binary matching instructionsBjörn Gustavsson
Mark the obsoleted instructions bs_start_match2, bs_save2, bs_restore2, and bs_context_to_binary as cold. Remove support of a Y operand for bs_save2 and bs_restore2.
2019-03-06Reclassify get_tuple_element with a Y destination as hotBjörn Gustavsson
get_tuple_element with an Y register has become more frequent with the new compiler.
2019-03-06Remove optimization that has become a pessimizationBjörn Gustavsson
The compiler used to generate "move Literal y(Y)" instructions very rarely. Therefore, there was a transformation to avoid having a "move c y" instruction. With the new compiler, "move Literal y(Y)" instructions are relatively frequent, so we will need a "move c y" instruction.
2019-03-06Introduce move_window2 and remove move2_par_xyxyBjörn Gustavsson
2019-03-06Optimize hd/1 and tl/1 in guardsBjörn Gustavsson
2019-03-06bif_instrs.tab: Don't hardcode length of instructionsBjörn Gustavsson
2019-03-06beam_emu.c: Rename the confusing macro GetR() to GetSource()Björn Gustavsson
2019-03-04Merge branch 'maint'Raimo Niskanen
* maint: Set early enough start time inet_db: fix a bug when .hosts file is never reloaded
2019-03-04Merge branch 'inet_db-startup-fix' into maintRaimo Niskanen
* inet_db-startup-fix: Set early enough start time inet_db: fix a bug when .hosts file is never reloaded
2019-03-04Set early enough start timeRaimo Niskanen
Adhering to the review in GitHub PR #2066: The start time should be set so the resolver file can get re-read as soon as possible to not get the whole timeout time before detecting that the resolver file has been created.
2019-03-04Merge branch 'rickard/deprecations-removals'Rickard Green
* rickard/deprecations-removals: Fix bootstrap
2019-03-04Merge branch 'maint'Hans Bolinder
* maint: stdlib: Optimize calendar:system_time_to_rfc3339()
2019-03-04Merge branch 'hasse/stdlib/optimize_calendar_rfc3339/OTP-15630' into maintHans Bolinder
* hasse/stdlib/optimize_calendar_rfc3339/OTP-15630: stdlib: Optimize calendar:system_time_to_rfc3339()
2019-03-04Merge branch 'bmk/20190301/socket_test_cleanup'Micael Karlberg
2019-03-04Merge branch 'maint'Siri Hansen
2019-03-04Merge branch 'siri/logger/os-timestamp/OTP-15625' into maintSiri Hansen
* siri/logger/os-timestamp/OTP-15625: Update preloaded [logger] Change timestamp from erlang:system_time to os:system_time
2019-03-04Merge branch 'maint'Raimo Niskanen
* maint: fixup! ssl: Add support for {active,N} ssl: Use common fonction to update {active,N} ssl: Document {active,N} ssl: Add support for {active,N}
2019-03-04Merge branch 'bmk/20190301/net_test/OTP-15635'Micael Karlberg
2019-03-04Merge pull request #2158 from Raphexion/masterSiri Hansen
Rewords one sentence in common_test documentation
2019-03-04Merge branch 'essen/ssl-active-n' into maintRaimo Niskanen
* essen/ssl-active-n: fixup! ssl: Add support for {active,N} ssl: Use common fonction to update {active,N} ssl: Document {active,N} ssl: Add support for {active,N} Conflicts: lib/ssl/src/ssl.erl
2019-03-04Merge branch 'maint'Siri Hansen
2019-03-04Fix bootstrapRickard Green
2019-03-04Merge pull request #2164 from josevalim/jv-set-env-maintSiri Hansen
Add application:set_env/1 and application:set_env/2 OTP-15642
2019-03-04Update primary bootstrapBjörn Gustavsson
2019-03-04Merge pull request #2168 from josevalim/jv-v3_kernel-binary-allBjörn Gustavsson
Move size=all binary clause pruning to v3_kernel
2019-03-04Merge pull request #2167 from bjorng/bjorn/tune-beamBjörn Gustavsson
Tune BEAM instructions for the new compiler (part 1)
2019-03-04Merge pull request #2166 from bjorng/bjorn/compiler/fix-slow-beam_ssa_deadBjörn Gustavsson
Optimize the beam_ssa_dead sub pass
2019-03-04Merge pull request #2165 from josevalim/jv-v3_kernel-fasterBjörn Gustavsson
Optimize v3_kernel for thousands of clauses
2019-03-01Add application:set_env/1 and application:set_env/2José Valim
It is equivalent to calling application:set_env/4 on each application individually, except it is more efficient. When given duplicate apps or duplicate keys, set_env/1 and set_env/2 will warn. The warning will also be emitted during boot: $ erl -config dupkeys.config -s erlang halt 2019-02-27 11:16:02.653100 application: kernel; duplicate parameter: key1 =WARNING REPORT==== 27-Feb-2019::11:16:02.653100 === application: kernel; duplicate parameter: key1 $ erl -config dupapps.config -s erlang halt 2019-02-27 11:16:02.653100 duplicate application config: kernel =WARNING REPORT==== 27-Feb-2019::11:16:02.653100 === duplicate application config: kernel Prior to this patch, the behaviour was unspecified, and duplicate keys and duplicate apps would behave different depending on the amount of config, the name of the config files, and how those configs would be listed. The goal is to raise an error in the future.
2019-03-01Move size=all binary clause prunning to v3_kernelJosé Valim
The advantage of moving it up is that it reduces the size of the code emitted by v3_kernel, speeding v3_kernel itself and beam_kernel_to_ssa pass.
2019-03-01Add a howto for counting instructionsBjörn Gustavsson
2019-03-01Combine is_nonempty_list with get_hd/get_tlBjörn Gustavsson
The is_nonempty_list test is very frequently followed by get_tl, and frequently followed by get_hd.
2019-03-01Remove the combined instruction is_nonempty_list_test_heapBjörn Gustavsson
It turns out that the combination of is_nonempty_list and test_heap is no longer frequent.
2019-03-01Combine more init instructionsBjörn Gustavsson
2019-03-01Combine test_arity with get_tuple_elementBjörn Gustavsson
The test_arity instruction is often followed by get_tuple_element.
2019-03-01Combine get_tuple_element when destinations are not consecutiveBjörn Gustavsson
2019-03-01Optimize v3_kernel for thousands of clausesJosé Valim
Prior to this patch, v3_kernel would do multiple passes on the clauses to group them. This commit unrolls those passes, making v3_kernel up to 10% faster in those cases.
2019-03-01Add a comment about the time complexity of beam_ssa_deadBjörn Gustavsson
2019-03-01Pass the from node as a function argument instead of in a mapBjörn Gustavsson
This is cleaner and slightly faster.
2019-03-01Do some minor optimizations of compilation timesBjörn Gustavsson
The general complexity of the shortcut sub pass of `beam_ssa_dead` is quadratic, but those optimizations will reduce the constant factor somewhat.
2019-03-01Keep the set of unset variables as small as possibleBjörn Gustavsson
Refactor the code to avoid putting any variable from a skippable block into the set of unset variables. Keeping the set of unset variables as small as possible will make beam_ssa_dead almost twice as fast when compiling lib/unicode/tokenizer.ex in elixir.
2019-03-01[socket|test] Quiet logger and ttest improvementsMicael Karlberg
Add a quiet logger mode (default) which limits the printouts in the (erlang) shell (the web log will be as verbose as usual). Also added a way to configure the runtime of the ttest cases.
2019-03-01[socket|test] Moved old test modulesMicael Karlberg
Moved the old socket test modules into its own (temporary?) directory.
2019-03-01[net] Fixed name_and_addr_info test caseMicael Karlberg
The test case did not consider that the machine might have both IPv4 (inet) and IPv6 (inet6) domain interfaces. OTP-15635
2019-03-01[net] Fixed getnameinfo functionMicael Karlberg
The getnameinfo function has been fixed: 1) Faulty sockaddr decode success check 2) Incorrect (name info) return value OTP-15636
2019-03-01[net|test] Add "proper" test suiteMicael Karlberg
Add a (basically) placeholder test suite for the net module. OTP-15635
2019-03-01Merge branch 'john/erts/fix-build-openindiana/OTP-15641'John Högberg
* john/erts/fix-build-openindiana/OTP-15641: erts: Fix erl_printf on Solaris erts: Stop using madvise(2) on Solaris