Age | Commit message (Collapse) | Author | |
---|---|---|---|
2016-05-10 | erts: Skip alloc_SUITE:erts_mmap if ERL_ZFLAGS | Sverker Eriksson | |
contains flags for super carrier +MMsc* | |||
2016-05-10 | erts: Implement max_heap_size process flag | Lukas Larsson | |
The max_heap_size process flag can be used to limit the growth of a process heap by killing it before it becomes too large to handle. It is possible to set the maximum using the `erl +hmax` option, `system_flag(max_heap_size, ...)`, `spawn_opt(Fun, [{max_heap_size, ...}])` and `process_flag(max_heap_size, ...)`. It is possible to configure the behaviour of the process when the maximum heap size is reached. The process may be sent an untrappable exit signal with reason kill and/or send an error_logger message with details on the process state. A new trace event called gc_max_heap_size is also triggered for the garbage_collection trace flag when the heap grows larger than the configured size. If kill and error_logger are disabled, it is still possible to see that the maximum has been reached by doing garbage collection tracing on the process. The heap size is defined as the sum of the heap memory that the process is currently using. This includes all generational heaps, the stack, any messages that are considered to be part of the heap and any extra memory the garbage collector may need during collection. In the current implementation this means that when a process is set using on_heap message queue data mode, the messages that are in the internal message queue are counted towards this value. For off_heap, only matched messages count towards the size of the heap. For mixed, it depends on race conditions within the VM whether a message is part of the heap or not. Below is an example run of the new behaviour: Eshell V8.0 (abort with ^G) 1> f(P),P = spawn_opt(fun() -> receive ok -> ok end end, [{max_heap_size, 512}]). <0.60.0> 2> erlang:trace(P, true, [garbage_collection, procs]). 1 3> [P ! lists:duplicate(M,M) || M <- lists:seq(1,15)],ok. ok 4> =ERROR REPORT==== 26-Apr-2016::16:25:10 === Process: <0.60.0> Context: maximum heap size reached Max heap size: 512 Total heap size: 723 Kill: true Error Logger: true GC Info: [{old_heap_block_size,0}, {heap_block_size,609}, {mbuf_size,145}, {recent_size,0}, {stack_size,9}, {old_heap_size,0}, {heap_size,211}, {bin_vheap_size,0}, {bin_vheap_block_size,46422}, {bin_old_vheap_size,0}, {bin_old_vheap_block_size,46422}] flush(). Shell got {trace,<0.60.0>,gc_start, [{old_heap_block_size,0}, {heap_block_size,233}, {mbuf_size,145}, {recent_size,0}, {stack_size,9}, {old_heap_size,0}, {heap_size,211}, {bin_vheap_size,0}, {bin_vheap_block_size,46422}, {bin_old_vheap_size,0}, {bin_old_vheap_block_size,46422}]} Shell got {trace,<0.60.0>,gc_max_heap_size, [{old_heap_block_size,0}, {heap_block_size,609}, {mbuf_size,145}, {recent_size,0}, {stack_size,9}, {old_heap_size,0}, {heap_size,211}, {bin_vheap_size,0}, {bin_vheap_block_size,46422}, {bin_old_vheap_size,0}, {bin_old_vheap_block_size,46422}]} Shell got {trace,<0.60.0>,exit,killed} | |||
2016-05-09 | Merge branch 'sverker/system_info-erts_mmap/OTP-13560' | Sverker Eriksson | |
2016-05-09 | Merge branch 'sverker/trace-send-receive-matchspec/OTP-13507' | Sverker Eriksson | |
2016-05-04 | erts: Add send and 'receive' to trace_info/2 | Sverker Eriksson | |
to obtain match specs | |||
2016-05-04 | erts: Change receive matchspec to [NodeOrOther, Pid, Msg] | Sverker Eriksson | |
2016-05-04 | erts: Add Sender in 'receive' trace matchspec | Sverker Eriksson | |
All 'EXIT' and monitor messages are sent from 'system' Timeouts are "sent" from 'clock_service' | |||
2016-05-04 | erts: Add matchspec restrictions for 'receive' trace | Sverker Eriksson | |
and non-call-trace. This is the easy way out to avoid difficult locking scenarios when accessing tracing flags on another process. | |||
2016-05-04 | erts: Add matchspec to 'receive' trace | Sverker Eriksson | |
2016-05-04 | erts: Add match spec for send trace | Sverker Eriksson | |
2016-05-04 | Merge branch 'rickard/reds-fix/master/OTP-13512' | Rickard Green | |
* rickard/reds-fix/master/OTP-13512: Ensure correct reduction counting | |||
2016-05-04 | Ensure correct reduction counting | Rickard Green | |
2016-05-03 | Merge branch 'egil/erts/doc-lttng-beam-tps/OTP-10282' | Björn-Egil Dahlberg | |
* egil/erts/doc-lttng-beam-tps/OTP-10282: erts: Rename LTTng tracepoint aio_pool_add to aio_pool_put erts: Change argument order for LTTng driver_stop runtime_tools: Document BEAM lttng tracepoints | |||
2016-05-03 | Merge branch 'lukas/erts/rename_xmqd_to_hmqd/OTP-13366' | Lukas Larsson | |
* lukas/erts/rename_xmqd_to_hmqd/OTP-13366: erts: Rename erl flag +xmqd to +hmqd in erlexec Fix proc_lib message_queue_data spec erts: Fix total_heap_size calculation for on_heap erts: Rename erl flag +xmqd to +hmqd | |||
2016-05-03 | Merge branch 'lukas/erts/tracing/misc_fixes/OTP-13503' | Lukas Larsson | |
* lukas/erts/tracing/misc_fixes/OTP-13503: erts: Add test for new procs trace with spawn_link kernel: Remove seq_trace event order dep in tc erts: Add tests for set on link tracing erts: Expand trace tests for refc binaries erts: Remove erl_tracer with invalid state erts: Remove some dead code erts: Fix broken doc link to erl_tracer Conflicts: erts/emulator/beam/erl_trace.c | |||
2016-05-02 | erts: Rename LTTng tracepoint aio_pool_add to aio_pool_put | Björn-Egil Dahlberg | |
* Be consistent. | |||
2016-04-29 | Merge branch 'egil/erts/tracing-support-lttng/OTP-13532' | Björn-Egil Dahlberg | |
* egil/erts/tracing-support-lttng/OTP-13532: (28 commits) runtime_tools: User's guide to LTTng and dyntrace runtime_tools: Fix Dtrace build erts: Fix gc messages in tracer_SUITE erts: Fix gc messages in sensitive_SUITE erts: Fix gc messages in trace_port_SUITE tools: Update fprof tests tools: Update fprof with new gc traces runtime_tools: Update dyntrace_lttng_SUITE tests runtime_tools: Add 'return_to' for call tracing erts: Fix return_to trace callback erts: Update erl_tracer documentation erts: Fix erl_tracer documentation typos Update preloaded erl_tracer.beam erts: Update erl_tracer type specs runtime_tools: Add lttng dyntrace tests runtime_tools: Extend 'trace' and 'enabled' tracer callbacks erts: Extend 'enabled' and 'trace' tracer callbacks runtime_tools: Extend 'enabled' tracer callbacks erts: Extend 'enabled' tracer callbacks runtime_tools: Update lttng garbage collection trace ... | |||
2016-04-29 | erts: Fix gc messages in tracer_SUITE | Björn-Egil Dahlberg | |
2016-04-29 | erts: Fix gc messages in sensitive_SUITE | Björn-Egil Dahlberg | |
2016-04-29 | erts: Fix gc messages in trace_port_SUITE | Björn-Egil Dahlberg | |
2016-04-27 | erts: Add tests for maps:take/2 | Björn-Egil Dahlberg | |
2016-04-26 | erts: Add test for new procs trace with spawn_link | Lukas Larsson | |
2016-04-26 | erts: Add tests for set on link tracing | Lukas Larsson | |
2016-04-26 | erts: Expand trace tests for refc binaries | Lukas Larsson | |
Make sure to cover all of the refc binary cases in tracing | |||
2016-04-26 | erts: Fix total_heap_size calculation for on_heap | Lukas Larsson | |
2016-04-26 | erts: Rename erl flag +xmqd to +hmqd | Lukas Larsson | |
Flags that control the heap should all fall under the +h flag | |||
2016-04-20 | erts: Produce statistics for literal and hipe super carriers | Sverker Eriksson | |
called 'literal_mmap' and 'exec_mmap'. Also moved existing erts_mmap info from 'mseg_alloc' to its own system_info({allocator, erts_mmap}) with "allocators" default_mmap, literal_mmap and exec_mmap. | |||
2016-04-18 | Merge 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-15 | erts: more logging in trace_bif_SUITE trace_bif_return | Lukas Larsson | |
2016-04-15 | erts: Optimize tracer reload test | Lukas 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-15 | erts: Add 'spawned' trace event to 'procs' trace flag | Lukas Larsson | |
OTP-13497 This trace event is triggered when a process is created from the process that is created. | |||
2016-04-15 | erts: Fix end_per_testcase crash in local_trace_SUITE | Lukas Larsson | |
2016-04-15 | erts: Remove fake schedule testcase | Lukas 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-15 | erts: Extend process and port tracing | Lukas 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-15 | erts: Implement tracer modules | Lukas 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-15 | Merge 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-15 | Merge 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-14 | erts: Enhance system_profile tests | Björn-Egil Dahlberg | |
2016-04-14 | Merge branch 'sverker/erts/open_port-improper-args.ERL-127.OTP-13489' | Sverker Eriksson | |
2016-04-14 | Mend beam_SUITE:packed_registers/1 | Bjö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-13 | erts: Improve port_SUITE:bad_env | Sverker Eriksson | |
It's not just ok to throw badarg, it MUST throw badarg. | |||
2016-04-13 | erts: Fix bug in open_port with {args,ImproperList} | Sverker Eriksson | |
2016-04-13 | Merge branch 'henrik/update-copyrightyear' | Henrik Nord | |
* henrik/update-copyrightyear: update copyright-year | |||
2016-04-12 | Merge branch 'sverk/big-external-creations.OTP-13488' | Sverker Eriksson | |
2016-04-08 | Additional logging for alloc_SUITE | Björn-Egil Dahlberg | |
2016-04-08 | Replace test_server:os_type/0 with os:type/0 | Björn-Egil Dahlberg | |
2016-04-08 | Let low_prio test run a bit longer | Björn-Egil Dahlberg | |
2016-04-08 | Increase timetrap for atom_roundtrip_r15b | Björn-Egil Dahlberg | |
2016-04-08 | Remove unnecessary ct boilerplate in suite | Björn-Egil Dahlberg | |
2016-04-08 | Don't divide by zero in test logging | Björn-Egil Dahlberg | |