aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
2014-02-24Merge branch 'lukas/erts/float_encoding/OTP-11738'Lukas Larsson
* lukas/erts/float_encoding/OTP-11738: erts: Set default external enc to use new float scheme
2014-02-24Merge branch 'vinoski/ds2'Rickard Green
* vinoski/ds2: further enhancements for dirty schedulers allow optional whitespace in dirty scheduler erl options
2014-02-24further enhancements for dirty schedulersSteve Vinoski
Add support for setting the number of dirty CPU schedulers online via erlang:system_flag/2. Assuming the emulator is built with dirty schedulers enabled, the number of dirty CPU schedulers online may not be less than 1, nor greater than the number of dirty CPU schedulers available, nor greater than the number of normal schedulers online. Dirty CPU scheduler threads that are taken offline via system_flag/2 are suspended. The number of dirty CPU schedulers online may be adjusted independently of the number of normal schedulers online, but if system_flag/2 is used to set the number of normal schedulers online to a value less than the current number of normal schedulers online, the number of dirty CPU schedulers online is decreased proportionally. Likewise, if the number of normal schedulers online is increased, the number of dirty CPU schedulers online is increased proportionally. For example, if 8 normal schedulers and 4 dirty CPU schedulers are online, and system_flag/2 is called to set the number of normal schedulers online to 4, the number of dirty CPU schedulers online is also decreased by half, to 2. Subsequently setting the number of normal schedulers online back to 8 also sets the number of dirty CPU schedulers online back to 4. Augment the system_flag/2 documentation in the erlang man page to explain this relationship between schedulers_online and dirty_cpu_schedulers_online. Also ensure that all dirty CPU and I/O schedulers are suspended when multi-scheduling is blocked via system_flag/2, and brought back online when multi-scheduling is unblocked. Add Rickard Green's rewritten check_enqueue_in_prio_queue() function that inspects process state more thoroughly to determine if to enqueue it and if so on what queue, including dirty queues when appropriate. Make sure dirty NIF jobs do not trigger erlang:system_monitor long_schedule messages. Add more dirty scheduler testing to the scheduler test suite. Remove the erts_no_dirty_cpu_schedulers_online global variable, since it's no longer needed. Execute dirty NIFs on a normal scheduler thread while multi-scheduling blocking is in effect. Evacuate any dirty jobs residing in the dirty run queues over to a normal run queue when multi-scheduling is blocked. Allow dirty schedulers to execute aux work. Set the dirty run queues halt_in_progress flag when halting the normal schedulers. Change dirty scheduler numbers to a structure including both scheduler number and type, either dirty CPU or dirty I/O. Add some assertions to ensure that dirty CPU schedulers operate only on dirty CPU scheduler process flags, and the same for dirty I/O schedulers.
2014-02-24erts: Set default external enc to use new float schemeLukas Larsson
This change was triggered by the OSE float printing function not working exactly the same way as linux/win32. But it is also a good one in general as it cuts size in more than half for floats.
2014-02-20erts: Fix memory leak in nif_SUITE:resource_takeoverSverker Eriksson
2014-02-19Merge branch 'sverk/test_server/openbsd-dynlink'Sverker Eriksson
* sverk/test_server/openbsd-dynlink: erts: Skip driver_SUITE:thr_free_drv for VM without threads erts: Fix driver_SUITE:otp_9302 for VM without threads test_server: Fix dynlib link command for openbsd
2014-02-19Merge branch 'sverk/crypto/hmac-context-reuse-bug'Sverker Eriksson
OTP-11722 OTP-11724 * sverk/crypto/hmac-context-reuse-bug: crypto: Fix bug when using old hmac context erts: Fix NIF bug when load/upgrade fails after enif_open_resource_type Conflicts: erts/emulator/test/nif_SUITE.erl
2014-02-07erts,compiler: Correct and amend tests for MapsBjörn-Egil Dahlberg
Faulty test for maps update
2014-02-05erts: Fix NIF bug when load/upgrade fails after enif_open_resource_typeSverker Eriksson
..has been successfully called. Opened resource types (created or taken-over) were left "hanging" leading both to memory leakage and other more strange and serious behavior. Now a proper rollback is done.
2014-02-05erts: Skip driver_SUITE:thr_free_drv for VM without threadsSverker Eriksson
2014-02-05erts: Fix driver_SUITE:otp_9302 for VM without threadsSverker Eriksson
2014-01-29erts: Strengthen map_SUITE testsBjörn-Egil Dahlberg
* Add tests for maps:merge/2 * Add tests for maps:update/3 * Test more corner cases
2014-01-29erts: Update maps_fold test to respect maps:fold/3Björn-Egil Dahlberg
2014-01-29erts: Add map construction to driver APISverker Eriksson
erl_drv_output_term() and erl_drv_send_term() can send messages containing maps with the use of the new ERL_DRV_MAP. The driver API minor version is updated as new functionality is added.
2014-01-29erts: Change 'size' argument of enif_get_map_size from int* to size_t*Sverker Eriksson
2014-01-29erts: Add more tests for the NIF map APISverker Eriksson
2014-01-29erts: Fix map iterator bug when reverting from end of map positionSverker Eriksson
and simplify code by ignoring h_limit which is always zero.
2014-01-29Update map_SUITE to test "unsorted" encoded mapsBjörn-Egil Dahlberg
2014-01-29Update map_SUITE to respect term orderBjörn-Egil Dahlberg
2014-01-29erts: Test Maps with NIFsBjörn-Egil Dahlberg
2014-01-28erts: Add tests for Map update on expressionsBjörn-Egil Dahlberg
(foo())#{ k1 := V1, k2 => V2 }
2014-01-28erts: Add tests for non BIFs in Maps moduleBjörn-Egil Dahlberg
* maps:without/2 * maps:foldl/3 * maps:foldr/3 * maps:map/2 * maps:size/1
2014-01-28erts,stdlib: Change map module name to mapsBjörn-Egil Dahlberg
Name conforms to EEP.
2014-01-28erts: Fix map_SUITE match spec testsBjörn-Egil Dahlberg
2014-01-28Add tests for pditc, ets and tracingLukas Larsson
2014-01-28erts: Remove erlang:size/1 test from map_SUITEBjörn-Egil Dahlberg
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: Add Map tests for erlang:phash/2Björn-Egil Dahlberg
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-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-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-23erts: Fix faulty assert in match spec engine.Sverker Eriksson
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-16compiler: Correct line number in exception from binary constructionBjörn Gustavsson
Reported-by: Stanislav Seletskiy
2014-01-15remove deprecated driver_async_cancel functionSteve Vinoski
Some time ago the driver_async_cancel function was deprecated and slated for removal in R17. This commit removes the function along with its associated tests and documentation, sets the ERL_DRV_EXTENDED_MAJOR_VERSION to 3 and ERL_DRV_EXTENDED_MINOR_VERSION to 0, and modifies the sys_info_base_drv and sys_info_prev_drv tests in the driver test suite to check version 3.0 instead of 2.0.
2014-01-10erts: Run binary_SUITE:trapping even for 32bitSverker Eriksson
Not sure why it was disabled for 32bit in the first place?
2014-01-10erts: Extend binary_SUITE:ttb_trap to also cover binary_to_termSverker Eriksson
and rename it 'trapping'.
2014-01-09Fix issues with new versioningRickard Green
2014-01-08erts: Fix useless comparisons in binary_SUITE:external_sizeSverker Eriksson
2014-01-08erts: Reduce heap usage for binary_SUITE:deepSverker Eriksson
2013-12-17Merge tag 'OTP_R16B03_yielding_binary_to_term'Sverker Eriksson
Yielding binary_to_term. OTP-11535 * tag 'OTP_R16B03_yielding_binary_to_term': Increase versions for OTP_R16B03_yielding_binary_to_term erts: Adjust term_to_binary reduction factors erts: Yield after trapping term_to_binary if gc has been ordered erts: Let term_to_binary disable gc while trapping erts: Improve stress of binary_to_term in binary_SUITE erts: Fix bug in binary_to_term for compressed on halfword erts: Fix crash when binary_to_term throws badarg erts: Trapping memcpy in binary_to_term erts: Cleanup code for trapping binary_to_term erts: Add erlang wrappers to binary_to_term trapping uncompress trapping size calculation trapping binary_to_term/2 trapping STRING_EXT trapping lists and tuples trapping binary_to_term passing binary_SUITE Conflicts: erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/vsn.mk lib/kernel/vsn.mk lib/stdlib/vsn.mk
2013-12-12Test named funsAnthony Ramine