aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2011-12-02Iron out bugs in Win64 found in daily buildsPatrik Nyblom
Almost all uses of the 'long' datatype is removed from VM and tests Emulator test now runs w/o drivers crashing Nasty abs bug fixed in VM as well as type errors in allocator debug functions Still one allocator test that fails, domain knowledge is needed to fix that. Fix type inconsistency in beam_load causing crashes
2011-12-02Make whole of OTP build and release on Win64Patrik Nyblom
Removed symbolic links from repository.
2011-12-02Get cerl and distribution working in Win64Patrik Nyblom
Can still not setup -a, but cerl works.
2011-12-02Get working prompt in Win64 using bootstrap codePatrik Nyblom
2011-12-02Build Win64 Erlang emulator using MSYSunknown
Still does not run, just compiles.
2011-12-02Mend the non-SMP emulatorBjörn Gustavsson
Commit 8781932b3b8769b6f208ac7c00471122ec7dd055 broke erlang:system_info(system_version) in the non-SMP emulator so that it would typically dump core. "rq:%d" was removed from the format string for erts_printf(), but the corresponding argument in the argument list was not removed, which ultimately caused "kernel-poll:%s" to be passed an integer (typically 0).
2011-12-01Merge branch 'rickard/deprecate-runtime-binding/OTP-9749'Rickard Green
* rickard/deprecate-runtime-binding/OTP-9749: Deprecate erlang:system_flag/2 arguments scheduler_bind_type and cpu_topology
2011-12-01Merge branch 'rickard/rm-common-runq/OTP-9727'Rickard Green
* rickard/rm-common-runq/OTP-9727: Remove common run-queue in SMP case Fix scheduler suspend bug Conflicts: erts/emulator/beam/erl_init.c
2011-12-01Deprecate erlang:system_flag/2 arguments scheduler_bind_type and cpu_topologyRickard Green
The use of erlang:system_flag(scheduler_bind_type, _) and erlang:system_flag(cpu_topology, _) have been deprecated and scheduled for removal in erts-5.10/OTP-R16. For more information see the documentation of erlang:system_flag/2.
2011-12-01Remove common run-queue in SMP caseRickard Green
The common run-queue implementation is removed since it is unused, untested, undocumented, unsupported, and only complicates the code. A spinlock used by the run-queue management sometimes got heavily contended. This code has now been rewritten, and the spinlock has been removed.
2011-12-01Fix scheduler suspend bugRickard Green
Calls to erlang:system_flag(schedulers_online, N) and/or erlang:system_flag(multi_scheduling, block|unblock) could cause internal data used by this functionality to get into an inconsistent state. When this happened various problems occurred. This bug was quite hard to trigger, so hopefully no-one has been effected by it.
2011-11-30Merge branch 'rickard/default-unbound/OTP-9726'Rickard Green
* rickard/default-unbound/OTP-9726: Use unbound schedulers as default
2011-11-30Merge branch 'rickard/pix-mutex/OTP-9723'Rickard Green
* rickard/pix-mutex/OTP-9723: Fix warning when lock-checker is enabled Replace spinlock with mutex as pix_lock implementation
2011-11-30Merge branch 'bjorn/deprecate-tuple-funs/OTP-9649'Björn Gustavsson
* bjorn/deprecate-tuple-funs/OTP-9649: erts: Warn the first time a tuple fun is called otp_mibs: Eliminate use of tuple fun os_mon: Eliminate use of tuple fun asn1: Eliminate use of tuple fun parsetools: Eliminate use of tuple fun mnesia tests: Eliminate use of tuple fun snmp: Eliminate use of tuple fun wrap_log_reader_SUITE: Eliminate use of tuple fun big_SUITE: Eliminate use of tuple fun file_SUITE: Eliminate use of tuple fun fprof: Eliminate use of tuple fun xref_compiler: Eliminate use of tuple fun shell: Eliminate use of tuple funs erl_eval: Eliminate use of tuple funs user_sup: Eliminate use of tuple fun
2011-11-30Merge branch 'bjorn/llvm-issues/OTP-9712'Björn Gustavsson
* bjorn/llvm-issues/OTP-9712: INSTALL.md: Update build instructions for Lion Fix clang linking problem configure: Define NO_JUMP_TABLE if all we have is llvm-gcc beam_emu.c: Eliminate warnings when NO_JUMP_TABLE is defined beam_emu.c: Use the correct void* type for computed gotos MacOS X: Completely remove obsolete -no-cpp-precomp option
2011-11-30erts: Warn the first time a tuple fun is calledBjörn Gustavsson
2011-11-29Merge branch 'bjorn/erts/remove-useless-variable'Björn Gustavsson
* bjorn/erts/remove-useless-variable: erl_process.c: Remove the redundant variable 'processes_busy' Update primary bootstrap otp_internal: Deprecate ssl:pid/1
2011-11-29erl_process.c: Remove the redundant variable 'processes_busy'Björn Gustavsson
There is a static variable called 'processes_busy' in erl_process.c, which will be incremented but never used. To confuse things, there is also a global variable with the same name, but it it is only defined and used if BM_COUNTERS is defined. In erl_process.c, the global version of 'processes_busy' will be seen and incremented if BM_COUNTERS is defined. Remove the static version of 'processes_busy' in erl_process.c, but keep the global version if BM_COUNTERS is defined. Noticed-by: Jovi Zhang
2011-11-28Merge branch 'lukas/erts/large_float_cmp/OTP-9497'Lukas Larsson
* lukas/erts/large_float_cmp/OTP-9497: Use CMP_TMP_HEAD_SIZE for C-stack
2011-11-28Use CMP_TMP_HEAD_SIZE for C-stackLukas Larsson
Thanks to Tuncer Ayaz
2011-11-26beam_load.c: Add init_iff_file() for verifying the IFF headerBjörn Gustavsson
Add init_iff_file() for verifying the IFF header. Also let it handle compressed BEAM files so that it will be done in one place. That means that code:get_chunk/2 and code:module_md5/1 will now support compressed BEAM files.
2011-11-26beam_code.c: Don't reinvent state initialization and deallocationBjörn Gustavsson
2011-11-26beam_load.c: Optimize code:get_chunk/2Björn Gustavsson
The undocumented code:get_chunk/2 BIF is supposed to be a fast way to extract a chunk from a BEAM file when loading native code. In practice, it might not have been faster because it happened to calculate an MD5 checksum for the chunk it extracted because it shared the scan_iff_file() function with the erlang:load_module/2 BIF. Split scan_iff_file() into scan_iff_file() and verify_chunks(), so that the unnecessary MD5 calculation can be avoided.
2011-11-26beam_load.c: Eliminate memory leak in code:make_stub_module/3Björn Gustavsson
code:make_stub_module/3 leaked memory if given either a corrupt BEAM file, or a compressed BEAM file and an error occurred, or a binary not aligned on byte boundaries.
2011-11-25Fix clang linking problemBjörn Gustavsson
Inlining was not done in a portable way. clang follows the C99 semantics for inlining ('inline' essentially implies 'static' in C99, but not in GCC), so bp_sched2ix() was not visible outside beam_bp.c. Since the function need to be used from more than one source file, put the function definition in the beam_bp.h header file. Also, give it an 'erts_' prefix since it is globally visible.
2011-11-25beam_emu.c: Eliminate warnings when NO_JUMP_TABLE is definedBjörn Gustavsson
2011-11-25beam_emu.c: Use the correct void* type for computed gotosBjörn Gustavsson
gcc don't care about the type, but clang does and will issue a warning.
2011-11-18Merge branch 'pan/binary_match_scope/OTP-9701'Patrik Nyblom
* pan/binary_match_scope/OTP-9701: Remove remaining gcc 4.6 assigned-but-not-used warnings from erts Remove GCC 4.6 set-but-not-used warning from erl_bif_binary Make binary:match with scope return correct values
2011-11-18Merge branch 'sverk/hipe-without-fpe/OTP-9724'Sverker Eriksson
* sverk/hipe-without-fpe/OTP-9724: otp_build: Disable FPE by default on Linux stdlib: Make sure qlc_SUITE:otp_6964 restores backtrace_depth erts: Add test for inf/NaN intermediate float results hipe,erts: Allow hipe without floating point exceptions hipe: Fix bug in hipe_rtl_lcm:calc_killed_expr_bb erts: Rename macros used by float instructions without FPE
2011-11-18Use unbound schedulers as defaultRickard Green
As of ERTS version 5.9 (OTP-R15B) the runtime system will by default not bind schedulers to logical processors. If the Erlang runtime system is the only operating system process that binds threads to logical processors, this improves the performance of the runtime system. However, if other operating system processes (as for example another Erlang runtime system) also bind threads to logical processors, there might be a performance penalty instead. In some cases this performance penalty might be severe. Due to this, we change the default so that the user must make an active decision in order to bind schedulers.
2011-11-18Fix warning when lock-checker is enabledRickard Green
2011-11-18Replace spinlock with mutex as pix_lock implementationRickard Green
The spinlocks used implementing pix-locks have been replaced with mutexes since they perform better during heavy contention.
2011-11-18Merge branch 'rickard/sched-compact-load/OTP-9695'Rickard Green
* rickard/sched-compact-load/OTP-9695: Add switch that can disable scheduler compaction of load
2011-11-17Merge branch 'bjorn/erts/refc-binary-literals/OTP-9486'Björn Gustavsson
* bjorn/erts/refc-binary-literals/OTP-9486: external.c: Remove the option to create over-sized heap binaries Allow refc binaries in literal pools code_SUITE clean-up: Remove experimental 'constant_pool' option
2011-11-17Merge branch 'sverker/valgrind-fixing'Sverker Eriksson
* sverker/valgrind-fixing: erts: valgrind suppressions for prebuilt terms in os_info_init Fix dlopen-leak of drivers with incorrect version erts: Add valgrind suppression files erts: Remove valgrind limit for erts_alloc_permanent_cache_aligned erts: Fix write-after-free bug in inet driver ETS: Fix faulty size calculation SIZEOF_EXTSEG ETS: Fix valgrind PossiblyLost in ETS hash tables
2011-11-17hipe,erts: Allow hipe without floating point exceptionsSverker Eriksson
2011-11-17erts: Rename macros used by float instructions without FPESverker Eriksson
No semantic change, just code clarification. Use unique macro names instead of redefining the original ones.
2011-11-17external.c: Remove the option to create over-sized heap binariesBjörn Gustavsson
Since refc binaries are now supported in literal pools, there is no longer any need to allow the creation of over-sized heap binaries.
2011-11-17Allow refc binaries in literal poolsBjörn Gustavsson
To simplify the implementation of literal pools (constant pools) for the R12 release, a shortcut was taken regarding binaries -- all binaries would be stored as heap binaries regardless of size. To allow a module containing literals to be unloaded, literal terms are copied when sent to another process. That means that huge literal binaries will also be copied if they are sent to another process, which could be surprising. Another problem is that the arity field in the header for the heap object may not be wide enough to handle big binaries. Therefore, bite the bullet and allow refc binaries to be stored in literal pools. In short, the following need to be changed: * Each loaded module needs a MSO list, linking all refc binaries in the literal pool. * When check_process_code/2 copies literals to a process heap, it must link each referenced binary into the MSO list for the process and increment the reference counter for the binary. * purge_module/1 must decrement the reference counter for each refc binary in the literal pool.
2011-11-17Merge branch 'bjorn/erts/code-loading/OTP-9720'Björn Gustavsson
* bjorn/erts/code-loading/OTP-9720: BEAM loader: Don't stop other schedulers until truly needed BEAM loader: Refactor code loading into separate functions beam_load.c: Factor out cleaning up of the loader state into free_state() BEAM loader: Clean up handling of error reasons Remove the useless -l option beam_load.c: Simplify handling of the bs_put_string_II instruction beam_load.c: Remove the unused struct LoadedCode
2011-11-17BEAM loader: Don't stop other schedulers until truly neededBjörn Gustavsson
The erlang:module_load/2 BIF will stop all other schedulers before it starts to process the BEAM file. That is not a problem when starting the Erlang/OTP system, since the start-up is mostly sequential. It is a problem, however, when big BEAM files are loaded in an already running system. After the refactoring in the previous commits, we can now do most of the processing of the BEAM file before we stop the other schedulers, so that we can minimize the time when only one scheduler will be running. Suggested-by: Bob Ippolito
2011-11-16Remove remaining gcc 4.6 assigned-but-not-used warnings from ertsPatrik Nyblom
2011-11-16Remove GCC 4.6 set-but-not-used warning from erl_bif_binaryPatrik Nyblom
2011-11-16Make binary:match with scope return correct valuesPatrik Nyblom
2011-11-15Add switch that can disable scheduler compaction of loadRickard Green
2011-11-14BEAM loader: Refactor code loading into separate functionsBjörn Gustavsson
Break apart code loading into the three functions: erts_alloc_loader_state() erts_prepare_loading() erts_finish_loading() The erts_alloc_loader_state() and erts_prepare_loading() can be executed with all schedulers running. Only erts_finish_loading() needs to be run in a single-scheduling system.
2011-11-14beam_load.c: Factor out cleaning up of the loader state into free_state()Björn Gustavsson
2011-11-14BEAM loader: Clean up handling of error reasonsBjörn Gustavsson
There is no reason to have erts_load_module() return integer values, only to have the caller convert the values to atoms. Return the appropriate atom directly from the place where the error is generated instead. Return NIL if the module was successfully loaded.
2011-11-14Merge branch 'egil/reallocating-catches/OTP-9692'Björn-Egil Dahlberg
* egil/reallocating-catches/OTP-9692: erts: Teach VM to reallocate beam catch table
2011-11-14Remove the useless -l optionBjörn Gustavsson
The -l option used to print information about modules being loaded, but now it prints very little information.