aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/lib
AgeCommit message (Collapse)Author
2018-01-19Update primary bootstrapBjörn Gustavsson
2018-01-08Merge branch 'john/erts/putenv-thread-safety/OTP-14666'John Högberg
2018-01-03Replace the libc environment with a thread-safe emulationJohn Högberg
putenv(3) and friends aren't thread-safe regardless of how you slice it; a global lock around all environment operations (like before) keeps things safe as far as our own operations go, but we have absolutely no control over what libc or a library dragged in by a driver/NIF does -- they're free to call getenv(3) or putenv(3) without honoring our lock. This commit solves this by setting up an "emulated" environment which can't be touched without going through our interfaces. Third-party libraries can still shoot themselves in the foot but benign uses of os:putenv/2 will no longer risk crashing the emulator.
2017-12-08Update primary bootstrapBjörn Gustavsson
2017-12-04Update primary bootstrapBjörn Gustavsson
2017-11-30Reimplement efile_drv as a dirty NIFJohn Högberg
This improves the latency of file operations as dirty schedulers are a bit more eager to run jobs than async threads, and use a single global queue rather than per-thread queues, eliminating the risk of a job stalling behind a long-running job on the same thread while other async threads sit idle. There's no such thing as a free lunch though; the lowered latency comes at the cost of increased busy-waiting which may have an adverse effect on some applications. This behavior can be tweaked with the +sbwt flag, but unfortunately it affects all types of schedulers and not just dirty ones. We plan to add type-specific flags at a later stage. sendfile has been moved to inet_drv to lessen the effect of a nasty race; the cooperation between inet_drv and efile has never been airtight and the socket dying at the wrong time (Regardless of reason) could result in fd aliasing. Moving it to the inet driver makes it impossible to trigger this by closing the socket in the middle of a sendfile operation, while still allowing it to be aborted -- something that can't be done if it stays in the file driver. The race still occurs if the controlling process dies in the short window between dispatching the sendfile operation and the dup(2) call in the driver, but it's much less likely to happen now. A proper fix is in the works. -- Notable functional differences: * The use_threads option for file:sendfile/5 no longer has any effect. * The file-specific DTrace probes have been removed. The same effect can be achieved with normal tracing together with the nif__entry/nif__return probes to track scheduling. -- OTP-14256
2017-11-20Merge branch 'lukas/stdlib/maps_iterators/OTP-14012'Lukas Larsson
* lukas/stdlib/maps_iterators/OTP-14012: erts: Limit size of first iterator for hashmaps Update primary bootstrap Update preloaded modules erts: Remove erts_internal:maps_to_list/2 stdlib: Make io_lib and io_lib_pretty use maps iterator erts: Implement batching maps:iterator erts: Implement maps path iterator erts: Implement map iterator using a stack stdlib: Introduce maps iterator API Conflicts: bootstrap/lib/stdlib/ebin/io_lib.beam bootstrap/lib/stdlib/ebin/io_lib_pretty.beam erts/emulator/beam/bif.tab erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/zlib.beam
2017-11-20Update primary bootstrapLukas Larsson
2017-11-20stdlib: Make io_lib and io_lib_pretty use maps iteratorLukas Larsson
2017-11-20erts: Implement batching maps:iteratorLukas Larsson
This iterator implementation fetches multiple elements to iterate over in one call to erts_internal:maps_next instead of one at a time. This means that the memory usage will go up for the iterator as we are buffering elements, but the usage is still bounded. In this implementation the max memory usage is 1000 words. Using this approach makes the iterator as fast as using maps:to_list, so maps:iterator/2 has been removed.
2017-11-13Update primary bootstrapBjörn Gustavsson
2017-10-30Update primary bootstrapBjörn Gustavsson
2017-10-13Update primary bootstrapBjörn Gustavsson
2017-10-02Update primary bootstrapBjörn Gustavsson
2017-09-25Update primary bootstrapBjörn Gustavsson
2017-09-08Merge branch 'maint'Björn Gustavsson
* maint: Update primary bootstrap Eliminate incorrect get_stacktrace/0 warning Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_utils.beam bootstrap/lib/compiler/ebin/beam_validator.beam bootstrap/lib/compiler/ebin/sys_core_fold.beam bootstrap/lib/kernel/ebin/error_logger.beam bootstrap/lib/kernel/ebin/file_server.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/kernel.appup bootstrap/lib/kernel/ebin/net_kernel.beam bootstrap/lib/kernel/ebin/user_drv.beam bootstrap/lib/stdlib/ebin/c.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/edlin.beam bootstrap/lib/stdlib/ebin/erl_lint.beam bootstrap/lib/stdlib/ebin/error_logger_file_h.beam bootstrap/lib/stdlib/ebin/error_logger_tty_h.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/ets.beam bootstrap/lib/stdlib/ebin/gen_event.beam bootstrap/lib/stdlib/ebin/gen_fsm.beam bootstrap/lib/stdlib/ebin/gen_server.beam bootstrap/lib/stdlib/ebin/gen_statem.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/proc_lib.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/shell.beam bootstrap/lib/stdlib/ebin/slave.beam bootstrap/lib/stdlib/ebin/string.beam bootstrap/lib/stdlib/ebin/supervisor.beam
2017-09-08Update primary bootstrapBjörn Gustavsson
2017-09-01Update primary bootstrapBjörn Gustavsson
2017-08-16Update primary bootstrapBjörn Gustavsson
2017-07-07Update primary bootstrapBjörn Gustavsson
2017-07-06Introduce a new core pass called sys_core_aliasJosé Valim
The goal of this pass is to find values that are built from patterns and generate aliases for those values to remove pressure from the GC. For example, this code: example({ok, Val}) -> {ok, Val}. shall become: example({ok, Val} = Tuple) -> Tuple. Currently this pass aliases tuple and cons nodes made of literals, variables and other cons. The tuple/cons may appear anywhere in the pattern and it will be aliased if used later on. Notice a tuple/cons made only of literals is not aliased as it may be part of the literal pool.
2017-06-20Update primary bootstrapHans Nilsson
2017-06-14Update primary bootstrapRickard Green
2017-06-12Update primary bootstrapBjörn Gustavsson
2017-05-19Update primary bootstrapHans Bolinder
2017-05-19Update primary bootstrapBjörn Gustavsson
2017-05-04Update primary bootstrapBjörn Gustavsson
2017-04-26Update primary bootstrapBjörn Gustavsson
2017-04-26Update primary bootstrapLukas Larsson
2017-04-20Update primary bootstrapBjörn Gustavsson
2017-03-30Update primary bootstrapBjörn-Egil Dahlberg
2017-03-24Update primary bootstrapBjörn-Egil Dahlberg
2017-03-22Merge branch 'sverker/ets-table-identifiers/OTP-14094'Sverker Eriksson
* sverker/ets-table-identifiers: observer: Polish crashdump viewer for ETS observer: Polish Table Viewer tab stdlib: Remove ets_SUITE:memory_check_summary erts: Improve reduction count during table cleanup erts: Cleanup table status bits erts: Remove now redundant 'id' from DbTableCommon erts: Remove meta_main_tab erts: Pass tid argument down to trapping functions erts: Print table id as ref in crashdump and break menu erts: Replace meta_pid_to{_fixed}_tab with linked lists erts: Correct erl_rbtree comments about yielding erts: Add ERTS_RBT_YIELD_STAT_INIT to erl_rbtree Fix node_container_SUITE list_to_ref/1 Implement ets:all() using scheduler specific data Rename fixation count in ets table to avoid confusion Introduce references as table identifiers
2017-03-02Implement ets:all() using scheduler specific dataRickard Green
2017-02-27Update primary bootstrapBjörn Gustavsson
2017-02-17Update primary bootstrapBjörn Gustavsson
2017-02-14Fixed typos in bootstrap/libAndrew Dryga
2017-02-06Use magic refs for compiled match specsRickard Green
2017-02-06Use magic refs for code loading stateRickard Green
2017-02-01Update primary bootstrapBjörn Gustavsson
2017-01-13Update primary bootstrapBjörn Gustavsson
2016-12-12Update primary bootstrapBjörn Gustavsson
2016-12-02Update primary bootstrapBjörn-Egil Dahlberg
2016-12-02Update primary bootstrapBjörn Gustavsson
2016-11-30Update primary bootstrapHans Bolinder
2016-11-28Update primary bootstrapBjörn Gustavsson
2016-11-23Update primary bootstrapBjörn Gustavsson
2016-11-23Merge branch 'maint'Björn Gustavsson
* maint: Update primary bootstrap document {yield/nb_yield}() limitation Suppress warnings from v3_kernel when inlining is turned on
2016-11-23Update primary bootstrapBjörn Gustavsson
2016-10-14erts: Fix early hipe patch loadingSverker Eriksson
by introducing hipe_bifs:commit_patch_load/1 that creates the HipeModule.