aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-04-18Merge branch 'bjorn/erts/beam_load'Björn Gustavsson
* bjorn/erts/beam_load: Optimize get_tuple_element instructions that target Y registers Mend beam_SUITE:packed_registers/1 Correct unpacking of 3 operands on 32-bit archictectures Eliminate misleading #ifdef ARCH_64 in beam_opcodes.h beam_debug: Correct masking when unpacking packed operands
2016-04-15Update preloaded modulesLukas Larsson
2016-04-15Merge branch 'lukas/erts/tracer-module-and-more/PR-1009/OTP-10268'Lukas Larsson
* lukas/erts/tracer-module-and-more/PR-1009/OTP-10268: (26 commits) erts: Don't trace on link events when port is dead erts: more logging in trace_bif_SUITE trace_bif_return erts: Make trace_delivered go via sys msg dispatcher again erts: Add comment about future trace optimizations erts: Optimize tracer reload test erts: Document erlang:match_spec_test/3 runtime_tools: Make dbg work with erl_tracer modules runtime_rools: Allow new timestamp trace flags runtime_tools: Lots of dbg docs updates erts: Deallocate heap fragments from trace nif calls eprof: Fix tests after tracer module incompatabilities fprof: update to work with new spawned trace event erts: Add 'spawned' trace event to 'procs' trace flag erts: send and receive no longer need status lock erts: Do 'unregister' as "self-tracing" erts: Silence harmless valgrind warning in dec_term erts: Fix end_per_testcase crash in local_trace_SUITE observer: Update ttb to work with tracing on ports runtime_tools: Update dbg to work with tracing on ports erts: Add tracing examples in match spec docs ...
2016-04-15erts: Don't trace on link events when port is deadLukas Larsson
2016-04-15erts: more logging in trace_bif_SUITE trace_bif_returnLukas Larsson
2016-04-15erts: Make trace_delivered go via sys msg dispatcher againLukas Larsson
This is needed as otherwise messages from system_profile will not be guaranteed to arrive before trace delivered.
2016-04-15erts: Add comment about future trace optimizationsLukas Larsson
2016-04-15erts: Optimize tracer reload testLukas Larsson
Without off_heap message queue the GC of the tracer could take very long and thus delay the code:purge which would in turn allow the trace generator to generate a lot of more messages which would make the tracer GC for even longer etc etc. The time taken for the testcase could go up to as large as 10 seconds and use lots of memory.
2016-04-15erts: Document erlang:match_spec_test/3Lukas Larsson
OTP-13501
2016-04-15runtime_tools: Make dbg work with erl_tracer modulesLukas Larsson
OTP-13500
2016-04-15runtime_rools: Allow new timestamp trace flagsLukas Larsson
OTP-13502
2016-04-15runtime_tools: Lots of dbg docs updatesLukas Larsson
2016-04-15erts: Deallocate heap fragments from trace nif callsLukas Larsson
Any heap fragment created during a nif call to a tracer nif should be free'd immediately in order for the GC not to treat it as live data.
2016-04-15eprof: Fix tests after tracer module incompatabilitiesLukas Larsson
2016-04-15fprof: update to work with new spawned trace eventLukas Larsson
OTP-13499
2016-04-15erts: Add 'spawned' trace event to 'procs' trace flagLukas Larsson
OTP-13497 This trace event is triggered when a process is created from the process that is created.
2016-04-15erts: send and receive no longer need status lockLukas Larsson
Rickards said that this was ok
2016-04-15erts: Do 'unregister' as "self-tracing"Sverker Eriksson
We have the main lock on rp->p, so why not?
2016-04-15erts: Silence harmless valgrind warning in dec_termSverker Eriksson
provoked by nif_SUITE:nif_binary_to_term. If we fail to decode an immediate (unsafe atom for example) with a dummy factory then hp and factory->hp will both be uninitialized and valgrind will complain about comparing them.
2016-04-15erts: Fix end_per_testcase crash in local_trace_SUITELukas Larsson
2016-04-15observer: Update ttb to work with tracing on portsLukas Larsson
OTP-13500
2016-04-15runtime_tools: Update dbg to work with tracing on portsLukas Larsson
OTP-13500
2016-04-15erts: Add tracing examples in match spec docsLukas Larsson
2016-04-15erts: Remove fake schedule testcaseLukas Larsson
Tracing to port in non-smp now creates port tasks instead of calling directly to the port to fake schedule events don't exist any more.
2016-04-15erts: Fix FPE bug in erl_nifSverker Eriksson
erts_block/unblock_fpe should only be called at entry to/exit from native user code.
2016-04-15erts: Extend process and port tracingLukas Larsson
This commit completes the tracing for processes so that all messages sent by a process (via nifs or otherwise) will be traced. The commit also adds tracing of all types of events from ports. When enabling tracing using erlang:trace, the 'all' flag now also enables tracing on all ports. OTP-13496
2016-04-15erts: Implement tracer modulesLukas Larsson
Add the possibility to use modules as trace data receivers. The functions in the module have to be nifs as otherwise complex trace probes will be very hard to handle (complex means trace probes for ports for example). This commit changes the way that the ptab->tracer field works from always being an immediate, to now be NIL if no tracer is present or else be the tuple {TracerModule, TracerState} where TracerModule is an atom that is later used to lookup the appropriate tracer callbacks to call and TracerState is just passed to the tracer callback. The default process and port tracers have been rewritten to use the new API. This commit also changes the order which trace messages are delivered to the potential tracer process. Any enif_send done in a tracer module may be delayed indefinitely because of lock order issues. If a message is delayed any other trace message send from that process is also delayed so that order is preserved for each traced entity. This means that for some trace events (i.e. send/receive) the events may come in an unintuitive order (receive before send) to the trace receiver. Timestamps are taken when the trace message is generated so trace messages from differented processes may arrive with the timestamp out of order. Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer module tracers and also the backwards compatible arguments. OTP-10267
2016-04-15erts: Add erts_nif_get_funcs and erts_nif_call_functionLukas Larsson
These are convinience functions for calling nifs from erts
2016-04-15erts: Calculate flatmap value offsetLukas Larsson
2016-04-15Merge branch 'lukas/erts/enif_send_null_env/OTP-13495'Lukas Larsson
* lukas/erts/enif_send_null_env/OTP-13495: erts: Add enif_send with NULL as msg env
2016-04-15Merge branch 'egil/erts/fix-erlang-system_profile/ERL-126/OTP-13494'Björn-Egil Dahlberg
* egil/erts/fix-erlang-system_profile/ERL-126/OTP-13494: erts: Enhance system_profile tests erts: Don't use function location when process is terminating
2016-04-15Merge branch 'paulgray/inet_db_fix/PR-949/OTP-13470'Raimo Niskanen
* paulgray/inet_db_fix/PR-949/OTP-13470: Fix start timestamp instead of time check Allow to refresh resolver settings on startup
2016-04-14Merge branch 'binarin/erts/fix-epmd-systemd-notifications/PR-999/OTP-13493'Björn-Egil Dahlberg
* binarin/erts/fix-epmd-systemd-notifications/PR-999/OTP-13493: Don't send unasked for systemd notifications
2016-04-14erts: Enhance system_profile testsBjörn-Egil Dahlberg
2016-04-14erts: Don't use function location when process is terminatingBjörn-Egil Dahlberg
2016-04-14Merge branch 'sverker/erts/open_port-improper-args.ERL-127.OTP-13489'Sverker Eriksson
2016-04-14Merge branch 'egil/fix-dyntrace-test'Björn-Egil Dahlberg
* egil/fix-dyntrace-test: runtime_tools: Skip dyntrace test if LTTng is enabled
2016-04-14Optimize get_tuple_element instructions that target Y registersBjörn Gustavsson
Several improvements in the compiler (e.g. c288ab87fd6) has lead to an Y register being the target for get_tuple_element instructions. Therefore, introduce i_get_tuple_element2y that combines two consecutive get_tuple_element instructions that target Y registers.
2016-04-14Mend beam_SUITE:packed_registers/1Björn Gustavsson
packed_registers/1 may have actually tested put_list/3 instructions with high register numbers at some time. Currently, the compiler will generate code that only uses low register numbers. Totally rewrite the test case. It is difficult to arrange so that put_list/3 uses three high register numbers, so we will use get_list/3 instructions with high register numbers.
2016-04-14Correct unpacking of 3 operands on 32-bit archictecturesBjörn Gustavsson
0a4750f91c83 optimized unpacking by removing a mask operation when unpacking three packed operands. Unfortunately, that optimization is only safe on 64-bit architectures. Here is what happens on 32-bit architectures. The operands to be packed are 10-bit register numbers that have been turned into byte offsets: aaaaaaaaaa00 bbbbbbbbbb00 cccccccccc00 They can be packed into a single word like this: 30 20 10 0 | | | | aa aaaaaaaabb bbbbbbbbcc cccccccc00 If we call the packed word P, the original operands can be extracted like this: C = P band 2#111111111100 B = (P bsr 10) band 2#111111111100 A = (P bsr 20) band 2#111111111100 The bug was that A was extracted without the masking: A = P bsr 20 That would give A the value: aaaaaaaaaaaabb That would only be safe if the two most significant bits in B were zeroes.
2016-04-14Eliminate misleading #ifdef ARCH_64 in beam_opcodes.hBjörn Gustavsson
There is a '#ifdef ARCH_64' beam_opcodes.h, which might make you think that files generated by beam_makeops will work for both 32-bit and 64-bit architectures. They will not. beam_makeops will generate different code depending on its -wordsize option.
2016-04-14beam_debug: Correct masking when unpacking packed operandsBjörn Gustavsson
2016-04-13runtime_tools: Skip dyntrace test if LTTng is enabledBjörn-Egil Dahlberg
2016-04-13Merge branch 'egil/erts/opt-list_append/OTP-13487'Björn-Egil Dahlberg
* egil/erts/opt-list_append/OTP-13487: erts: Optimize '++' operator
2016-04-13Merge branch 'egil/tools/modernize-tests'Björn-Egil Dahlberg
* egil/tools/modernize-tests: tools: Don't divide by zero in tests Fix instruments_SUITE sumblock check Eliminate use of doc and suite clauses Replace ?t with test_server Use test_server:is_debug/0 instead of custom check Replace use of test_server:format/2 with io:format/2 Eliminate use of ?config() macro Eliminate use of test_server:fail/0,1 Eliminate erlang:now/0 Modernize use of timetraps Remove ?line macros
2016-04-13erts: Improve port_SUITE:bad_envSverker Eriksson
It's not just ok to throw badarg, it MUST throw badarg.
2016-04-13erts: Fix bug in open_port with {args,ImproperList}Sverker Eriksson
2016-04-13tools: Don't divide by zero in testsBjörn-Egil Dahlberg
2016-04-13Merge branch 'siri/otp-19-vsns'Siri Hansen
* siri/otp-19-vsns: Update version of common_test for OTP-19 Update versions
2016-04-13Merge branch 'siri/ct/mods-in-app-file/OTP-13475'Siri Hansen
* siri/ct/mods-in-app-file/OTP-13475: Don't add explicit path to ct_release_test Add missing modules to common_test.app.src