Age | Commit message (Collapse) | Author |
|
Internally in the v3_core pass, an #imatch{} record represents
a match expression:
Pattern = Expression
If Pattern is a single, unbound variable, #imatch{} will be
rewritten to #iset{}; otherwise it will be rewritten to #icase{}.
To determine how #imatch{} should be translated, the pattern is
processed using upattern/3. The return value from upattern/3 is thrown
away (after having been used for determing how the #imatch{} record
should be translated).
That means that every pattern in an #imatch{} is processed twice,
which is wasteful.
We can easily avoid the double processing of patterns by
introducing a new helper function that determines whether the
pattern is a new variable.
|
|
* maint:
tools: Add a Cover test
tools: Fix wrong instrumentation of binary comprehensions
|
|
|
|
When cover instruments binary comprehensions it's generating a
{block, ...} abstract code term inside a {bc, ...} term that is causing
the evaluation to fail at runtime. Removing the block statement
eliminates the error.
The template of a bit string comprehension cannot have a counter since
it is not allowed to be a block.
|
|
* lukas/erts/msacc:
Update preloaded modules
erts: Make msacc alloctor type thread safe
Silence compiler
erts: Fix msacc testcase on some windowses
erts: Add power saving cpu feature tests and use them
erts: Refactor perf counter internal interface
erts: Add rdtscp instruction check
erts: Fix hrtime for windows
erts: use correct function for perf counter on non-x86
erts: Fix msacc win32 debug compile error
erts: Add microstate accounting
erts, kernel: Add os:perf_counter function
erts: Add ERTS_WRITE_UNLIKELY
|
|
* maint:
Use nano second time unit in tracing
|
|
* rickard/monotonic-time-improvements/OTP-13222:
Use nano second time unit in tracing
|
|
|
|
Conflicts:
erts/emulator/beam/beam_emu.c
|
|
* margnus1/bs_unit_fix:
hipe: Fix signed compares of unsigned sizes
beam: Fix overflow bug in i_bs_add_jId
hipe: Add tests for bad bit syntax float sizes
Add a case testing the handling of guards involving binaries
Add some more binary syntax construction tests
hipe: Guard against enormous numbers in ranges
hipe: Fix constructing huge binaries
hipe: Fix binary constructions failing with badarith
Add missing corner-case to bs_construct_SUITE
hipe: Allow unsigned args in hipe_rtl_arith
hipe: test unit size match in bs_put_binary_all
hipe: test unit size match in bs_append
Fix hipe_rtl_binary_construct:floorlog2/1
OTP-13272
|
|
Conflicts:
lib/dialyzer/src/dialyzer_analysis_callgraph.erl
|
|
* aronisstav/dialyzer-missing-callback-info:
Fix inadvertent deletion of callback info
Eliminate ugly case statements
Remove dead code related to missing behaviour info
OTP-13287
|
|
|
|
* palas/maint:
inets: Add PATCH method to client and server
OTP-13286
|
|
Microstate accounting is a way to track which state the
different threads within ERTS are in. The main usage area
is to pin point performance bottlenecks by checking which
states the threads are in and then from there figuring out
why and where to optimize.
Since checking whether microstate accounting is on or off is
relatively expensive if done in a short loop only a few of the
states are enabled by default and more states can be enabled
through configure.
I've done some benchmarking and the overhead with it turned off
is not noticible and with it on it is a fraction of a percent.
If you enable the extra states, depending on the benchmark,
the ovehead when turned off is about 1% and when turned on
somewhere inbetween 5-15%.
OTP-12345
|
|
The perf_counter is a very very cheap and high resolution timer
that can be used to timestamp system events. It does not have
monoticity guarantees, but should on most OS's expose a monotonous
time.
A special instruction has been created for this counter to further
speed up fetching it.
OTP-12908
|
|
|
|
* legoscia/tls-dist-connect-options:
ssl_dist_SUITE: don't use deprecated functions
TLS distribution: support inet_dist_connect_options
OTP-13285
|
|
* maint:
Introduce time management in native APIs
Introduce time warp safe replacement for safe_fixed option
Introduce time warp safe trace timestamp formats
Conflicts:
erts/emulator/beam/erl_bif_trace.c
erts/emulator/beam/erl_driver.h
erts/emulator/beam/erl_nif.h
erts/emulator/beam/erl_trace.c
erts/preloaded/ebin/erlang.beam
|
|
* rickard/monotonic-time-improvements/OTP-13222:
Introduce time management in native APIs
Introduce time warp safe replacement for safe_fixed option
Introduce time warp safe trace timestamp formats
|
|
* bjorn/stdlib/remove-tuple-fun-vestiges:
Eliminate redundant double is_function test
|
|
* maint:
Check for already started beam_lib crypto server
|
|
* lrascao/stdlib/beam_lib-race-condition/OTP-13278:
Check for already started beam_lib crypto server
|
|
Parameterized modules are no longer supported, so module() can only be
an atom().
|
|
Conflicts:
OTP_VERSION
|
|
|
|
When release_handler_1:get_supervised_procs/0 does a recursive walk of
the supervision tree, it calls sys:get_status/1 on supervisors, to check
if they are suspended or running.
This fixes a race condition where a list of supervisor pids is gathered,
one of them (legitimately) exits before release_handler can examine it,
then sys:get_status/1 is called with a dead pid, causing an exit(noproc)
See: http://erlang.org/pipermail/erlang-questions/2015-August/085712.html
(To recreate this problem for testing, I added a timer:sleep into the
release_handler_1 code, and killed a supervisor during
get_supervised_procs being called).
|
|
|
|
* ia/maint/inets/mod_alias/OTP-13248:
inets: Prepare for release
inets: Traverse all aliases looking for the longest match
inets: Use re instead of inets_regexp
# Conflicts:
# lib/inets/vsn.mk
|
|
In commit b8c6a119.
|
|
When tuple funs were still supported, the idiom for allowing
real funs with a certain arity but not tuple funs was:
is_function(Fun) andalso is_function(Fun, Arity)
The reason that both tests were needed is because:
is_function({M,F}) would return 'false'
is_function({M,F}, Arity) would return 'true'
In 53ec991d19, is_function/2 was updated to only return 'false'
for tuples, so the call to is_function/1 can be removed.
|
|
* aronisstav/compiler/extend-cerl_trees_mapfold/OTP-13280:
Extend cerl_trees:mapfold with a 'pre-order' operation
|
|
* maint:
Use file read buffering in dbg:trace_client
Do not consider "." part of names in edlin
|
|
* gomoripeti/dbg/read_ahead/OTP-13279:
Use file read buffering in dbg:trace_client
|
|
* josevalim/stdlib/edlin/OTP-13281:
Do not consider "." part of names in edlin
|
|
When starting the beam_lib crypto server, don't crash
when it is already running. Some other process might
have already called it.
|
|
There are two problematic areas: EC curve selection and
interoperability tests with OpenSSL.
The tests shouldn't assume any particular EC curve is available, but
should always check the list of curves reported by
tls_v1:ecc_curves/1.
And during interoperability tests the tests shouldn't assume that any
cipher suite supported by Erlang is also supported by OpenSSL. There
are OpenSSL packages where the command line openssl tool only supports
a subset of the ciphers available in libcrypto. The actual list of
supported cipher suites thus shall be queried from OpenSSL.
|
|
Avoid hardcoding EC curve names in tests where it basically doesn't
matter which curve is used. Take one of the supported curbes instead.
Also, when testing ECDH key generation, skip unsupported curves.
These changes are to simplify dealing with exotic libcrypto builds
that don't support certain curves (for example RHEL disallows < 256
bit curves). The crypto application is only able to detect the
supported curves on a very coarse level (ECC support in general and
GF2m curves), so it may be necessary to edit the list of curves in the
crypto_ec_curves modules. But that should be the only necessary
modification to make the crypto tests pass.
|
|
|
|
Before the first matching alias was returned, but we want the longest one to
be returned.
|
|
|
|
When manipulating Core Erlang trees it may be useful to perform some
operation when a node is visited, before inspecting children nodes. The
definition of cerl_tree:mapfold/3 does not allow that, as it applies the
given function only after all the recursive calls on the children nodes
have been completed.
This patch adds a new argument to mapfold: a function that is applied when
a node is first entered.
As an example of its use, consider the case where one wants to move a
'call' node earlier, by adding 'let' node and replacing the 'call' node
with the defined variable. The name of that variable must be specified
before one traverses the inner tree (especially if such replacements can be
nested).
|
|
Trace files are typically large but contain small terms so we can expect
a performance gain from read buffering. dbg:trace_client with a dummy
handler ran more then 3x faster on a sample 200MB trace file.
fprof:profile can also gain a bit.
|
|
* bjorn/kernel/clean-up-code_server:
code_server: Add specs for all exported functions
code_server: Add types to the state record
code_server: Don't export internal system_* functions
Simplify starting of code server
Remove first argument of code_server:call()
|
|
|
|
* maint:
Update documentation for code-loading functions
code: Correct the types for error returns
Eliminate run-time system crash in code:load_abs/1
|
|
* bjorn/kernel/code/OTP-9375:
Update documentation for code-loading functions
code: Correct the types for error returns
Eliminate run-time system crash in code:load_abs/1
|
|
Some of the error reasons were not explained.
|
|
The specifications for functions that load code in the 'code'
module (e.g. code:load_file/1) have some problems:
* The specs claim that the functions can return {error,on_load}, but
they never do. However, they can return {error,on_load_failure} if
the -on_load function in a module fails.
* The specs claim that the functions can return {error,native_code},
but they never do.
While we are it, also extend the on_load_errors/1 test case to test
that the load functions return {error,on_load_failure} when an
-on_load function fails.
|
|
|