aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2014-01-28stdlib: Deny variables as keys and disallow ':=' in map constructionBjörn-Egil Dahlberg
In the current iteration of Maps we should deny *any* variables in Map keys.
2014-01-28erts: Update Maps erlang:phash2/1 testsBjörn-Egil Dahlberg
2014-01-28erts: erlang:phash2 should hash Maps independent of orderBjörn-Egil Dahlberg
2014-01-28erts: Add Map tests for erlang:phash/2Björn-Egil Dahlberg
2014-01-28erts: Add Maps to erlang:phash/2 and erlang:hash/2Björn-Egil Dahlberg
The hashing a map in these functions uses the same strategy as the other terms. The exception being a prime number with size so we do not get erlang:phash(#{}) -> 1 which would be the same as erlang:phash({}) and erlang:phash(<<>>). Same argument for erlang:hash/1.
2014-01-28erts: Add Map tests for hashing and external formatBjörn-Egil Dahlberg
- Update map_SUITE with hash and encode tests - Update map_SUITE with external format decode tests - Update map_SUITE with map:to_list/1 and map:from_list/1 tests
2014-01-28erts: Teach term_to_binary/1 and binary_to_term/1 Map encodingBjörn-Egil Dahlberg
2014-01-28erts: Fixup map instructions for halfwordBjörn-Egil Dahlberg
2014-01-28compiler: Implement different instructions for => and :=Björn Gustavsson
2014-01-28erts: Conform map_SUITE to extended syntaxBjörn-Egil Dahlberg
2014-01-28erts: Add testsuite for MapsBjörn-Egil Dahlberg
2014-01-28erts: Introduce more Maps BIFsBjörn-Egil Dahlberg
* map:remove/2 * map:keys/1 * map:values/1 * map:is_key/2 * map:update/3 - Equivalent to ':=' operator in #{ K := V } maps. * map:from_list/1 - map:from_list/1 takes any unsorted key/value list, [{K,V}], and produces a map. Duplicate keys are removed. The latest key is kept. * map:find/2 - Searches for a pair that *equals* input key. * map:merge/2 - Merge two maps to one map.
2014-01-28erts: Add the type-testing guard BIF is_map/1Björn-Egil Dahlberg
To add a type-testing guard BIF, the following steps are needed: * The BIF itself is added to bif.tab (note that it should be declared using "ubif", not "bif"), and its implementation to erl_bif_op.c. * erl_internal must be modified in 3 places: The type test must be recognized as guard BIF, as a type test, and it must be auto-imported. * There must be an instruction that implements the same type test as the BIF (it will be used in guards). beam_utils:bif_to_test/3 must be updated to recognize the new guard BIF.
2014-01-28erts: Add the size-testing guard BIF map_size/1Björn-Egil Dahlberg
2014-01-28erts: Add phash2 Map functionalityBjörn-Egil Dahlberg
2014-01-28erts: Initial Map instructions, type and structureBjörn-Egil Dahlberg
2014-01-28erts: Maps beam-instruction definitionsBjörn Gustavsson
2014-01-28Implement support for maps in the compilerBjörn Gustavsson
To make it possible to build the entire OTP system, also define dummys for the instructions in ops.tab.
2014-01-28BEAM loader: Support preservation of extra operand in transformsBjörn Gustavsson
It was not possible to preserve extra arguments in transformations. The following (hypothetical) example will now work: some_op Lit=c SizeArg Rest=* => move Lit x | some_op x SizeArg Rest
2014-01-28Merge branch 'vinoski/ds'Rickard Green
* vinoski/ds: initial support for dirty schedulers and dirty NIFs
2014-01-28initial support for dirty schedulers and dirty NIFsSteve Vinoski
Add initial support for dirty schedulers. There are two types of dirty schedulers: CPU schedulers and I/O schedulers. By default, there are as many dirty CPU schedulers as there are normal schedulers and as many dirty CPU schedulers online as normal schedulers online. There are 10 dirty I/O schedulers (similar to the choice of 10 as the default for async threads). By default, dirty schedulers are disabled and conditionally compiled out. To enable them, you must pass --enable-dirty-schedulers to the top-level configure script when building Erlang/OTP. Current dirty scheduler support requires the emulator to be built with SMP support. This restriction will be lifted in the future. You can specify the number of dirty schedulers with the command-line options +SDcpu (for dirty CPU schedulers) and +SDio (for dirty I/O schedulers). The +SDcpu option is similar to the +S option in that it takes two numbers separated by a colon: C1:C2, where C1 specifies the number of dirty schedulers available and C2 specifies the number of dirty schedulers online. The +SDPcpu option allows numbers of dirty CPU schedulers available and dirty CPU schedulers online to be specified as percentages, similar to the existing +SP option for normal schedulers. The number of dirty CPU schedulers created and dirty CPU schedulers online may not exceed the number of normal schedulers created and normal schedulers online, respectively. The +SDio option takes only a single number specifying the number of dirty I/O schedulers available and online. There is no support yet for programmatically changing at run time the number of dirty CPU schedulers online via erlang:system_flag/2. Also, changing the number of normal schedulers online via erlang:system_flag(schedulers_online, NewSchedulersOnline) should ensure that there are no more dirty CPU schedulers than normal schedulers, but this is not yet implemented. You can retrieve the number of dirty schedulers by passing dirty_cpu_schedulers, dirty_cpu_schedulers_online, or dirty_io_schedulers to erlang:system_info/1. Currently only NIFs are able to access dirty scheduler functionality. Neither drivers nor BIFs currently support dirty schedulers. This restriction will be addressed in the future. If dirty scheduler support is present in the runtime, the initial status line Erlang prints before presenting its interactive prompt will include the indicator "[ds:C1:C2:I]" where "ds" indicates "dirty schedulers", "C1" indicates the number of dirty CPU schedulers available, "C2" indicates the number of dirty CPU schedulers online, and "I" indicates the number of dirty I/O schedulers. Document The dirty NIF API in the erl_nif man page. The API closely follows Rickard Green's presentation slides from his talk "Future Extensions to the Native Interface", presented at the 2011 Erlang Factory held in the San Francisco Bay Area. Rickard's slides are available online at http://bit.ly/1m34UHB . Document the new erl command-line options, the additions to erlang:system_info/1, and also add the erlang:system_flag/2 dirty scheduler documentation even though it's not yet implemented. To determine whether the dirty NIF API is available, native code can check to see whether the C preprocessor macro ERL_NIF_DIRTY_SCHEDULER_SUPPORT is defined. To check if dirty schedulers are available at run time, native code can call the boolean enif_have_dirty_schedulers() function, and Erlang code can call erlang:system_info(dirty_cpu_schedulers), which raises badarg if no dirty scheduler support is available. Add a simple dirty NIF test to the emulator NIF suite.
2014-01-28Merge branch 'vinoski/rm-drv-async-cancel'Rickard Green
OTP-11628 * vinoski/rm-drv-async-cancel: remove deprecated driver_async_cancel function
2014-01-27Merge branch 'sverk/misc-bug-fixes'Sverker Eriksson
OTP-11618 * sverk/misc-bug-fixes: erts: Fix faulty assert in match spec engine. erts: Fix crash when comparing very large floats with integers erts: Refactor big-float compare on HALFWORD to use C-stack erts: Fix halfword compile errors in ESTACK
2014-01-27Merge branch 'egil/gc-increase-tenure-rate/OTP-11617'Björn-Egil Dahlberg
* egil/gc-increase-tenure-rate/OTP-11617: erts: Increase gc tenure rate
2014-01-27Merge branch 'rickard/load_balance/OTP-11385'Rickard Green
* rickard/load_balance/OTP-11385: Fix usage of non-empty run-queue flag
2014-01-27Fix usage of non-empty run-queue flagRickard Green
2014-01-27Merge branch 'lukas/erts/sendfile_passive_mode_fix/OTP-11614'Lukas Larsson
* lukas/erts/sendfile_passive_mode_fix/OTP-11614: erts: fix bug when using passive mode and sendfile
2014-01-27erts: fix bug when using passive mode and sendfileLukas Larsson
The bug incorrectly issued driver_select when un-ignoring an fd for a socket in passive mode, which caused an incorrect error tuple to be returned when the remote end closed the connection.
2014-01-27erts/kernel: sendfile no longer uses async threadsLukas Larsson
This has been done because a slow client attack is possible if the async thread pool is used. The scenario is: Client does a request for a file and then slowly receives the file one byte at a time. This will eventually fill the async thread pool with blocking sendfile operations and thus starving the vm of all file operations. If you still want to use the async threads pool for sendfile an option to enable it has been introduced.
2014-01-24Merge branch 'rickard/load_balance/OTP-11385'Rickard Green
* rickard/load_balance/OTP-11385: Disable scheduler utilization balancing if +scl true is passed
2014-01-24Disable scheduler utilization balancing if +scl true is passedRickard Green
2014-01-24Merge branch 'rickard/load_balance/OTP-11385'Rickard Green
* rickard/load_balance/OTP-11385: Add support for scheduler utilization balancing
2014-01-23Merge branch 'rickard/default_acul/OTP-11604'Rickard Green
* rickard/default_acul/OTP-11604: erts: Use "+Muacul de" as default
2014-01-23Add support for scheduler utilization balancingRickard Green
For more information see documentation of the new command line argument +sub
2014-01-23Merge branch 'vinoski/system-flag-warn-msg'Henrik Nord
* vinoski/system-flag-warn-msg: fix system_flag deprecation warnings OTP-11602
2014-01-23erts: Fix faulty assert in match spec engine.Sverker Eriksson
2014-01-22erts: Fix crash when comparing very large floats with integersSverker Eriksson
big_buf was one word too short on 32-bit emulators causing memory corruption. Seems like this did not cause a problem before the ESTACK memory layout was changed in 172ebf11dc455e22b87f.
2014-01-22erts: Refactor big-float compare on HALFWORD to use C-stackSverker Eriksson
for the temporary conversion from float to big. Preparation for coming bugfix of 'big_buf' array size.
2014-01-22Merge branch 'bjorn/erts/zlib-1.2.8'Björn Gustavsson
* bjorn/erts/zlib-1.2.8: configure: Prefer the system's zlib over own our zlib source Update preloaded modules Add the 'rle' zstrategy Don't make gzio.c dependent on the zutil.h header file Update zlib to 1.2.8 erts/zlib: Remove unused file example.c
2014-01-22erts: Fix halfword compile errors in ESTACKSverker Eriksson
Errors introduced in 172ebf11dc455e2
2014-01-20Merge branch 'sverk/term2bin-simplify'Sverker Eriksson
* sverk/term2bin-simplify: erts: Refactor ESTACK & WSTACK to use a struct easy to "export" erts: Fix benign ESTACK/WSTACK typo erts: Fix compiler warnings for NO_JUMP_TABLE erts: Run binary_SUITE:trapping even for 32bit erts: Extend binary_SUITE:ttb_trap to also cover binary_to_term erts: Remove the extra_root feature from the process structure erts: Simplify term_to_binary by removing saved ESTACK from root set
2014-01-20Fix testcase driver_SUITE:consume_timesliceRickard Green
2014-01-20Merge branch 'sverk/bin2term-int-size-estimation-bug'Sverker Eriksson
OTP-11585 * sverk/bin2term-int-size-estimation-bug: erts: Fix useless comparisons in binary_SUITE:external_size erts: Reduce heap usage for binary_SUITE:deep erts: Remove overestimation of heap space in binary_to_term
2014-01-20Merge branch 'bjorn/fix-line-number-in-bs-exception/OTP-11572'Björn Gustavsson
* bjorn/fix-line-number-in-bs-exception/OTP-11572: compiler: Correct line number in exception from binary construction
2014-01-20Merge branch 'egil/fix-bs_get_integer/OTP-11581'Björn-Egil Dahlberg
* egil/fix-bs_get_integer/OTP-11581: erts: Fix bs_get_integer instruction
2014-01-17erts: Refactor ESTACK & WSTACK to use a struct easy to "export"Sverker Eriksson
This is not a clean refactor. It changes the behaviour slightly of E/WSTACK_RESTORE. The allocated stack from E/WSTACK_SAVE is used as-is and not copied into default_stack. This will hopefully fix an illusive memory leak that valgrind is reporting.
2014-01-16compiler: Correct line number in exception from binary constructionBjörn Gustavsson
Reported-by: Stanislav Seletskiy
2014-01-15fix system_flag deprecation warningsSteve Vinoski
Passing cpu_topology or scheduler_bind_type to erlang:system_flag/2 results in an error report warning that the argument is deprecated and is slated for removal in erts-5.10/OTP-R16. Since we're already past that version and no substitute approach has yet been decided for these features, keep the deprecation warning but bump the removal version it mentions up to Erlang 18.
2014-01-15erts: Fix benign ESTACK/WSTACK typoSverker Eriksson
2014-01-15erts: Fix compiler warnings for NO_JUMP_TABLESverker Eriksson