Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-03-15 | Tracing MatchSpec docs update | Vladimir 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. | |||
2016-09-01 | doc: Correct errors introduced by Editorial changes | Hans Bolinder | |
Fix some older errors as well. | |||
2016-07-13 | erts: Review of documentation changes | Lukas Larsson | |
2016-07-13 | erts: Editorial changes | xsipewe | |
2016-05-12 | erts: Add send/receive trace to match spec user guide | Sverker Eriksson | |
Introduce section/terminology "Match target". | |||
2016-05-12 | erts: Fix confusion among match spec examples | Sverker Eriksson | |
Tracing and ETS examples were not separated correctly under the corresponding headings. | |||
2016-04-15 | erts: Add tracing examples in match spec docs | Lukas Larsson | |
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-03-15 | update copyright-year | Henrik Nord | |
2015-06-18 | Change license text to APLv2 | Bruce Yinhe | |
2014-08-20 | Properly support maps in match_specs | Anthony Ramine | |
2013-04-19 | Convert XML files to UTF-8 | Hans Bolinder | |
2012-03-30 | Update copyright years | Björn-Egil Dahlberg | |
2012-01-26 | Remove references to is_constant/1 from the match spec documentation | Björn Gustavsson | |
is_constant/1 was removed in R13B. | |||
2010-06-02 | Add match_specification grammar documentation specifically for ets | Patrik Nyblom | |
2010-05-17 | Fix typo in code example | Raimo Niskanen | |
Reported by Uwe Dauernheim. | |||
2010-02-10 | OTP-8422 Removed bogus "\011" character sequence in documentation. | Hans Bolinder | |
2009-11-20 | The R13B03 release.OTP_R13B03 | Erlang/OTP | |