Age | Commit message (Collapse) | Author |
|
* sverk/bif-args/OTP-9662:
erts,hipe: Limited support for hipe cross compilation
erts-hipe: Change THE_NON_VALUE for HiPE enabled debug emulator
erts-hipe: Enable debug compiled hipe-VM with lock checker
erts-hipe: Rename fail_bif_interface_0 to standard_bif_interface_0
erts-hipe: Deliberate leak of native fun entries
erts-hipe: Fix new trap conventions for x86, amd64 and ppc
Store the trap address in p->i
Store the trap arguments in the X register array
erts-hipe: Make some primops use new BIF calling convention
erts-hipe: Adapt generated BIF wrappers for new calling convention
erts-hipe: Remove obscuring macros in generated assembler code
erts-hipe: Make hipe enabled emulator compile with new BIF calls
Simplify the instructions for calling BIFs
Change the calling convention for BIFs
Use the proper macros in all BIFs
Conflicts:
erts/emulator/beam/bif.h
erts/emulator/beam/erl_bif_info.c
|
|
Normally hipe assumes that generated native code will be executed
on the same emulator as the hipe compiler is running on.
This commit allows you to build a hipe "cross-compiler"
for a different configured emulator (but for same architecture).
Example:
> cd lib/hipe
> make clean
> make XCOMP=yes FLAVOR=smp TYPE=debug
This hipe compiler will generate code to be executed
on the debug compiled smp-emulator at $ERL_TOP.
|
|
|
|
all = opt is now default target and run executes testsuites. Note that
parallel execution is unproblematic since each suite target starts
a node with a suite-specific name.
|
|
Simple code refactor in the debugger: renames all the occurrences of
"Ok" to "OK" in the code, variable names and strings. This improves the
consistency of the code and follows the GTK UI where "OK" is always
used.
|
|
Add missing spaces when using wx UI. The gs UI didn't need them.
Change the exclamation of the message by a dot, more formal style for a
UI message.
|
|
|
|
* bjorn/line-numbers/OTP-9468:
beam_type: Improve FP optimizations in the presence of line numbers
|
|
* bjorn/create-less-garbage:
Optimize filename:basename/1 to produce less garbage
Optimize filename:extension/1 to produce less garbage
sys.c for Unix: Undo caching of utsname in os_flavor()
Pre-build the tuples returned by os:type/0 and os:version/0
|
|
|
|
In most cases, we can simply return a tail of the flattened
filename.
|
|
|
|
|
|
Allow schema operation even if not all nodes are upgraded to
latest version.
|
|
|
|
Aviods failing/wobbling testcase. Mnesia mishandled supervisors.
|
|
* bjorn/fun-improvements/OTP-9667:
sys_pre_expand: Remove incorrect comment
compiler: Eliminate use of deprecated erlang:hash/2
beam_asm: Fix broken NewIndex in fun entries
beam_asm: Strenghten the calculation of Uniq for funs
|
|
* bjorn/external-funs/OTP-9643:
EEP-23: Allow variables in fun M:F/A
Reference manual: Improve the documentation for external funs
Test calling a parameterized module within a fun
beam_loader: Support external funs in the literal pool
|
|
sys_pre_expand does not keep track of used or new variables (and have
not done since about the time Core Erlang was introduced).
|
|
Now that beam_asm computes the Index and Uniq values for funs, there
is no need to compute those values in the sys_pre_expand and v3_kernel
modules, thus eliminating the calls to the deprecated erlang:hash/2
function.
It would be tempting to stop generating the name for the fun in
sys_pre_expand so that we did not have to add the Info field to a tuple.
But:
* The debugger depends on the name being there. (Simple solution:
Let the debugger generate the name itself.)
* When a fun has been inlined into another function, the fun name in
'id' annotation will be used to notice the inlining and change the
final clause of the top-level case from generating a 'function_clause'
exception to a case_clause exception. (Possible workaround: Have the
inliner set an inlined attribute on functions that have been inlined, or
have the inliner rewrite 'function_clause' exceptions itself.)
|
|
The calculation of the NewIndex field in fun entries is broken: the
sys_pre_expand and v3_kernel modules keep separate index counters
starting at zero; thus there is no guarantee that each fun within a
module will have its own unique NewIndex.
We don't really need the NewIndex any more (see below), but since
we do need the NewUniq field, we should fix NewIndex for cleanliness
sake. The simplest way is to assign NewIndex as late as possible,
namely in beam_asm, and to set it to the same value as Index.
Historical Note: Why NewIndex Was Introduced
There was once an idea that the debugger should be able to interpret
only a single function in a module (for speed). To make sure that
interpreted funs could be called from BEAM code and vice versa,
the fun identification must be visible in the abstract code.
Therefore a NewIndex field was introduced in each fun in the abstract
code.
However, it turned out that interpreting single functions does not
play well with aggressive code optimization. For example, in this
code:
f() ->
X = 1,
fun() -> X+2 end.
the variable X will seem to be free in the fun, but an aggressive
optimizer will replace X with 1 in the fun; thus the fun will no
longer have any free variables. Therefore, the debugger will always
interpret entire modules.
|
|
Funs are identified by a triple, <Module,Uniq,Index>, where Module is
the module name, Uniq is a 27 bit hash value of some intermediate
representation of the code for the fun, and index is a small integer.
When a fun is loaded, the triple for the fun will be compared to
previously loaded funs. If all elements in the triple in the newly
loaded fun are the same, the newly loaded fun will replace the previous
fun. The idea is that if Uniq are the same, the code for the fun is also
the same.
The problem is that Uniq is only based on the intermediate representation
of the fun itself. If the fun calls local functions in the same module,
Uniq may remain the same even if the behavior of the fun has been changed.
See
http://erlang.org/pipermail/erlang-bugs/2007-June/000368.htlm
for an example.
As a long-term plan to fix this problem, the NewIndex and NewUniq
fields was added to each fun in the R8 release (where NewUniq is the
MD5 of the BEAM code for the module). Unfortunately, it turns
out that the compiler does not assign unique value to NewIndex (if it
isn't tested, it doesn't work), so we cannot use the
<Module,NewUniq,NewIndex> triple as identification.
It would be possible to use <Module,NewUniq,Index>, but that seems
ugly. Therefore, fix the problem by making Uniq more unique by
taking 27 bits from the MD5 for the BEAM code. That only requires
a change to the compiler.
Also update a test case for cover, which now fails because of the
stronger Uniq calculation. (The comment in test case about why the
Pid2 process survived is not correct.)
|
|
Currently, the external fun syntax "fun M:F/A" only supports
literals. That is, "fun lists:reverse/1" is allowed but not
"fun M:F/A".
In many real-life situations, some or all of M, F, A are
not known until run-time, and one is forced to either use
the undocumented erlang:make_fun/3 BIF or to use a
"tuple fun" (which is deprecated).
EEP-23 suggests that the parser (erl_parse) should immediately
transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have
not followed that approach in this implementation, because we
want the abstract code to mirror the source code as closely
as possible, and we also consider erlang:make_fun/3 to
be an implementation detail that we might want to remove in
the future.
Instead, we will change the abstract format for "fun M:F/A" (in a way
that is not backwards compatible), and while we are at it, we will
move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)"
from sys_pre_expand down to the v3_core pass. We will also update
the debugger and xref to use the new format.
We did consider making the abstract format backward compatible if
no variables were used in the fun, but decided against it. Keeping
it backward compatible would mean that there would be different
abstract formats for the no-variable and variable case, and tools
would have to handle both formats, probably forever.
Reference: http://www.erlang.org/eeps/eep-0023.html
|
|
Merge branch 'ssl-cbc-fix'
* ssl-cbc-fix:
fix handling of block_decipher/5 failure
|
|
OTP-9604
Merge branch 'bmk/megaco/20111003/improving_mstone1/OTP-9604' into bmk/megaco/r15_integration
Conflicts:
lib/megaco/doc/src/notes.xml
|
|
H�kan Mattsson.
OTP-9679
Merge branch 'bmk/megaco/improving_profiling_tool/OTP-9679' into bmk/megaco/r15_integration
|
|
OTP-9679
|
|
Allow line/1 instructions to be part of a sequence of floating point
instructions to avoid outputting fclearerror / fcheckerror around
every floating point instruction.
|
|
It is tempting to transform code such as:
fun(X) -> M:foo(X) end
to:
fun M:foo/1
Unfortunately, that transformation is not safe if
M happens to be a parameterized module. Add a test
case so that we don't attempt to do such an optimization
in the future.
|
|
|
|
|
|
* lukas/kernel/tc_fixes:
Kill nodes inbetween tests
|
|
OTP-9673
|
|
* lukas/megaco/remove_driver_warning/OTP-9672:
Remove the warning that driver option is replaced by nif
|
|
|
|
* siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644:
Adjust ttb_SUITE to work better on windows
Cleanup after testcases in ttb_SUITE
|
|
* siri/observer/close-ip-to-file-trace-port/OTP-9665:
Close ip_to_file trace port in ttb:stop
|
|
These dependency files was once used when building the documentation,
but are no longer needed.
|
|
Some applications still have support for an ancient documentation
build system. Eliminate the DOCSUPPORT define in otp.mk.in and the
not taken arm of the ifdefs in the Makefiles.
|
|
* bjorn/eliminate-regexp-usage:
erl_tidy: Eliminate two references to 'regexp' in the documentation
erts/z_SUITE: Eliminate use of deprecated regexp module
erts/nt_SUITE: Eliminate use of deprecated regexp module
erl_html_tools: Eliminate mention of deprecated regexp module
erl_interface tests: Eliminate use of deprecated regexp module
tools test suite: Eliminate compilation warnings for the eed module
tools test suite: Eliminate use of deprecated regexp module
xmerl test suite: Eliminate use of deprecated regexp module
appmon: Eliminate use of deprecated regexp module
tv: Eliminate use of deprecated regexp module
gs: Eliminate use of deprecated regexp module
inviso: Eliminate use of deprecated regexp module
|
|
|
|
|
|
|
|
Also extend the test suite so that the changed code will be
executed.
|
|
|
|
This is a relay port opened from the IP trace client when tracing
diskless nodes. The port was not closed properly in ttb:stop, which
caused problems on windows since the file could not be moved to the
upload directory before the file descriptor was closed.
|
|
There is a problem with long paths on windows, which causes some of
the ttb logs in this suite not to be created. To go around this, the
original priv_dir from the Config is no longer used for writing the
logs. Instead a new priv_dir is created in the data_dir - which makes
the path much shorter.
There is also a problem caused by the lower resolution of the system
clock on windows. It makes the test cases for sorting trace messages
fail. To get around this a sleep of 2 ms is added in "appropriate
places", and also the messages sent between client and server when
creating the trace log for these test cases is now better synched.
The cleanup functions, which terminate slave nodes, was called in
end_per_testcase. However, it seems to be a bug in the test_server
which causes this to hang if the test case failed with a
timetrap_timeout. Workaround for this is to do the cleanup in
init_per_testcase instead - i.e. make sure that nodes that are to be
started by the test case do not already live when the test case
starts.
|
|
Slave nodes were earlier stopped inside each test case. If a test case
failed before this point, a slave node would survive and it might
interfere with the next test case causing multiple failures. This
commit moves the stopping of slave nodes out to a separate function
for each test case - called during end_per_testcase.
A minor correction is also done in ttb:ensure_no_overloaded_nodes -
the reply message sent back from the ttb process is tagged so only the
expected message will be picked from the message queue. Otherwise, for
instance nodedown messages from the monitoring of slave nodes (by the
test cases) could be received here.
Finally, the sleep timer when waiting for trace messages to arrive
over tcp/ip is extended a bit since test cases sometimes failed with
missing trace messages here.
|
|
'siri/runtime_tools/dbg-flush-trace-file-driver-before-stop/OTP-9651'
* siri/runtime_tools/dbg-flush-trace-file-driver-before-stop/OTP-9651:
Flush trace file driver before stopping dbg
|
|
|