aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-10-18Merge branch 'ar/odbc_nagel'Henrik Nord
* ar/odbc_nagel: Under Unix enable TCP_NODELAY to disable Nagel's socket algorithm OTP-10506
2012-10-18Merge branch 'nk/jinterface-fix_compressed_binary'Henrik Nord
* nk/jinterface-fix_compressed_binary: add (de)compress roundtrip tests with larger values fix reading compressed binary terms from Java OTP-10505
2012-10-18Merge branch 'at/binary-depth-printing'Henrik Nord
* at/binary-depth-printing: Fix printing the empty binary at depth 1 with ~W OTP-10504
2012-10-18Merge branch 'jf/fix_sctp_peeloff_active_true'Henrik Nord
* jf/fix_sctp_peeloff_active_true: Set new peeled off SCTP socket to nonblocking socket SCTP test case with socket active options once and true OTP-10491
2012-10-16test: Add test for heart restart on crashBjörn-Egil Dahlberg
* node_start_immediately_after_crash tests that heart restarts beam upon a crash and will not generate a crash dump
2012-10-16erts: Change ERL_CRASH_DUMP_SECONDS behaviourBjörn-Egil Dahlberg
Not setting ERL_CRASH_DUMP_SECONDS will now terminate beam immediately on a crash without writing a crash dump file. Setting ERL_CRASH_DUMP_SECONDS to 0 will also terminate beam immediately on a crash without writing a crash dump file, i.e. same as not setting ERL_CRASH_DUMP_SECONDS environment variable. Setting ERL_CRASH_DUMP_SECONDS to a negative value will let the beam wait indefinitely on the crash dump file being written. Setting ERL_CRASH_DUMP_SECONDS to a positive value will let the beam wait that many seconds on the crash dump file being written. A positive value will set both an alarm in beam AND a heart timeout for restart if heart is running. This is due to the change of 'heart' behavior when 'heart' is listening for a crash.
2012-10-15test: Refactor away ?line macros in heart_SUITEBjörn-Egil Dahlberg
2012-10-15erts: Search for heart in ports that are aliveBjörn-Egil Dahlberg
2012-10-15heart: Refactor heart debuggingBjörn-Egil Dahlberg
2012-10-15erts, heart: Ensure erl_crash.dump is writtenBjörn-Egil Dahlberg
When a crash dump is about to be written and we have heartbeat enabled on a system. We need time to write it before heart explicitly kills the beam.
2012-10-15beam_makeops: Eliminate a deprecation warningBjörn Gustavsson
Perl 5.16.1 (and perhaps other versions) issues the following warning: defined(@array) is deprecated at utils/beam_makeops line 1714. (Maybe you should just omit the defined()?) for the following line: $prev_last = pop(@{$gen_transform{$key}}) if defined @{$gen_transform{$key}}; # LINE 1714 The documentation for "defined" says that its use on hashes and arrays is deprecated and that it may stop working in a future release. Simply removing "defined" (as suggested by the warning message) will not work, as there will be an error when trying to use an undefined value as an array reference: Can't use an undefined value as an ARRAY reference at utils/beam_makeops line 1714. What we must do is to check whether $gen_transform{$key} is defined before trying to use it as an array reference. Noticed-by: Tuncer Ayaz
2012-10-15Merge branch 'tp/supervisor-pass-on-errors'Siri Hansen
* tp/supervisor-pass-on-errors: If supervisor:start_link fails to start child, add child id to error reason Fix documentation about how supervisor handles crash in child's start function Have supervisor send errors up the chain OTP-10490
2012-10-12Merge branch 'egil/add-scalefactor-to-start_node'Björn-Egil Dahlberg
* egil/add-scalefactor-to-start_node: test_server: Let start_node/3 utilize scalefactor test_server: Refactor timetrap_scale_factor/0
2012-10-12erts: Add configure test for IPV6_V6ONLYRaimo Niskanen
2012-10-11If supervisor:start_link fails to start child, add child id to error reasonSiri Hansen
2012-10-11filename: Eliminate Dialyzer warningBjörn Gustavsson
os:type/0 always returns a two-tuple.
2012-10-11common_test: Make ct_system_error_SUITE portable to WindowsBjörn Gustavsson
On Windows, the log files are not placed under priv_dir, so we will have to retrieve the path using ct_test_support (which works fine on all platforms).
2012-10-11Fix documentation about how supervisor handles crash in child's start functionSiri Hansen
2012-10-11Merge branch 'lukas/erts/dont_break_reductions_skip/OTP-10373'Lukas Larsson
* lukas/erts/dont_break_reductions_skip/OTP-10373: Skip dont_break_reductions on hipe libs tests
2012-10-11Merge branch 'lukas/erts/bad_terms_hipe_skip/OTP-10375'Lukas Larsson
* lukas/erts/bad_terms_hipe_skip/OTP-10375: Skip fun corruption when lists is native
2012-10-11Merge branch 'hb/kernel/spec_fix/OTP-10473'Hans Bolinder
* hb/kernel/spec_fix/OTP-10473: Fix the contract of erl_ddll:format_error/1
2012-10-11Merge branch 'hb/stdlib/spec_fix/OTP-10474'Hans Bolinder
* hb/stdlib/spec_fix/OTP-10474: Change the type of some arguments in filename to file:name()
2012-10-10Change the type of some arguments in filename to file:name()Hans Bolinder
2012-10-10Skip dont_break_reductions on hipe libs testsLukas Larsson
2012-10-10Skip fun corruption when lists is nativeLukas Larsson
This is needed as corruption of the index_uniq byte can cause very strange behaviour when the fun is called by native code.
2012-10-10Update primary bootstrapBjörn Gustavsson
2012-10-10Merge branch 'bjorn/compiler/minor-optimization-polishing/OTP-10193'Björn Gustavsson
* bjorn/compiler/minor-optimization-polishing/OTP-10193: (25 commits) beam_bsm: Handle calls slightly better Break apart tail-recursive call instructions Represent the 'send' instruction as a call_ext/2 instruction Rewrite select_val and select_tuple_arity to a select instruction Rewrite binary creation instructions to bs_init instructions Rewrite bs_add, bs_utf*_size to BIF instructions in optimizations Rewrite bs_put* instructions to a generic bs_put instruction Refactor removal of unused labels Introduce the mandatory beam_a and beam_z passes compile: Fix bug in selection of passes beam_receive: Optimize receives using refs created by spawn_monitor/{1,3} compile: Give a friendler error message if a parse transform cannot be found beam_jump: Don't move a block which can be entered via a fallthrough beam_jump: Fix broken optimization v3_kernel: Fix match code for matched out segment size in multiple clauses Improve binary matching of literals v3_codegen: Combine adjacent bs_match_string instructions beam_bool: Recognize more safe optimizations beam_utils: Correct usage calculations for GC BIFs in blocks beam_utils:live_opt/1: Correct liveness calculation for 'try' ...
2012-10-10beam_bsm: Handle calls slightly betterBjörn Gustavsson
We were too conservative when handling a call when there were copies of the match context in both x and y registers. Don't give up if there is are copies of the match context in y registers, as long as those copies are killed by the code that follows the call.
2012-10-10Break apart tail-recursive call instructionsBjörn Gustavsson
Somewhat reduce the code bloat by eliminating special cases.
2012-10-10Represent the 'send' instruction as a call_ext/2 instructionBjörn Gustavsson
Somewhat reduce code bloat.
2012-10-10Rewrite select_val and select_tuple_arity to a select instructionBjörn Gustavsson
Eliminate some code bloat.
2012-10-10Merge branch 'maint'Björn-Egil Dahlberg
2012-10-10Merge branch 'egil/fix-boot_combo-test' into maintBjörn-Egil Dahlberg
* egil/fix-boot_combo-test: test: Fix smoke_test_SUITE
2012-10-10Merge branch 'siri/sasl/appup-regexp-fix/OTP-10463'Siri Hansen
* siri/sasl/appup-regexp-fix/OTP-10463: Fix release_handler:find_script so it can read regexp in appups
2012-10-09Merge branch 'maint'Lukas Larsson
* maint: Fix bug when making nsis target
2012-10-09Merge branch 'lukas/erts/whitespace_nsis_fix/OTP-10481' into maintLukas Larsson
* lukas/erts/whitespace_nsis_fix/OTP-10481: Fix bug when making nsis target
2012-10-09test: Fix smoke_test_SUITEBjörn-Egil Dahlberg
* Skip boot_combo tests where cannot start slave nodes (The binary will not exist)
2012-10-09Rewrite binary creation instructions to bs_init instructionsBjörn Gustavsson
Rewrite the five binary creation instructions to a bs_init instruction, in order to somewhat reduce code bloat.
2012-10-09Rewrite bs_add, bs_utf*_size to BIF instructions in optimizationsBjörn Gustavsson
We can remove some code bloat by handling the special instructions as BIF instructions in the optimization passes. Also note that bs_utf*_size was not handled by beam_utils:check_liveness/3 (meaning the conservative answer instead of the correct answer would be returned).
2012-10-09Rewrite bs_put* instructions to a generic bs_put instructionBjörn Gustavsson
Seven bs_put_* instructions can be combined into one generic bs_put instruction to avoid some code bloat. That will also improve some optimizations (such as beam_trim) that did not handle all bs_put* variants.
2012-10-09Refactor removal of unused labelsBjörn Gustavsson
Since we always want to remove unused labels directly after code generation (whether we'll run the optimization passes or not), we can simplify the code by doing it in beam_a.
2012-10-09Introduce the mandatory beam_a and beam_z passesBjörn Gustavsson
Introduce the mandary beam_a pass that will be run directly after code generation, and the mandatory beam_z pass that will be run just before beam_asm. Since these passes surround the optimizations, beam_a can (for example) do instruction renaming to simplify the optimization passes and beam_z can undo those renamings.
2012-10-09compile: Fix bug in selection of passesBjörn Gustavsson
2012-10-09beam_receive: Optimize receives using refs created by spawn_monitor/{1,3}Björn Gustavsson
2012-10-09compile: Give a friendler error message if a parse transform cannot be foundBjörn Gustavsson
Don't throw the parse tree in the face of the user. OTP-8707
2012-10-09beam_jump: Don't move a block which can be entered via a fallthroughBjörn Gustavsson
beam_jump moves short code sequences ending in an instruction that causes an exception to the end of the function, in the hope that a jump around the moved blocked can be replaced with a fallthrough. Therefore, moving a block that is entered via a fallthrough defeats the purpose of the optimization. Also add two more test cases for the beam_receive module to ensure that all lines are still covered.
2012-10-09beam_jump: Fix broken optimizationBjörn Gustavsson
A test instruction with the same target label as jump immediately followed it was supposed to be removed, but it was kept anyway. Fix that optimization, but also make sure that the test instruction is kept if the test instruction may have side effects (such as a bit syntax matching instruction). While at it, make the code cleaner by breaking it up into two clauses and don't remove the jump instruction if it is redudant (removal of redundant jump instructions is already handled in another place).
2012-10-09v3_kernel: Fix match code for matched out segment size in multiple clausesBjörn Gustavsson
When matched variable is used as a size field in multiple clauses, as in: foo(<<L:8,A:L>>) -> A; foo(<<L:8,A:L,B:8>>) -> {A,B}. the match tree would branch out before the segment that used the matched-out variable (in this example, the tree would branch out before the matching of A:L). That happens because the pattern matching compilator did not take variable substitutions into account when grouping clauses that match the same value. That is, the generated code would work similarly to this code: foo(<<L:8,T/binary>>) -> case T of <<A:L>> -> A; _ -> case T of <<A:L,B:8>> -> %% A matched out again! {A,B} end end. We would like the matching to work more like: foo(<<L,A:L,T/binary>>) -> case T of <<>> -> A; <<B:8>> -> {A,B} end. Fix the problem by taking the substitutions into account when grouping clauses that match out the same value.
2012-10-09Improve binary matching of literalsBjörn Gustavsson
The bs_match_string instruction is used to speed up matching of binary literals. For example, given this source code: foo1(<<1,2,3>>) -> ok. The matching part of the code will look like: {test,bs_start_match2,{f,1},1,[{x,0},0],{x,0}}. {test,bs_match_string,{f,3},[{x,0},24,{string,[1,2,3]}]}. {test,bs_test_tail2,{f,3},[{x,0},0]}. Nice. However, if we do a simple change to the source code: foo2(<<1,2,3>>) -> ok; foo2(<<>>) -> error. the resulting matching code will look like (sligthly simplified): {test,bs_start_match2,{f,4},1,[{x,0},0],{x,0}}. {test,bs_get_integer2,{f,7},1,[{x,0},{integer,8},1,Flags],{x,1}}. {test,is_eq_exact,{f,8},[{x,1},{integer,1}]}. {test,bs_match_string,{f,6},[{x,0},16,{string,[2,3]}]}. {test,bs_test_tail2,{f,6},[{x,0},0]}. {move,{atom,ok},{x,0}}. return. {label,6}. {bs_restore2,{x,0},{atom,start}}. {label,7}. {test,bs_test_tail2,{f,8},[{x,0},0]}. That is, matching of the first byte is not combined into the bs_match_string instruction that follows. Fix this problem by allowing a bs_match_string instruction to be used if all clauses will match either the same integer literal or the empty binary.
2012-10-09v3_codegen: Combine adjacent bs_match_string instructionsBjörn Gustavsson
In modules with huge functions with many bs_match_string instructions, we can speed up the compilation by combining adjacent bs_match_strings instruction in v3_codegen (as opposed to in beam_block where we used to do it). For instance, on my computer the v3_codegen became more than twice as fast when compiling the re_testoutput1_split_test module in the STDLIB test suites.