aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
AgeCommit message (Collapse)Author
2018-04-25Merge branch 'hasse/stdlib/map_guards_shell/OTP-15035/ERL-613'Hans Bolinder
* hasse/stdlib/map_guards_shell/OTP-15035/ERL-613: erts: Correct abstract format doc regarding map creation stdlib: Correct the linter's check of map guard expressions
2018-04-25Merge branch 'map-get-bif' of git://github.com/michalmuskala/otpBjörn Gustavsson
* 'map-get-bif' of git://github.com/michalmuskala/otp: Introduce map_get guard-safe function OTP-15037
2018-04-24Merge pull request #1790 from jhogberg/john/erts/more-alloc-info/OTP-14961John Högberg
Improve memory instrumentation OTP-15024 OTP-14961
2018-04-24erts: Correct abstract format doc regarding map creationHans Bolinder
2018-04-24Introduce map_get guard-safe functionMichał Muskała
Rationale Today all compound data types except for maps can be deconstructed in guards. For tuples we have `element/2` and for lists `hd/1` and `tl/1`. Maps are completely opaque to guards. This means matching on maps can't be abstracted into macros, which is often done with repetitive guards. It also means that maps have to be always selected whole from ETS tables, even when only one field would be enough, which creates a potential efficiency issue. This PR introduces an `erlang:map_get/2` guard-safe function that allows extracting a map field in guard. An alternative to this function would be to introduce the syntax for extracting a value from a map that was planned in the original EEP: `Map#{Key}`. Even outside of guards, since this function is a guard-BIF it is more efficient than using `maps:get/2` (since it does not need to set up the stack), and more convenient from pattern matching on the map (compare: `#{key := Value} = Map, Value` to `map_get(key, Map)`). Performance considerations A common concern against adding this function is the notion that "guards have to be fast" and ideally execute in constant time. While there are some counterexamples (`length/1`), what is more important is the fact that adding those functions does not change in any way the time complexity of pattern matching - it's already possible to match on map fields today directly in patterns - adding this ability to guards will niether slow down or speed up the execution, it will only make certain programs more convenient to write. This first version is very naive and does not perform any optimizations.
2018-04-23erts: Rewrite memory instrumentationJohn Högberg
This commit replaces the old memory instrumentation with a new implementation that scans carriers instead of wrapping erts_alloc/erts_free. The old implementation could not extract information without halting the emulator, had considerable runtime overhead, and the memory maps it produced were noisy and lacked critical information. Since the new implementation walks through existing data structures there's no longer a need to start the emulator with special flags to get information about carrier utilization/fragmentation. Memory fragmentation is also easier to diagnose as it's presented on a per-carrier basis which eliminates the need to account for "holes" between mmap segments. To help track allocations, each allocation can now be tagged with what it is and who allocated it at the cost of one extra word per allocation. This is controlled on a per-allocator basis with the +M<S>atags option, and is enabled by default for binary_alloc and driver_alloc (which is also used by NIFs).
2018-04-23Merge branch 'john/erts/fix-sbwt-links'John Högberg
* john/erts/fix-sbwt-links: Fix seealso tags for +sbwt/+swt
2018-04-20Fix seealso tags for +sbwt/+swtJohn Högberg
2018-04-19Merge pull request #1789 from ↵Lukas Larsson
christhekeele/remove-trace-terms-from-table-types-in-match-docs Remove trace-specific terms from docs for table-oriented matchspecs
2018-04-19Remove trace-specific terms from docs for table-oriented matchspecsChris Keele
This removes the matchspec instructions `is_seq_trace` and `get_tcw/0` from the documentation for table-oriented matchspecs. This is likely correct as both are already documented under "Functions Allowed Only for Tracing", despite appearing in the list of possible options for table specs. The following observations further back this change up: ```erl erlang:match_spec_test([whatever], [{'_', [], [{is_seq_trace}]}], trace). %=> {ok,true,[],[]} erlang:match_spec_test({whatever}, [{'_', [], [{is_seq_trace}]}], table). %=> {error,[{error,"Special form 'is_seq_trace' used in wrong %dialect."}]} erlang:match_spec_test([whatever], [{'_', [], [{get_tcw}]}], trace). %=> {ok,true,[],[]} erlang:match_spec_test({whatever}, [{'_', [], [{get_tcw}]}], table). %=> {error,[{error,"Function get_tcw/0 cannot be called in this context."}]} ```
2018-04-10erl_docgen: Add hover links for ghlinkLukas Larsson
All functions, datatype and h3 headings have gotten a hover attribute that shows a link directly to the edit page on github for easy editing of documentation. The github link links to the maint branch. An early attempt was done to use the SHA of the current branch, but that did not work well as github can only take pull requests from branches.
2018-04-09erl_docgen: Add ghlink step for all non-generated doc xml filesLukas Larsson
In order to get line numbers into the ghlink we have to add a post processing step for all xml files.
2018-04-09Fix erlang:abs/2 type docsLukas Larsson
2018-04-06erts: Fix doc typo for enif_free_iovecSverker Eriksson
2018-03-26Add +sbwt/+swt analogues for dirty schedulersJohn Högberg
Sharing these settings for all schedulers can degrade performance, so it makes sense to be able to configure them separately. This also changes the default busy-wait time to "short" for both kinds of dirty schedulers.
2018-03-23Merge branch 'john/erts/async-thread-defaults/OTP-14928'John Högberg
* john/erts/async-thread-defaults/OTP-14928: Change default async thread count to 1
2018-03-23Add enif_make_map_from_arraysJohn Högberg
2018-03-22Merge branch 'sverker/enif-name-funcs/OTP-14994'Sverker Eriksson
2018-03-22erts: Remove const from ErlNifResourceDown docSverker Eriksson
to conform with erl_nif.h
2018-03-22erts: Add statement about errno to enif_*printf docsSverker Eriksson
2018-03-22erts: Add enif_vfprintf and enif_vsnprintfSverker Eriksson
2018-03-22erts: Add enif_*_name functionsSverker Eriksson
2018-03-21Change default async thread count to 1John Högberg
All uses of async threads in the built-in drivers have been replaced with dirty IO, so it no longer makes sense to leave the default at 10.
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-16Merge pull request #1746 from legoscia/erl_nif.xml-spellingLukas Larsson
Fix typos in erl_nif.xml
2018-03-15Tracing MatchSpec docs updateVladimir Gordeev
I was running this code in shell and expected it to take default `self()` meta tracer, and start tracing `erlang:put/2`. ``` F = fun F() -> timer:sleep(5000), erlang:get(unique_field), erlang:put(unique_field, 123), F() end. erlang:trace_pattern({erlang, put, 2}, [{['$1', '_'], [{'==', '$1', unique_field}], []}], [global]). erlang:trace_pattern({erlang, get, 1}, [{['_'], [], [{trace, [], [call, timestamp]}]}], [meta]). Pid = spawn(F). ``` But tracing didn't start: ``` 6> flush(). Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118606,753838}} Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118611,754798}} Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118616,755705}} ok 7> erlang:trace_info(Pid, flags). {flags,[]} ``` Turns out that I had false expectations, that `{trace, _, _}` would enable tracing on that process, inheriting meta tracer process as consumer of trace messages. Instead it tried to take tracer from executing process (which is pointed out in docs). But there was none, so no tracing was started and flags were simply ignored (which is not that obvious from docs). Updated docs to point out that there are cases when flags would be simply ignored, and no tracing would start.
2018-03-14Merge branch 'maint'Henrik
Conflicts: OTP_VERSION
2018-03-13Merge PR-1699 from sverker/hipe-amd64-high-code/OTP-14951Sverker Eriksson
Remove low memory need for HiPE on x86_64
2018-03-13Merge branch 'sverker/enif_fprintf-doc'Sverker Eriksson
2018-03-13Merge branch 'sverker/dist-flags-consolidate'Sverker Eriksson
2018-03-13Fix typos in erl_nif.xmlMagnus Henoch
2018-03-10update erlang:process_info/1 docsMikael Pettersson
2018-03-09Update release notesErlang/OTP
2018-03-07erts: Add enif_fprintf docsSverker Eriksson
2018-03-05erts: Remove hipe amd64 code super carrier (exec_mmap)Sverker Eriksson
2018-03-02erts: Improve send/2 docsSverker Eriksson
with link to ! operator and clarify ugly badarg for unregistered atom argument.
2018-03-02erts,kernel: Add dist_util:strict_order_flags/0Sverker Eriksson
to replace DFLAGS_STRICT_ORDER_DELIVERY and remove that compile time dependency.
2018-03-02erts: Cleanup erlang:system_info docsLukas Larsson
Attempt to make the system_info docs easier to navigate by grouping items of similar themes together in the documentation.
2018-02-26Merge branch 'maint'Sverker Eriksson
2018-02-26Suggest using enif_make_new_binary when possibleJohn Högberg
While enif_make_binary will create heap-binaries from ErlNifBinaries when possible now, enif_alloc_binary still allocates a Binary* off-heap which is avoided entirely with enif_make_new_binary.
2018-02-23erts: Clarify enif_self docsSverker Eriksson
2018-02-13Merge branch 'maint'Sverker Eriksson
* maint: Updated OTP version Update release notes Update version numbers kernel: Add os:cmd/2 with max_size option # Conflicts: # OTP_VERSION # lib/kernel/doc/src/os.xml # lib/kernel/src/os.erl
2018-02-13Merge branch 'maint-20' into maintSverker Eriksson
* maint-20: Updated OTP version Update release notes Update version numbers erts: Add system_flags(erts_alloc,"+M?sbct *") erts: Add age order first fit allocator strategies erts: Refactor erl_ao_firstfit_alloc erts: Add migration options "acnl" and "acfml" kernel: Add os:cmd/2 with max_size option erts: Add more stats for mbcs_pool erts: Fix alloc_SUITE:migration stdlib: Make ets_SUITE memory check try again erts: Improve carrier pool search erts: Improve alloc_SUITE:migration erts: Refactor carrier dealloc migration
2018-02-12Update release notesErlang/OTP
2018-02-12Merge 'sverker/maint-20/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/master/alloc-n-migration/ERIERL-88'
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2018-02-12erts: Add system_flags(erts_alloc,"+M?sbct *")Sverker Eriksson
to change sbct limit in runtime for chosen allocator type. With great power comes great responsibility.
2018-02-12erts: Add age order first fit allocator strategiesSverker Eriksson
ageffcaoff: Age First Fit Carrier, Address Order First Fit (within carrier) ageffcbf : Age First Fit Carrier, Best Fit (within carrier) ageffcaobf: Age First Fit Carrier, Address Order Best Fit (within carrier) Prefer old carriers, the older the better.
2018-02-08erts: Add migration options "acnl" and "acfml"Sverker Eriksson
acnl: Abandon Carrier Nr Limit acfml: Abandon Carrier Free block Min Limit
2018-02-07Merge branch 'hasse/no_get_stacktrace/OTP-14861'Hans Bolinder
* hasse/no_get_stacktrace/OTP-14861: erts: Update abstract format doc with stacktrace variable wx: Do not call erlang:get_stacktrace() tools: Do not call erlang:get_stacktrace() stdlib: Do not call erlang:get_stacktrace() sasl: Do not call erlang:get_stacktrace() runtime_tools: Do not call erlang:get_stacktrace() reltool: Do not call erlang:get_stacktrace() parsetools: Do not call erlang:get_stacktrace() observer: Do not call erlang:get_stacktrace() mnesia: Do not call erlang:get_stacktrace() (cont) mnesia: Do not call erlang:get_stacktrace() kernel: Do not call erlang:get_stacktrace() inets: Do not call erlang:get_stacktrace() eunit: Do not call erlang:get_stacktrace() et: Do not call erlang:get_stacktrace() dialyzer: Do not call erlang:get_stacktrace() debugger: Do not call erlang:get_stacktrace() debugger: Do not try to restore stacktrace common_test: Do not call erlang:get_stacktrace()