aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2013-10-15Merge branch 'rickard-sverker/supercarrier/OTP-11149' into maintSverker Eriksson
* rickard-sverker/supercarrier/OTP-11149: (29 commits) erts: Add test case for erts_mmap erts: Add mutex to init_atoms in erts_mmap.c erts: Fix lock violation for init_atoms in erl_mmap.c erts: Fix misc minor bugs in supercarrier initialization erts: Add erts_mmap stats erts: Add erts_bld_tupleX macros erts: Rename erts_bld_atom_uint_2tup_list to *_uword_* erts: Fix bug in lookup_free_seg erts: Fix race bug in erts_munmap erts: Add HARD_DBG_MSEG erts: Refactor rbt_insert in erl_mmap erts: erts_mmap improved free seg desc management erts: Add documentation for +MMsc* system flags erts: Allow page aligned erts_munmap() erts: Sort tree in super aligned sizes (SA_SZ_ADDR_ORDER) erts: Fix ASSERT bug and void* arithmetics erts: Add mmap argument to erts_debug:get_internal_state erts: Improve erts_mmap out of free descriptor management erts: Cleanup erl_mmap erts: Add __func__ to ERTS_ASSERT macro ...
2013-10-14Merge branch 'fenollp/treewide_remove_unexpected_0xff/OTP-11323' into maintFredrik Gustafsson
* fenollp/treewide_remove_unexpected_0xff/OTP-11323: Remove ^L characters hidden randomly in the code. Not those used in text files as delimiters.
2013-10-10Fix bsr bugLars Hesel Christensen
Fix bsr bug occurring when shifting a huge number a huge number of bits to the right. The bug can occur if Sint is 64 bits and int is 32 bits, causing a truncation in the big.c:I_lshift function.
2013-10-02erts: Add mutex to init_atoms in erts_mmap.cSverker Eriksson
2013-09-30erts: Add erts_mmap statsSverker Eriksson
As part of erlang:system_info({allocator,mseg_alloc}) and erl_crash.dump
2013-09-30erts: Add erts_bld_tupleX macrosSverker Eriksson
for compile time argument checking
2013-09-30erts: Rename erts_bld_atom_uint_2tup_list to *_uword_*Sverker Eriksson
and change from Uint to UWord values
2013-09-30erts: Add HARD_DBG_MSEGSverker Eriksson
2013-09-30erts: Add mmap argument to erts_debug:get_internal_stateSverker Eriksson
2013-09-30erts: Add __func__ to ERTS_ASSERT macroSverker Eriksson
2013-09-30erts: erts_mmap supercarrier management and erts_mseg usageRickard Green
* Coalescing and trimming of free segments in supercarrier * Management of super aligned and super unaligned areas in supercarrier * Management of reservation of physical memory * erts_mseg usage of erts_mmap
2013-09-30erts: Prepare erl_mmap with tree structures for free seg storageSverker Eriksson
2013-09-30erts: Remove ASSERT_EXPR macroSverker Eriksson
2013-09-30erts: Refactor the ASSERT macroSverker Eriksson
Introduce unconditional ERTS_ASSERT and use that for both ASSERT and ASSERT_EXPR.
2013-09-30Merge branch 'maint-r16' into maintFredrik Gustafsson
Conflicts: erts/vsn.mk
2013-09-30Merge branch 'msassak/empty-pattern-badarg/OTP-11350' into maintFredrik Gustafsson
* msassak/empty-pattern-badarg/OTP-11350: stdlib: extended binary_module_SUITE to assure badarg for OTP-11350 Check all pattern arguments passed to binary:matches/2
2013-09-25Merge branch 'rickard/aligned-sys_alloc-carriers/OTP-11318' into ↵Rickard Green
rickard/aligned-sys_alloc-carriers_maint/OTP-11318 Conflicts: erts/emulator/beam/erl_alloc.c erts/emulator/beam/erl_alloc_util.c erts/emulator/beam/erl_alloc_util.h
2013-09-25Implement platform specific aligned sys_alloc and use when supportedRickard Green
erts_sys_aligned_alloc() is currently implemented using posix_memalign if it exist, or using _aligned_malloc on Windows. If erts_sys_aligned_alloc() exist allocators will create sys_alloc carriers similar to how this was done pre-R16.
2013-09-24add system_info(ets_limit)Steve Vinoski
Add system_info(ets_limit) to provide a way to retrieve the runtime's maximum number of ETS tables. Add tests and documentation for it too. Also repair the alphabetical order of system_info/1 argument descriptions in the documentation and in the erlang.erl clauses. Add new preloaded erlang.erl due to that change. Also ensure all system_info/1 clauses are represented in the erlang.xml source documentation -- a couple had been inadvertently dropped in previous commits when other clauses were added.
2013-09-20Check all pattern arguments passed to binary:matches/2Mike Sassak
Including an empty binary as one of multiple patterns passed to binary:matches/2 would crash BEAM with: "Cannot reallocate 1342177280 bytes of memory (of type "tmp")". This ensures each pattern is valid before trying to match.
2013-09-12Remove ^L characters hidden randomly in the code. Not those used in text ↵Pierre Fenoll
files as delimiters. While working on a tool that processes Erlang code and testing it against this repo, I found out about those little sneaky 0xff. I thought it may be of help to other people build such tools to remove non-conforming-to-standard characters.
2013-09-10fix system_flag(scheduling_statistics,disable)Steve Vinoski
Clear the "enabled" flag for scheduling statistics when disable is specified.
2013-09-05Merge branch 'egil/erl_driver-thread-info/OTP-11303' into maintBjörn-Egil Dahlberg
* egil/erl_driver-thread-info/OTP-11303: erts: Document erl_driver interface lock names erts: Extend erl_driver interface with lock names
2013-09-02Merge branch 'sv-sched-percentage-option' into maintLukas Larsson
* sv-sched-percentage-option: Silence gcc warnings in non-smp build
2013-09-02Merge branch 'lukas/erts/clean_port_msg_dispatcher/OTP-11290' into maintLukas Larsson
* lukas/erts/clean_port_msg_dispatcher/OTP-11290: erts: Fix segfault when scheduling release_port later_op
2013-09-02Silence gcc warnings in non-smp buildLukas Larsson
2013-08-29add erl option to set schedulers by percentagesSteve Vinoski
For applications where measurements show enhanced performance from the use of a non-default number of emulator scheduler threads, having to accurately set the right number of scheduler threads across multiple hosts each with different numbers of logical processors is difficult because the erl +S option requires absolute numbers of scheduler threads and scheduler threads online to be specified. To address this issue, add a +SP option to erl, similar to the existing +S option but allowing the number of scheduler threads and scheduler threads online to be set as percentages of logical processors configured and logical processors available, respectively. For example, "+SP 50:25" sets the number of scheduler threads to 50% of the logical processors configured, and the number of scheduler threads online to 25% of the logical processors available. The +SP option also interacts with any settings specified with the +S option, such that the combination of options "+S 4:4 +SP 50:50" (in either order) results in 2 scheduler threads and 2 scheduler threads online. Add documentation for the +SP option. Add tests for the +SP option to scheduler_SUITE. Add tests and documentation for two existing features of the +S option: +S 0:0 resets the scheduler thread count and scheduler threads online count to their defaults, and specifying negative numbers for +S results in those values being subtracted from the default values for the host.
2013-08-27erts: Fix segfault when scheduling release_port later_opLukas Larsson
begin_port_cleanup can be called from a non-scheduler thread, this means that there is no esdp available and thus erts_schedule_thr_prgr_later_op segfaults.
2013-08-23Create better distribution of files over async threadsPatrik Nyblom
The actual port id is used to create a key from the pointer value which is the ErlDrvPort. To do this a new driver api function driver_async_port_key is added and the driver API minor version is updated. The documentation is updated and the faulty description of how to spread ports over async threads is updated to use the new API. Testcase also added.
2013-08-23erts: Fix print out of acul option in crash dumpLukas Larsson
2013-08-12Merge branch 'lukas/erts/match_spec_test_silent/OTP-11232' into maintLukas Larsson
* lukas/erts/match_spec_test_silent/OTP-11232: erts: Do not enable TRACE_SILENT when testing a ms
2013-08-09Merge branch 'sverk/ptab-race' into maintSverker Eriksson
* sverk/ptab-race: erts: Fix race in ptab that can cause PID mix-ups OTP-11225
2013-08-08erts: Do not enable TRACE_SILENT when testing a msLukas Larsson
2013-08-07erts: Fix race in ptab that can cause PID mix-upsSverker Eriksson
Since: R16B01 Symptom: A spawned process may get the same PID as an existing process. The new process will "steal" the PID and make the old process unreachable through the PID. The problem also applies to port identities but has only been seen for processes. Conditions: SMP emulator with at least two scheduler threads. Rapid spawning and termination of a large number of processes. A small number of free slots in the process table will also increase the risk for this bug. Workaround: Use command line options "+P legacy" and "+Q legacy" Cause: The race happens if a process terminates and gets stalled while releasing its process table slot. The stall has to be so long (due to OS preemptive scheduling most probably) for other schedluer threads to consume all other free slots for newly spawn processes. Fix: Write invalid-markers in the free-pid-table and do atomic exhange operations in retry-loops to make sure each thread gets a unique PID.
2013-07-30Change default of erlang:halt/2 to the documentedPatrik Nyblom
Bug reported by Jose Valim on the erlang-bugs mailing list: erlang:halt(0,[]) does not flush as advertised in the documentation. Should be the same as erlang:halt(0,[{flush,true}]), but is in fact the same as erlang:halt(0,[{flush,false}]).
2013-07-24erts: Extend erl_driver interface with lock namesBjörn-Egil Dahlberg
Lock and thread names are already a feature in the driver interface. This extension will let developers read these names. Eases debugging.
2013-07-15Merge branch 'egil/erts/aggregate-system-traceability/OTP-11196' into maintBjörn-Egil Dahlberg
* egil/erts/aggregate-system-traceability/OTP-11196: Check for native code without loading module Fix erlang:system_info(compile_info) Fix system_information get_beam_name/0 Add beam dynamic libraries to system_information Add system_information testsuite Add system information aggregate Refactor away ?line macro in code_SUITE Fix tests for erts app-file Add erts app-file erts: Add cflags, ldflags and config.h into executable
2013-07-15Fix erlang:system_info(compile_info)Björn-Egil Dahlberg
Allocation needs to be in correct order.
2013-07-12Merge branch 'rickard/warning_fixes' into maintRickard Green
* rickard/warning_fixes: Fix variable ‘rp_had_locks’ set but not used warning Fix ‘ethr_native_rwlock_destroy’ defined but not used warning Fix 'no previous prototype' warning for dtrace functions
2013-07-11erts: Add cflags, ldflags and config.h into executableLukas Larsson
2013-07-11Fix variable ‘rp_had_locks’ set but not used warningRickard Green
2013-07-11Fix 'no previous prototype' warning for dtrace functionsRickard Green
2013-07-11Merge branch 'jw/fix-float-middle-endian/OTP-11201' into maintFredrik Gustafsson
* jw/fix-float-middle-endian/OTP-11201: Fix binary construction on floating point middle-endian machines Fix binary matching on floating point middle-endian machines Fix erlang:phash2() on floating point middle-endian machines Fix external term format BIFs on floating point middle-endian machines
2013-07-10Merge branch 'rickard/info/OTP-11196' into maintRickard Green
* rickard/info/OTP-11196: Add test cases for native atomics and jump table Refuse to build SMP runtime by default without native atomics Make information about use of jump table available via system_info BIF Make ethread library information available via system_info BIF Make emulator arguments available via the system_info BIF
2013-07-09Make information about use of jump table available via system_info BIFRickard Green
erlang:system_info(beam_jump_table)
2013-07-09Make ethread library information available via system_info BIFRickard Green
erlang:system_info(ethread_info)
2013-07-09Make emulator arguments available via the system_info BIFRickard Green
erlang:system_info(emu_args)
2013-06-20Merge branch 'sverk/aoffcbf' into maintSverker Eriksson
* sverk/aoffcbf: erts: Make aoffcbf default when migration is enabled erts: Add new allocator strategy aoffcbf OTP-11174
2013-06-19erts: Make aoffcbf default when migration is enabledSverker Eriksson
2013-06-19erts: Add new allocator strategy aoffcbfSverker Eriksson
with better performance than aoffcaobf as we don't have to rearrange the search tree when there are blocks of equal size.